« first day (3219 days earlier)      last day (196 days later) » 

12:07 AM
Q: Continued Fractions Output

Timothy Norris III am trying to print out a set of numbers as a sum of continued fractions. For example, I have the set: {2,3,5,3,1} and I am trying to get a function to leave it in the form below: Continued Fraction: 1/2 + 1/1/3 + 1/1/1/5+1/1/1/1/3+1/1/1/1/1/1/1 What is a good idea of a function or loop constru...

5 hours later…
5:15 AM
Q: SQL table output... with PHP?

Bobby Woodtooth - IS BACKReproductive strategy of oozes can be summarized as follows: o O 8 oo A population of oozes at generation N is described by a string, for example: ooooo88ooOoOo8Ooooo8OOoo8Oo8Oo8oo8oooooo8OOooO88o To compute the population at generation N+1, take one character randomly, and replace it by...

4 hours later…
8:55 AM
@NewMainPosts "lightest code wins"
9:22 AM
@flawr I measure the score of answers in eV
A _
9:49 AM
@Fatalize Unknown language, 0 high-volts: \x00\x00\x00...
@Fatalize ? I get the impression that you are a nuclear physicist.
A: Sandbox for Proposed Challenges

simonalexander2005A Spherical Die Inspiration I have a spherical die, but it's a cheap one so it doesn't work properly. When I roll it, it doesn't always land directly on a "face" marking, but instead can result in an ambiguous result ("is that a 6, a 4 or a 2?") Assumptions Assume the die is a perfect, evenly...

@flawr I’m not
@Fatalize that is what a nuclear physicists who doesn't want to be identified as such would say
A _
These should be called environmentalists.
3 hours later…
12:46 PM
What to do with a challenge I posted in sandbox but after some thought is trivial (because there is a simple algorithm that can solve it). To delete it ? There was no down votes.
@tigrou Simple challenges are not banned.
A _
1:06 PM
I am glad to see those challenges that (at)tigrou posted in the sandbox...
Simple challenges are always fine, as long as the "simple algorithm" hasn't already been posted as a challenge (or more exactly, no one throws a dupe at your face)
@JoKing nice bowling scorer
i think i'll need to switch languages if i want to match it
A _
1:27 PM
If anyone is willing to answer it, CMQ 1. Do you consider Pass an Esoteric Programming Language or a Practical Programming Language? It is very hard to devise a useful program witout the use of the try function, yet it allows people to develop much faster than most other esolangs.
2. Which of the three behaviors in the reference do you think is the most useful for the language to be practical? (You can only pick the best one.)
Here is my sample Pass program that reverses the given string:
try strrev:=(x+try(a)%256+a/256
try strrev unless try(a)%256=try(a)/256)
say x
@A_ One more thing. Please explain why you chose your answer; if you consider it an esoteric programming language please answer how it can be made into a practical one.
A _
1:46 PM
:52656985 Whoops... x:=()
try strrev:=(x+try(a)%256+0*a/256
try strrev unless try(a)%256=try(a)/256)
say x
Initial thoughts: Scanning through the docs, I really don't like how a+1 sets the value of a. I don't see how this is practical in any way
"After the execution, the printed values are returned as values for other functions. A syntax error prints syntax error, hence the name. Expressions auto-print themselves (this can be set using flags of the interpreter as whether you need this thing or not." This also seems only useful in code-golfing
A _
I clarify: Expression auto-print themselves only in the try functions in order to make returning values easier. The printed values are what is returned from the function call. There isn't any auto-printing in the main program.
@A_ How do you take input?
A _
@cairdcoinheringaahing Currently the only way is to define a try procedure and them pass the operands into the procedure. Here is a sample program.
I probably forgot to add it in the documentation.
So you can't take input from STDIN or command line arguments?
A _
2:02 PM
Not yet, I can't think of any unique way to do that.
Why does it have to be unique? a:=input() would work
A _
Well, in that case () defines a nestable string. I guess a:=input is better.
(Does using parentheses make the language feel esoteric? I tried to allow them to nest.)
Given some of the odd features (a+1 ≠ 1+a for example), it does feel quite esoteric, despite its syntax
A _
2:19 PM
reply to 52657258. This might be useful if you want to increment the value of the variable. It is just a+1 instead of a:=a+1, to make programs faster to write.
A _
2:30 PM
(In my opinion, ) It is much easier to implement a+1 with initialization in a canonical bytecode compared with a+1 without initialization. Correct me if I am wrong.
@A_ What's with the "reply to <id>"? Just reply to the message directly?
@cairdcoinheringaahing In case this user is busy...
@Ugh.Dupe'd. The point of replies and pings is so that people know when someone is talking to them. If you just type "reply to", it's unlikely that Quintec will ever know you replied to them. And besides, you can read pings at any time, not just as soon as they happen
2:48 PM
Any final feedback on this challenge proposal?
2 hours later…
4:43 PM
@cairdcoinheringaahing Looks good to me. Insanely difficult, but good.
Seems to implicitly restrict practical languages
but it's a neat idea
5:25 PM
@cairdcoinheringaahing I predict arbitrarily large scores will be found.
5:40 PM
@feersum an arbitrarily large score is definitely possible, question is if there's really a language that allows for it
5:52 PM
I'm considering writing a KotH question. Past questions I've seen have all been python-based. Is that a requirement or just the standard? I have an existing system in C# I was planning on adapting but I don't know how much interest I would get if it was limited to C#
KotHs tend to be Python or Javascript because those are the most widespread and well-known languages, and the easiest to just whip up something that works.
@El'endiaStarman Or Java
I don't remember seeing Java very often but I'll take your word for it.
@Malivil You might get slightly less interest, but I don't think it would be a problem
C# isn't incredibly hard to learn
So, a C# KotH is certainly doable. Just be prepared for less engagement than Python or Javascript simply because fewer people know C#.
If the KotH is particularly good and/or interesting, you'll still get plenty of entries.
5:55 PM
I have been working off-and-on on a version of the 1960s board game Acquire. The goal is establishing companies by placing squares, buying stock, and merging companies. My intent was to turn that into a competition where each answer would be a different bot playing the game. Probably 1v1 but it supports up to 8 players iirc
Whoever has the most money (or money + stock value) after a certain condition is met (based on company size) wins
I need to do some work on it to have a better API but maybe i'll work on it when I'm bored in the next week or so
6:11 PM
You guys make me so happy. I really hated it when we would recommend cross-language KotHs
It's 20x the work for very little benefit
I loved the game Acquire :)
FYI: There's quite a bit of luck (mostly in regards to the order of tiles drawn). These kinds of elements make games fun for humans, but for bots, it simply means you have to run more games to make sure the best strategy wins.
@NathanMerrill A cross language KotH was one of the first challenges I posted on this site. Hoo boi, that was a lot of work
I think I even wrote the controller in C++ lol
yeah. I wrote cross-language support in my KoTH framework, but still recommended people not to use it :)
I was actually considering adding custom support for compiling other JVM-based languages so I could get everything compiled to run on the JVM and avoid all of that mess
@NathanMerrill That's true. I would probably have to run it multiple times. Do a "best 3 out of 5" or something
You vastly underestimate the number of games. You at least want to run 10K games :)
If I wanted every permutation, yea
The version of the game I have is UI based (because it was made for people) but I could make a headless mode and then run it en-masse for the scoring
6:18 PM
No, every permutation of tiles drawn is far more than that. Here's the thing about KoTH challenges: There are going to be really good bots, and they will only have a slight edge over each other. There may also be bots where A > B, B > C, and C > A.

Trying to figure out who wins more is really hard, especially when the competition is really fierce
I don't think I've had a single KoTH with less than 10K runs. Many of them I've had up to 10 million
@NathanMerrill Does that change if there's no source of randomness?
I suppose bots themselves are a source of randomness
Yes, but only if you ban randomness from the competitors :)
That's fair
if bots are deterministic, or probabilistic (and you want to calculate each line of probability), then you can do it with fewer runs
I find myself always wishing that the best bots were more deterministic, but it seems like relying on randomness to some degree usually turns out as a strong strategy
6:21 PM
I think that it will run fast enough that I can do many permutations like that
Even if the bots were deterministic in this specific example the inputs are randomized (the hand of squares to place)
@DJMcMayhem probably because if you're deterministic someone else can specifically target your exact actions and win every time
I agree. The game really doesn't have that many moves, so it really shouldn't be hard
yep. I really like the concept of doing probabilistic (where a bot returns a list of actions with % probability they will take that action). It can definitely work, but only if the graph of possible states doesn't explode
@NathanMerrill And the controller calculates which move is taken?
It follows both paths, following each game state
So, if each move creates a new game state, then those games are hard to enumerate. But if you have games where sets of moves create a new game state (like voting mechanics), then this becomes much more realistic.
Alternatively, if the game can be partitioned, you can limit the explosion that way as well
6:58 PM
@feersum I'm fine with that, so long as it only works in specific languages, rather than every language using the same trick
@AdmBorkBork A personal goal of mine is to write a challenge that stays unanswered for at least a year
Interesting self-challenge
This is the closest I got, but the fact that I could answer it annoyed me
Q: How short can you get?

caird coinheringaahingYou are to write a program that, when given an integer between 1 and 5 (or 0 and 4 if you wish to use 0-indexing), outputs one of Code, Golf, and, Coding or Challenges. Each input can map to any of the five outputs. However, the mapping must be one to one (each input goes to a different output) a...

1 hour later…
8:23 PM
I made a malbolge program that is actually shorter than 2MB
and it's a polyglot between Malbolge Unshackled and Malbolge20
2 hours later…
9:53 PM
@primo Thanks, Raku's regexes really helped, as well as univals for the unicode numbers. How do you handle those in other languages?
2 hours later…
11:37 PM
Q: Decorate Pascal's Triangle

Alexey BurdinAlthough what is a Pascal's triangle is well-known and we already can generate it, the task is now different: Output \$n\$ first lines of the Pascal's triangle as colored bricks. Color number is computed as maximal power of \$d\$, that divides the needed-to-color element or \$7\$ if power is more...


« first day (3219 days earlier)      last day (196 days later) »