« first day (4424 days earlier)      last day (411 days later) » 

12:40 AM
Holy hell, nice Area 51 meta post @lyxal. You really blew the consensus for PLD&I out of thin air with that lawyer-level proposal.
 
heh, I tried my best :p
 
12:54 AM
0
A: Sandbox for Proposed Challenges

Huỳnh Trần KhanhGuess The Array code-golf interactive You are given a system with a hidden permutation of the numbers 1, 2, 3, ..., n. Your task is to guess this permutation by asking the system a series of questions. Each question consists of providing the system with a permutation of the numbers 1, 2, 3, ..., ...

 
 
1 hour later…
2:10 AM
@RydwolfPrograms I don't know the rules for meta, but I do know you are allowed to make deadlineless bounties for answering in languages
 
2:27 AM
0
Q: Guess The Array

Huỳnh Trần KhanhYou are given a system with a hidden permutation of the numbers 1, 2, 3, ..., n. Your task is to guess this permutation by asking the system a series of questions. Each question consists of providing the system with a permutation of the numbers 1, 2, 3, ..., n. The system will respond with the le...

 
 
5 hours later…
7:40 AM
58
A: Implement Minceraft

OkxMinecraft, 358 293 277 276 bytes Implementing Minceraft in Minecraft Should be run as a set of commands in game. Should be run on a fresh superflat (redstone ready) world. Byte count is the amount of characters you need to type, including newlines. /scoreboard objectives add s dummy /summon bat /...

So I have a suggestion for how to improve this answer... where do I put it?
The standard of answer "in the comments/replies/whatever" doesn't work because you need 50 rep to do that, and I don't.
 
Yes you do ;)
 
If you'd like, I can send a picture of me clicking on "Add a comment" and it says "You need 50 reputation to do that".
I think it means 50 CGSE rep, it probably says I have 70 rep here because it's including some rep from the rpg stackexchange
 
Check again ;)
 
Ah, it updated. Thanks.
 
Alternatively, it's generally fine to post it yourself. The user who posted that answer has been inactive for three months.
 
7:49 AM
Honestly, I didn't even notice the post was from 2021. But in that case, I'll post it myself.
 
8:31 AM
how substantial is the improvement
like is it a handful of basic golfs or is it some serious insight that happens to use a shared skeleton
oh i see your comment
yeah wow that's... hard to make a call on lmao
 
Post a new answer, get upvotes on it, use that rep to comment, then delete your answer /s
 
true
...i remember when i actively fucked with minecraft commands a couple years back when they were borderline unusable for anything interesting
now that they actually are more powerful i'm just fucking scared
 
9:40 AM
def parse(x):
    bot_name = re.search(
        r'^class +([A-Z]\w*)(\(.*\))?:', x, re.MULTILINE)

    if not bot_name:
        raise ValueError(f"Cannot parse bot {x}")

    bot_class = []
    exec(
        x+"\n\nbot_class[:]=["+bot_name.group(1)+']\n',
        {},
        {"bot_class": bot_class}
    )

    return bot_class[0]
Guess what this does
 
9:53 AM
Get the class object of a bot?
 
Yep, but with regex. The best tool for parsing code
 
doesn't seem to fix it
wrong link?
 
def parse(x):
    bot_name = re.search(
        r'^class +([A-Z]\w*)(\(.*\))?:', x.replace("\\\n",""), re.MULTILINE)

    if not bot_name:
        raise ValueError(f"Cannot parse bot {x}")

    bot_class = []
    exec(
        x+"\n\nbot_class[:]=["+bot_name.group(1)+']\n',
        {},
        {"bot_class": bot_class}
    )

    return bot_class[0]
 
10:03 AM
that still gives the same error
oh
there is a change
but yeah it still errors
 
ValueError: Cannot parse bot class\
Trolling:
  def __init__(self):
    print("a little trolling")

a_little = Trolling()
is that intended?
 
Oh I see
Wait your code isn't actually valid, it's missing any kind of whitespace between the class and it's name
because the way tripple quoted strings are parsed
This works though: tio.run/…
 
I don't know whether to be troll facing or downright disgusted at that
 
Super easy fix though tio.run/…
 
10:14 AM
:+1:
 
Fan of using a literal tab inside a regex
 
underscore at the start of class names
is that a problem?
 
Oh and lower case letters at the start of class names
I'm just going to enforce proper python class name conventions :)
 
fair call
 
This is what is looks like rn
 
10:17 AM
Looking good
I can't think of anything else that could be a problem with the regex so hopefully that'll be good to go too
oh nevermind I have
unicode normalisation
 
... well that's not going to be able to be fixed easily
 
unicodedata.normalize
normalise the string before you regex search it
very simple
 
What if the class name contains Unicode symbols? Will it match when I assign it
 
exec would also normalise right?
 
Well if I normalize before exec that would also effect the contents of strings etc. and effect the behavior of the code potentially
 
10:23 AM
no I mean exec itself would normalise, wouldn't it?
 
Hmmm I guess so
 
The entire concept is so cursed
 
it sure is
but it makes for good restricted source answers :P
 
Do you happen to know what normalization form should be used?
 
10:28 AM
no
NFKC
87
A: Does Python forbid two similarly looking Unicode identifiers?

MarkPEP 3131 -- Supporting Non-ASCII Identifiers says All identifiers are converted into the normal form NFKC while parsing; comparison of identifiers is based on NFKC. You can use unicodedata to test the conversions: import unicodedata unicodedata.normalize('NFKC', '𝑓') # f which would in...

found from
31
A: Tips for restricted source in Python

Luis MendoAvoid "normal" letters Identifiers are normalized by the Python 3 parser. This implies that cursive (Unicode) letters such as 𝓪𝓫𝓬𝓓𝓔𝓕 are interpreted as their ASCII-compliant equivalents abcDEF. So the following code works (as was exploited here): 𝓝=123 𝓹𝓻𝓲𝓷𝓽(𝓝) Python versions in wh...

 
TY
А = 42
print(A)
# => NameError: name 'A' is not defined
 
thanks python
very cool
 
In my language identifiers are going to be rendered with the system font to determine equality.
Depending on the font installed l and I might or might not be the same variable
 
I'm calling the court.
 
Jokes on you my ban on creating new languages has ended
 
10:41 AM
 
 
5 hours later…
3:19 PM
@lyxal I do not like this image
 
3:55 PM
@lyxal the court sits in judgment
 
4:24 PM
My ban expired last week due to a bug in the courtrooms data management system (they used a language I designed). So I'm free now.

I rest my case
 
5:18 PM
What?
Oh you're kidding me, there's planned maintenance all day today
 
6:09 PM
@UnrelatedString Honestly, I'm not so sure. I can't find a good way to do string concatenation, or input strings from cin.
Unless you mean in the context of Minecraft itself what can be done (ie make boss fights, dungeons, arenas, etc.) then yeah, it's getting very impressive though there's still some features missing. Typically I say "there's no way to deal a custom amount of damage to players", but with the /damage command (upcoming either 1.19.4 or 1.20) that's changing.
 
6:34 PM
Now it's down entirely :/
 
7:25 PM
@TsumikiMiniwa Speaking of Minecraft commands: Why did they remove the testfor family of commands? I'm sure there's some way to reproduce the effect with modern commands but I have no idea how
 
 
4 hours later…
11:52 PM
0
A: Sandbox for Proposed Challenges

chunesIs it traversable? code-golf decision-problem array Imagine that a list of integers describes the heights of some two-dimensional terrain. Stamina: [ 4 4 4 4 4 4 3 3 3 3 2 2 2 - ] O /|\ / \ +---+ +---+ ...

 

« first day (4424 days earlier)      last day (411 days later) »