< 1564272052 520343 :Sgeo!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Ping timeout: 244 seconds < 1564272714 539007 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 272 seconds < 1564272841 214602 :arseniiv!~arseniiv@136.169.234.37 QUIT :Ping timeout: 246 seconds < 1564278932 230002 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :I found a Scrabble game called "scribble" in the package manager on my computer. Scribble was written by Brian White and has been placed in the public domain (the only true "free"). I added a single player mode, so that if you put level 0 then you can play game by yourself. < 1564280776 77785 :FreeFull!~freefull@defocus/sausage-lover QUIT : > 1564281624 958236 PRIVMSG #esoteric :14[[07Talk:Swissen Machine14]]4 10 02https://esolangs.org/w/index.php?diff=64740&oldid=64725 5* 03Jussef Swissen 5* (+291) 10 < 1564281869 185107 :xkapastel!uid17782@gateway/web/irccloud.com/x-wdlmpvsdagmozcgl QUIT :Quit: Connection closed for inactivity < 1564283452 314342 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net JOIN :#esoteric < 1564283628 323776 :Sgeo_!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Ping timeout: 245 seconds < 1564285031 617909 :int-e!~noone@int-e.eu PRIVMSG #esoteric :The Wave: \o/ \ꙩ/ \ꙫ/ \ꙭ/ \ꙮ/ < 1564285049 349328 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Oh there's \ꚙ/ as well. < 1564285181 17111 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :int-e: It doesn't seem easy to get a definitive answer to the question "what should my program non-C program do between _start and main?" < 1564285194 589683 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That rdx thing is one piece of the puzzle but there are presumably others. > 1564285270 190113 PRIVMSG #esoteric :14[[07Talk:Swissen Machine14]]4 M10 02https://esolangs.org/w/index.php?diff=64741&oldid=64740 5* 03A 5* (+615) 10/* Conclusion */ > 1564285284 316744 PRIVMSG #esoteric :14[[07Talk:Swissen Machine14]]4 M10 02https://esolangs.org/w/index.php?diff=64742&oldid=64741 5* 03A 5* (+64) 10/* Conclusion */ > 1564285608 557836 PRIVMSG #esoteric :14[[07Idea14]]4 N10 02https://esolangs.org/w/index.php?oldid=64743 5* 03A 5* (+666) 10Stub page. > 1564285664 605654 PRIVMSG #esoteric :14[[07Idea14]]4 M10 02https://esolangs.org/w/index.php?diff=64744&oldid=64743 5* 03A 5* (+0) 10 < 1564285844 831603 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Tricky. I would rather take off from main() instead, because presumably I want to interact with libraries that in turn use libc, so I want the C library to be fully initialized. < 1564285907 121151 :int-e!~noone@int-e.eu PRIVMSG #esoteric :And I'm not sure that it does all that using the __constructor__ mechanism. (I don't even know how that works on the ELF side.) > 1564286417 622173 PRIVMSG #esoteric :14[[07Idea14]]4 M10 02https://esolangs.org/w/index.php?diff=64745&oldid=64744 5* 03A 5* (+195) 10 < 1564286464 709707 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :How can my compiler do that? < 1564286476 742408 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Do I find crt0.o and link it in or something? < 1564286503 782201 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: Oh there's more to this than the SysV ABI. LSB plays into it as well, apparently: http://refspecs.linuxbase.org/LSB_3.1.0/LSB-generic/LSB-generic/baselib---libc-start-main-.html (I googled "libc initialization" with duckduckgo) < 1564286506 631994 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It seems like there should be an ABI for this. > 1564286516 415553 PRIVMSG #esoteric :14[[07Idea14]]4 M10 02https://esolangs.org/w/index.php?diff=64746&oldid=64745 5* 03A 5* (-14) 10/* Instructions */ < 1564286684 355784 :int-e!~noone@int-e.eu PRIVMSG #esoteric :hmm objdump -dr /usr/lib/x86_64-linux-gnu/crt1.o < 1564286791 170078 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :You want things from /usr/lib/gcc/x86_64-linux-gnu/*/ as well. > 1564286828 204196 PRIVMSG #esoteric :14[[07Idea14]]4 M10 02https://esolangs.org/w/index.php?diff=64747&oldid=64746 5* 03A 5* (-59) 10/* Infinite loop */ < 1564286830 620001 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` echo 'int main() { return 0; }' | gcc -x c - -o /tmp/true; objdump -d /tmp/true | grep '>:$' | awk '{print $2}' | xargs < 1564286831 855019 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​<_init>: <.plt>: <.plt.got>: <_start>: : : <__do_global_dtors_aux>: :
: <__libc_csu_init>: <__libc_csu_fini>: <_fini>: < 1564286846 499903 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What's all this nonsense? Am I supposed to do all that? > 1564286936 726167 PRIVMSG #esoteric :14[[07Idea14]]4 M10 02https://esolangs.org/w/index.php?diff=64748&oldid=64747 5* 03A 5* (-10) 10 < 1564287000 464739 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hmm, what does csu stand for. Something boring like "C start-up" maybe? < 1564287016 591645 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :I don't know; I have once used LLVM and just defined main, and it work, so, I don't know how to do it without main < 1564287082 755138 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :"This directory contains the C startup code (that which calls main)." from glibc/csu/ < 1564287086 125266 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I mean, looking at https://sourceware.org/git/?p=glibc.git;a=tree;f=csu it's all connected to initialization of various things... < 1564287100 510295 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :(From the Makefile.) < 1564287155 890992 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So crti/crtn stand for "initializer" and "finalizer". < 1564287179 874658 :int-e!~noone@int-e.eu PRIVMSG #esoteric :http://www.dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html has a fancy diagram < 1564287256 841969 :int-e!~noone@int-e.eu PRIVMSG #esoteric :So it seems that my idea of .init is all wrong, I thought the loader handled those... but it's libc. The loader does preinit stuff, which I wasn't aware of. < 1564287278 117426 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(loader = interpreter = ld.so) < 1564287314 319933 :int-e!~noone@int-e.eu PRIVMSG #esoteric :hmm, no. < 1564287349 199207 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I was unaware of both preinit and init stuff; only the constructors were on my radar. < 1564287353 526805 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It seems like the loader has to be involved. < 1564287360 450336 :int-e!~noone@int-e.eu PRIVMSG #esoteric :too many mechanisms... < 1564287763 244333 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hrm, that picture fails to explain what rdx is used for by the loader. < 1564287804 814697 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Or edx, since they're discussing x86 < 1564287809 883666 :int-e!~noone@int-e.eu PRIVMSG #esoteric :_32 < 1564287822 375861 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It explains it under rtld_fini, doesn't it? < 1564287965 937878 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So is calling __libc_start_main required by any program that wants to use libraries that link against libc? < 1564288072 746306 :int-e!~noone@int-e.eu PRIVMSG #esoteric :That's what it looks like to me. It seems that *a lot* of initialization doesn't happen otherwise. < 1564288096 619603 :int-e!~noone@int-e.eu PRIVMSG #esoteric :All the world is libc :) < 1564288106 433239 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :And then there's register_tm_clones and other things. < 1564288563 690994 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://stackoverflow.com/questions/34966097/what-functions-does-gcc-add-to-the-linux-elf talks about these a bit. < 1564288790 945726 :int-e!~noone@int-e.eu PRIVMSG #esoteric :https://gcc.gnu.org/wiki/TransactionalMemory - yay yet another ABI < 1564288937 192121 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Why does this need to be linked into my program instead of libc? < 1564289104 542688 :int-e!~noone@int-e.eu PRIVMSG #esoteric :well it's a gcc feature not a libc feature, and presumably glibc doesn't use transactional memory itself? < 1564289111 276618 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This page says some of these things are deprecated, too. < 1564289138 160409 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Anyway I should take advantage of being up early and go for a walk before it starts getting hot. < 1564289143 549251 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :@time int-e < 1564289144 245934 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :Local time for int-e is Sun Jul 28 06:45:43 2019 < 1564289238 354197 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@metar lowi < 1564289238 680810 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :LOWI 280420Z VRB02KT 9999 FEW008 SCT018 BKN090 16/15 Q1001 NOSIG < 1564289256 663249 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :@metar koak < 1564289257 85482 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :KOAK 280353Z 29007KT 10SM CLR 20/15 A2994 RMK AO2 SLP137 T02000150 $ < 1564289265 373756 :int-e!~noone@int-e.eu PRIVMSG #esoteric :hmm, almost chilly... < 1564291335 430187 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :int-e: I thought the _tm_ things were necessary when linking any library that uses the transactional memory. < 1564291338 433110 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe not. < 1564293360 969728 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: I expect so. But why should the C library care? < 1564293911 846193 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Perhaps it doesn't. < 1564293938 731703 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I think maybe I'll just call __libc_start_main or something and see if anything breaks. < 1564293947 987705 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That sounds like a good way to be confident in your software. < 1564294000 823121 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I mean, gcc is a C compiler but in this case it's implementing its own features that need additional initialization support. < 1564294036 445751 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I would invoke gcc as a linker, tbh. Maybe g++ if C++ stuff is involved. < 1564294169 446867 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That seems complicated. < 1564294171 82532 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(partly because that's what ghc does) < 1564294177 512451 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :And how do you cross-compile in that scenario? < 1564294193 789355 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Ugh. < 1564294207 809585 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I basically don't cross-compile. < 1564294293 949699 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Probably because every tool makes it impossible to cross-compile because they do things like that. < 1564294294 891022 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I guess technically the OpenCL experiment involved cross compilation. The last time before that was playing with an Arduino. < 1564294302 3567 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Or because you unly use one platform, I guess. < 1564294344 717053 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But if you have a gcc cross compiler for the target then that should work? < 1564294374 560440 :doesntthiswork!~doesthisw@98-125-168-130.dyn.centurytel.net QUIT :Ping timeout: 272 seconds < 1564294516 214319 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I thought cross-compiling with gcc was a nightmare. < 1564294543 190698 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I thought that was true in general, independent of gcc. < 1564294611 698638 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But as indicated I have not really touched cross compilation. < 1564294627 260021 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Even for the Arduino thing I used a canned Makefile which, fortunately, worked. < 1564294643 494201 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe I should look at what Go does when it makes non-statically-linked binaries. < 1564294646 477362 :int-e!~noone@int-e.eu PRIVMSG #esoteric :That did involve gcc as a cross compiler. < 1564294714 322757 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(but as a stand-alone implementation without a full-fledged C library, so a lot of *your* problems didn't really come up) < 1564294733 995062 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(no dynamic linking either!) < 1564294762 783873 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I've already made an ELF file that segfaults gdb. < 1564294877 931588 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Was that your goal? :P < 1564294878 358497 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It's actually pretty easy, you can make it with objcopy. < 1564294893 830606 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :No, my goal was to make an ELF file that can be executed. < 1564294900 287389 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :(I managed that too.) < 1564294932 45300 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(Didn't we once find out that you can crash /bin/true by messing with localisation?) < 1564294961 504623 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I don't remember that. < 1564294985 478696 :int-e!~noone@int-e.eu PRIVMSG #esoteric :How about an ELF file that can be executed but still makes gdb crash when you attempt to load it there? < 1564295033 288289 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(Basic idea, put garbage in some sections that only gdb really cares about... dwarf stuff, say.) < 1564295047 15499 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm, I don't remember whether the ELF file I made loaded. < 1564295099 892630 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Nope, also SEGV < 1564295198 423258 :int-e!~noone@int-e.eu PRIVMSG #esoteric :tbf, it was /bin/true --help < 1564295542 119846 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So it looks like Go programs that link with libc don't call libc_start_main. < 1564295593 815680 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Go, be evil. < 1564295642 514118 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But what do they do instead? < 1564295646 86217 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I should probably just do that. < 1564295652 757093 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://golang.org/src/runtime/asm_amd64.s < 1564295703 908697 :int-e!~noone@int-e.eu PRIVMSG #esoteric :what assembly flavor is that... < 1564295707 855750 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm, maybe I'm wrong. < 1564295712 153568 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Plan 9 assembly, obviously. < 1564295757 8902 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hmm I guess actually I'm wondering about the register naming. < 1564295781 925263 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I think the register sizes are implied by the instruction names? < 1564295861 369214 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Recently I was writing a bit of x86 code by hand and I was confusil until I remembered someone said octal would be better than hexadecimal. < 1564295868 892888 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Then I was a bit less confusil. < 1564295902 226234 :int-e!~noone@int-e.eu PRIVMSG #esoteric :what does the (SB) do? < 1564295927 31305 :int-e!~noone@int-e.eu PRIVMSG #esoteric :...Oh is that a register... < 1564295984 457729 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://golang.org/doc/asm < 1564295991 468368 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :"The SB pseudo-register can be thought of as the origin of memory, so the symbol foo(SB) is the name foo as an address in memory." < 1564296142 826525 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So that file defines main to be called by libc, but as far as I can tell that's not being used on a compiled binary. < 1564297049 190542 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: https://golang.org/src/cmd/cgo/doc.go ... have a look at lines 698ff. It seems that gcc is involved in the middle of the process. < 1564297114 23980 :int-e!~noone@int-e.eu PRIVMSG #esoteric :__libc_start_main is mentioned but it's not clear by what mechanism it would actually be called. < 1564297223 796564 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(that means it's still possible that it isn't called) < 1564299054 121625 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: this may disappoint you, but go will use gcc or clang as a linker if shared libraries are involved somehow. < 1564299159 979126 :int-e!~noone@int-e.eu PRIVMSG #esoteric :https://golang.org/src/cmd/link/internal/ld/config.go#L224 < 1564299220 463800 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(plus documentation for `link`, which says "Set the external linker (default "clang" or "gcc")." for the -extld flag.) < 1564299231 892233 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :int-e: I didn't see it executing gcc in the strace output, and I didn't see libc_start_main in the output of objdump -d < 1564299261 493906 :int-e!~noone@int-e.eu PRIVMSG #esoteric :hmm did you do strace -f < 1564299269 273818 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Admittedly it is passing -extld=gcc to `link`. < 1564299278 186676 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yes. < 1564299349 581726 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Maybe I'm misinterpreting ctxt.linkShared. < 1564299352 417247 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ACTION shrugs < 1564299357 788693 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I will stop anyway < 1564299427 973182 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe it's being cached somehow? < 1564300311 517640 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Anyway the entry point is certainly _rt0_amd64_linux < 1564300677 254778 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 245 seconds < 1564300821 126046 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1564300900 595615 :nfd9001!~nfd9001@2601:602:8500:2443:c13b:e67f:162:2f48 JOIN :#esoteric < 1564301737 823017 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :the BDF format is apparently so old that BDF files were "typically distributed on nine-track tapes" < 1564301781 513812 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :why one would use a text-based format rather than binary in that era, I don't know < 1564301889 887162 :int-e!~noone@int-e.eu PRIVMSG #esoteric :so that they could be input using punched cards maybe? < 1564301909 247632 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :ah yeah, that would explain it < 1564301921 622893 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What's the benefit of bitmap font formats? < 1564301940 861361 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :They are easy to edit < 1564301966 811852 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :or at least, that's my main reasoning < 1564302057 543881 :int-e!~noone@int-e.eu PRIVMSG #esoteric :\oren\: Maybe punched cards are too old, but even so I suspect being able to edit bitmaps in a text editor was useful. < 1564302171 956284 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Though, hmm. It's using hex encoding. That's inconvenient. < 1564302189 135202 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :I am currently working on making my BDF-handling programs more general, rather than totally specific to my neoletters font < 1564302228 623211 :\oren\!~oren@ec2-35-175-217-128.compute-1.amazonaws.com PRIVMSG #esoteric :They should be capable of handling any number of rows and up to 32 columns of pixels < 1564302729 168300 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :\oren\: have you considered making a signed distance field font instead hth < 1564306115 749793 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net JOIN :#esoteric < 1564306798 120293 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` file /bin/true < 1564306798 816687 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​/bin/true: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9ae82394864538fa7b23b7f87b259ea2a20889c4, stripped < 1564306830 142810 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is it a shared object (rather than an executable) because it's a position-independent executable? < 1564306863 896728 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`` ldd /bin/true < 1564306864 667049 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ linux-vdso.so.1 (0x0000007fbffff000) \ libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000000004042e000) \ /lib64/ld-linux-x86-64.so.2 (0x0000000040000000) < 1564306889 134053 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` readelf -h /bin/true | grep -i entry < 1564306889 830261 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ Entry point address: 0x1670 < 1564306906 86122 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That doesn't look like an absolute entry point. < 1564306925 721563 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So that's pretty neat. I guess I want my programs to be position-independent. < 1564306934 427279 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Oh, I get the question, hmm. < 1564306956 571096 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`` file --version < 1564306957 204878 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :file-5.30 \ magic file from /etc/magic:/usr/share/misc/magic < 1564306969 626285 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I imagine that's much trickier if you're doing static linking. < 1564306994 208901 :int-e!~noone@int-e.eu PRIVMSG #esoteric :here it says, /bin/true: ELF 64-bit LSB pie executable, with file-5.37 (though technically iot's the `magic` file that's more important...) < 1564307007 884565 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What does readelf say? < 1564307024 502547 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` readelf -h /bin/true | grep -i type < 1564307025 285141 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ Type: DYN (Shared object file) < 1564307073 950216 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` echo $'.globl _start\n_start: int3' > /tmp/test.s && as -o /tmp/test.o /tmp/test.s && ld -o /tmp/test /tmp/test.o && file /tmp/test < 1564307074 763090 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​/tmp/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped < 1564307206 433717 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://github.com/file/file/commit/6876ebadcdf27224b3ffa9dfa4343127aa97c9b2 < 1564307210 325958 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Looks like a pretty recent change. < 1564307310 535963 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :int-e: Does it just print that because it has +x permission? < 1564307666 417869 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: maybe but then please explain why file -L /lib/x86_64-linux-gnu/libc.so.6 says "shared object" < 1564307714 104995 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :What about the thing it links to? < 1564307728 939333 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Oh, that's -L < 1564307760 663363 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Well, my version of file isn't even new enough to say "pie executable" < 1564307902 209097 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hmm, no, 'x' must be something else. < 1564307915 719462 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Probably. < 1564308346 151992 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm also confused that it says leshort when e_type is a one-byte value. < 1564308361 947809 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :The last time I wrote magic entries I didn't enjoy it. < 1564308581 594837 :int-e!~noone@int-e.eu PRIVMSG #esoteric :well, you got the meaning of 'x' right. < 1564308598 806510 :int-e!~noone@int-e.eu PRIVMSG #esoteric :https://github.com/file/file/commit/5b49de03a239c6765b6b6858d56827a021370b07#diff-dde49634c7a5cf692df46037d67d8c2eR480-R488 < 1564308704 344486 :int-e!~noone@int-e.eu PRIVMSG #esoteric :which means I'm pretty confused now < 1564308747 553459 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Did you try it on the link target to be sure? < 1564308786 675675 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I actually made a copy of /bin/true, removed the x, and it still says "pie executable" < 1564308811 748791 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm. < 1564308828 299008 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also is this the one use of ${ in the entire magic database? < 1564308866 446737 :int-e!~noone@int-e.eu PRIVMSG #esoteric :possibly? the feature was introduced one or two patches before the elf change < 1564308913 525195 :arseniiv!~arseniiv@136.169.234.37 JOIN :#esoteric < 1564308914 932472 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Ugh, autoconf/automake is such a scow < 1564308919 114661 :int-e!~noone@int-e.eu PRIVMSG #esoteric :certainly looks that way < 1564308923 894693 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It makes me miserable every time I accidentally read any of it < 1564308924 154466 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(re: x) < 1564308957 740037 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I know I call things scow sometimes but I think this is a pretty legitimate use < 1564309149 909496 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Anyway this is a real mystery now. < 1564309156 965665 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :If only I had a more recent version of file. < 1564309509 423028 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Oh, I guess I can get it from Nix. < 1564309527 314623 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ah, there's more magic > 1564309546 466211 PRIVMSG #esoteric :14[[07Bauberqueue/bauberqueue.py14]]4 M10 02https://esolangs.org/w/index.php?diff=64749&oldid=64378 5* 03Erikkonstas 5* (-9) 10 < 1564309560 188677 :int-e!~noone@int-e.eu PRIVMSG #esoteric :which overrides the file mode for ELF files < 1564309618 975536 :int-e!~noone@int-e.eu PRIVMSG #esoteric :https://github.com/file/file/blob/master/src/readelf.c modifies ms->mode in a couple of places. < 1564309653 510228 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yikes. OK. < 1564309723 313820 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` readelf -a /bin/true | grep FLAGS_1 < 1564309724 86009 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ 0x000000006ffffffb (FLAGS_1) Flags: PIE < 1564309804 161681 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I wonder where this is specified? < 1564310173 989179 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://cirosantilli.com/elf-hello-world#df_1_pie talks about it and links to a description < 1564310178 403912 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Man, this is ridiculous. < 1564310241 230094 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`` readelf -h /lib64/ld-linux-x86-64.so.2 | grep -i entry < 1564310242 28006 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ Entry point address: 0xc20 < 1564310266 156398 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Even ld-linux is randomized? < 1564310275 831574 :int-e!~noone@int-e.eu PRIVMSG #esoteric :It looks like this elf specific hack was initially introduced just for ", stripped" (checking for the absence of a particular type of section is too hard for the simple 'magic' logic) < 1564310277 252138 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I think I'm a bit confused about how ASLR works. < 1564310303 133047 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It seems the kernel decides to randomize based on an ELF file calling itself DYN. < 1564310422 561490 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hmm, on a fundamental level that's nevessary: ld.so remains mapped executably, and may contain useful functions and ROP gadgets. < 1564310430 825554 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Right. < 1564310441 663832 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But then why would the kernel only randomize DYN files? < 1564310446 698951 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Can static executables get randomized? < 1564310563 991084 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Hrm, depends on details of the ELF format that I don't want to check... < 1564310648 103473 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://stackoverflow.com/a/55704865 says "The Linux kernel 5.0 determines if ASLR can be used based on ET_DYN" < 1564310769 433038 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :https://github.com/torvalds/linux/blob/v5.0/fs/binfmt_elf.c#L956 < 1564310786 785510 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :"There are effectively two types of ET_DYN * binaries: programs (i.e. PIE: ET_DYN with INTERP) and loaders (ET_DYN without INTERP, since they _are_ the ELF interpreter)." < 1564310791 49781 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :thanks, linux. thinux. < 1564310856 986316 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Oh, well, that doesn't say what I thought it did. < 1564310907 929561 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But the gist of it seems the same. < 1564312079 273887 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net PART :#esoteric < 1564312285 758844 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1564313952 417483 :int-e!~noone@int-e.eu PRIVMSG #esoteric :@metar lowi < 1564313952 762906 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :LOWI 281120Z 07003KT 030V170 9999 -SHRA FEW025 SCT050 BKN070 20/16 Q1001 TEMPO SHRA < 1564313975 767480 :int-e!~noone@int-e.eu PRIVMSG #esoteric :not hot today. it's raining actually. < 1564315541 776773 :FreeFull!~freefull@defocus/sausage-lover JOIN :#esoteric < 1564316921 504594 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :The PE machine identifier for x86-64 is 0x8664 < 1564318636 519688 :int-e!~noone@int-e.eu PRIVMSG #esoteric :have a look at Intel's PCI vendor id some day < 1564318668 524760 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(it's 0x8086) < 1564319283 124832 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That doesn't use the x, though. < 1564319432 93990 :int-e!~noone@int-e.eu PRIVMSG #esoteric :the 0x isn't part of the ID anyway < 1564319966 236197 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Read error: Connection reset by peer < 1564319994 207719 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net JOIN :#esoteric < 1564320713 602232 :xkapastel!uid17782@gateway/web/irccloud.com/x-ybdkhkgmqgsjwoov JOIN :#esoteric > 1564322804 748124 PRIVMSG #esoteric :14[[07Sidex14]]4 M10 02https://esolangs.org/w/index.php?diff=64750&oldid=64708 5* 03A 5* (+189) 10 > 1564323028 142267 PRIVMSG #esoteric :14[[07Brainfuck extensions14]]4 M10 02https://esolangs.org/w/index.php?diff=64751&oldid=61455 5* 03A 5* (+30) 10 > 1564323428 172853 PRIVMSG #esoteric :14[[07Sidex14]]4 10 02https://esolangs.org/w/index.php?diff=64752&oldid=64750 5* 03A 5* (+1) 10Oops < 1564324240 206361 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Intel also has the "8086F2" MAC OUI, which may or may not be a coincidence. (They have many others too.) > 1564324609 800379 PRIVMSG #esoteric :14[[07Idea14]]4 10 02https://esolangs.org/w/index.php?diff=64753&oldid=64748 5* 03A 5* (+109) 10 < 1564324813 263100 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Next you'll tell me they have it in their CPUID < 1564325340 887516 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: I don't know, do they? < 1564325406 15011 :int-e!~noone@int-e.eu PRIVMSG #esoteric :> map length . words $ "GenuineIntel AuthenticAMD" < 1564325412 985772 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric : mueval-core: Time limit exceeded < 1564325417 248248 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ah < 1564325418 446055 :int-e!~noone@int-e.eu PRIVMSG #esoteric :> map length . words $ "GenuineIntel AuthenticAMD" < 1564325421 822160 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric : [12,12] < 1564325445 683575 :int-e!~noone@int-e.eu PRIVMSG #esoteric :that's the only part of cpuid I tend to remember < 1564325447 536665 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net JOIN :#esoteric < 1564325466 212083 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net PART :#esoteric < 1564326601 80800 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :int-e: Oh man, https://www.cs.stevens.edu/~jschauma/631A/elf.html < 1564326614 971145 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So many things. > 1564327075 377131 PRIVMSG #esoteric :14[[07Talk:Sidex14]]4 10 02https://esolangs.org/w/index.php?diff=64754&oldid=64705 5* 03Areallycoolusername 5* (+194) 10 < 1564328417 463511 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net JOIN :#esoteric < 1564328432 195883 :Frater_EST!~adrianbib@wsip-68-15-198-210.ok.ok.cox.net PART :#esoteric < 1564328727 230800 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Ping timeout: 245 seconds > 1564329559 374344 PRIVMSG #esoteric :14[[07Talk:Sidex14]]4 10 02https://esolangs.org/w/index.php?diff=64755&oldid=64754 5* 03Arseniiv 5* (+588) 10/* Concatenative */ new section < 1564332870 203475 :Sgeo!~Sgeo@ool-18b98455.dyn.optonline.net JOIN :#esoteric < 1564332903 577813 :Sgeo!~Sgeo@ool-18b98455.dyn.optonline.net PRIVMSG #esoteric :You know what would be nice? A non-dying Internet connection. And a chat platform that doesn't spam people when someone happens to have a dying Internet connection. < 1564333128 424860 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :someone's salty < 1564333149 259156 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :Sgeo: I rent a cheap VPS, run irssi there and connect with mosh from both my laptop and phone < 1564333167 789767 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :it's very convenient and only rarely disconnects < 1564333185 150827 :kmc!~beehive@li521-214.members.linode.com PRIVMSG #esoteric :only when linode reboots my machine, or i have to update irssi < 1564335039 957805 :moei!~moei@softbank221078042071.bbtec.net JOIN :#esoteric < 1564336710 489419 :user24!~user24@p4FCA30BF.dip0.t-ipconnect.de JOIN :#esoteric < 1564337328 778905 :doesntthiswork!~doesthisw@98-125-168-130.dyn.centurytel.net JOIN :#esoteric < 1564337946 375184 :dont-panic!~Andipanic@225.sub-174-224-158.myvzw.com JOIN :#esoteric < 1564337957 127444 :dont-panic!~Andipanic@225.sub-174-224-158.myvzw.com PRIVMSG #esoteric :meow? < 1564340616 249721 :user24!~user24@p4FCA30BF.dip0.t-ipconnect.de QUIT :Quit: Leaving < 1564341033 223513 :arseniiv!~arseniiv@136.169.234.37 QUIT :Read error: Connection reset by peer < 1564341050 565846 :arseniiv!~arseniiv@136.169.234.37 JOIN :#esoteric < 1564342397 870751 :lynn!sid154965@gateway/web/irccloud.com/x-heibmrmlhutuqfbg QUIT :Read error: Connection reset by peer < 1564342417 640198 :lynn!sid154965@gateway/web/irccloud.com/x-kackpwqdkqqshueb JOIN :#esoteric < 1564344002 170208 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 245 seconds < 1564344063 267142 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1564345777 449558 :Googied!~Googied@2a00:23c5:f9f:2001:15ed:5539:f311:a057 JOIN :#esoteric < 1564345875 71576 :Googied!~Googied@2a00:23c5:f9f:2001:15ed:5539:f311:a057 PART #esoteric :"Leaving" > 1564346629 397054 PRIVMSG #esoteric :14[[07Renumbering14]]4 N10 02https://esolangs.org/w/index.php?oldid=64756 5* 03DoggyDogWhirl 5* (+1839) 10 > 1564346634 606808 PRIVMSG #esoteric :14[[07Renumbering/Python Implementation14]]4 N10 02https://esolangs.org/w/index.php?oldid=64757 5* 03DoggyDogWhirl 5* (+1486) 10 < 1564347771 664341 :Sgeo_!~Sgeo@ool-18b98455.dyn.optonline.net JOIN :#esoteric < 1564347952 54678 :Sgeo!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Ping timeout: 245 seconds > 1564349349 924615 PRIVMSG #esoteric :14[[07User:DoggyDogWhirl14]]4 10 02https://esolangs.org/w/index.php?diff=64758&oldid=64682 5* 03DoggyDogWhirl 5* (+18) 10 < 1564349498 624998 :xkapastel!uid17782@gateway/web/irccloud.com/x-ybdkhkgmqgsjwoov QUIT :Quit: Connection closed for inactivity > 1564349512 406450 PRIVMSG #esoteric :14[[07Language list14]]4 M10 02https://esolangs.org/w/index.php?diff=64759&oldid=64646 5* 03DoggyDogWhirl 5* (+18) 10 < 1564349527 934475 :dont-panic!~Andipanic@225.sub-174-224-158.myvzw.com QUIT :Ping timeout: 258 seconds < 1564349783 223129 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net JOIN :#esoteric < 1564349947 290292 :dont-panic!~Andipanic@225.sub-174-224-158.myvzw.com JOIN :#esoteric < 1564349987 657228 :Sgeo_!~Sgeo@ool-18b98455.dyn.optonline.net QUIT :Ping timeout: 268 seconds < 1564350978 483022 :atslash!~atslash@static.231.107.9.5.clients.your-server.de QUIT :Quit: Leaving < 1564351445 79678 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :What is the command in Perl to count how many copies of a letter can be found in a string? < 1564353293 650993 :xkapastel!uid17782@gateway/web/irccloud.com/x-niyftdharlfgogth JOIN :#esoteric < 1564353323 272299 :moei!~moei@softbank221078042071.bbtec.net QUIT :Quit: Leaving... < 1564356466 533497 :arseniiv!~arseniiv@136.169.234.37 QUIT :Ping timeout: 272 seconds < 1564356927 243922 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 245 seconds < 1564357246 305599 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1564358138 208453 :ais523!~ais523@unaffiliated/ais523 JOIN :#esoteric < 1564358180 874502 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :zzo38: there isn't a dedicated command, but if you use code like $string =~ y/x/x/ to replace the letter with itself in the string, the return value is the number of replacements (and the string doesn't actually change); for a hardcoded letter, that's probably the shortest and clearest way to do it < 1564358185 775222 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :Sgeo: If you do not want that spam then you should filter it out by your client. < 1564358206 883564 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :ais523: As it turns out I asked on ifMUD and received a suitable answer there, so I did what they said and it work. < 1564358219 693722 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :was it the same answer or a different one? < 1564358247 555247 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :hmm… a general method might be to split the string on the letter, count the number of components in the result, and subtract 1 < 1564358279 625343 :Sgeo__!~Sgeo@ool-18b98455.dyn.optonline.net PRIVMSG #esoteric :zzo38, it's other people complaining at me in one of the channels I'm in < 1564358299 142941 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :Their answer was: $count = () = ($str =~ /$letter/g) < 1564358339 899873 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :I'm a bit surprised that =()= works < 1564358344 115426 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :although I can see logical rules behind which it would < 1564358353 75484 :zzo38!~zzo38@24-207-15-213.eastlink.ca PRIVMSG #esoteric :I asked because I was modifying a Scrabble game in Perl. I added a "count" command, to count how many letters remain according to your point of view, so the letters in opponent's hand have to added back in to the count.