00:00:47 <arseniiv> zzo38: But, what with instruction set? => didn’t think about it, but it would be nice if it somehow anticipated using algebraic datatypes in a language compiled to it
00:02:14 <arseniiv> and it would should have a minimalistic instruction set
00:11:07 <shachaf> zzo38: What's the problem with parentheses and spaces?
00:14:44 <zzo38> The fields in that file are separated by spaces, and there is parentheses around it, but how can you parse it if the filename contains parentheses and spaces?
00:15:25 <shachaf> Oh, I misread that as /proc/$$/comm somehow.
00:24:43 <shachaf> zzo38: I found the answer.
00:24:53 <shachaf> zzo38: First you look for the leftmost (, and then you look for the rightmost )
00:24:59 <shachaf> And the comm is between them.
00:25:08 <shachaf> This is what ps does, at least.
00:25:28 <shachaf> https://github.com/thlorenz/procps/blob/master/deps/procps/proc/readproc.c#L516
00:25:51 <zzo38> Well, I suppose that will work (as long as no other parentheses are possible in that file, which as far as I can tell is the case), although it doesn't seem a very good design.
00:26:15 <shachaf> it's p. scow the amount of ad-hoc parsing unix makes you do to do things
00:28:30 <pikhq> I find myself kinda wishing the "everything is text" thing had motivated fewer data representations, not more.
00:29:25 <shachaf> I don't think it's that great.
00:29:56 <shachaf> Structure is good, throwing it away is a scow move
00:31:40 <pikhq> On the other hand, the period structured file systems were pretty scow.
00:32:03 <arseniiv> Structure is good, throwing it away is a scow move => +1 vive LispOS!
00:32:09 <shachaf> Well, sure, most things are scow.
00:32:20 <shachaf> But why do we gotta be stuck with the 1970s scow?
00:33:07 <pikhq> Because people are afraid of change.
00:33:42 <pikhq> To the point that you live in a country that's using 16th century scow units. :)
00:33:57 <shachaf> I think I'll give up on all computer things and just do it all myself.
00:35:07 <zzo38> UNIX is still much better than Windows though, even though there are some problem
00:36:17 <shachaf> Is it better than Windows?
00:38:22 <pikhq> Depends on where you're looking really.
00:38:24 <shachaf> A lot of the windows system calls seem better to me.
00:39:53 <zzo38> Yes, a few are in fact better, some are same, many are worse.
00:40:23 <shachaf> I haven't used other UNIX systems much.
00:40:37 <shachaf> Which parts of the Linux system call API are much better than Windows?
00:41:20 <pikhq> (Windows does not have a stable system call API at all)
00:41:32 <shachaf> I mean kernel32.dll or whatever the equivalent is.
00:41:39 <zzo38> Yes, that is much of why Windows is worse.
00:41:48 <shachaf> The Windows approach seems p. reasonable?
00:41:58 <shachaf> It's like the VDSO in Linux.
00:42:11 <pikhq> Nah, kernel32.dll is not a thin wrapper.
00:42:39 <shachaf> Right, but is that a bad thing?
00:42:40 <pikhq> kernel32.dll is more analogous to glibc, if glibc was built on top of an unstable system call API.
00:43:01 <shachaf> Better for more of the stable API compatiblity layers to be in userspace rather than in the kernel.
00:43:20 <shachaf> (Then again, they do font rendering in the kernel, so, y'know.)
00:46:07 <shachaf> By the way, I didn't really realize until recently why C89 requires all variable declarations to be at the beginning of a block.
00:46:41 <shachaf> It's really laying out a stack frame, just like a struct etc.
00:47:32 <shachaf> Compilers have been ignoring that completely and doing much fancier allocation for a long time so it didn't really occur to me.
00:47:34 <pikhq> Yeah, and period compilers were generally very simple.
00:51:23 <shachaf> Windows debugging-related system calls seem much nicer than ptrace.
00:51:46 <shachaf> And I hear IOCP is p. good?
00:52:44 <pikhq> IOCP is a mixed bag. When it works it's great, but it requires a client-side buffer for each request, and in some cases *can block anyways*.
00:53:00 <shachaf> That's true for a lot of Linux APIs too. :-(
00:53:11 <pikhq> Yeah, and I'm harsh on them for the same exact reasons!
00:53:28 <shachaf> I don't understand why they don't just give you an API where everything is asynchronous.
00:53:59 <shachaf> Where you can do socket I/O and file I/O and it's guaranteed not to block the OS thread.
00:54:23 <pikhq> Yeah, it makes some things really painful not having that.
00:54:41 <pikhq> Thread pools for async IO should not be a thing that people actually do.
00:54:46 <shachaf> Instead it's a mess of different APIs for different things and they have strange restrictions and some things can block anyway.
00:55:01 <shachaf> So you have to use a thread pool, yep.
00:55:30 <shachaf> And it's just so much effort for so much wasted work! To make the thread pool work it has to be doing lots of extra work I don't want!
00:55:45 <pikhq> You can make it work that way, but it really feels like just reimplementing a part of the kernel because the kernel can't be bothered to expose it to you.
01:01:21 -!- arseniiv has quit (Ping timeout: 252 seconds).
01:32:53 <zzo38> Will GCC optimize out a code to switch the endian if it is already correct, in any cases?
01:33:16 <shachaf> I'm confused by that question.
01:33:49 <shachaf> Do you mean "if (IS_BIG_ENDIAN) { x = switch_endian(x); }", where IS_BIG_ENDIAN is known to be false at compile-time?
01:34:49 <shachaf> Or do you mean something along the lines of "char *p; uint32_t x = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;"?
01:35:10 <zzo38> I mean like that second way.
01:35:30 <shachaf> In the first case, it can certainly remove that dead code. In the second case, I'm pretty sure it'll recognize that and turn it into a simple instruction that reads 4 bytes at a time.
01:35:40 <shachaf> (Assuming there are no alignment issues, I guess.)
02:47:41 <Sgeo__> I wonder if there are any C64-like screen editors for shells for modern OSes
02:50:32 <Sgeo__> zzo38, you mentioned music compression? http://deepsid.chordian.net/?file=MUSICIANS/0-9/4-Mat/Empty_512_bytes.sid
02:51:29 <zzo38> I have no SID player on my computer at this time
02:51:33 <Sgeo__> The file it's playing is ... huh my copy is 630 bytes, I feel cheated
02:51:37 <Sgeo__> That website has a built in SID player
02:51:46 <zzo38> Maybe there is a header?
02:52:16 <Sgeo__> The heck? Windows tells me the size on disk is 0 bytes
02:57:35 <Sgeo__> Huh, so they measure the side of the .prg file (executable C64 can run). .sid does have a header, so yeah maybe
02:57:52 <Sgeo__> Although turning a .sid into a .prg would also involve adding a small amount of code
02:59:00 <Sgeo__> 7zip says the .sid is 618 bytes and the .prg is 510 bytes
03:04:32 <esowiki> [[Printf]] https://esolangs.org/w/index.php?diff=57485&oldid=57451 * A * (+27) Actually, mispelled word
03:04:42 <esowiki> [[Printf]] https://esolangs.org/w/index.php?diff=57486&oldid=57485 * A * (-4)
03:14:53 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
04:06:03 <Sgeo__> Someone fit the Bad Apple animation onto a single disk for the C64
04:06:13 <Sgeo__> https://csdb.dk/release/?id=131628
04:25:24 -!- bradcomp has joined.
04:31:43 -!- XorSwap has quit (Quit: the creeping crawling chaos will return.).
04:42:40 -!- bradcomp has quit (Ping timeout: 244 seconds).
05:34:03 -!- copumpkin[m] has quit (Ping timeout: 255 seconds).
05:43:16 <Sgeo__> ""The (zero) flag is probably misnamed, and should have been called the
05:48:41 -!- copumpkin[m] has joined.
05:51:08 * Sgeo__ is vaguely annoyed that 6502 asm uses "EOR" instead of "XOR"
05:54:39 <Sgeo__> "Coding to test the RUN/STOP key is often removed once testing is complete, on the assumption that no one will want to stop perfect program. Incidentally, if you plan to write nothing but 100 percent perfect programs, you will not need to use this subroutine."
08:03:58 -!- wob_jonas has joined.
08:06:17 <wob_jonas> zzo38: re "comm" field of /proc/$$/stat, see http://man7.org/linux/man-pages/man5/proc.5.html and the source of http://procps.sourceforge.net/ which has utilities like ps and top for linux and parse data from /proc , note that you may need to read /proc/$pid/status instead
08:07:31 <wob_jonas> zzo38: also, if you only want the arguments (argv or the argument list in execve), you can try /proc/$pid/cmdline
08:08:22 <wob_jonas> the format of /proc/$pid/cmdline is nul-byte-separated and so completely unambiguous
08:21:05 <wob_jonas> zzo38: You can also read the source code of Linux or of any of the open source BSDs that emulates a linux-like /proc interface. I did that to make sure that that counter somewhere in /proc that counts the number of times a new process was created was 64-bit so it can't overflow.
08:24:07 <wob_jonas> The counter is the line with "processes" in /proc/stat
08:31:59 <wob_jonas> zzo38: gcc optimize endian: in some cases yes, but it's hard to tell which those cases are, so it's easier to just steal the macro definitions from http://software.schmorp.de/pkg/libev.html , which define sane endianness swapping operations calling builtins on many compilers including gcc and msvc, and falling back to portable C on others.
08:33:19 <wob_jonas> I can also point to like five other libraries that give you endianness interface, including https://www.boost.org/doc/libs/1_68_0/libs/endian/doc/index.html , but I can't vouch for their quality,
08:35:27 <wob_jonas> whereas I have examined libev in detail and have worked with schmorp on some of libev's integer code, and I know its code is excellent.
08:36:01 <wob_jonas> Instead of libev, I mean http://software.schmorp.de/pkg/libecb.html
08:36:38 <wob_jonas> You want the functions ecb_bswap16
08:37:06 <wob_jonas> , ecb_bswap32, ecb_bswap64, ecb_big_endian, ecb_little_endian.
08:38:04 <wob_jonas> I also wanted to add macro functions for reading/writing unaligned integers, but eventually schmorp convinced me that malloc is the best solution for that, compilers already optimize it really well and it has exactly correct semantics in C and C++, my solutions were more complicated and not better.
08:48:11 -!- SopaXorzTaker has joined.
08:49:16 -!- imode has quit (Ping timeout: 268 seconds).
08:52:29 <wob_jonas> Sgeo: yes, the operation was called EOR and IOR back then, for exclusive and inclusive or. It's not xclusive to 6502.
08:52:54 <wob_jonas> I don't know when "iff" and "ssi" started.
08:53:46 -!- AnotherTest has joined.
09:10:32 <int-e> "iff" is nxor; wtf is "ssi"?
09:11:01 <int-e> (Most of my assembly exposure was intel x86, hence 'xor' rather than 'eor')
09:11:29 <shachaf> int-e: You were playing that one assembly game.
09:12:37 <int-e> shachaf: Which one, box-256, tis100, shenzhen I/O? Or the old hugi competitions?
09:13:02 <shachaf> Box-256, I think that was it.
09:17:04 <wob_jonas> and I think "iff" in the bitwise logic version is called "xnor" or "equ" rather than "nxor", but I'm not sure
09:28:57 <int-e> wob_jonas: I think you're right... and it's confusing :P
09:29:53 <int-e> (exclusive neither-nor?)
09:48:48 -!- atslash has quit (Ping timeout: 272 seconds).
09:49:46 -!- atslash has joined.
09:56:40 <wob_jonas> int-e: "exclusive nor". sounds better than "nexclusive or".
09:57:40 <wob_jonas> wait, let me check what the MMIX bitwise instructions call it... it has all 8 bitwise instructions, not just the 4 ones that are invariant to zeros
09:58:50 <int-e> wob_jonas: I've been trained to think logically... :P
09:59:45 <wob_jonas> the eight are OR ORN NOR XOR AND ANDN NAND NXOR
10:00:03 <wob_jonas> in that case there's good precedent to call it "nxor". sorry.
10:01:09 <wob_jonas> and the text gives the short name "bitwise not-exclusive-or" to that instr
10:02:29 <wob_jonas> the text might have changed in the final version, not likely, but if you want I can check at home where I have the up to date book; the instruction mnemonic can't have changed because that would break compat with MMIXAL programs whose syntax were fixed at that time
10:11:35 <int-e> yeah, seems unlikely
10:11:58 <int-e> (that the text changed from the pre-fascicle to the published fascicle)
10:23:37 <wob_jonas> in any case, "bitwise not-exclusive-or" is definitely not a so silly name that nobody would ever use it
11:13:46 -!- oerjan has joined.
12:45:42 -!- oerjan has quit (Quit: Later).
13:13:48 -!- ais523 has joined.
13:14:31 <lambdabot> You have 1 new message. '/msg lambdabot @messages' to read it.
13:21:26 -!- vertrex has quit (Ping timeout: 260 seconds).
13:27:21 -!- vertrex has joined.
13:27:22 -!- vertrex has quit (Changing host).
13:27:22 -!- vertrex has joined.
13:30:12 <ais523> "don't ask to ask, just ask"
13:30:38 <ais523> it's kind-of pointless to attract someone's attention to say you're going to ask a question, and then not ask it, because there's nothing they can actually do with their attention on the channel
13:30:42 <wob_jonas> ais523: I asked on #nethack4, then noticed you're not joined there. Join there, or should I ask here?
13:31:00 <ais523> just checked #esoteric first
13:40:32 -!- sleepnap has joined.
14:02:14 -!- S_Gautam has joined.
14:13:06 -!- vertrex has quit (Ping timeout: 264 seconds).
14:14:59 -!- vertrex has joined.
14:15:00 -!- vertrex has quit (Changing host).
14:15:00 -!- vertrex has joined.
15:03:19 -!- arseniiv has joined.
15:06:08 -!- LKoen has joined.
15:10:31 -!- SopaXorzTaker has quit (Quit: Leaving).
15:16:31 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
15:36:09 -!- bradcomp has joined.
15:36:44 -!- ep100_ has joined.
15:56:54 -!- AnotherTest has quit (Ping timeout: 252 seconds).
15:58:09 -!- ais523 has quit (Quit: quit).
16:03:53 -!- digitalcold has joined.
16:23:43 -!- AnotherTest has joined.
16:23:58 <zzo38> I am making a graphics extension for SQLite. Currently I have functions GR_BLANK, GR_HCONCAT, GR_HEIGHT, GR_TEXT, GR_VCONCAT, GR_WIDTH, RGB8, RGBA8, RGB16, RGBA16, but I intend eventually will also add functions for making pie charts and other data graphics too (possibly as aggregate functions).
16:24:08 <lambdabot> fizzie said 1d 7h 31m 8s ago: I don't think you can. No matter which value q you choose to correspond to the first non-empty byte string ("\0"?), q/2 is a smaller rational and should've been chosen
16:24:08 <lambdabot> oerjan said 1d 4h 41m 57s ago: <zzo38> Can you make a correspondence between all byte strings and all rational numbers (or, possibly, all rational numbers whose denominator is a power of two), and
16:24:08 <lambdabot> have the proper ordering? <-- i think not; there are strings with no elements between them, like "" and "\0"
16:24:52 <zzo38> Do you like this graphics extension? (Note: The extension to display the graphics on the screen is a separate extension (already released, as "sqlext_xwindows"), since it uses Xlib.)
16:38:21 <zzo38> A function to convert a picture into Sixel format may also be helpful, in case you wish to display the picture inline rather than a separate window.
16:38:33 -!- atslash has quit (Quit: This computer has gone to sleep).
17:04:16 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
17:23:08 <esowiki> [[Math++]] https://esolangs.org/w/index.php?diff=57487&oldid=53054 * SuperJedi224 * (+141)
17:50:27 -!- zseri has joined.
17:50:54 -!- imode has joined.
17:53:10 -!- ep100_ has quit (Ping timeout: 244 seconds).
17:54:11 -!- SopaXorzTaker has joined.
17:55:39 -!- ep100_ has joined.
18:19:17 -!- Phantom_Hoover has joined.
18:31:48 -!- void_ has joined.
18:32:48 -!- void_ has quit (Client Quit).
19:04:12 -!- iCantBePepperdin has quit (Read error: Connection reset by peer).
19:05:41 -!- sebbu has quit (Read error: Connection reset by peer).
19:13:31 -!- sebbu has joined.
19:20:24 -!- Shragazord has joined.
19:22:32 -!- sprocklem has quit (Quit: brb).
19:25:55 -!- sprocklem has joined.
19:32:26 <esowiki> [[Alphabet Stew]] M https://esolangs.org/w/index.php?diff=57488&oldid=57287 * DMC * (+57) /* Description */
19:45:50 -!- erkin has joined.
19:52:29 <\oren\> Lol I figured out this bug only because of my memorization of the numberic values of ascii chaacters
19:53:17 <\oren\> I just happen to know that !"#$ are the first 4 ascii
20:17:24 -!- S_Gautam has joined.
20:18:01 -!- SopaXorzTaker has quit (Remote host closed the connection).
20:19:11 -!- xkapastel has quit (Quit: ERC (IRC client for Emacs 24.5.1)).
20:19:25 -!- xkapastel has joined.
20:32:06 -!- atslash has joined.
20:38:05 -!- erkin has quit (Remote host closed the connection).
20:38:54 -!- sleepnap has quit (Ping timeout: 264 seconds).
20:40:40 -!- tswett has joined.
20:42:51 <\oren\> I still think C++ syntax for pure virtual fucntions is retarded
20:44:30 <tswett> I've always thought that generally, esolangs should be designed with the best and clearest syntax possible.
20:44:37 <tswett> This means, of course, that C++ fails to meet esolang standards.
20:56:42 <tswett> Invent the best esolang based on aviation.
20:57:13 <tswett> The prize is a free ride in a glider, assuming that I have a commercial pilot's license by the time you make it to Richmond Field on a day that I'm flying there.
20:57:19 <int-e> tswett: that will never fly
20:57:31 <Taneb> int-e: let tswett have this flight of fancy
20:57:57 <tswett> I think you guys need to take the ten thousand foot view.
20:58:00 <int-e> Taneb: fair enough but I don't want to be here when it comes crashing down
20:58:17 <tswett> I think this idea could really take off.
20:59:22 <tswett> It's all a matter of having the right attitude.
21:01:29 -!- zseri has quit (Quit: Leaving).
21:02:27 <arseniiv> (personally IDK anything about aviation but that dispatching all that is really hard on people doing it and that they do it well, so there’s less incidents than with cars etc.)
21:03:31 <tswett> Now I have a completely different idea.
21:03:45 <tswett> I want to create the fastest video game ever created.
21:04:18 <tswett> You click on "start", and the Big Bang happens, and you guide the entire evolution of the universe until its heat death 20 seconds later.
21:07:34 <arseniiv> is it possible to base an esolang on keyboard cleaning procedures? I’ve cleaned mine and it was as usual full of cat hair and crumbs of something, and I have finally realized how the Enter key is supposed to be fixed correctly (there are staple-like things which allow the key to press more stable)
21:08:24 <arseniiv> tswett: too hard, interesting parts would be unnoticeable
21:10:29 -!- tromp has quit (Remote host closed the connection).
21:20:46 -!- tromp has joined.
21:39:26 -!- atslash has quit (Quit: Leaving).
21:44:57 -!- atslash has joined.
22:01:10 -!- contrapumpkin has joined.
22:01:57 -!- copumpkin has quit (Ping timeout: 240 seconds).
22:03:45 -!- ep100_ has quit (Ping timeout: 244 seconds).
22:04:46 -!- imode has quit (Ping timeout: 268 seconds).
22:09:48 -!- Melvar has quit (Ping timeout: 272 seconds).
22:11:51 -!- Melvar has joined.
22:15:09 -!- AnotherTest has quit (Ping timeout: 252 seconds).
22:28:51 -!- LKoen_ has joined.
22:29:20 -!- LKoen has quit (Read error: Connection reset by peer).
22:30:13 -!- LKoen_ has quit (Client Quit).
22:30:20 -!- LKoen has joined.
22:34:11 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
22:47:51 -!- imode has joined.
22:51:59 -!- sebbu has quit (Read error: Connection reset by peer).
22:53:51 -!- sebbu has joined.
22:56:00 -!- sebbu has quit (Remote host closed the connection).
22:56:29 -!- sebbu has joined.
22:58:00 -!- bradcomp has quit (Ping timeout: 244 seconds).
22:58:58 -!- atslash has quit (Remote host closed the connection).
23:13:22 -!- atslash has joined.
23:14:32 -!- imode has quit (Ping timeout: 244 seconds).
23:18:46 -!- atslash has quit (Ping timeout: 268 seconds).
23:19:38 -!- atslash has joined.
23:19:45 -!- arseniiv has quit (Read error: Connection reset by peer).
23:20:02 -!- arseniiv has joined.
23:22:03 -!- XorSwap has joined.
23:27:18 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
23:43:18 -!- danieljabailey has quit (Ping timeout: 252 seconds).
23:50:14 -!- danieljabailey has joined.
23:53:20 -!- rdococ has quit (Quit: CHEAPIE! What did you do to the bouncer?! :P (jk)).
23:53:31 -!- rdococ has joined.
23:53:52 -!- rdococ has quit (Changing host).
23:53:52 -!- rdococ has joined.