> 1765326591 204088 PRIVMSG #esolangs :14[[07Gensym14]]4 N10 02https://esolangs.org/w/index.php?oldid=170371 5* 03Corbin 5* (+589) 10Stub an important concept. I'm writing a blog post and I'd like to have ''something'' to bluelink, as WP doesn't have an article on this! > 1765326709 143877 PRIVMSG #esolangs :14[[07Gensym14]]4 10 02https://esolangs.org/w/index.php?diff=170372&oldid=170371 5* 03Aadenboy 5* (+13) 10lowercase < 1765328185 5128 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :hmm, "compiler routine" is a bit ambiguous but I don't know what else to call it < 1765328212 722418 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :it's generally used by metaprogramming facilities to generate symbols at compile time (although it could plausibly be used at runtime in a language that was sufficiently dynamic) < 1765328239 222337 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :I think gensym would be ontopic for WIkipedia but it might be hard to find the required amount of secondary coverage < 1765328252 685470 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :especially as it's likely to be, e.g., side mentions in academic papers < 1765328340 533873 :b_jonas!~x@80.98.84.202 PRIVMSG #esolangs :I gensym in two different levels in Olvashato, I guess you could get confused by that < 1765328519 154012 :b_jonas!~x@80.98.84.202 PRIVMSG #esolangs :The compiler gens prolog symbol names -- these are represented by ruby strings so there's no ruby gensym involved. But then the if you run the resulting prolog program, it can use copy_term to gen more syms at runtime: this happens whenever you call a function value (as opposed to a named function). < 1765328911 25031 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :huh, https://en.wikipedia.org/wiki/Fresh_variable exists < 1765329012 370308 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :that article would probably be better if it explained the difference between fresh variables and free variables < 1765329090 409093 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :there was an AfD where people thought it might be good to merge into another article but weren't sure which one < 1765329101 959521 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :I suspect the correct location is an article about variable capture, but Wikipedia doesn't have one of those either < 1765329162 840342 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :ah, it's a section, https://en.wikipedia.org/wiki/Hygienic_macro#The_hygiene_problem < 1765329187 21322 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :but it's worded in terms of shadowing rather than capturing > 1765329283 738670 PRIVMSG #esolangs :14[[07Gensym14]]4 10 02https://esolangs.org/w/index.php?diff=170373&oldid=170372 5* 03Ais523 5* (+84) 10link to the appropriate Wikipedia section > 1765330331 892970 PRIVMSG #esolangs :14[[07Language list14]]4 10 02https://esolangs.org/w/index.php?diff=170374&oldid=170361 5* 03Mker-bin 5* (-10) 10/* D */ < 1765330442 278899 :amby!~ambylastn@host-78-151-27-178.as13285.net QUIT :Quit: so long suckers! i rev up my motorcylce and create a huge cloud of smoke. when the cloud dissipates im lying completely dead on the pavement > 1765330521 809113 PRIVMSG #esolangs :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=170375&oldid=170243 5* 03Mker-bin 5* (-159) 10/* Introductions */ < 1765330872 56451 :b_jonas!~x@80.98.84.202 PRIVMSG #esolangs :I'm looking at https://worrydream.com/AlligatorEggs/#colorrule , it says “… we need to change that color in one family to something else.”. doesn't say “fresh color” or anything like that. < 1765331058 178811 :strerror!~strerror@user/strerror QUIT :Ping timeout: 246 seconds < 1765331058 179028 :strerror_r!~strerror@user/strerror JOIN #esolangs strerror :ZNC - https://znc.in > 1765331601 848472 PRIVMSG #esolangs :14[[07Special:Log/newusers14]]4 create10 02 5* 03Ytebbit 5* 10New user account < 1765331718 601290 :b_jonas_!~x@catv-80-98-84-202.catv.fixed.one.hu JOIN #esolangs * :b_jonas < 1765331720 305570 :Hoolootwo!~Hooloovoo@hax0rbana.org JOIN #esolangs * :Hooloovoo < 1765331861 317804 :op_4_!~tslil@2a01:4f8:c0c:7952::1 JOIN #esolangs * :op_4 < 1765331938 127861 :chiselfu1e!~chiselfus@user/chiselfuse JOIN #esolangs chiselfuse :chiselfuse < 1765332023 984348 :b_jonas!~x@80.98.84.202 QUIT :*.net *.split < 1765332024 66288 :op_4!~tslil@user/op-4/x-9116473 QUIT :*.net *.split < 1765332024 94079 :lambdabot!~lambdabot@haskell/bot/lambdabot QUIT :*.net *.split < 1765332024 131575 :chiselfuse!~chiselfus@user/chiselfuse QUIT :*.net *.split < 1765332024 159661 :Hooloovoo!~Hooloovoo@hax0rbana.org QUIT :*.net *.split < 1765332024 319130 :zzo38!~zzo38@host-24-207-46-238.public.eastlink.ca QUIT :*.net *.split < 1765332025 163095 :op_4_!~tslil@2a01:4f8:c0c:7952::1 NICK :op_4 < 1765332204 660427 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Well, here's one more refinement: https://int-e.eu/~bf3/tmp/omnipresence-exact.txt -- this version spawns exactly CORESIZE-6 threads for the bulk task instead of relying on exceeding the MAXPROCESS limit, which also happens to save two instructions (counting the dat 0 instruction that killed the sacrificial processes previously) < 1765332208 167981 :lambdabot!~lambdabot@haskell/bot/lambdabot JOIN #esolangs lambdabot :Lambda_Robots:_100%_Loyal < 1765332348 417876 :int-e!~noone@int-e.eu PRIVMSG #esolangs :For the most part this was motivated by trying to figure out the variables feature of the pMARS language. There are no binary shift operations, so converting a number to binary is a tad tricky. < 1765332457 755768 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(The finicky part is unchanged so I still consider this to be the same solution.) < 1765332900 202294 :zzo38!~zzo38@host-24-207-46-238.public.eastlink.ca JOIN #esolangs zzo38 :zzo38 < 1765332902 33015 :b_jonas_!~x@catv-80-98-84-202.catv.fixed.one.hu NICK :b_jonas < 1765333589 254340 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :ais523: Nice, thanks. < 1765333638 34050 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :korvo: there are a couple of relevant sections in that article, I posted one on IRC and one on Esolang, so pick whichever one works best for your purpsoes < 1765333639 62956 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :And yeah, it's always been side mentions. OCaml and Scheme papers that have (define (gensym)) without explanation. Little methods in parser libraries. It didn't click for me until this afternoon that CL literally has a (gensym) routine. < 1765333758 780003 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :these little things that are side-mentions everywhere are so hard to document well < 1765334052 300735 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :ais523: how about in documents about prolog? I'd expect it's more documented how prolog handles this because prolog generates unbound variables during normal function calls, and also often prints expressions that contain unbound variable, so it has to handle printing those genned syms > 1765334065 879683 PRIVMSG #esolangs :14[[07User:Ytebbit14]]4 N10 02https://esolangs.org/w/index.php?oldid=170376 5* 03Mker-bin 5* (+132) 10Introducing Ytebbit < 1765334090 950467 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :b_jonas: the situation in Prolog is complicated because the unbound variables it generates usually don't have names at all < 1765334092 226893 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :s/function calls/function entry/ < 1765334116 288974 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :the printing algorithms work by trying to check which of the unbound variables in the thing being printed are equal to each other < 1765334135 590038 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :I see < 1765334157 850737 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :| ?- display(a(F, G, b(G, T))). < 1765334159 465707 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :a(_23,_24,b(_24,_25)) < 1765334184 629901 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :gensymming can be useful in Prolog but you wouldn't use it for variable names < 1765334304 161110 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :the REPL appears to retain variable names, but that's just because it's trying to match up the names in its output with the names it saw in the input, rather than because the variables have names internally < 1765334333 275929 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :I think getting printable names is usually not the main purpose of genning syms even outside of prolog, even if gensym happens to be implemented in a way that it gives printable names, or you get printable names in error messages later < 1765334360 570278 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :| ?- assertz(a(b(C,C))). < 1765334362 129613 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :| ?- a(X). < 1765334363 621592 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :X = b(A,A) < 1765334374 369305 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :the symbols just need to have identities that can be distinguished from each other and used as keys in a dictionary < 1765334388 658535 :ais523!~ais523@user/ais523 PRIVMSG #esolangs :variable name has been forgotten because it wasn't part of the most recent REPL statement < 1765334400 420564 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :(and probably distingiushed from some non-symbol types) < 1765334521 710192 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :I think freshness is slightly different from gensym. In e.g. miniKanren, (fresh (x) g) doesn't say whether x is free in g, just that *if* it were free then it is now bound, and doesn't say whether there's a symbol for the variable. < 1765334583 793564 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :They do both involve bumping a counter, but only gensym actually creates a symbol. < 1765334761 177949 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :I suppose it's a more imperative approach. When a formula is open in one variable then we can naturally talk about binding a fresh variable over that formula without actually naming it. gensym is about generating the token for the name without necessarily having a formula to bind. < 1765334778 545146 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :sorear: Oh, thank you too for the link. < 1765334799 636209 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765335107 341100 :somefan!~somefan@208.58.192.69 QUIT :Ping timeout: 272 seconds > 1765335430 398473 PRIVMSG #esolangs :14[[07202714]]4 N10 02https://esolangs.org/w/index.php?oldid=170377 5* 03Tommyaweosme 5* (+508) 10Created page with "2027 is a program with 2027 unique commands, and it only works in the year 2025. However, every year, the documentation is changed so that the current year is the only one that is supported in. == Commands == f_1 - Undefined behaviour, different for every interpreter. > 1765335476 105630 PRIVMSG #esolangs :14[[07User:Tommyaweosme14]]4 10 02https://esolangs.org/w/index.php?diff=170378&oldid=170178 5* 03Tommyaweosme 5* (+13) 10/* esolangs */ added [[2027]], fixed infamous brainletter typo > 1765335614 864172 PRIVMSG #esolangs :14[[07Brainletter14]]4 10 02https://esolangs.org/w/index.php?diff=170379&oldid=134668 5* 03Tommyaweosme 5* (+26) 10 < 1765335667 757774 :pool!~nathan@user/PoolloverNathan QUIT :Quit: The Lounge - https://thelounge.chat < 1765335805 689386 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765335933 443624 :pool!~nathan@user/PoolloverNathan QUIT :Client Quit < 1765335982 696433 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765336127 830417 :pool!~nathan@user/PoolloverNathan QUIT :Client Quit < 1765336157 692528 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765336974 675854 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :korvo: I think gensym is for generating a symbol (that isn't equal to any previously existing symbol), but a symbol isn't necessarily used as a variable, in particular even in prolog you could have a "gensym" that generates a new atom rather than a variable < 1765337251 194078 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :but maybe this is too general to be considered a gensym < 1765337322 252780 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :like in python3, you could just define `class symbol: __slots__ = []`, instances of this are usable as dictionary keys and compare by address by default, so the call `symbol()` creates a fresh symbol that works this way > 1765337347 551449 PRIVMSG #esolangs :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=170380&oldid=170375 5* 03Ytebbit 5* (+124) 10Introducing myself as Ytebbit