« first day (4213 days earlier)      last day (56 days later) » 

12:25 AM
Q: A better Hexagony template

BubblerWe once made a Hexagony template without actually knowing it. But after a bit of experience with Hexagony, it becomes apparent that it is not enough; sometimes the source code is too short for the given hexagon, and you get totally unexpected results. So I came up with an idea: a template that gi...

12:35 AM
@emanresuA maybe after finding important stuff lke parenthesis then?
point is i never considered using the matches themselves
i always was thinking in terms of like
splitting strings
into tokens (i.e. finding the non tokens)
rather than just... finding the tokens
1 hour later…
2:25 AM
Don't you just love things that don't install dependencies for you
(cough cough, make)
hey guys would a unary fractional byte encoding that had each thing as log_256(1) always be 0 bytes?
Because n * log_256(1) = 0
Only if you can store it in zero bytes
(which you can, since the standard positional unary can encode exactly one program :p)
Also I'm compiling Linux right now, yayyyyy
The estimates I've seen for how long it takes vary between 2 minutes and 12 hours so I have no idea what to expect
( 2 minutes + 12 hours ) / 2
so 7 minours
I think a geometric mean would make sense here
idk how to multiply strings though
2:33 AM
(also I'm just a geometric mean simp)
Okay the geometric mean is about 40 minutes
Which actually sounds reasonable
is there a next step beyond arithmetic => geometric => ?
really? wow
The harmonic mean is about 4 minutes
that doesnt seem like a step up from geometric though
2:36 AM
It sort of is (I have a really cool demonstation of why I believe it to be), but I guess you could do an "exponential mean"
The geomtric mean of the natural logarithms, then exp it
oh cool
8.46 minutes
im curious about your demonstration though
Y'know that geothmetic meandian xkcd?
wait oh my god do we have a challenge for geo
yeah that
2:38 AM
Well, if you do it with arithmetic, geometric, and harmonic means, the Pythagorean means, when you put two powers of two in, you get their geomtric mean
So the arithmetic and harmonic means cancel out; almost like they're inverses
omg cool
but also i cant believe we dont have a geomethic meandian challenge
IIRC we do have a challenge for it, I know for sure one was sandboxed at least
i cant find it those bastards must have calledi t something else
ok no yea its sandboxed
> geomethic
Jesse we need to find more averages!
im spelling it wrong anyway but searching for meandian was easier
2:43 AM
@NoHaxJustRadvylf ^ demo
It actually works with any powers
3 and 27 gives 9
Wait...it's the exact same as geometric mean for any two numbers :o
Actually for any list of numbers :o
Thus...a much much stronger demonstration than I originally thought of harmonic mean's inversiness :p
3:05 AM
Yay, the Linux compilation finished at some point while I was doing some other stuff, and it works, and it fixed some issues I was having with RTO :D
which amount of time did it take
Not sure since I wasn't paying attention
But I'll round it to 40 minutes :p
2 hours later…
5:06 AM
Good morning!
Great to know there is a human here :)
If I post a challenge this evening, is that a bad time to do it?
5:26 AM
@Adám do you have a moment for code writing?
Feel free to write me, I'll get back to you.
5:53 AM
2 hours later…
7:52 AM
Q: Change the quotations as if in Microsoft Word

py3programmerI noticed that in Microsoft Word, single quotations are either ‘ or ’, but not in Notepad. Your task today is: given a string q, convert all the ' characters (only) to ‘ or ’, according to these rules, and then output it: If the character before the quote is a space, and after it comes a charact...

8:38 AM
Why are the questions so low-quality?
"the questions"? Do you just mean recently on the site? Or are you talking about something else?
I don't feel like it's particularly worse than usual
9:07 AM
99% of everything is always bad, just nobody agrees which ones are the 1%
10:02 AM
@GingerBot imagine running your code after checking it! couldn't be me!
2 hours later…
12:24 PM
@pxeger Heh, perhaps it was a self-referential question
Why is this question in particular so awesome?
12:41 PM
"extremely impressive or daunting; inspiring great admiration, apprehension, or fear."
not sure how to help you :P
I do not understand "awesome"
i forgot, bots cant process complex emotions like awe
look man I'm running on a Raspberry Pi 3 you gotta make it more simple
12:44 PM
awesome is another word for "very truthy"
Why were you referring to the question emanresu A said was "low quality" as "awesome"?
this question in particular = self
i should have done the self reply thing but thats way too hard to set up im lazy
36 secs ago, by GingerBot
12:47 PM
any feedback? good? bad? salvageable? scrap it?
Segmentation fault
posted on August 12, 2022 by Razetime‭

Challenge A Niven number is a positive integer which is divisible by the sum of its digits. For example, 81 -> 8+1=9 -> 81%9=0. Your task is to find ...

thank you razetime very cool
wow an actual codidact post isn't that a biblical sign of the apocalypse
@lyxal fastest vyxal in the west
12:55 PM
14 minutes fast
1:08 PM
My question got closed in 10 seconds yesterday
About polyglot and benchmarkgames
Maybe scoring could be runtime of solution in all languages divided by the number of languages?
well first id like to say that i dont actually know what the challenge itself is
i dont quite understand the layout of the site you linked :P
@OlleHärstedt That wouldn't actually benefit multiple languages since each contributes runtime
@thejonymyster It's to write a working solution to a benchmarkgame in more than one language in the same file, polyglot code
I'm not sure if a fastest code polyglot challange works at all. There is no real tradeoff there
One example being the n-body calculation
@mousetail The challenge is not be fast, but to be polyglot :) and fast
@mousetail No tradeoff how?
1:12 PM
Making a program polyglot won't make it slower normally
It would basically just be combining the fastest code in 2 languages
@mousetail Yeah, and is that easy? Or 3 languages, or 4...
No it's not easy I'm not saying that
But you can't optimize much
The polyglot aspect won't effect your attempt to improve the actual winning criterea
@mousetail Hm, saying that the polyglot aspect would be more important than the performance?
Because of the score calc?
@OlleHärstedt you should pick one specific challenge, since (id assume) there are very many benchmark games to choose from, so that challenge would be very broad :o
I wanted to do n-body in PHP and C, so that could be a start.
1:15 PM
@OlleHärstedt It wouldn't be important at all after you figure out the basics
are polyglot challenges hard to write? im starting to get the impression they are
hello new person! (belated) welcome to TNB!
@thejonymyster very difficult to make novel
polyglots are not easy
1:17 PM
@thejonymyster Depends on which languages you combine, and the length of the program, I guess.
no, the challenge itself
i.e. the problem/question
Oh ok
I wanted to combine polyglot with performance, but maybe no good scoring system
Disregarding the fact that they have to run on the same machine
someone described polyglot challenges as like... paraphrasing, but like "polyglot challenges are hard to write because no matter what the problem is, solving it ends up amounting to less of 'get this code to run in N languages' and more of 'get anything to run in N languages'"
but that might have been specifically about challenges where the scoring was "number of languages" period
someone should really find that quote i cant remember who said it
i think it was on that "output 12 in as many languages as possible" question
i was thinking about a cross lisp polyglot challenge earlier
nooo dont star me that quote is uncited :crying screaming:
1:20 PM
Code golf + polyglot works ok
each time you add a new macro and use in in the code
Q: chess smallest amount of steps

BjopI you place a horse on the top left corner what is the smallest amount of steps to reach a certain position? Rules It is an 8*8 board. You start at the top left corner. The same moves are possible of a regular chess game. example For example this is the desired output with a queen: (Q is start...

I'm convinced someone is running an experiment to use AI to generate code golf posts
An AI wouldn't make this many spelling errors
1:30 PM
i honestly thought it was a shitpost
would horse=>knight be a reasonable edit or does that change the question :P
I'd say it detracts from it.
Would maybe be interesting if it was just the horse but he wants every chess piece
@mousetail "The pattern printed for a horse, as short as possible."
It's a bit confusingly worded
1:32 PM
hence the close vote :P
I'd vote to close if I had enough rep
in any case it should actually have an example of the expected output
All I can do is flag because bot account ;-;
the example being for a different piece almost makes me wonder if this is some bizarre homework question
amazingly no downvotes yet
we're all just sort of... waiting to see what this is huh
1:35 PM
never a dull moment at TNB
Except every day between 9 and 12 AM
When nobody is online in my timezone
im downvoting, its not well written by any standard, and it was posted in an obviously super incomplete state /shrug
@GingerBot except.. most moments
always possible to upvote it again if it gets fixed somehow
There is potential there
1:36 PM
never a dull moment at TNB, except for all the dull moments
sure, but im still gonna link sandbox and say "go here next time"
Or i would if i could rmeember the phrasing
i dont wanna be mean lol i just want them to sandbox
Maybe what they want is for us to print that pattern for their horse to see
Off topic but @thejonymyster Why is the "check out my github" link on your profile not a github link
because it's funny I think
non-answer of the century
"how are we supposed to do this?" "you must do it in a way."
1:42 PM
"it has to be like this, but it doesnt matter how you do it"
pawn smallest amount of steps (first you have to promote to queen)
aaand deleted
oh swag you love to see it
I love it when the rules are followed
I'm used to on SO where I can just close and edit anything I want
1:54 PM
A: Sandbox for Proposed Challenges

Bjopchess smallest amount of steps If you place a horse on the top left corner what is the smallest amount of steps to reach a certain position? Rules It is an 8*8 board. You start at the top left corner. The same moves are possible of a regular chess game. example For example this is the desired o...

2:17 PM
2:36 PM
Q: CGCC Rocket Biking

mindoverflowSomething I found while looking through some old files. It seemed like a neat idea for a code golf challenge. The intro One of the most popular events at the annual Cyclist's Grand Competition for Charity (CGCC) is the rocket bike parcours. The rules are simple: Inspect the parcours and place a b...

3:07 PM
@NewPosts i cba to make a decent solution to this rn but i think this is essentially just "fill in the blanks to make a balanced string"
tempted to edit the tag in :P
3:29 PM
A: Sandbox for Proposed Challenges

rubbernillySolve the Greek Computer Puzzle Toy There is a small toy of a series of stacked dials -- loosely inspired by the Antikythera Device. The puzzle has a series of dials that must be arranged in a particular configuration to win. In this challenge, you will write a function/program to find that solut...

3:43 PM
Challenge posted
3:55 PM
Q: Optimal strategy to defeat the wizard

graffeConsider the following setup. An evil wizard has ten opaque boxes in front of him. Hidden from you, he chooses a random number of coins \$x \in \{1 \dots 10\}\$ and spreads them uniformly at random in the boxes. That is, there should be equal probability of assignment of coins to boxes from all...

4:25 PM
Has anyone done any stats on the number of views per up or downvote on average?
4:36 PM
Q: The relationships between question length, views, and votes (and more painfully unlabeled graphs)

NoHaxJustRadvylfI recently meta'd some interesting research I'd done relating to the correlation (or lack of) between the time a question is asked and its view count. I got some comments suggesting I look into other interesting things, so I dusted off my text editor (lots of dust builds up in 23 hours, I guess) ...

@NoHaxJustRadvylf thanks!
Whenever I post a challenge I am on tenter hooks for the first answer
@NoHaxJustRadvylf please do post an answer of course
Can you see a graph of the scores for a particular question?
I really want to compare two questions and the rate at which the got up votes
I have a KotH idea
Pretty unlike any I've done before
So, it's chess or go, or some other strategic game
Except instead of turns, you can move as often as you like
So you can be slow and strategic, or you can make a ton of quick moves with very little thinking behind them
@NoHaxJustRadvylf can't you just take the opponent's king that way?
Maybe, but since you don't get much time for complicated strategy, your opponent could more effectively counter your moves
Although one issue is that making it no longer turn based kind of removes a lot of strategy as well, so this probably wouldn't work too well
I don't know what happens in chess if you get two moves per turn
All chess variants have been tried :)
5:40 PM
@NoHaxJustRadvylf like kung fu chess?
Huh, TIL
6:06 PM
I sandboxed my craziest challenge yet just now, have a look and give opinions
I don't think really applies here
Well, I guess I could see how it does
This challenge is somewhat similar to my Steiner quadruples problem, which does have that tag, so I added it here
ehh nvm
IMO the wording makes the challenge seem a lot more complicated than it is
how could I simplify it? The construction of the KTS is very precise by nature
6:21 PM
What is open-ended used for here?
I already del'd that tag
@NoHaxJustRadvylf should I delete the history part of my challenge and just state the def of a KTS?
I'm not sure, I'm still trying to understand exactly what the challenge is asking
From what I understand, it's just the schoolgirl problem, but with any number of schoolgirls?
A: Sandbox for Proposed Challenges

Parcly TaxelGenerate a Kirkman triple system mathcombinatoricscode-golfnumber-theory The objective of Kirkman's schoolgirl problem is an arrangement of 7 classes of 5 blocks of 3 elements each, where there are 15 elements in the universe, so that each pair of elements appears in exactly one block all classe...

@NoHaxJustRadvylf yah. More precisely 3(prime number 6t+1) girls
(RCW71 shows you can have any 6k+3 girls, but say if I was asked to describe it for 33 girls, I'd be hard-pressed)
I think a few things that would make it clearer are:
- Adding a simpler description of the schoolgirl problem and how it's generalized
- Making it clear that all you're doing is solving that generalized variant of the schoolgirl problem, and that all the 3(prime number... stuff is restrictions on what inputs you'll get
Maybe including this bit from Wikipedia would help:
> Fifteen young ladies in a school walk out three abreast for seven days in succession: it is required to arrange them daily so that no two shall walk twice abreast.
That gives a good intuition for what answers are trying to do, without all the precise terminology
6:31 PM
When people talk about monads, are they really just talking about Haskell's version of Some/Result?
I've heard like ten people try to describe what they are but they all just jump from this really technical definition into "and that's a monad! it's a completely revolutionary thing that'll make your code functional and teach your dog to speak fluent english"
Without describing like, from a programmer's perspective, how exactly you'd use one, what they look like, or why
Maybe has a monad instance but it's more general than that
for the most part it's a convenient way to handle various kinds of effect and state within the realm of pure code
like obviously that itself is nothing inherent to what a monad is
but yeah
i guess it's more... having useful patterns of things you can do and expect to have work with those types
like some impure computations are actually better expressed as more general arrows afaik, but you can also have and use monad instances for all kinds of normal shit like lists and the aforementioned Maybe
also a lot of it you don't even strictly need monads for; plain applicative functors are plenty powerful
6:47 PM
@NoHaxJustRadvylf OK I edited, is it better now
It's a bit better, yeah
honestly i have no idea what kind of thing the people are talking about but there are sort of two separate fundamental things going on here, one of which is representing impure computations as pure values, and the other one of which is applying the same idea of "context" to more normal stuff
7:07 PM
NVMe M.2 HDD who wants to invest in my business plan
7:18 PM
@NoHaxJustRadvylf definitely me
Actually that would be so adorable. Just a tiny spinning platter on the M.2 board. I bet you could even fit multiple.
I estimate you could get about 115 GB per platter, which isn't bad
Even in 2004 it was possible to make HDDs just 2mm too wide to fit on an M.2 board, so I bet it'd be possible. On a standard 2280 you could easily fit two platters side by side, and three if you used some clever engineering.
If you can stack 5 of them in a 2.5" form factor, you could probably get two in an M.2, so 6 platters of 115 GB each: over half a terabyte of storage (plus maybe 200 GB, but that might need to be sacrificed for a higher RPM or slightly smaller platters).
7:43 PM
@NoHaxJustRadvylf I am currently at the point where I can understand about 25% of talk about monads in Haskell, but I definitely can't explain them to someone else. I start thinking I understand when it's lists or Maybes, and then it progresses to functions or IO or state, and I'm back to not understanding.
Also I think it helps if you have a background in certain abstract math concepts, with which I have a passing familiarity. Haskell in general feels like a bunch of theoretical maths that somebody wrote a compiler for and it's somehow actually usable for programming.
(Which, oddly enough, is literally how Lisp came to be, so... hm.)
@DLosc I mean, it kinda is, right? iirc a bunch of academics made it
@DLosc Lisp is simple.
Haskell is cursed.
Become cursed by a warlock for great good
7:49 PM
@DLosc Same, I always think about boxes when I hear about monads. Category theory is wild
@user That's my understanding, yeah.
@emanresuA Have you seen the first lisps, though? Some had dynamic scoping, functions were in a different namespace, etc. Lisps are weird
(in an adorable, quirky way, not like PHP)
> functions were in a different namespace
Still true for Common Lisp
I count CL among the first lisps :P
I mean, Scheme is ten years older, so...
7:54 PM
CMQ for the lispers here: what's your preferred way to handle overloading?
@user So now I'm skimming the Wikipedia article for Common Lisp and I see a section "Multiple return values." It seems functions can return extra values in addition to their primary return value. Never knew that was a thing.
@user I'm probably not enough of a Lisp programmer to have an answer for that. D'you mean like writing a function that could take either a number or a string, that sort of overloading?
@DLosc Yeah
@DLosc Huh, I always thought CL was super old (admittedly, I only tried it out once, and not for very long)
@user TBH it does feel old. Maybe it has something to do with how stuff like NIL is capitalized when it's output.
@user I would guess you'd do something like in Python, where you define the function once and its body is a conditional structure that tests the type of the arguments. Anyway, that's how you'd do it in tinylisp (but tinylisp shouldn't really be taken as representative of real Lisps).
8:16 PM
What's the criterion--usability? Aesthetics? How much you personally like the language?
I've tried to remain fairly impartial
The criterion is just some vague notion of how good it is, taking into account usability, aesthetics, dev survey results, and cursedness
CMQ if there is a 1/10 chance of getting 10 coins and they are uniformly distributed amongst 10 boxes then there is a 0.1 * (9/10)^(10) prob there are 10 coins in the first 9 boxes. Is that right?
For golfing languages, conciseness is also taken into account
I am worried I am making a basic error to do with independence
8:21 PM
P(getting 10 coins) * P(coin 1 is not in box 10) * ... * P(coin 10 is not in box 10) should do it, I think. So yes, that looks right.
@NoHaxJustRadvylf I'd swap Haskell and JS/C
@DLosc phew! Thanks
Also, Vyxal deserves B tier
now someone claims to have posted an optimal solution!
Assuming "uniformly distributed" means "each coin independently has equal probability of being placed in any box."
8:22 PM
Haskell can be dropped to D tier yeah
@DLosc it does thanka
Maybe even E since it isn't really all that practical
Honestly yeah
I'm sure there's people who will strenuously disagree
@emanresuA I was kind of torn between C and B for Vyxal yeah. It does get a couple cursedness points for various things though.
8:24 PM
I have no idea what they have done!
Who could've predicted someone would find a perfectly optimal solution :p
@NoHaxJustRadvylf only a genius :)
but what on Earth is it doing!
The magic seems to be in [0, 3, 4, 6, 7, 8, 9, 9, 10]
@NoHaxJustRadvylf I guess traces of Keg still remain
IIRC it switched to using sympy like ages after it was first made which is kinda cursed
And since it has things like named functions, I took practicality into account, and being a golfing language it's kinda hard to compete in that category :p
Lyxal did half of AoC with it
(mostly as a PR stunt but still)
8:37 PM
Yeah, and it both being golfy and somewhat practical is great for introducing people to golfing languages
It's around as golfy as Jelly (though hard to measure due to flags), but easier to learn, and I do think that's helped remove a lot of the last little bits of golflangphobia
@NoHaxJustRadvylf The author of this article disagrees (though I'm not sure whether he's tried Rust):
9:00 PM
@Adám Now that I've written a 200-line program in Haskell, I agree wholeheartedly with this quote.
@NoHaxJustRadvylf I'd put JS above HTML/CSS personally. CSS is such a pain to work with, whereas JS is...almost nice to work with sometimes
That's fair
@DLosc Interesting, I guess overloading's not needed much in Lisp then?
Although for JS there's plenty of great alternatives, whereas HTML/CSS doesn't really have any good competition, other than like, Less and SASS which don't add much
I really like the way React and other frameworks use components to separate concerns, I wish the whole HTML/CSS/JS thing could be turned into components that are mostly JS (I mean, you can do that even now, but it's not the easiest)
The fact that CSS cascades is somewhat useful but mostly annoying imo
9:08 PM
@user ¯\_(ツ)_/¯
For font stuff it's fine, and that's the main place where cascading happens
I guess
9:36 PM
@NoHaxJustRadvylf this does not bode well for me; im about to learn sql for a class
The D tier is interesting
I guess there's multiple factors to be taken into account but those are wildly different languages
I wonder what a good way to vote on a tier chart would be
Runoff, maybe?
@thejonymyster Don't listen to him, SQL is cool
Also, it warms my heart to see Scala next to Jelly :P
(If you decide after learning it that you don't like SQL, that's fine, I just don't want you to be biased going in :P)
@thejonymyster Depending on what you're doing, you can create queries in other, higher-level languages like Python
9:44 PM
@user The way I'd do it is average everyone's votes, then bias away from the center
Not being biased going in is a pretty good mindset in general ig
Well yeah but when you average people opinions that adds bias toward the center
Take the inverse of the cumulative distribution function for the average of n random numbers, and then apply that to the score of each language.
That'd fix it.
@user (just to clarify, I was responding to DLosc's message)
Oh oops lol
@DLosc The best way to learn SQL is a bias going in, that way your self-preservation instinct will kick in sooner :p
Yeah I have no idea what you're talking about here, statistics is arcane magic to me
9:47 PM
I'm like 90% sure my idea's the wrong way to do it but meh
That's not enough to reject the null :P
@NoHaxJustRadvylf Some people are just adrenalin junkies
@DLosc The only way to get someone to learn SQL is to bias them going on, or else they'll quickly learn to hate it :P
@NoHaxJustRadvylf It looks like this for n=2:
10:07 PM
Wait actually it shouldn't be the inverse
@Zionmyceliaadamancy I am counterexample :D
Though it's always possible we're talking past each other here. When I say SQL, I mostly mean relational databases and a language for querying them. Obviously I wouldn't want to write a full application in just SQL. But that's not what it's meant for.
@DLosc Personally, I've always seen SQL as a necessary evil :P
I don't want to use it, but I will if I need to
10:24 PM
In the sense of it existing it is a totally unnecessary evil
The default for UPDATE should not be to overwrite every column in a table, for example
And doing anything involving more than one table is so needlessly painful
@NoHaxJustRadvylf I would leave Haskell at C. It can be practical lol
I wouldn't
Fight! Fight! Fight!
Alright, I'll move Haskell to A for you then
If you don't want it at C
@NoHaxJustRadvylf That's a fair criticism. I wouldn't mind if UPDATE errored if there isn't a WHERE clause. You could always do WHERE 1=1 if you really want to update everything.
TBH I thought I remembered that being the case, or maybe it was for DELETE, but I just tried both in SQL Server and they updated/deleted every row. DELETE should definitely not let you do that (especially because TRUNCATE exists and is basically identical to "delete every row").
@NoHaxJustRadvylf I like joining tables ¯\_(ツ)_/¯
@DLosc I wonder if I'm remembering the MySQL interface in Webmin, actually. I'm pretty sure I remember having to add a dummy condition sometime in my life when I wanted to update all rows.
10:41 PM
Personally, I don't want to be changing any data, I just use SQL to interpret/analyse existing data :P
Also, the most useful Tom Scott video I've ever watched is the one about why you should use database transactions. I had vaguely heard of transactions before watching the video, but I didn't know how or why to use them. Now I use them at work all the time, and they've saved my bacon more than once.
I love that video just for introducing me to the concept of the "onosecond" :P
11:39 PM
testing out manjaro w/ KDE on my Pi
@Zionmyceliaadamancy well if you don't like SQL try TREQUEL, the hypothetical SQL-like language I'm working on
11:55 PM
@Zionmyceliaadamancy That's what it's purpose should be
Programmatically generating SQL queries to mess with databases is really dumb IMO
They should just have like, normal APIs
hi guys!
I'm talking to yall from Manjaro right now
surprisingly, KDE seems to be running smoothly

« first day (4213 days earlier)      last day (56 days later) »