« first day (4137 days earlier)      last day (697 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
@pxeger not so; Lua is from 1993; Tcl is from 1988; Guile is also from 1993
and LuaJIT is the sort of thing that only gets invented after the language has already become successful
 
But LuaJIT is helping keep it successful
 
I think the reason Lua does well is that it has fairly reasonable syntax, plus a good set of standard data structures
 
Tcl is still in use, especially via its GUI toolkit Tk, which is bundled with (or at least has bindings from) Python, Ruby, Perl, etc
 
yes, I think Tk is one of its main applications nowadays
I learned (basic) Tcl for AALTAP, that gave me a good understanding of just how odd the language's parser is
it's like they wrote a half-decent tokeniser with a few weird bugs, and then designed an entire language around it
 
Tcl has a syntax a bit like shell script, but without most of the features of shell that make it appropriate
And Guile is a lisp, and S-expressions seem to inevitably never catch on in the mainstream
(except maybe Clojure)
 
4:08 PM
IIRC, Lisp wasn't intended to use S-expressions originally – the plan was to have a more natural-looking syntax and desugar, but they never got around to defining the details of the more natural syntax
 
M-expressions are a thing
 
and it would have been hard to use with macros
 
Elixir and Julia have lisp-like macro systems while using something more like M-expressions
but they don't use macros as pervasively as a true lisp does
 
I guess Prolog is a good example of what it could have looked like; the syntax handles macros just as well as Lisp does, and parse trees can be manipulated directly as data structures, etc., but it's less parenthesis-heavy than Lisp
people rarely seem to actually use macros in Prolog in practice, though, for some reason
possibly because it's frequently a compiled language, and macros would need to run during the compile phase rather than at runtime, which makes the whole toolchain more complex
actually I think one of the main issues with Lisp syntax is that a function call, e.g. (add 1 2), is both syntactically and runtime indistinguishable from a list, e.g. (1 2 3) – this makes it difficult to print the function calls in a prettier way, and also requires explicit quoting to stop literal lists being evaluated as though they were functions
Prolog's solution to this problem is to a) quote everything by default (e.g. X = 1 + 1 assigns the expression 1 + 1, i.e. '+'(1, 1), to X – it doesn't evaluate the expression to 2), and b) have an explicit operator for converting between lists and ASTs for function calls, it isn't implicit
actually, on its own, X = 1 + 1 isn't evaluated either, to evaluate it you have to put it inside a function body and then call the function
until then it's just an inert bit of AST
this is a kind-of extreme way to avoid the need for a quote operator, but I kind-of like it
 
@RadvylfPrograms ahh that explains why the people i had mentioned it to before hadnt heard of it. ok that makes sense
 
4:18 PM
It's occured to me that CGCC's like the ultimate way to get exposed to all the programming languages out there. We've got historical stuff like FORTRAN, COBOL, ALGOL, more theoretical stuff like turing machine code and combinator calculus, today's common languages, most of the popular esolangs, various languages like Lua and LaTeX with more specific purposes, etc.
HW's a catalog of 1100 languages, for example
 
Aside from golfing languages, there is still a bias towards popular languages though
 
CGCC has a very skewed view of what popular esolangs are
 
I don't recall ever seeing an ALGOL answer
Sure, I could search for one, but I'm not really being "exposed" to ALGOL
 
top ten most popular programming languages:
 
I think most esolangs used here are either a) designed to be good at golfing even compared to other languages (e.g. Jelly), or b) designed to be interesting to golf in
 
4:21 PM
sorry i forgot theres no soft enter on mobile
 
Yeah, true. The historical ones aren't super common here, but it's how I learned most of them exist.
 
I think it is also true that the majority of esolangs aren't interesting
 
fo sho
 
@ais523 I consider golfing languages to be separate from esolangs, with both falling under recreational languages.
 
Statistically, most of them don't do anything new
 
4:22 PM
agree abt that distinction
they can go on esolangs wiki for convenience, however
 
even out of the top five esolangs, INTERCAL is rarely used, and Unlambda almost unheard of; I use Underload for functional programming and quine questions sometimes, but few other people do; Malbolge is almost impossible to write in; and so only BF gets a good showing
 
its ok if names dont perfectly line up
 
fwiw, most golfing languages don't fit my working definition for an esolang, "a language for which there would be no point in writing a better standard library"
 
Whitespace is used occasionally
@ais523 Mathematica's hardly an esolang
 
Whitespace is mostly used in , right? just like Lenguage in
@RadvylfPrograms a better standard library would improve Mathematica, though – in fact, the standard library is basically the only selling point of the language
 
4:24 PM
I think I've seen it in other places, not recently though
@ais523 This just seems like a heristic for "doesn't aim to be practical and convenient", in which case I agree
 
(incidentally, I recently tried to invent a tarpit before realising that it was basically Mathematica minus all the builtins, and thus there was no point in inventing it because it had already been invented)
 
not to derail and i hope you all can continue talking abt programming languages and their use in challenges as it is equally on topic and interesting, but,
any feedback on this? or have i not given it long enough lol
 
there are some languages designed with golfing in mind that aim for very high compression via having only minimal builtins but a huge amount of declarative power
 
like i could probavly clean up the explanation a little more but like, what i/o makes sense? :3
 
@thejonymyster re: output formats, the question is "invert a function from X to Y" and thus the question should be "write a function from Y to X", then you can use the standard I/O rules (although as usual, you want "program or function" rather than just "function")
 
4:28 PM
right ofc my bad lol
but yeah that is really helpful tip ty
 
so it's "given the result of A versus B and the result of B versus A, output all possible (A, B) pairs"
"output a list of pairs" is a little more complex I/O than usual, so some esolangs will struggle, but I think the default rules will hadnle it
you might want to make a note that it's OK if text output uses the same delimiter between the two elements of a pair as it does between one pair and a next
 
sure im down yeah
the questions not abt formatting or nothin like that :-3
 
I think outputting [(1,2),(3,4)] as 1 2 3 4 is reasonable as an output format, but that isn't obvious from the default rules and probably needs to be qualified in the question
 
thank you yeah i will do
only integer inputs?
pos ints i mean sorry im on mobile
 
oh, right, this problem has come up before and I don't think it was satisfactorily resolved last time
one way to work around it is to number the table implicitly
 
4:31 PM
I think it's reasonable to leave it undefined and let answers pick some reasonable subset of Unicode they're fine with using.
 
i.e. you need to return the row/column number from the table
 
I think CGCC has gotten a lot less nitpicky by default with I/O in the last few years
 
@RadvylfPrograms strings versus integers is a really big distinction for many languages
 
@ais523 I think I know what you mean, but do you have any specific examples in mind?
 
yeah i kinda wanna like
 
4:32 PM
@ais523 Like the half-byte golfing language family?
 
literally let input decide how they want to allow input so long as its like... not restricted to "only 2 values so i can hardcode it"
 
like if youd rather strings or nums or whatever go for it
ill give it a big edit and come back maybe
thx all
 
Allowing either strings or numbers seems reasonable
 
actually that's probably a good option, but the problem is that the input is fundamentally a table with column headings, which is hard to represent
this is why fixing the headings to 0, 1, 2, … or 1, 2, 3, … (answerer's choice) is probably the better option in practice
 
4:35 PM
oh uh it doesnt have to literally be a table as input
like the first list is also acceptable, ill be more clear
in the post
 
well, you need to specify the relationships somehow
 
@ais523 A mapping of pairs to outputs would be an I/O format used by a lot of answers I'd imagine
Or even just [[Rock, Rock, Win], [Rock, Paper, Loss], [Rock, Scissors, Win], ...]
 
@RadvylfPrograms I think it's been more than the last few years, it feels like it's been getting less nitpicky over its entire history
 
Like I think for most of my challenges I just say something along the lines of "take input in any reasonable manner" and it's never caused any issues
 
4:37 PM
@ais523 if we look at your idea, I am not sure how it works. Say we know the optimal value for choosing 50 coins
 
ill just give the whole thing a brush up now that ive got all this in mind, i really just needed to see what things were clear and what wasnt
thankz
peace be with you all ov
 
the loosening of I/O formats feels like it sometimes has negative consequences, e.g. my second answer here
 
Now we want to know the optimal for choosing 51..
What do we do?
 
oY (like o/ but im doing a peace sign)
 
@graffe you calculate each of 0 to 100 separately; 51 isn't calculated in terms of 50, but rather in terms of the calculations for the left half and right half
 
4:39 PM
There might be a lot of different ways of getting the same optimal score for 50
 
@ais523 I think most answerers just kind of self-moderate how cheaty their I/O is though. We're all here to have fun, it's not 2017 anymore and I think people have mostly moved past trying to bend the rules for better byte counts.
 
@graffe that doesn't matter, pick one, you'll get an equally optimal result either way
like, the idea is, say we have a list of the best score we can get from 0, 1, 2, 3, 4, … 100 from the left half
and the same for the right half
now all we need to do is to find the optimal result from combining the two halves, which only needs checking 101 possibilities
(so I was wrong about it being n log n, it's n² log n, still polynomial though)
@RadvylfPrograms I normally post multiple answers in one post when this sort of situation comes up, "there's an exploit but this is how you solve it without"
 
Yeah, that's a good approach too
It's something I see occasionally with flags that I hope becomes more common
 
or I guess you can think of I/O abuses like flagged variants of Vyxal – you get the ability to take the input as a list of digits, so if the first thing your function would do is to create a list of digits, you can move a byte into the I/O specification
fwiw, I don't really see the attraction of using flagged Vyxal variants for golf – most of them are worse at golfing than Vyxal itself is, because they gain on only a few programs but lose on most others
 
@ais523 (for this example, I'm replacing 50 and 51 with 5 and 6 respectively, and using k to represent the number of coins to choose). If there are 2 piles of coins: [0, 1, 2, 3, a million] and [4, 5, 6, 7, 8, a trillion], then the optimal solution for k=6 is completely unrelated to the optimal solution for k=5.
 
4:44 PM
@ais523 Well yeah, that's the point. You only switch to vyxal s for challenges where it's more optimal.
 
@pxeger the idea is to solve the left half and the right half of the problem, independently of each other, for all ks from 0 to 6; then you use that table of solutions to calculate the solution for the whole problem
 
Sure it's about equal or worse in golfiness for the average challenge, but people don't actually treat it the way our rules do (a totally separate language from vyxal)
 
@ais523 Oh I see
 
the fact that the solutions for each k are pretty much independent is why you need to work it out for all of them
fwiw, I think the dynamic programming solution simplifies to the same algorithm as this one
@RadvylfPrograms this is an interesting thought experiment – suppose I define 65536 Jelly variants, each of which has the first two bytes of the program hardcoded (to a different selection of two bytes); am I violating the MetaGolfScript loophole?
 
That's basically what Lyxal once threatened to do if flag scoring changed with Vyxal
 
4:49 PM
our current precedents require the specific variant of the language in use to have actually been specified / thought about by a human, not just the general algorithm, but 65536 is small enough to manage htat
 
I think it's a gray area where downvotes work pretty well
 
hmm, now I have a vague urge to find a challenge that's easy but not a trivial builtin or pair of builtins, and solve it in ten different flagged Vyxal variants
but I feel like that would be being disruptive to make a point
 
@RadvylfPrograms I've sometimes considered adding an extra rule to my challenges which amounts to "unlike standard I/O rules, I'm allowing snippets"
 
Japt might be more interesting, Vyxal only has ~12 or so cheaty flags, but IIRC Japt has a lot more
 
because honestly I think the best way to get I/O out of your way is not to have any at all, which input by predefined variables, and output as the resulting value of an expression, pretty much are IMO
I've never done it, as you can tell, because I think to myself that the default I/O rules are there for a reason
 
4:52 PM
@pxeger I'm pretty sure I did that once but can't remember why, I'm sure it was a good reason though
 
but in this case I've never fully thought through what that reason would be
@ais523 I think I remember seeing it in some style questions
 
oh, the Showcase explicitly permits snippets, that's a situation where there's an obvious reason
although, the Showcase is its own thing
it would be much easier to find my question if you could search for posts by a particular deleted user…
(you can do that on SEDE but I'm not sure how good it is at searching the text of the post in addition to the author)
 
I feel like really the issue with snippets is that its pretty unclear how they work.
 
@ais523 you can kinda do substring searches using WHERE body LIKE '%keyword%"
 
Like I don't think you can just say "snippets are allowed" you kind of need to explain how snippets are supposed to work.
 
4:57 PM
yeah
 
@pxeger I have an innate aversion to any database query that doesn't have a corresponding index
 
@ais523 You're not the one paying for the database server in this case ;)
 
@pxeger unnecessary energy usage costs everyone in the long run due to the damage it does to the environment
 
SEDE but on blockchain when
 
although, this is a bit inconsistent, because I'm currently checking all the questions that contain the word "snippet" manually to see if I wrote any of them, which almost certainly uses more energy
 
5:00 PM
@WheatWizard My thought process is this: on StackOverflow, which is where our flavour of Code Golf originated, (for non-code-golf questions), I/O is always pretty implicit. In response to the question "how do I repeat a list?", an answer could look like mylist * repeatcount. Nobody asks you to specify that the input is in those two variables, and the question rarely specifies exactly what format they want the answer to take. (And when it does, it's only sometimes respected)
I honestly think the continual push for precision in challenge specifications is a detriment to the site
I wish we could all just use some common sense
I mean, I understand why we can't do it like that, but it's still pretty annoying
 
That's one way to do snippets, but people also do some other weird ways.
 
fwiw, I learned golfing on anagol, which has 100% rigid I/O rules, and there is some interest in that way of doing things too
the punishment for a simple Perl flag on anagol is ten bytes, and is still often worth paying
 
I wish we had rules more like anagol, but simply made new languages for stuff like e.g. Haskell (function), which would just add the boilerplate.
Oh yeah, I don't like the anagol flag penalties.
 
if I were making my own codegolf site I would do it like that
 
I do prefer ppcg's flags make a new language, even if some vyxal programmers don't act like it.
 
5:04 PM
Perl -p, Perl -n, and Perl -a have really different I/O languages (from base Perl and from each other)
the old rule, of each of those flags costing 1, worked fairly well for Perl (although it relied on a loophole for the cost to be 1 rather than 3)
 
Yeah, but it didn't work so well for other things.
 
although, if I were designing the rules, I'd give languages confined to ASCII a bytecount reduction because they're using less than half the bytes
@WheatWizard agreed, it's mostly just a coincidence that it worked well for Perl
 
What do you mean by confined to ascii?
I'm not sure what the point of a byte count reduction applied to an entire language is. Python's still not going to come close to Jelly 90% even if you cut it's score in 4.
 
@WheatWizard no non-ASCII is required for the language to function, nor actually used in the answer
 
@ais523 So as an example Haskell allows you to write certain operators either as ascii or as non-ascii variants, e.g. -> vs →. So Haskell would be ASCII unless you use a character with a code-point above 127?
 
5:11 PM
I'd go further along these lines, and score, e.g., brainfuck as 3 bits per character
@WheatWizard right, ASCII Haskell and Unicode Haskell would be different languages, much like Jelly and Jelly u
 
What's the point though?
 
the main motivation is to prevent SBCS languages getting an automatic advantage when there's a requirement to store large amounts of literal data
 
I guess I really just don't care about a language getting an advantage.
 
for this sort of question, which involves large data + small decompressor, the choice of language mostly doesn't matter, so you can compare answers fairly directly
 
If you are using a SBCS you are probably also using a bunch of other tricks that make it pointless to compare.
 
5:14 PM
but the size of the language's character set really does matter
 
Why does it matter?
 
because you want to know which algorithm is the best, which you can mostly do by comparing bytecounts?
if an optimal answer consists of a 100-byte decompressor and a 5000-byte string literal, the advantage of golfing languages over practical languages will be minimal
 
Why don't you compare from within a language?
 
because there normally aren't two answers in the same language, and yet the algorithms are directly comparable
you could port an algorithm to a different language but nobody does, it's the algorithms that the question is really about
 
I really don't feel like this is very useful tbh. It is such a circumstantial edge case that it seems simpler and more straight forward to just say "bytes are bytes" and be done with it.
 
5:18 PM
anyway, I need to go, but it's been interesting to talk about
 
You can also just do it post factum when you need to compare algorithms, not much reason to complicate the entire scoring for everyone all the time.
 
5:39 PM
I have a cool idea for a 2d language
Every space is represented with a 32-bit integer
The pointer has a state of either 0 or 1, and so it has 8 possible states including movement. So, the 32-bit integer is broken into 8 nibbles, with each providing instructions for what to do in each case.
The first two bits would determine which direction to go, and the next to would be 00 for "set the pointer state to 0", 01 for "set the pointer state to 1", 10 for "take a bit of input", and 11 for "produce a bit of output"
You'd need some way of storing state, and terminating the program, so maybe leaving the boundaries of the program would do those things.
Ooh...maybe leaving the boundaries would do I/O (y-axis) and program termination (x-axis), and 10 and 11 would be used for storage in some way
 
0
A: Sandbox for Proposed Challenges

mathcatSell cinema tickets Or in other words, print out a numbered grid from bottom-middle to top-middle. Challenge Most people think that, in a cinema, the back seats and the middle ones are the best. You'll be receiving the number of seats across and vertically in the theater, your job is to sell the ...

 
5:59 PM
for 10 piles of coins we split them into two groups of 5 piles, solve the problem for each of the two halves and then combine the solutions?
@ais523 let me try to understand. Are you saying for for
@pxeger do you understand the proposed solution?
 
@RadvylfPrograms Okay so it'll be a 40-bit integer instead
Since I actually need three bits for the storage. 000 will set both p and s to 0 (where p is the pointer and s is the internal state), 001 will set p to 1 and s to 0, 010 will set p to 0 and s to 1, and 011 will set both p and s to 1. 100 will set p to 0 and keep s the same, 101 will set p to 1 and keep s the same, 110 will set p to s and set s to 0, and 111 will set p to s and set s to 1.
I might be able to find some subset of four of these that allows all of the same operations, which would allow sticking with 32-bit ops
Waiiit...what if it depended on the state too?
So 64 bits per space
Each possible combination of pointer direction, pointer state bit, and space state bit would factor into which of the 16 nibbles is chosen, and that nibble would set the new pointer direction, pointer state bit, and space state bit
Maybe the program would be infinitely tiled, so with some clever engineering you could make a program that stores infinite state
Moving to a negative x-coordinate would do I/O, and moving to a negative Y-coordinate would terminate the program
 
6:25 PM
this sounds like a horrifying tarpit youre thinking up radvylf
 
TIL I have many friends.
 
7:01 PM
Who else dislikes python but uses it anyway because its useful for quick scripting :P
 
me_irl but JS
 
ellho
 
@Seggan It's great for brainlessly making a Jupyter notebook, throwing a bunch of libraries at it, and pretending you're doing very high level data science and machine learning stuff
 
It's great because I can just use libraries for everything
 
^ ^^
 
7:08 PM
It's kinda unfortunate that Python is so popular though, instead of languages like Nim, Scala, and Kotlin which are also easy to write quick scripts with (despite being compiled)
 
yes
 
@Seggan everyone! :)
@user or Julia!
 
@Seggan I'm a python fan
but I still dislike it
 
Looks like Julia's somewhat commonly used in the data science world
Not as much as Python or R but still close enough
 
8:09 PM
I just saw this answer and holy f**k: codegolf.stackexchange.com/a/177047/104836
It is absolutely insane.
Is there a place where I can post way under-appreciated answers? So they can get more upvotes? This deserves hundreds of them!
 
@Pyautogui Yep! We have an underappreciated answers section with every blog post, and lyxal's drafting one now
 
Good to know! Thanks!
 
that is... absurd
 
8:44 PM
@ais523 Yeah, or occasionally in challenges involving whitespace, where it's fitting.
@ais523 Yeah, I try to avoid them except when justified (e.g. standard I/O gets overruuled)
 
@emanresuA I love the implication behindd "the community decides that Vyxal is not fixable" :P
 
Lol
 
Also, the double "Jyxal is created" :P
 
Should probably add some clarifications
@user I use Vyxal for that :)
 
9:00 PM
@Pyautogui You can also start a bounty to bring some visibility to it
 
Got it. Good to know! I would if I wouldn't drop under 1000 if I did!
 
@cairdcoinheringaahing there are 2 jyxals
 
@Seggan I'm aware, but there are 2 entries in the History Of that have identical titles, despite discussing different events/things
Changing it to "Jyxal (the other one) is created" or something similar would be better :P
@ais523 The site started out incredibly loose on basically everything, then we overcompensated by going super nitpicky and strict, and in the last 3-5 years, we've become more moderate :P
 
9:17 PM
IMO collections.namedtuple is one of Python's best features
CMQ: Should I use a library to provide a Vector3 clas or should I make my own?
That's right Radvylf, I'm actually considering implementing something myself!
 
9:54 PM
@Ginger As in, a list of three numbers?
That seems like 1. a very dumb thing to require a library for and 2. a very dumb thing to use a class for
 
A class for vectors of arbitrary size is usually worth it if you're doing anything with vector math/linear algebra, but for a fixed n, meh
 
Depends on what the language is too
 
the only reason I could see a Vector3 class being useful is for cross products, but then you can just use a function
 
If it has operator overloading it's worth it, otherwise no
You sacrifice a ton of readability and introduce clutter for literally no reason
And it's probably worse performance-wise
(Probably by a negligible amount, but if you have vectors you tend to have lots of them)
 
10:11 PM
@Ginger This has reminded me that Whispers has a Vector class, so I'm going over my old Whispers code, and man, I really should apply some of my uni classes/lectures to the new version of Whispers :P
Got to add a InnerProductSpace class :P
 
10:59 PM
ok so i cleaned [this sandbox](https://codegolf.meta.stackexchange.com/a/24797/107310) up,
are there any weirdly described things or mistakes i can fix before posting?
oh right multiline
i hate this chat formatting so much so much
but yea i reworked it a bit, added some specific spec stuff, it already has "enough" upvotes and ppl seem generally cool with the idea but i just wanna make sure its Squeaky Clean out the gate
 
@thejonymyster I have no idea how the second test case represents any table
 
fair!
idea is each trio of strings is two elements and an outcome
is that too loose i/o? lol
or is it ok, and i just need to explain why in the post?
 
11:33 PM
changing it anyway
if anyone wants to do it looser we'll see lol
 
11:51 PM
@thejonymyster it's not necessarily too loose, just that there's no translation between this list of strings to the table. Grouping it into lists of 3 makes it clear, as does a brief explanation
 
ah reasonable
 
I'd be surprised to see anyone use a completely flat list as input
 
same LOL
but still its not like a formatting challenge, i really wanna be open ended abt formatting
 
00:00 - 16:0016:00 - 00:00

« first day (4137 days earlier)      last day (697 days later) »