< 1572654187 372549 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Are pointers signed or unsigned? < 1572654222 737626 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :they could be < 1572654282 570755 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :How should I think of them? < 1572654290 110238 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :what does it actually mean though? when do you have sign/zero-extension of pointers where you could tell the difference? < 1572654360 311329 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :I do like to think that x86-64 has signed pointers the way they're usually used (with kernel space in negative addresses) < 1572654583 257448 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Right, that's the sort of thing I was thinking. < 1572654589 765925 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe it makes no difference. < 1572654627 372484 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 265 seconds < 1572654740 233146 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :. o O ( the difference is negative ) < 1572654790 785367 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: signs are pointers, so pointers should be signed, is that what you mean? < 1572654822 704519 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Exactly. < 1572654832 159756 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But then what are cosigns? < 1572654866 523240 :int-e!~noone@int-e.eu PRIVMSG #esoteric :They are orthogonal to signs. < 1572654896 366417 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric : 17: 76 06 jbe 1f < 1572654899 538896 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So confusil. < 1572654926 990366 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I just learned about gas "1f" label syntax a few days ago, and I kept thinking it was a 0x1f offset. < 1572654934 587834 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This time it actually is a 0x1f offset! < 1572654943 261356 :int-e!~noone@int-e.eu PRIVMSG #esoteric ::) < 1572654977 203038 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :(To be fair, this is objdump output, so it wouldn't use the 1f syntax.) < 1572655038 114562 :int-e!~noone@int-e.eu PRIVMSG #esoteric :To this day I find it confusing that the offset of relative jumps is relative to the address following the current instruction. < 1572655057 170810 :int-e!~noone@int-e.eu PRIVMSG #esoteric :0x19 + 0x06 = 0x1f < 1572655075 804838 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yes. < 1572655100 73056 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :In particular I was trying to figure out a jump target in gdb a few days and I computed it relative to $rip without thinking. < 1572655122 562334 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :No, not a jump target, rip-relative addressing. < 1572655141 322537 :int-e!~noone@int-e.eu PRIVMSG #esoteric :It makes sense, of course (the instruction has been decoded, and correspondingly, the IP advanced, when the jump happens) < 1572655167 922991 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(thinking in terms of *very* old processors like 8086) < 1572655229 207324 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Sure. < 1572655314 622434 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is rip-relative addressing the same way? I guess it must be but I've already forgotten. < 1572655353 668497 :int-e!~noone@int-e.eu PRIVMSG #esoteric :yes it is. < 1572655382 880260 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yep, I just checked. < 1572655403 212775 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I should know this since I implemented most of the addressing modes recently. < 1572655434 250438 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Though not some of the weird ones like 64-bit (%eax). < 1572655437 236860 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Does anyone use that? < 1572655460 803024 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Actually I think so. < 1572655469 726213 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm addr32; mov (%rax),%rdi < 1572655470 500175 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 67 48 8b 38 mov (%eax),%rdi < 1572655485 348137 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572655498 427244 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Having 32bit pointers is still attractive to conserve memory. < 1572655523 935484 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But you can use them with 64-bit registers, can't you? < 1572655543 549249 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Yes. < 1572655544 323219 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :since you get zero-extension for most operations, you can usually just use %rax with a 32-bit address and save a byte < 1572655551 298241 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :At least if you write something like mov foo, %eax; mov (%rax), bar < 1572655584 198936 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I wonder, is %eax sign-extended when you use (%eax)? < 1572655587 429563 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I imagine not. < 1572655605 932892 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But I can make up reasons... getting proper overflow behavior for (%eax + 4*%esi + 0xbase).... < 1572655637 723226 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :but what would use something like that in 64-bit code? < 1572655675 568351 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :When do you want overflow behavior for addresses? < 1572655687 89774 :int-e!~noone@int-e.eu PRIVMSG #esoteric :olsner: I *would* hope that this is a purely theoretical reason :) < 1572655697 810123 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :but an interesting side-effect if the address size affects all of the address calculation or just the size of the input registers < 1572655755 604331 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Clearly I expect that it affects the whole computation. < 1572655768 542731 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm mov (%eax,%edx), %edi < 1572655769 434886 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 67 8b 3c 10 mov (%eax,%edx,1),%edi < 1572655776 822649 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm mov (%rax,%edx), %edi < 1572655777 704489 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :​/tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: `(%rax,%edx)' is not a valid base/index expression \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: missing ')' \ /tmp/asm.s:1: Error: junk `)' after expression < 1572655790 830917 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm addr32; mov (%rax,%rdx), %edi < 1572655791 668922 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 67 8b 3c 10 mov (%eax,%edx,1),%edi < 1572655823 213393 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm addr32; gs; mov (%rax,%rdx), %edi < 1572655824 13899 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 67 65 8b 3c 10 mov %gs:(%eax,%edx,1),%edi < 1572655825 764740 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm gs; addr32; mov (%rax,%rdx), %edi < 1572655826 538273 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 65 67 8b 3c 10 mov %gs:(%eax,%edx,1),%edi < 1572655835 859399 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Just write the prefixes in any order you like. So convenient. < 1572655850 767334 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm data16; mov (%rax,%rdx), %edi < 1572655851 561367 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 66 8b 3c 10 mov (%rax,%rdx,1),%di < 1572655865 59343 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Golly. < 1572655890 272233 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm movq (%rax), %xmm0 < 1572655891 31915 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: f3 0f 7e 00 movq (%rax),%xmm0 < 1572655896 629621 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm movq (%eax), %xmm0 < 1572655897 487897 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 67 f3 0f 7e 00 movq (%eax),%xmm0 < 1572655991 48625 :int-e!~noone@int-e.eu PRIVMSG #esoteric :oh right, that was the gas syntax for these funny addressing modes < 1572656018 775243 :int-e!~noone@int-e.eu PRIVMSG #esoteric :offset(%base,%index,multiplier) < 1572656076 889717 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :possible dumb reason: someone planned/built a 32-bit x86 emulator (before compatibility mode was invented?) and convinced AMD to provide support for extra-stupid JIT compilers that just add prefixes to specific instructions < 1572656135 547758 :int-e!~noone@int-e.eu PRIVMSG #esoteric :olsner: sorry, I lost track... reason for what? < 1572656142 566847 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :for having the 32-bit override < 1572656157 842787 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ah. < 1572656171 201825 :int-e!~noone@int-e.eu PRIVMSG #esoteric :plausible enough < 1572656231 303607 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I also bet this was rather cheap to support. < 1572656296 737337 :int-e!~noone@int-e.eu PRIVMSG #esoteric :In context... which is a CPU that supports real mode (which has 32 bit addressing mode via the address size prefix) and 32 bit mode support for legacy software. > 1572656467 234520 PRIVMSG #esoteric :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=66918&oldid=66897 5* 03DmilkaSTD 5* (+179) 10/* Introductions */ > 1572656528 887367 PRIVMSG #esoteric :14[[07Esomachine14]]4 N10 02https://esolangs.org/w/index.php?oldid=66919 5* 03DmilkaSTD 5* (+3608) 10Created page with "Esomachine was made by [https://esolangs.org/wiki/User:DmilkaSTD DmilkaSTD]. Imagine we have an array with infinite length. When it starts every array index is locked (If an..." < 1572656959 938709 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :congratulations, schlock. you might get to save the galaxy single-handed... < 1572657458 971089 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru QUIT :Ping timeout: 246 seconds < 1572657857 269540 :oerjan!oerjan@sprocket.nvg.ntnu.no QUIT :Quit: Nite < 1572657933 274002 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 265 seconds < 1572658025 285599 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572658193 141846 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What other bizarro addressing modes are there in amd64? < 1572658221 627767 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also did I link this tcc SSE bug I found? https://lists.nongnu.org/archive/html/tinycc-devel/2019-10/msg00033.html < 1572658229 953848 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It was somewhat annoying to track down. < 1572660518 385769 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :what bizarro mode are you talking about < 1572660538 384180 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :the base + mult*index + offset mode is pretty reasonable, aside from the gas syntax for it < 1572660584 662788 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :with Intel syntax it'd be like MOV EDI, DWORD PTR [4*EAX + EDX + 7] < 1572660592 16968 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :or what have you < 1572660593 142098 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Sure, but you have addr32, fs/gs, rip-relative, all sorts of things. < 1572660650 514582 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Presumably there are some things I don't know about. < 1572660669 980725 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also there are all the little details, which I think I got right? < 1572660696 225522 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm lea (%r11), %rax < 1572660697 167525 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 49 8d 03 lea (%r11),%rax < 1572660698 344530 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm lea (%r12), %rax < 1572660699 113931 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 49 8d 04 24 lea (%r12),%rax < 1572660717 271997 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 265 seconds < 1572660723 620827 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :gotta include that sib byte for r12 < 1572660766 800363 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Of course I haven't done SSE/AVX/whatever at all, or the VEX prefix, or anything like that. < 1572660865 284800 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :so much nonsense < 1572660902 790753 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :what instruction encoding are you into < 1572660955 22777 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :It doesn't even have a bit-reversed addressing mode. < 1572660990 118212 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What's that? < 1572661000 649318 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :It's a thing DSPs have, for speeding up FFTs. < 1572661019 227178 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :The TI TMS320C54x at least has it. < 1572661020 488695 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`asm lea (%r13), %rax < 1572661021 287750 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0: 49 8d 45 00 lea 0x0(%r13),%rax < 1572661030 235287 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Right, r13 has a special case too. < 1572661041 291728 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :oh? < 1572661055 196713 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But I think that one is modrm+offset rather than modrm+SIB. < 1572661064 431485 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :fizzie: That sounds pretty fancy. I should learn about fancy DSP things. < 1572661079 704667 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :They also have circular addressing modes. < 1572661086 177476 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :For FIR filters and suchlike. < 1572661127 739154 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Speaking of circles, what's the nicest way to write a circular buffer? < 1572661136 293805 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I don't like having a boolean to distinguish empty from full. < 1572661170 201731 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :You can go with head + length instead of head + tail. < 1572661183 400255 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Then you have 0 and N for empty and full. < 1572661214 842325 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm, I guess. < 1572661223 855860 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :There's also that one fancy thing that I think Chrome used somewhere, or someone used somewhere. < 1572661225 96187 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What about the case where you have a separate reader and writer? < 1572661233 807352 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I know of some other tricks: < 1572661248 103323 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Map two copies of the same buffer in adjacent address space, so you get a contiguous buffer. < 1572661252 479618 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :The Bip-Buffer, that's what I was thinking of. < 1572661261 285567 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :The Bip-Buffer doesn't need the mapping trick. < 1572661289 711533 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :(On the other hand, it may waste some space.) < 1572661350 161629 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Another trick I heard about is, instead of keeping the read/written size mod the buffer size, keep the total size, and mask it at use time. < 1572661360 673458 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :bip booper < 1572661487 989822 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I can't find any reference to anyone actually using the bip-buffer, just a few random implementations, so maybe I imagined that. < 1572661506 404760 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm reading about it now. < 1572661508 997897 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :spsc-bip-buffer is "#108 in Concurrency" on lib.rs, which sounds like a TripAdvisor ranking. < 1572661604 372799 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This explanation doesn't seem very clear. < 1572661708 356592 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What's the benefit of this? < 1572661729 630739 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :what is lib.rs < 1572661739 3138 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is it that writes are always contiguous (but reads might not be)? < 1572661934 887686 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572662533 892086 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :AIUI, the reads are contiguous too. < 1572662619 961389 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe I don't understand the diagram in https://www.codeproject.com/Articles/3479/The-Bip-Buffer-The-Circular-Buffer-with-a-Twist < 1572662646 91770 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What happens in 5? From their description it looks like both A and B contain data. < 1572662675 375551 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Right, reads of multiple writes are not necessarily contiguous. < 1572662701 300303 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Maybe. < 1572662713 748516 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm. < 1572662731 494580 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I guess the idea is that a library might want to write a fixed-size thing and you want to make sure to be able to fit it in the buffer? < 1572662744 381986 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :And another library can also interpret that fixed-size thing since it's contiguous. < 1572662793 799493 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :(Or, y'know, non-fixed-size.) < 1572662797 931362 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Or, no, maybe reads of any size can be contiguous too, it's just that in stage 5 if you wanted to read more than the orange bit some copying would be involved. < 1572662811 683094 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :...or maybe not. < 1572662851 916366 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :As in copying all the data in the buffer? < 1572662857 349204 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Yeah, I was looking at the API, for reading you just ask the thing for the largest contiguous block. < 1572662858 249366 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Regular circular buffers have this property too. < 1572662864 841536 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Which API? < 1572662885 573171 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Well, the BipBuffer class described there. < 1572662900 935155 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :But I guess it's still useful, if you (say) put length-delimited protos there. < 1572662909 469242 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Oh, the one on that page. < 1572662931 766452 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I guess that's true? < 1572662936 218911 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :As long as you write the thing into one contiguous (reserved) block, the reading side can also read it as one contiguous block. < 1572662949 672807 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Right. < 1572662964 54153 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe it would be better for APIs to support reading and writing in multiple chunks. < 1572662985 305186 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Maybe. < 1572662985 891225 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I guess there's some concern that the API will want to keep an internal buffer and do some copying in order to support that. < 1572663028 827648 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I think the mmap solution is better if you want things to be contiguous. < 1572663890 877197 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 240 seconds < 1572664948 519290 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572665326 738849 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@metar lowi < 1572665327 29841 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :LOWI 020320Z AUTO 27011KT 9000 FEW001 BKN002 08/07 Q1006 < 1572665483 269725 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :@metar koak < 1572665483 589343 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :KOAK 020253Z 00000KT 10SM CLR 13/01 A3011 RMK AO2 SLP194 T01330011 53004 < 1572668267 16006 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :@metar ksea < 1572668267 335607 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :KSEA 020353Z 01013KT 10SM SCT200 09/03 A3037 RMK AO2 SLP293 T00890033 < 1572668831 575707 :hppavilion[1]!~omegasome@172.98.86.92 JOIN :#esoteric < 1572669165 430175 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :using the thought I had earlier, you can build interesting data pipelines. < 1572669194 118745 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :sum $1234 bitvector < 1572669225 5422 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :or sum bitvector $1234 number < 1572669270 718411 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :because you push a handle to the concurrent process to the queue, any further processes can be constructed, passed that handle, and form a linear dataflow graph. < 1572669345 847705 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :a bidirectional one as well. `number` takes a number and a process to send that value to. `bitvector` takes a process, receives a number and sends the bits of that number to the taken process. `sum` takes a process, receives a number and keeps a running tally of that number which is available on request. < 1572669355 747209 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :you can do lazy evaluation with that. < 1572669424 798790 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :you can design a process that takes two handles, receives something and broadcasts it to the two processes it has handles to. < 1572670896 901145 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :https://hatebin.com/shiyqdhisf not bad. < 1572671057 1567 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :bitvector's logic is wrong, it should send zero on completion. < 1572671262 860449 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :https://hatebin.com/lriwwfiijo that's better. < 1572671356 108924 :imode!~linear@unaffiliated/imode PRIVMSG #esoteric :I feel like you can get pretty granular with this. < 1572673734 799340 :ArthurStrong!~ArthurStr@slow.wreckage.volia.net QUIT :Quit: leaving < 1572674363 543117 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 276 seconds < 1572674446 981744 :tromp_!~tromp@2a02:a210:1585:3200:cd11:227e:3137:6ca6 JOIN :#esoteric < 1572674594 969415 :tromp!~tromp@2a02:a210:1585:3200:c04e:4d3c:d1e4:f01d QUIT :Ping timeout: 246 seconds < 1572674966 515546 :imode!~linear@unaffiliated/imode JOIN :#esoteric > 1572675253 196223 PRIVMSG #esoteric :14[[07Metatape14]]4 10 02https://esolangs.org/w/index.php?diff=66920&oldid=53872 5* 03HactarCE 5* (+4400) 10Overhauled Metatape according to 2019 edition < 1572678731 538388 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 276 seconds < 1572683165 977869 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1572684789 875679 :kspalaiologos!~kspalaiol@176.221.122.71 JOIN :#esoteric < 1572685277 87446 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 240 seconds > 1572691532 708500 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66921&oldid=66919 5* 03DmilkaSTD 5* (+0) 10 > 1572691606 858173 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66922&oldid=66921 5* 03DmilkaSTD 5* (+15) 10 > 1572691645 572469 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66923&oldid=66922 5* 03DmilkaSTD 5* (+10) 10 > 1572691672 984235 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66924&oldid=66923 5* 03DmilkaSTD 5* (-7) 10 > 1572691701 427168 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66925&oldid=66924 5* 03DmilkaSTD 5* (+10) 10 < 1572692163 888618 :tromp!~tromp@2a02:a210:1585:3200:fc32:aa2a:2f75:3f27 JOIN :#esoteric > 1572692253 575808 PRIVMSG #esoteric :14[[07Esomachine14]]4 10 02https://esolangs.org/w/index.php?diff=66926&oldid=66925 5* 03DmilkaSTD 5* (+156) 10 < 1572692339 973386 :tromp_!~tromp@2a02:a210:1585:3200:cd11:227e:3137:6ca6 QUIT :Ping timeout: 246 seconds < 1572693459 926872 :hppavilion[1]!~omegasome@172.98.86.92 QUIT :Remote host closed the connection < 1572693849 230127 :kspalaiologos!~kspalaiol@176.221.122.71 PRIVMSG #esoteric :has someone taken up on esoshell project? < 1572694597 887142 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru JOIN :#esoteric < 1572700239 662959 :kspalaiologos!~kspalaiol@176.221.122.71 QUIT :Quit: Leaving < 1572700741 896076 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu JOIN :#esoteric < 1572701061 578350 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :kspalaiologos: I beg to differ, but I can write usable parsers from scratch. just don't look at my ancient psz interpreter. that was long ago, and I've matured since. < 1572701173 238174 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :" I shouldn't have slept at math lessons" => meh, it's quite possible that many of your lessons were a waste of time. get some good books and learn from them instead. < 1572701254 657524 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :" Are pointers signed or unsigned?" => I don't think that distinction makes sense there. you don't high-multiply pointers, or compare pointers from two different arrays < 1572701353 478441 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :but if I have to choose, they're probably signed on x86_64 (because the top bits are usually the same unless you have a future cpu with a 2**64 bit long address space), unsigned on x86_16 (because they are mapped into x86_32's address space by zero filling), > 1572701521 198151 PRIVMSG #esoteric :14[[07Kill14]]4 N10 02https://esolangs.org/w/index.php?oldid=66927 5* 03CMinusMinus 5* (+723) 10Created page with "'''Kill''' is a one-word, Python-interpreted, joke programming language created by [[User:CMinusMinus]]. The sole purpose of this language, is to delete the code. The only leg..." < 1572701727 577190 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shikhin: for x86_32 though, signed vs unsigned does make a difference, and I don't know which one is used. either look it up in the ELF ABI docs, or allocate a 2.5 GB sized array (for which you need either an x86_64 kernel, or an x86_32 kernel configured to the slower 3GB+1GB address space split rather than the default 2GB+2GB split) and see how it's layed out and how pointers in it compare < 1572701733 581467 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :argh < 1572701739 4340 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :s/shikhin/shachaf/ < 1572701749 502145 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I suck at autocompletion > 1572701773 626704 PRIVMSG #esoteric :14[[07Kill14]]4 10 02https://esolangs.org/w/index.php?diff=66928&oldid=66927 5* 03CMinusMinus 5* (+102) 10 < 1572701792 857371 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :oerjan: ^ < 1572701837 708515 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :" To this day I find it confusing that the offset of relative jumps is relative to the address following the current instruction." => I find that one natural, and the other convention (which some cpu archs use) unnatural > 1572701862 449236 PRIVMSG #esoteric :14[[07Kill14]]4 10 02https://esolangs.org/w/index.php?diff=66929&oldid=66928 5* 03CMinusMinus 5* (+22) 10 > 1572702032 653029 PRIVMSG #esoteric :14[[07Language list14]]4 10 02https://esolangs.org/w/index.php?diff=66930&oldid=66864 5* 03CMinusMinus 5* (+11) 10Added "Kill" Language > 1572702057 79538 PRIVMSG #esoteric :14[[07Kill14]]4 10 02https://esolangs.org/w/index.php?diff=66931&oldid=66929 5* 03CMinusMinus 5* (+2) 10 > 1572702177 907075 PRIVMSG #esoteric :14[[07Kill14]]4 10 02https://esolangs.org/w/index.php?diff=66932&oldid=66931 5* 03CMinusMinus 5* (+3) 10 < 1572702198 171990 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :" Maybe it would be better for APIs to support reading and writing in multiple chunks." => they already do, if you mean multiple chunks in memory assembled to a single chunk in the file descriptor or back, with preadv/pwritev, plus the aio api eg. aio_write is parametrized like that by default (I wanted to say "works like that by default" but it's probably not correct to use "works" for the < 1572702204 164587 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :linux aio api at all) < 1572702235 539876 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :hmm no, I remembered wrong, aio_write doesn't use preadv-style scatter-gather addressing > 1572702250 387827 PRIVMSG #esoteric :14[[07User:CMinusMinus14]]4 10 02https://esolangs.org/w/index.php?diff=66933&oldid=66903 5* 03CMinusMinus 5* (+27) 10 < 1572702250 423033 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm not talking about OS APIs, which support this already, but other APIs. < 1572702252 656243 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :what api was it than otehr tahn preadv/pwritev, I wonder? I'm sure there was another < 1572702264 729032 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Presumably that's also what fizzie is talking about also. < 1572702278 591053 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Just some arbitrary function in your code like parse_thing() that takes a buffer and a length. < 1572702283 136517 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :what other APIs then? < 1572702287 625721 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :ah < 1572702325 659003 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: I think https://laurikari.net/tre/ allows you match a regex to a string that is not continuous, and even from a string that's read lazily < 1572702356 778463 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :OK, but regex matching is one special-case API which is already naturally written as a state machine anyway. < 1572702377 860515 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :but of course continuous buffers have a lot of advantage < 1572702380 569503 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :easier to optimize < 1572702402 50040 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I worked with bitmap images at my previous job, and I wouldn't like a non-continuous bitmap image < 1572702541 552701 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :if I was given one, I'd just copy it into a proper continuous buffer (that is also aligned so that its rows are padded to a size that is 64 bytes long modulo 128 bytes; possibly padded a little at the beginning and end so I can read past the ends; and with the color channels either together and padded as if you had four channels if the input has three, or separately each one in a layer, depending on < 1572702547 553376 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :what I want to do with the image) < 1572703026 506571 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Of course APIs can do that, and keep their own buffers. < 1572703049 128287 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But then you have a bunch of different buffers all the over the system, which doesn't seem that nice. < 1572703823 161914 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: no, in my experience once you have a continuous buffers, I could use them with multiple apis in place for image processing < 1572703850 478637 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :there are subtleties about pixel formats, but in practice most of the time I didn't have to do unnecessary copies < 1572703909 403358 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :OK, but maybe you have one buffer for parsing an HTTP request, and then another buffer for parsing the image it contains, or whatever. < 1572703930 893377 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Presumably you want to avoid a bunch of copies if you can. < 1572703945 400390 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: the HTTP buffer has compressed images < 1572703960 793052 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Sure, another buffer for decompression. < 1572703966 671756 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I have to decode those to raw uncompressed anyway if I want to work with < 1572703978 211358 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm describing the kind of thing you might want to avoid. < 1572703986 815990 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Can your decompression algorithm operate directly on the circular buffer? < 1572703986 937757 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :but in practice when I get an image from HTTP, I save it for multiple uses rather than process directly < 1572704050 962683 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: hmm, I don't know the details, I usually decompressed images with either ImageMagick or ffmpeg, and read them from a regular file < 1572704161 224122 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: for decoding video, I did store the uncompressed frames sparsely, so each frame can be anywhere in memory and they can be reused as a circular buffer < 1572704400 227163 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :shachaf: when the video is read from network directly, rather than local file, then ffmpeg does the reading, so I don't know what kind of buffer it uses < 1572704450 152205 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :admittedly I used ffmpeg as a separate process, so there are two copies of the uncompressed raw data there < 1572704458 604983 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :so I guess I was wrong above < 1572704469 790369 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :three copies if I want a planewise format < 1572705918 240366 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Running a separate process for video decoding is obviously not reasonable for any kind of special-purpose application. < 1572706614 324284 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1572708984 991494 :kspalaiologos!~kspalaiol@176.221.122.71 JOIN :#esoteric < 1572711585 804904 :int-e!~noone@int-e.eu PRIVMSG #esoteric :. o O ( Prove or disprove: There is a POSIX extended regular expression of length shorter than 10000 that accepts the multiples of 7 in decimal, with leading zeros allowed. ) < 1572711631 800556 :int-e!~noone@int-e.eu PRIVMSG #esoteric :*Main> length rex ==> 10791 < 1572711712 222670 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Which doesn't include the anchors ^( and )$, so 10795 is where I'm really at. < 1572711830 535258 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Make that 10793 (the parentheses are not required). Oh and I'm excluding the empty string but as far as I can tell this doesn't affect the length anyway; it's a matter of using + or * in one place. < 1572712366 300942 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 265 seconds < 1572713146 27470 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1572713482 539787 :xkapastel!uid17782@gateway/web/irccloud.com/x-wxrifdiwsiyklijo JOIN :#esoteric < 1572713972 351192 :lldd_!~atrapado@unaffiliated/atrapado JOIN :#esoteric < 1572715580 273701 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572715953 422813 :imode!~linear@unaffiliated/imode QUIT :Quit: WeeChat 2.6 < 1572716012 646074 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572716503 266992 :lldd_!~atrapado@unaffiliated/atrapado QUIT :Quit: Leaving < 1572721476 992057 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 240 seconds < 1572722125 654062 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 268 seconds < 1572722218 344401 :Cale!~cale@2607:fea8:9960:35:15ca:67bf:6980:12ef QUIT :Ping timeout: 245 seconds < 1572722946 424196 :kspalaiologos!~kspalaiol@176.221.122.71 QUIT :Quit: Leaving < 1572722952 609096 :Cale!~cale@2607:fea8:9960:35:309a:d88e:fc4e:14b5 JOIN :#esoteric < 1572723322 664381 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572724409 567525 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: eww. < 1572724443 144020 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: also isn't it ^[[:space:]][-+]( )$ < 1572724449 359788 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :no wait < 1572724457 319301 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :^[[:space:]][-+]?( )$ < 1572724743 521186 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1572724789 692548 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 268 seconds < 1572724854 565037 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572725285 744583 :int-e!~noone@int-e.eu PRIVMSG #esoteric :b_jonas: nah, no signs < 1572725676 281057 :myname!~myname@ks300980.kimsufi.com PRIVMSG #esoteric :int-e: if i want to be picky, i'd say .* doas accept the multiples of 7 < 1572725803 549828 :int-e!~noone@int-e.eu PRIVMSG #esoteric :myname: yeah but you know what I meant anyway < 1572725854 708635 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Also obviously the right way to write such a regular expression is to not do it. :P < 1572725869 980463 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(But the second best way is to write a program to do it for you.) < 1572727133 661437 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: yeah, there are programs that can automatically convert a nondet finite automaton to a regex, even with the blowup < 1572727156 617915 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I know of one < 1572727170 585018 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :but there are probably more because it's a known algorithm < 1572727208 532728 :imode!~linear@unaffiliated/imode QUIT :Ping timeout: 276 seconds < 1572727226 348375 :int-e!~noone@int-e.eu PRIVMSG #esoteric :sure < 1572727268 335515 :xkapastel!uid17782@gateway/web/irccloud.com/x-wxrifdiwsiyklijo QUIT :Quit: Connection closed for inactivity < 1572727291 328440 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But do they also try to optimize the result size... < 1572727480 26976 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: obviously the regex would be shorter in perl regex syntax, where you can use the "recursion" feature, not to build recursive regex, but to reuse longer regex multiple times < 1572727499 377018 :int-e!~noone@int-e.eu PRIVMSG #esoteric :yeah that would definitely help < 1572727951 404463 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :hm, surprisingly large blowup from such a reasonably sized state machine < 1572727977 638061 :dingwat!uid70835@gateway/web/irccloud.com/x-spcuoorqjqvimidn QUIT :Quit: Connection closed for inactivity < 1572728119 790675 :int-e!~noone@int-e.eu PRIVMSG #esoteric :it's easily O(3^n) where n is the number of states < 1572728158 973484 :oerjan!oerjan@sprocket.nvg.ntnu.no JOIN :#esoteric < 1572728207 946543 :int-e!~noone@int-e.eu PRIVMSG #esoteric :So... let me try... 5 states (remainders 0..4 only): 689; 6 states: 2701; 7 states: 10793 < 1572728251 727383 :int-e!~noone@int-e.eu PRIVMSG #esoteric :That really looks a bit worse than O(3^n). But of course the number of states is still small. < 1572728264 612201 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But wait. O(4^n) actually makes more sense. < 1572728277 280538 :int-e!~noone@int-e.eu PRIVMSG #esoteric :And it looks pretty close to that. < 1572728284 530853 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hi oerjan. < 1572728351 210594 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :hi int-e < 1572728396 269999 :MDude!~MDude@c-174-55-101-236.hsd1.pa.comcast.net JOIN :#esoteric < 1572728689 519372 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But eh. My (fairly primitive) code is here: http://paste.debian.net/1113236/ ... it's optimizing, including a small peephole optimization (intelligently choosing between [07] and 0|7 depending on context), but fundamentally the question is whether there is a better way to convert a DFA (which happens to be a minimal NFA for the purpose) to a regexp than removing states one by one. < 1572728779 437339 :int-e!~noone@int-e.eu PRIVMSG #esoteric :And I just don't know the answer to that question. < 1572728798 116076 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :I tried a bit with https://github.com/qntm/greenery, it seems to always produce a regexp that converts back to the same DFA (which I suspect is not optimal for making a short regexp) < 1572728863 880164 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Well this is inherently a DFA... you have 7 remainders to keep track of, so that's a minimum of 7 states, and if you use 7 states then you'll be dealing with a DFA. < 1572728888 248187 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric : oerjan: ^ <-- i have no idea why you pinged me there < 1572728902 5454 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :unless it was to joke about autocompletion < 1572728918 361104 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :(in which case you need to work on your jokes) < 1572728957 263789 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Maybe b_jonas wanted to highlight me. Which would've been appropriate. :) < 1572728963 146724 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :heh < 1572729675 520966 :imode!~linear@unaffiliated/imode JOIN :#esoteric < 1572729675 755503 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :what books on numeric recipes related to floating-point (or esp. IEEE 754) issues could you recommend? With recipes for inverse hyperbolic functions or e. g. if there is a sense to define `coshm1(x) := 0.5 * (expm1(x) + expm1(-x))` or one should just use plain `cosh(x) - 1` < 1572730043 782408 :int-e!~noone@int-e.eu PRIVMSG #esoteric :fun question.... < 1572730082 946463 :heroux!sandroco@gateway/shell/insomnia247/x-sdiynjuymchimatg QUIT :Ping timeout: 240 seconds < 1572730083 701491 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :oerjan: sorry, that should have highlighted olsner < 1572730119 155375 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :fizzie: the https://esolangs.org/logs/all.html website seems to be down < 1572730137 204914 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I mean, cosh(x) - 1 suffers from terrible cancellation around 0, but 0.5 * (expm1(x) + expm1(-x)) still suffers from cancellation (expm1(x) = x + x^2/2 + O(x^3), expm1(-x) = -x + x^2/2 + O(x^3), cosm1(x) = x^2/2 + O(x^3)...) < 1572730235 826820 :int-e!~noone@int-e.eu PRIVMSG #esoteric :So exp1m(log1p(sinh(x)**2)/2) may be better. < 1572730266 662043 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: the fourth edition of Knuth volume 2, only it's not yet written < 1572730267 451696 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Modulo function names. < 1572730309 694936 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :b_jonas: :( < 1572730351 365684 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :int-e: ah, I suspected my definition would have a flaw < 1572730371 691082 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :ah sorry, that will be third edition < 1572730374 795298 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :no wait < 1572730376 556738 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :fourth edition < 1572730386 354535 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :anyway, until that time, you can look at the existing third edition < 1572730411 754131 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :it doesn't talk about IEEE 754, but it does talk about floating point in general < 1572730443 350685 :atslash!~atslash@static.231.107.9.5.clients.your-server.de QUIT :Quit: This computer has gone to sleep < 1572730447 941895 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :MIX uses a different floating point format that shifts by mix bytes, rather than bits, but the main text considers other bases too, including base 2 < 1572730544 180053 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :what the current edition doesn't consider is features specific to IEEE 754, which are infinities and NaNs < 1572730583 787191 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :b_jonas: I'm not sure what's up with it, my monitoring has been saying every now and then that it's down for a bit. < 1572730587 323380 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Working for me now. < 1572730595 285607 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :b_jonas: mix bytes => wait, there are its own bytes? How many bits? < 1572730609 91422 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: either six bits, or two decimal digits < 1572730648 51349 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: technically the book says the byte has a range from 0 to a maximum that is between 63 and 99 inclusive, so a binary MIX goes up to 63, a decimal up to 99, a ternary up to 81 < 1572730662 643104 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: see our wiki article < 1572730671 845864 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :(and the book itself) < 1572730710 27549 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :I wonder if MIX-related issues don’t make the text obscurer < 1572730757 754884 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :yeah, I was to look for searching if I have it somewhere < 1572730762 646849 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :don’t remember < 1572730827 445871 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :have what? < 1572730830 456935 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :the books? < 1572731002 927997 :OugiOshino!~bwbellair@hellomouse/dev/bwbellairs NICK :BWBellairs < 1572731048 657060 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :b_jonas: hm I don’t seem to find there much of the redundant recipes I was to look for < 1572731111 794682 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :fizzie: yes, it's up now < 1572731113 465202 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :b_jonas: yeah, it seems I have that volume here, but the contents page doesn’t look too promising < 1572731121 344990 :heroux!sandroco@gateway/shell/insomnia247/x-kbmbuhzvditvwhrj JOIN :#esoteric < 1572731168 352863 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :I mean, for basics I have that “What every computer scientist should know about FP arithmetic” article reprint-as-an-appendix-from-some-Sun-manual < 1572731200 429990 :int-e!~noone@int-e.eu PRIVMSG #esoteric :texlive's documentation packages are ridiculously big < 1572731265 359412 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :but the careful examination of numeric issues by myself seems unnecessary if… hm I wonder if I should look at Numpy code < 1572731340 850938 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: TAOCP vol 2 almost certainly isn't enough for what you asked, < 1572731348 514175 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :but I'm not familiar with other books to recommend < 1572731365 290988 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I haven't read many such books really < 1572731385 864904 :heroux!sandroco@gateway/shell/insomnia247/x-kbmbuhzvditvwhrj QUIT :Read error: Connection reset by peer < 1572731386 961524 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I'm aware that there *are* numerical recipe books... < 1572731411 695109 :heroux!sandroco@gateway/shell/insomnia247/x-eclakbeqfwpopiqe JOIN :#esoteric < 1572731441 678127 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :b_jonas: ah, OK < 1572731465 886469 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :int-e: yeah, they just seem elusive < 1572731481 514951 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :there's Stoyan Gisbert's numerical analysis textbook, which is freely available online, but I think only exists in Hungarian. I don't know if there's any translation < 1572731517 637830 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@where floating-point < 1572731517 717652 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :"What Every Programmer Should Know About Floating-Point Arithmetic" at and "What Every Computer Scientist Should Know About Floating-Point Arithmetic" by David < 1572731517 777418 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :Goldberg in 1991 at and < 1572731521 542867 :olsner!~salparot@c80-217-180-83.bredband.comhem.se PRIVMSG #esoteric :b_jonas: finally a good excuse to learn hungarian? < 1572731521 855668 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :it has three volumes, the first one is an introduction one that goes pretty far, and then the second and third are about solving partial differential equations numerically < 1572731541 234929 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :therea are certainly more good books, I'm just not familiar with them < 1572731577 173463 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :for the logs, IIRC Stoyan Gisbert's book is available somewhere from http://www.tankonyvtar.hu/hu/bongeszes , but that server is down right now < 1572731611 493521 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :it says that it's down until 2019-11-03 though, so unless you see the date autoincrement, it'll hopefully come up later < 1572731619 693328 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric : and then the second and third are about solving partial differential equations numerically => (aaaah!! you know, this is the night here, how would I go to sleep now) < 1572731659 405306 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :(I’m afraid of numeric PDEs after my naive Shrödinger model blown up) < 1572731684 221134 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv: right, the whole thing is so tricky that it's no wonder you need two volumes on it < 1572731690 981652 :int-e!~noone@int-e.eu PRIVMSG #esoteric :pfft. < 1572731691 744504 :heroux!sandroco@gateway/shell/insomnia247/x-eclakbeqfwpopiqe QUIT :Read error: Connection reset by peer < 1572731696 516075 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@where ffi < 1572731696 597359 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :http://www.cse.unsw.edu.au/~chak/haskell/ffi/ < 1572731700 308935 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I think the first volume covers ODEs and numerical integration < 1572731710 495264 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: lol < 1572731722 78630 :heroux!sandroco@gateway/shell/insomnia247/x-ozsftnzodrtpflns JOIN :#esoteric < 1572731729 891676 :int-e!~noone@int-e.eu PRIVMSG #esoteric :dead link tjhough < 1572731792 216647 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: https://www.haskell.org/onlinereport/haskell2010/haskellch8.html#x15-1490008 is probably the current one < 1572731804 555814 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :it's integrated to the main standard from the separate tech report < 1572731817 479058 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@where+ ffi http://www.haskell.org/onlinereport/haskell2010/haskellch8.html < 1572731817 552522 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :Nice! < 1572731849 786069 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :@hwere ffi < 1572731849 860833 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :http://www.haskell.org/onlinereport/haskell2010/haskellch8.html < 1572731867 524806 :int-e!~noone@int-e.eu PRIVMSG #esoteric :yeah that's what I copied < 1572731973 45644 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :that's not standalone though, you need most of chapters 24 to 37 inclusive < 1572731978 462722 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric :@ʍere ffi -- just testing < 1572731978 520967 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :http://www.haskell.org/onlinereport/haskell2010/haskellch8.html < 1572731980 893713 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru PRIVMSG #esoteric ::o < 1572731982 750710 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :which have the relevant Foreign modules < 1572732026 300761 :unlimiter!~unlimiter@105.157.211.60 JOIN :#esoteric < 1572732032 954689 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :eg. https://www.haskell.org/onlinereport/haskell2010/haskellch28.html#x36-27400028 defines the Foreign.C.CLong type < 1572732198 600100 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :so perhaps https://www.haskell.org/onlinereport/haskell2010/haskell.html#QQ2-15-159 would be a better link < 1572732204 295791 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: ^ < 1572732374 46636 :arseniiv_!~arseniiv@95.105.4.44.dynamic.ufanet.ru JOIN :#esoteric < 1572732390 303104 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I don't like the anchor :P < 1572732410 869839 :arseniiv!~arseniiv@95.105.3.47.dynamic.ufanet.ru QUIT :Ping timeout: 240 seconds < 1572732451 563361 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: same without anchor then? < 1572732457 572963 :unlimiter!~unlimiter@105.157.211.60 QUIT :Quit: WeeChat 2.6 < 1572732471 153045 :int-e!~noone@int-e.eu PRIVMSG #esoteric :well then it's no longer the FFI specifically < 1572732474 147248 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@where report < 1572732474 236887 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :http://www.haskell.org/onlinereport/haskell2010/ (more: http://www.haskell.org/haskellwiki/Definition) < 1572732483 667295 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: sure, but it's where you look up the ffi < 1572732488 806363 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :which might not be obvious < 1572732507 187567 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :I think it even has additions to the original ffi report < 1572732507 312980 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I'm happy with the link to chapter 8 < 1572732511 567515 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :ok < 1572732948 127249 :arseniiv_!~arseniiv@95.105.4.44.dynamic.ufanet.ru PRIVMSG #esoteric :how did something like [miau] in English end up spelling “meow”? Prior to hearing the pronunciation I thought it should be something like [mju] and secretly thought how strange it should be to hear that from cats < 1572732964 53318 :arseniiv_!~arseniiv@95.105.4.44.dynamic.ufanet.ru NICK :arseniiv < 1572733052 433537 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :arseniiv_: no, that's "mew" which is a synonym < 1572733533 698337 :heroux!sandroco@gateway/shell/insomnia247/x-ozsftnzodrtpflns QUIT :Read error: Connection reset by peer < 1572733553 545415 :heroux!sandroco@gateway/shell/insomnia247/x-ycamayshofybvpjq JOIN :#esoteric < 1572733567 701510 :int-e!~noone@int-e.eu PRIVMSG #esoteric :They're all terrible approximatiopns of the real sound. < 1572733597 232729 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :int-e: no surprise, because most animal calls don't follow the phonemics of any human language < 1572733607 327805 :oerjan!oerjan@sprocket.nvg.ntnu.no PRIVMSG #esoteric :shocking < 1572733610 126081 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :so they're transcribed a bit randomly < 1572733617 716625 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :*ribbit* < 1572733624 742129 :int-e!~noone@int-e.eu PRIVMSG #esoteric :quak! < 1572733667 634403 :heroux!sandroco@gateway/shell/insomnia247/x-ycamayshofybvpjq QUIT :Read error: Connection reset by peer < 1572733685 910895 :int-e!~noone@int-e.eu PRIVMSG #esoteric :"ribbit" is pretty good, compared to that. < 1572733854 781037 :heroux!sandroco@gateway/shell/insomnia247/x-aksdrnuadcquduyp JOIN :#esoteric < 1572733913 810505 :heroux!sandroco@gateway/shell/insomnia247/x-aksdrnuadcquduyp QUIT :Read error: Connection reset by peer < 1572734145 479265 :heroux!sandroco@gateway/shell/insomnia247/x-fsvqpqfufjvtaoks JOIN :#esoteric < 1572734453 28080 :heroux!sandroco@gateway/shell/insomnia247/x-fsvqpqfufjvtaoks QUIT :Read error: Connection reset by peer < 1572734477 444934 :heroux!sandroco@gateway/shell/insomnia247/x-yguoradkkpliecrr JOIN :#esoteric < 1572734615 882129 :arseniiv!~arseniiv@95.105.4.44.dynamic.ufanet.ru PRIVMSG #esoteric :it seems frogs make at least two types of sounds, one closer to ribbit and the other to qua(k)? < 1572734643 966105 :b_jonas!~x@catv-176-63-14-167.catv.broadband.hu PRIVMSG #esoteric :dunno, I live in a city, I rarely hear actual frogs < 1572734652 126374 :arseniiv!~arseniiv@95.105.4.44.dynamic.ufanet.ru PRIVMSG #esoteric :or maybe it’s just different kinds of frogs, humble and noisy < 1572734694 445915 :arseniiv!~arseniiv@95.105.4.44.dynamic.ufanet.ru PRIVMSG #esoteric :I heard some at various times but won’t say I had enough to decide < 1572734967 972035 :heroux!sandroco@gateway/shell/insomnia247/x-yguoradkkpliecrr QUIT :Read error: Connection reset by peer < 1572734969 978364 :arseniiv!~arseniiv@95.105.4.44.dynamic.ufanet.ru QUIT :Ping timeout: 246 seconds < 1572734987 399462 :heroux!sandroco@gateway/shell/insomnia247/x-ehfozhggwqrdjwim JOIN :#esoteric < 1572735039 718646 :heroux!sandroco@gateway/shell/insomnia247/x-ehfozhggwqrdjwim QUIT :Read error: Connection reset by peer < 1572735320 487015 :heroux!sandroco@gateway/shell/insomnia247/x-ucgyyoiwshjqfxhi JOIN :#esoteric