00:29:51 <esolangs> [[Gensym]] N https://esolangs.org/w/index.php?oldid=170371 * Corbin * (+589) Stub 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!
00:31:49 <esolangs> [[Gensym]] https://esolangs.org/w/index.php?diff=170372&oldid=170371 * Aadenboy * (+13) lowercase
00:56:25 <ais523> hmm, "compiler routine" is a bit ambiguous but I don't know what else to call it
00:56:52 <ais523> 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)
00:57:19 <ais523> I think gensym would be ontopic for WIkipedia but it might be hard to find the required amount of secondary coverage
00:57:32 <ais523> especially as it's likely to be, e.g., side mentions in academic papers
00:59:00 <b_jonas> I gensym in two different levels in Olvashato, I guess you could get confused by that
01:01:59 <b_jonas> 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).
01:08:31 <sorear> huh, https://en.wikipedia.org/wiki/Fresh_variable exists
01:10:12 <ais523> that article would probably be better if it explained the difference between fresh variables and free variables
01:11:30 <ais523> there was an AfD where people thought it might be good to merge into another article but weren't sure which one
01:11:41 <ais523> I suspect the correct location is an article about variable capture, but Wikipedia doesn't have one of those either
01:12:42 <ais523> ah, it's a section, https://en.wikipedia.org/wiki/Hygienic_macro#The_hygiene_problem
01:13:07 <ais523> but it's worded in terms of shadowing rather than capturing
01:14:43 <esolangs> [[Gensym]] https://esolangs.org/w/index.php?diff=170373&oldid=170372 * Ais523 * (+84) link to the appropriate Wikipedia section
01:32:11 <esolangs> [[Language list]] https://esolangs.org/w/index.php?diff=170374&oldid=170361 * Mker-bin * (-10) /* D */
01:34:02 -!- amby has quit (Quit: so long suckers! i rev up my motorcylce and create a huge cloud of smoke. when the cloud dissipates im lying completely dead on the pavement).
01:35:21 <esolangs> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=170375&oldid=170243 * Mker-bin * (-159) /* Introductions */
01:41:12 <b_jonas> 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.
01:44:18 -!- strerror has quit (Ping timeout: 246 seconds).
01:44:18 -!- strerror_r has joined.
01:53:21 <esolangs> [[Special:Log/newusers]] create * Ytebbit * New user account
01:55:18 -!- b_jonas_ has joined.
01:55:20 -!- Hoolootwo has joined.
01:57:41 -!- op_4_ has joined.
01:58:58 -!- chiselfu1e has joined.
02:00:23 -!- b_jonas has quit (*.net *.split).
02:00:24 -!- op_4 has quit (*.net *.split).
02:00:24 -!- lambdabot has quit (*.net *.split).
02:00:24 -!- chiselfuse has quit (*.net *.split).
02:00:24 -!- Hooloovoo has quit (*.net *.split).
02:00:24 -!- zzo38 has quit (*.net *.split).
02:00:25 -!- op_4_ has changed nick to op_4.
02:03:24 <int-e> 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)
02:03:28 -!- lambdabot has joined.
02:05:48 <int-e> 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.
02:07:37 <int-e> (The finicky part is unchanged so I still consider this to be the same solution.)
02:15:00 -!- zzo38 has joined.
02:15:02 -!- b_jonas_ has changed nick to b_jonas.
02:26:29 <korvo> ais523: Nice, thanks.
02:27:18 <ais523> 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
02:27:19 <korvo> 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.
02:29:18 <ais523> these little things that are side-mentions everywhere are so hard to document well
02:34:12 <b_jonas> 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
02:34:25 <esolangs> [[User:Ytebbit]] N https://esolangs.org/w/index.php?oldid=170376 * Mker-bin * (+132) Introducing Ytebbit
02:34:50 <ais523> b_jonas: the situation in Prolog is complicated because the unbound variables it generates usually don't have names at all
02:34:52 <b_jonas> s/function calls/function entry/
02:35:16 <ais523> the printing algorithms work by trying to check which of the unbound variables in the thing being printed are equal to each other
02:35:57 <ais523> | ?- display(a(F, G, b(G, T))).
02:36:24 <ais523> gensymming can be useful in Prolog but you wouldn't use it for variable names
02:38:24 <ais523> 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
02:38:53 <b_jonas> 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
02:39:20 <ais523> | ?- assertz(a(b(C,C))).
02:39:34 <b_jonas> the symbols just need to have identities that can be distinguished from each other and used as keys in a dictionary
02:39:48 <ais523> variable name has been forgotten because it wasn't part of the most recent REPL statement
02:40:00 <b_jonas> (and probably distingiushed from some non-symbol types)
02:42:01 <korvo> 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.
02:43:03 <korvo> They do both involve bumping a counter, but only gensym actually creates a symbol.
02:46:01 <korvo> 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.
02:46:18 <korvo> sorear: Oh, thank you too for the link.
02:46:39 -!- pool has joined.
02:51:47 -!- somefan has quit (Ping timeout: 272 seconds).
02:57:10 <esolangs> [[2027]] N https://esolangs.org/w/index.php?oldid=170377 * Tommyaweosme * (+508) Created 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.
02:57:56 <esolangs> [[User:Tommyaweosme]] https://esolangs.org/w/index.php?diff=170378&oldid=170178 * Tommyaweosme * (+13) /* esolangs */ added [[2027]], fixed infamous brainletter typo
03:00:14 <esolangs> [[Brainletter]] https://esolangs.org/w/index.php?diff=170379&oldid=134668 * Tommyaweosme * (+26)
03:01:07 -!- pool has quit (Quit: The Lounge - https://thelounge.chat).
03:03:25 -!- pool has joined.
03:05:33 -!- pool has quit (Client Quit).
03:06:22 -!- pool has joined.
03:08:47 -!- pool has quit (Client Quit).
03:09:17 -!- pool has joined.
03:22:54 <b_jonas> 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
03:27:31 <b_jonas> but maybe this is too general to be considered a gensym
03:28:42 <b_jonas> 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