« first day (2311 days earlier)      last day (2829 days later) » 

03:01
@MDXF I am confused by your latest comment on my answer
@WheatWizard "Your program will display the exact string NO VACANCY, including case."
Oh so it has to be a full program?
Well, does your program display the string?
Its not a program
its a function
It can be a function, but still should actually output the colored string
03:03
so no? If you run it will do nothing
I'll clarify in the rules
it will output a colored string
if called
Ah
Forgive me
I'm unfamiliar with lambdas
You're valid
@Dennis You're esc byte suggestion works well thanks!
@NewMainPosts lol finally working, why encodings
03:10
@MDXF To be absolutely clear lambdas do not print anything. They just output a string when called. Usually this type of thing is allowed but its obviously your dicretion as the OP.
*discretion
My lambdas will only print when you do print (my lambda)(args)
imo this seems like it should be printing
@WheatWizard Yeah, that sounds fine.
I think the go submission does the same, but I don't know Go
03:19
Nope, totallyhuman is fixing the Go submission
ok this is weird
it returns the string
then you do Print(f(42))
The three answers all function in the same way
03:21
Either it prints something (when called) or it's invalid
Ok then all of them are invalid
This should be more explicit in the question because this goes agains normal convention
Wait... that goes against convention?
user165474
lambdas are functions without names (so they return the value) and are usually allowed, and I'd recommend you stick to that because otherwise you just invalidated a bunch of solutions and people may not like that
Okay I'll fix that
Yeah if it's conventional I'll definitely not go against that
My bad :I
32
Q: Default for Code Golf: Program, Function or Snippet?

Martin EnderOne of the things many (new?) users forget to specify in code-golf challenges is whether the answers should provide a full program or a function (or even just a snippet). For most such things, we have defaults in the tag wiki (like scoring by bytes), but not for this. The conclusion in chat was ...

03:24
dangit dennis
51
Q: Default for Code Golf: Input/Output methods

Martin EnderIt looks like we have a consensus that we want certain defaults for the format which answers are expected in for code-golf. On that poll, the question arose twice, which input/output formats should be allowed for programs and functions. So here is another poll. This one works different though. A...

@HelkaHomba you never surrender when you ninja someone
@HelkaHomba You actually ninja'd me to the second one. :P
@Dennis ninja'd?
user165474
quick rollback
03:25
Start of charcoal flatten cube thing (mostly for be because battery almost dead):
https://tio.run/##ldZLTsJAGAfw/XeKUkwUREEsKAqK4CMqIKCiqUIsVStosWniG0jcmLj1Bq6NiYmJLuzKA@gdvECPgAVR@tj8ncBMv8n3A2amM0U8EFTxWDhqtXTtSdeede3@8/bjTddev641XXswXoyuPX7d3LVaWyzLMs6SVv1NSfYVRJfqC4hlOZuM81KkWvaMxeSSopxlvJmTQ8@VSk4qMlB5f@GdeAmzk4zbYfcwWmWYcbstYrRsvFmbdWN0p11xVnuA0b5OPWSxCkZrP03QbFMYXe22WZNNoIvTLfmejWO0t/yzf3YOo5neZfTXrmB02zyz9K@xXpiD2I@tYzRinbSOXcPouTXcatswRo9t8aFhXRh13DnGeMHFWXb0NGlKrsqXYd/0jDfnKQ0LE4vKQpYtlZcbs6ubKU9w3pUo1Fk57Hd@2hoJ2NfOOHrCFMJozN6h0AgmK7Y4TxwGbSOdpiHM8ZZoAP2dllN/h/oxFTBdX1EGQ6bjKk3gp
user165474
so you can say you ninja'd the great dennis
So, when do you rename the language?
I updated the challenge. Sorry about that.
@Dennis Oh, I did. Saw "default" and thought it was the same
@totallyhuman Sorry I messed up your answer. Deleted the comments.
03:28
@JanDvorak Me? IDK, whenever I think of a suitable name I guess (or if there's a major update)
Anonymous
Given how many blackboard bold chars you use, maybe Chalk would be a good name
Anonymous
It still fits the name theme (charcoal for drawing on canvas, chalk for drawing on chalkboards)
just coal?
user165474
CMC: given a positive integer as input, output the integer except string-reversed, without using string reversal or list reversal built-ins (that is, it should be arithmetic)
What's wrong with Charcoal?
03:32
It can only output in one color.
I assume that applies to both the language and actual charcoal though.
user165474
actual charcoal smudges as well
Someday I want to make a language called TIARA, where TIARA stands for Tiara Is A Recursive Acronym.
Whoa, meta-recursive acronyms.
Can I make my own list reversal function?
03:34
@WheatWizard Did you know that GNU is a recursive acronym? For GNU's Not Unix.
user165474
it should be arithmetic
@JanDvorak No, "should be arithmetic"
user165474
ninja'd
user165474
I'm so meta even this acronym
@MDXF That's probably the most well-known one.
Anonymous
03:35
@HyperNeutrino Actually, 22 bytes: ;╥KR♂╤@♀%;r♂╤@♀\;r♂╤R*
@HyperNeutrino what should happen when the number ends with a 0?
@Dennis I didn't actually know until I visited GNU's homepage and I've used GNU since I was nine.
Heh.
user165474
it doesn't matter whether or not leading 0s are output
user165474
@Mego :o how does that work
03:35
so 100 -> 1?
HURD is a nice one.
Anonymous
@HyperNeutrino Lots of log10 and 10**n
@MDXF Wine Is Not an Emulator
@WheatWizard NO WAY.
That was the only one I had heard of prior
03:36
Also help me phrase this: Pick a system. Now pick a language that is <> to that system. <> being a one-word statement to say "generally implemented on", or "only used in"
Something like that
EINE Is Not Emacs and ZWEI Was Eine Initially
For example, Oregon is <> to the United States
HURD means HIRD of Unix-Replacing Daemons, where HIRD means HURD of Interfaces Representing Depth.
A meta-meta-meta acronym?!?
03:37
def f(x,r=0):
 while x:r*=10;r+=x%10;x/=10
 return r
Anonymous
@Dennis Baby don't HURD me no more
2
Anonymous
@totallyhuman while x instead of while x>0
This did HURD
@JanDvorak *ZWEI not TWEI
@Mego ah yeah thanks
03:39
@ASCII-only Makes sense. 1 and 2 in German.
also, Drei's Really Emacs Inside
Anonymous
@totallyhuman 50
o0 i'm missing basic things
@Mego I think they intended both to be pronounced as herd (GNU/HURD or GNU/HIRD, for maximal punniness).
must be 'cause it's 11:41pm :P
user165474
03:41
That's not late.
user165474
:P
ah no that's the best time for coding
not for golfing though
Anonymous
@ASCII-only Nice recursion, I was working on doing that when I got distracted by cows
3
03:42
stahp out-golfin me ;-;
user165474
please explain the cows
Anonymous
They go moo, usually
It's a charcoal reference
Anonymous
We're slightly losing our minds in Charcoal HQ. Nothing to concern yourselves with. :)
@totallyhuman wait wrong site to ask that
user165474
03:44
exactly
user165474
CMC: Given an integer z, generate [1, 1, ..., 1] of length z without using list repetition. you may define your own list repetition function if you really want. Output in any reasonable format. Iteration and list iteration is allowed.
o0 where are you getting these ideas from
That's a really good idea
You should post that
user165474
ooo maybe i will
user165474
actually then
user165474
03:46
don't answer the CMC
f=->n{n<1?[]:f[n-1]+[1]}
I'll answer the post
user165474
because if I post then someone might FGITW ninja you
@HyperNeutrino Python, 30 bytes: f=lambda z:z and[1]+f(z-1)or[]
Yeah :P
03:47
... oh.
@JanDvorak hehe I'm gonna ninja you :P
@HyperNeutrino without using list repetition is fine for a CMC, but too vague for main.
user165474
ah ok
user165474
thanks for the feedback i was almost going to post that
user165474
though i would sandbox it first ofc
03:47
Don't sandbox it
The sandbox seems pretty useless nowadays
Anyways...->n{[1]*n}
I use the sandbox so that I can get my idea out on "paper"
user165474
most challenges i put in sandbox actually die, so...
it's still a good idea though
user165474
yes
03:48
I propose that Sandbox be renamed to Graveyard
3
although, yes, the sandbox is not getting a great amount of attention
but the few people who do, usually give goo feedback
> goo feedback
generally objectively 'orrible?
@MDXF It's certainly not fool-proof, but a decent amount of bad ideas get weeded out before making it to main. And since getting answer-banned on meta is substantially more difficult than getting question-banned on main, I'd still recommend it for inexperienced challenge writers.
Yeah... I guess I qualify as inexperienced :P
look dennis said it better than me
03:51
Each and every one of my questions has either been closed or included non-conventional rules by accident
But they were all in the sandbox first so...
user165474
not for long enough
user165474
you literally left "no vacancy" in sandbox for 1 hour
user165474
most people probably slept over that period of time
there should be a badge for sandbox people
maybe that'd give some motivation
user165474
you know what else gives motivation?
03:52
ice cream?
only if it can be awarded multiple times
user165474
sure
@HyperNeutrino Yeah I know, but it got every bit as much attention as the one I left in there for three months
user165474
how about getting a good challenge out there and upvoted instead of posting a flawed challenge that gets downvoted and VTC'd (cc VoteToClose) into oblivion
@HyperNeutrino shouting at people when their question has faults that could have theoretically been ironed out in the graveyard ... I mean, sandbox?
03:53
cookies?
@MDXF The problem with about unconventional rules isn't really something the sandbox can fix. If you and I both assume default rules apply, but we think different rules to apply by default, that's not something that would come up naturally.
user165474
@MDXF people tend to link sandbox posts they care about into chat a lot to get details ironed out
user165474
@JanDvorak sure that works too
@HyperNeutrino I did and y'all said it was good :P
user165474
well it has +4/-0
user165474
03:54
and really there was nothing wrong with the challenge
user165474
we just needed to clear up how lambdas work in terms of validity
Yeah
That meta post even specifically said functions, and non-lambda people have no idea that those correlate
user165474
I suddenly got an idea for challenges: user appreciation posts for random users that either have helped to community a lot or maybe just specifically me
user165474
@MDXF "lambda" means "lambda function"
lambdafunc
> dafunc
user165474
03:56
ಠ_ಠ
Why did this get downvoted immediately? It's a user's first submission and it's not bad
user165474
good question
@MDXF Because you edited it.
Anonymous
@totallyhuman funky lambs
@Dennis That's a reason for a dv?
03:58
But, but it was the cause.
Just so you know, the downvote was cast automatically by the Community user when you edited your answer. I consider this a bug. — Dennis ♦ 49 secs ago
Anonymous
Community does that. He's terrible.
Anonymous
oh yeah he pokes things
user165474
did you just assume community's... nvm
he's not nice
@HyperNeutrino shh the horse is dead
Anonymous
03:58
@HyperNeutrino Community identifies as a meat popsicle
user165474
:{
@totallyhuman da funk is a daft punk song
...that message was totally unnecessary
here's a joke to make up for it
why did the programmer get fired
CMC: Given an int a and string s, determine if s has length a.
because he didn't get arrays
Anonymous
@Phoenix l=
user165474
04:05
@Phoenix lambda a,s:len(s)==a
user165474
@Phoenix Jelly, 2 byes: L=
user165474
argument 1 is string
user165474
argument 2 is int
user165474
dennis comment-ninja'd me by 14 seconds ;_;
Welp, time to solve this in Jelly.
04:09
0
A: Sandbox for Proposed Challenges

SteveFestIf without If code-golf To be honest, this is the same as my last closed challenge, but improved. Oh no! Your mighty boss requested you to separate a string text and return if it is a specific string or not. However, you're i and f key is broken! That means a nightmare - No if statements! ...

that was fast o0
user165474
for once
bad grammar makes me [sic]
user165474
where?
@ASCII-only Hm, I would probably try to reinstall MSKLC and rebuild. Remember to save your layout file.
user165474
04:38
waiting for NSP......
0
A: Sandbox for Proposed Challenges

Hyper NeutrinoUser Appreciation Challenge #1: Dennis ♦ I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P If you convert Dennis's name to an array of 1s and 0s ...

0
A: Sandbox for Proposed Challenges

msh210What's the date, in Usenet time? code-golf The program should take any date as input and return the same date as output if it's prior to September 1993 or the date on the September 1993 calendar if thereafter. (For example, today is September 8671, 1993.) Input and output formats should be amo...

uhm
is it just me or is every sandboxed challenge downvoted rn
urp nvm
sorted by votes
user165474
>_>
user165474
the most upvoted one literally says "go sort by active" :P
i was on page 52 :P
user165474
04:48
... ok then... :P
writes a Java answer
05:12
calls moderator
Anonymous
3 messages moved to Trash
Anonymous
Let's not, please
sorry these rules are much stricter than i'm used to :P
05:51
Generic Programming Life Question: What differentiates a software engineer? I'm sure they are millions of people who can write great React or Java apps, so what would you say the things that makes someone special are?
their code-golfing skills
Anonymous
@Downgoat I actually was thinking about this a few days ago, after being asked a similar question. In my experience, there are a few terms used in the field to differentiate levels of experience and skillsets:
Anonymous
1. Programmer: your basic code monkey. You tell them to write a module that does X, and they'll give you a module that does X, but they probably didn't test it very much, and it will almost always have scaling and/or integration issues to work out.
2. Software Developer: a professional, experienced programmer. They know the value of tools like unit tests and data structures. They deal with program-level issues rather than module-level issues. Their code is consistently good, and they anticipate issues and solve them before they come up (though this can occasionally get into optimization hell).
TIL the difference between the three
I used to think all those three terms meant the same thing
Anonymous
A different, possibly better explanation:
06:03
@Mego hm, thanks. The problem I have with these scales is I'd feel like I'm a 2-3ish but I always feel like I am overestimating myself >_< though I guess it doesn't hurt to just apply for everything in term of internship
Anonymous
1. Programmer: someone who knows how to program. A very low bar.
2. Software Developer: someone who can take a list of program requirements and write a program that fulfills them.
3. Software Engineer: an engineer that works in software. We deal with the clients, translating their requirement descriptions into program and system requirements, set up the systems, and work on things like integration tests and high-level design. Lots of overlap with project managers, but unlike PMs, SEs know how to write software, and actually do write software.
Anonymous
Some people make a distinction between software engineers and systems engineers, but I don't think that's a very meaningful distinction. There's a lot of overlap.
Anonymous
And then there's IT people, who are sometimes software people too, but most of the time they try to make sure that the systems aren't on fire for too long.
so IT people and programmers/software developers/software engineers are mutually exclusive?
Anonymous
Usually, but there are exceptions to every rule
06:10
I remember having a conversation with my parents about this, and they said that programmers and software developers and IT people are the same thing
Anonymous
IT usually focuses on the deployment and maintenance of systems. They don't care how the code works. Their job is to make sure that everything stays updated, all of the systems are online and communicating, and that users' computers aren't catching on fire.
Anonymous
IT is a very broad term that technically can include software development, but it's rarely used that way in practice.
Anonymous
Having worked in IT before I became a software developer/engineer, I understand and can appreciate the differences between the two fields :)
I think it's US-specific thing.
In most other countries it seems like IT can be any computer-related thing and includes computer science
But in the US "IT" connotes people installing Windows updates and helping people who lost their password.
not really... from what I've heard in 99% of cases it's that
06:18
Well you live in the US.
right... but I've read a lot of things from non-US people.
On an unrelated note: I just had a bar of red bean ice cream. It was ice cream with red beans mixed in. pretty unusual to say the least. was really good though.
0
Q: Quine/Error Quine Polyglot

Challenger5Your task is simple: Write a program that can be run in two languages. It should be a normal quine (prints its own source code) in language 1, and should be an error quine (generates an error message identical to its own source code) in language 2. This is code-golf, so the shortest valid submis...

Question: does this render correctly for you?
@Downgoat This is how it looks for me:
Anonymous
@feersum That's IT support staff, aka help desk. The network engineers would hang you by your toes with CAT5E cables if you lumped them in that category.
06:23
and btw "O(lg n)"
Anonymous
@KritixiLithos lg is common shorthand for log base 2
oh, okay. Then what is the "∃"?
@KritixiLithos exestential quantifier
btw the website looks great, but it loads a bit too slow
and you should link to these docs in the readme instead of linking to the cheddar docs :P
@KritixiLithos >_< yeah keep forgetting to fix that
@KritixiLithos yeah, I'm using ESDoc which does great doc generation but its styling sucks so I basically redid the entire thing and added a bunch of JS and stuff to inject scripts and all to render everything
06:45
@Mego What I'm saying is that's the public perception of "IT".
Do network engineers that you know call themselves IT?
Anonymous
Yep
0
A: Sandbox for Proposed Challenges

BumpyBuzzby Berkely Robot Hokey Pokey Task Write a program or function to produce an ASCII art animation depicting a line of robots dancing to the lyrics of the Hokey Pokey* (or Hokey Cokey, if you prefer) in the style of a Busby Berkely number! Example Output ⍊ ⍎ ⍚ ⍊ ⍒ ...

07:06
@Mego I'm definitely #1 haha, I found an issue 5 months after it was implemented
> 2 byes
@NewSandboxedPosts lambda s:['\\"','BSlash',Quote'][s=='\\'+2*s=='"'] (I think)
Also whoops I killed chat
07:40
@isaacg :)
08:05
Lol, I sent a chat message just after the Sandbox room froze
 
1 hour later…
09:15
I don't recommend looking at any of the answers here. You absolutely don't want to be hospitalized for a tremendous mental shock or something like that.
09:25
argh, just realised the saved copy of the whitespace <s>tutorial</s> reference manual I have has the archive.org headers overlaying some of the instructions...
sitting here wondering why I'm missing a description of two of the operations
I should probs start Periodic
I think I need a cheat sheet in the shape of the periodic table
0
A: Sandbox for Proposed Challenges

I like my dogGermanify A Sentence Please keep in mind that I am still learning German so feel free to correct my grammar In German, there are 4 different forms that an article can take, called cases. As a German learner, I can safely say that learning them is one of the hardest things to understand in the l...

(And yes every number/flag/function/etc are atoms, yes real atoms like H,He,N,O,C,etc)
I've come across a situation in which using pass seems suitable
is this a good idea or some sort of anti pattern?
I've got a new idea for a metagolf: find the largest sequence of +'s and -'s that solves the Erdös discrepancy problem with a constant of n (based on the recent compression challenge).
Anonymous
09:44
@DestructibleLemon What would that situation be?
hmmm, it seems in this particular circumstance I don't need to use pass.
but if I had more items in my koth, it would be useful
Anonymous
The only good use case I'm aware of for pass is for creating abstract base classes
adding an item, but imagine there were more items
if card is vorped:
    pass
elif card % 2 == 0 and items[self.GRAIL]:
    pass
elif card <= 3 and items[self.TORCH]:
    pass
else:
    hp -= card
the passes would avoid a really long if statement, and make it explicit we can pass these cards with the right item
is this an antipattern?
Anonymous
Probably
@Mego tbh it doesn't seem that bad. really long if statements that span multiple lines is probably more of an antipattern anyway
Anonymous
09:48
You're making 3 comparisons, so you have 4 branches. The Python bytecode compiler is not that smart - it probably wouldn't optimize out those useless branches. Your performance will suffer.
I guess I could use continue
python has a bytecode compiler?
oh right. well I guess I should use that
Anonymous
@DestructibleLemon Yeah, it's automagically run when you run a Python script
@Mego clarity over performance?
or something?
Anonymous
@DestructibleLemon There's another solution: is_vorped = card is vorped; is_even_and_have_grail = card % 2 == 0 and items[self.GRAIL]; is_lt_3_and_have_torch = card <= 3 and items[self.TORCH]; if not is_vorped and not is_even_and_have_grail and not is_lt_3_and_have_torch: hp -= card
Anonymous
(use better names, obviously)
Anonymous
09:50
It's not a great solution either
Anonymous
You'd probably be better off modularizing those checks by breaking them out into a different part of the program
wouldn't that have just as many branches though
well luckily I only have a couple of items I need to consider
Anonymous
@DestructibleLemon The other solution I proposed? No, there's only 2 branches.
using break isn't as bad as gotos, right?
Anonymous
It's basically a goto, but it's better because it's not unconditional jumping anywhere
09:54
as long as I don't do "while true:\n if etc break if etc break something break"?
Anonymous
You could do it an ugly branchless way by doing hp -= card*(card is not vorped and not (card % 2 == 0 and items[self.GRAIL]) and not (card <= 3 and items[self.TORCH]))
Anonymous
But that's not very readable
I considered doing something like that earlier
for another thing
(example of bad break usage I was referring to: thedailywtf.com/articles/do-while-false)
Anonymous
My approach would be to make card an object and give it a property damage that returns how much damage it does. The damage function would decide how much damage is done, taking into account all of those conditions.
I think it would be an antipattern not to break.
@Mego cards are just ints
whats wrong with that
it seems like not creating a new class makes more sense
09:57
0
Q: Partial Sum of Harmonic Sequence!

ArjunDefinition In Mathematics, Harmonic Sequence refers to a sequence where i.e. the nth term of the sequence equals the reciprocal of n. Introduction In this challenge, given a positive integer n as input, output the Partial Sum of first n terms of the Harmonic Sequence. Inpu...

it seems like that would be worse than the pass branches
anyway, I don't have that many items
Anonymous
If you're having to consider all of those conditions about the card, it would make more sense to me to make it an object and have it consider all of those conditions inside its own functions
    for card in dungeon:
        if card == 7 and items[self.PACT]:
            pact_killing = True
        elif (not card % 2 == 0 and items[self.GRAIL]) and (not card is vorped):
            hp -= card
            if hp <= 0 and items[self.POTION]:
                hp = 3
                items[self.POTION] = False
if you're curious, that is what I have
so far
Anonymous
@DestructibleLemon I would be physically revolted by that code if I hadn't seen similar things so often at my last job

« first day (2311 days earlier)      last day (2829 days later) »