« first day (1901 days earlier)      last day (2943 days later) » 

2:00 PM
-4
Q: Convert phrases to reverse style

NoOneIsHereThe Challenge Convert a phrase of two words to reverse style: candy bar -> bar le candy. Specifications There will be one word (only a-zA-Z0-9 + -), a space (), and then another word. Test cases: candy bar -> bar le candy code golf -> golf le code programming puzzles -> puzzles le progra...

24 answers, score: -4
wow...
 
@FricativeMelon well I didn't say I liked Python's forced indentation either ;)
 
Ugh. This part: "When B does not appear in A, you should output A unchanged." is going to cause several more bytes :(
 
@Geobits it costed me about 12 byte in lua ^^
 
@MartinBüttner You have a point, so "style" is going to be taken carefully and slowly. I'm still not sure whether I'm going to do python-style indenting, but a good example I can give you is requiring spaces around operators
 
I had 111 in java (still golfing though) before I saw that part.
 
2:09 PM
@NathanMerrill enforcing space around operators...?
 
@NathanMerrill see, I find a + b*c more readable than a + b * c ;)
 
I would hate that D:
 
Can't figure out the shortest/best way to clone/check/swap it though.
 
@MartinBüttner I agree that people have personal preferences on what style looks best, but the issue is that code is never written for one person.
so, by enforcing a common code style, you make the entirety of code readable for everybody
aside from the impossible-to-enforce things, like variable naming
 
2:12 PM
In fact, the problem comes more from people who have no code-style at all, rather than having multiple code-style mixed in
the only thing that can be disturbing is about functions
 
@NathanMerrill You could use spaces around operators to decide operator precedence, like a + b * c does the multiplication first, where a + b * c does it second. That may not be particularly readable though.
 
function name(int parameter){

}
vs
function name(int parameter)
{

}
 
@Geobits I feel like it's been ages since the last time you answered one of my code golfs. ;)
 
@FricativeMelon style, by definition, has no impact on the runtime of the program
 
@FricativeMelon it would be particulary messy D:
 
2:14 PM
@FricativeMelon that sounds like a terrible idea which I will definitely work into some future esolang, thanks.
13
 
I'm scared now...
 
@Katenkyo yep, if I do decide on curly braces for functions, then I'll definitely do the first
 
@MartinBüttner This one looked nice and simple to bang out in a minute or so. And it was, except that keeping a copy of A around to return really sucks. I'm sure there's a better way to do this.
 
@NathanMerrill Most people use the first, from what I saw, but I prefer the second because I easily can see where it start and where it ends
 
@Katenkyo either way, indentation will be required, so it should be easy to tell where it starts/ends
 
2:17 PM
@Geobits it may be the easiest way, I've oftep for it, why not just copy it, work on the copy, and at the end decide if you print the original or its copy?
 
@Katenkyo I'm looking at that now. Modifying inplace looked so nice though :P
 
You
Hello
 
@NathanMerrill Not really, I usually expect a one liner in the first case, because I don't see the first brace, so I need some time to understand it isn't
 
What kind of indentation? There are several diferent styles (tabs, 4 spaces,...) and they are all objectively right. If you enforce one you're gonna end up with a bunch of salty people
 
@quartata hum, what's the difference between tabs and 4 spaces...?
 
You
2:19 PM
@Katenkyo Absolutely nothing!!! :)
Except tabs may be different sizes in other editors.
 
Big difference. Tabs can be any number of spaces; there is no standard.
 
How do you put multiple lines in chat, since Enter doesn't work?
 
You
Spaces are constant
@FricativeMelon Shift + Enter
 
shift enter
 
Well, true that I have some editor jusing tab=2 spaces, but by tab-spacing I usually mean 4 spaces
 
2:21 PM
Anyways, I just think in general it's bad to enforce a code style that you think is right but others might not
 
It's the most common setting
 
@quartata tabs.
 
Yeah that's gonna get a lot of people mad at you
 
You
I prefer tabs and I don't care what other people think. :)
 
sure. I know lots of people love spaces (and I currently use them on pretty much every project), but fundamentally, tabs are better
 
2:23 PM
A lot of editors expand tabs too so they'll have to fiddle with their settings and stuff
 
what do you mean by "expand tabs"
 
Auto converted to spaces.
 
@quartata And some editor auto-convert spaces to tabs...
(it can be painful when working in 2-spaces D:)
 
@NathanMerrill How about this:
function name(par)
{
| function second(par2,par3)
| {
| | output par2
| | if par2>par3
| | {
| | | do stuff
| | }
| }
}
 
They won't be able to copy snippets from SO either since they expand tabs
 
2:25 PM
@NathanMerrill are they now...
 
I think for indentation you should just enforce consistency
i.e no mixing tabs and spaces
 
@NathanMerrill I find that easier to read than having to count spaces in normal indentation
 
" I designed it according to what I think languages should do, as opposed to what they currently do"
 
@MartinBüttner Yes :P
 
You
@quartata I don't understand why people do that.
 
2:26 PM
@quartata mixing tabs and space is a pretty healthy thing to do in python !
 
You
Mixing tabs and spaces.
 
For golfing maybe.
 
please no
 
@Geobits I could totally get behind the whole "everyone can use the tab width they like in their editor and it's still going be consistent" argument if it actually worked
 
You
Oh no! Not a tab-space war! For the sake of all, let's change the topic!
 
2:27 PM
@MartinBüttner The only thing you need to do to get that to actually work would be enforcing tabs AFAIK. The only times I see problems with it is when they're mixed.
 
this_function_takes_a_lot_of_arguments(foo,
                                       bar,
                                       baz,
                                       blah,
                                       yadda)
^ can't do that with tabs
 
No one is going to want to use a language that enforces tabs. It woud be a massive pain in the ass
 
You
@MartinBüttner Good point.
 
@quartata like Makefiles you mean? ;)
 
Also no one is going to use a language that enforces spaces
You have to be flexible on some things
 
You
2:30 PM
Really, spaces and tabs are an opinion. Don't bother changing people's minds about it.
 
@MartinBüttner oooh, that's a really good argument
 
@MartinBüttner didn't even think of that
I want to golf down my answer before Geobits beats me, but cant' find anything to improve >_<
 
@NathanMerrill this is probably not even the best case I can make for it, because this is a fine alternative:
this_function_takes_a_lot_of_arguments(
    foo,
    bar,
    baz,
    blah,
    yadda
)
 
You
@MartinBüttner Actually, that looks nicer. :P
 
@MartinBüttner only if you want the latter code style
I'm not sure what I want
 
2:33 PM
but when I have a lengthy arithmetic or logical expression, I like to do this:
   foo
&& bar
&& baz
&& blah
&& yadda
(possibly with something preceding the foo)
and for this kind of alignment you're not as free to pick any position as with the function call
 
no, the &&s are like commas
and should always go after
 
@NathanMerrill actually, I prefer to put them at the start of a line
It indicates what's the purpose of this line
 
@NathanMerrill think of it like long addition... you'd put the + in front as well
 
It's easier to see what's in the condition, and what isn't
 
because then you might have + or - and which one you have affects the next operand not the previous one
 
2:35 PM
mmm, true
 
also putting them at the front makes it less likely that you forget the operand when extending the list
 
@Katenkyo I don't think there's any way I'm shaving 20 bytes from mine. You're safe from being beaten by Java today I think.
Even seeing mine beat Python 3 by so much makes me just assume that one isn't golfed enough.
 
@Geobits Makes me wonder what he did too, python is often about the same length or shorter than lua
 
Well, I probably could get rid of 20 or so using Java 8, but I have a thing against using lambdas to "disappear" the entire function declaration.
 
Feel like it's cheating?
 
2:41 PM
Very much so. It's just offloading it to another part of the program imo.
 
you people and your "X language should be hard to golf in" arguments
 
Not "should be hard to golf in", but "should be a self-contained function". It's no different than requiring imports to be counted to me.
 
@NathanMerrill there's languages for everyone
I personnaly golf in lua because of its simplicity: you have nothing at hands, do everything by yourself
 
@Geobits Yeah, I've never lost to Java before. This is my greatest shame. — Morgan 'Venti' Thrappuccino 1 min ago
 
It has the bad side of making golfs longer
 
2:47 PM
@Geobits :(
 
Oh, I thought you would want your greatest shame on display. Is that not normal? :P
 
Normally yes, but losing golf to JAVA!?
 
I am alive!
 
Is putting variable declaration outside of function cheating?
 
2:50 PM
@Morgan'Venti'Thrappuccino I don't know enough Python golfing to help, but I bet you can lose 3 to pull ahead. Use that shame to fuel your search.
 
@Geobits Oh I'm well versed in using shame to motivate myself.
@NathanMerrill Yeah.
 
@Morgan'Venti'Thrappuccino Usually happened to me quite often, nothing to be shame :D
 
@NathanMerrill As long as the declaration is counted in the byte count, I think it's usually allowed.
 
@NathanMerrill it's commonly used in C golfing, you declare variables outside the main as they will default to int and have a value of 0
 
@Geobits I thought you couldn't because the function has to work multiple times. So they won't get reinitialized if they're outside the definition.
 
2:52 PM
@Morgan'Venti'Thrappuccino I think it depends on the function. If it needs to be initialized each time, then that part should be in the function, yes.
 
@Morgan'Venti'Thrappuccino I've left you a comment about ternaries, maybe it could save you ^^
 
@Katenkyo Yeah, I just saw that. I'm so used to golfing down to (False, True)[bool] that I forgot about normal ternaries. :P
 
@Morgan'Venti'Thrappuccino ^^
 
bah, I was going to suggest putting your a=0,b=0 outside, but despite the fact that it doesn't work with multiple runthroughs, it doesn't improve the byte count
 
2:55 PM
@Morgan'Venti'Thrappuccino Don't golf it down anymore! Else, you'll beat me D:
 
@Katenkyo I suppose that's the least I can do in thanks. ;)
 
@MartinBüttner Well you can't say that any more (for a while at least) :P
@Morgan'Venti'Thrappuccino Well damn.
Nice job.
 
@Katenkyo About that...
 
@Optimizer I will speak to Martin about it.
 
@Sp3000 è_é
 
2:57 PM
@MartinBüttner Are you there? I need mod attention on something.
 
hmmm, are default values a good idea?
 
for function arguments?
 
I realised a few days ago that i am underage @MartinBüttner
 
why not?
 
2:58 PM
aka, if a class declares an integer with no value, is it good design that it automatically becomes 0?
 
@MartinBüttner what do i do?
 
Oh man. I just spent way too long trying to figure out what my issue was with this code. Who can spot the error?
    public class MyObject
    {
        public string Foo { get; }

        public MyObject(string foo)
        {
            Foo = Foo;
        }
    }
 
@NathanMerrill Depending on scoping rules you'll sometimes want to declare a variable in a different place from where it's used for the first time, and if you then require people to give it a meaningless dummy value I don't think that's a good idea.
 
@Rainbolt the caps in Foo=Foo;
 
Haha yup.
 
3:01 PM
should be Foo=foo; :D
 
Foo was just always null and I could not figure out why
 
@Rainbolt Btw i am not gone yet
 
The more obvious the mistake, the longer it takes to spot :)
2
 
@Rainbolt do you use an IDE?
 
@trichoplax so true
 
3:02 PM
I know at least Jetbrains IDEs will detect that
 
That's because it comes with Foo fighters.
 
I once lost 2 hours looking for error, looks like I typed test/javascript instead of text/javascript
 
@NathanMerrill everyone does.
 
Yes, but my IDE doesn't tell me that foo is unused. If I had ReSharper turned on, then it would have, but our solution is so large that ReSharper crashes Visual Studio every ten minutes.
There are parts of ReSharper I could turn off, but I haven't bothered to tinker with it
 
Damn, that sucks.
 
3:03 PM
@MartinBüttner So what do i do about my age?
 
I've wasted hours with < instead of <=
 
@Solver If you wait a few years, it will sort itself out.
 
@Rainbolt That's why you shouldn't rely too much on your DIE :D
 
@Geobits lol
 
Also, exactly what is the problem with age? I set up an account for my nine year old. I looked at the rules and meta posts, and it seems like that if it's set up by the parent and monitored, there isn't an issue.
Nobody's bothered telling me otherwise, so...
 
3:05 PM
@trichoplax using < and <= is now a habit for me, I do it the right way, but don't even know I chose one over the other
 
@Solver Unfortunately, I don't think there's much you can do. Afaik what usually happens is that SE staff will remove the account when they get around to it, and then you're free to sign up again once you turn 13.
 
@Geobits yes but i set up my own account myself
 
@Solver Why in the world would you say that publicly? ;)
 
@Solver first rule of the internet: nobody knows who you are unless you tell them
 
63
Q: How do I use Stack Exchange if I'm under 13 years old?

Maxim ZaslavskyI was just reading the Terms of Service, and noticed something: Subscriber certifies to Stack Overflow that if Subscriber is an individual (i.e., not a corporate entity), Subscriber is at least 13 years of age. No one under the age of 13 may provide any personal information to or on...

 
3:07 PM
on the internet no one knows you're a dog
 
@Geobits This seems to confirm that
 
@Geobits I think you misread the post. Stack exchange needs to allow parent/guardian permission
which they currently don't
 
Yea, that's the one I finally found when researching.
> We'd encourage you to work with your parent or legal guardian, who can set up an account and use it with you, or establish other appropriate ways to use the site as a family.
I have one account for me, and one account for us.
 
> Get Stack Overflow to accept parental/guardian permission for individual accounts,
 
that works, as long as none of the information isn't his (or hers)
 
3:09 PM
@MartinBüttner Do you think I should answer that string question or ask another one on meta about that issue specifically?
 
Oh right, none of the personal info is his. I don't want random people emailing him anyway.
 
You could also ask your parents/guardians to explictly tells to SE that they agree with and monitor your use
 
@FryAmTheEggman I think you could just answer that.
 
But couldn't say how it'll turn out as you setted up the account by yourself
 
@QPaysTaxes the guy who runs this emailed me about another project I am doing, and he said he likes Desert Survival.
 
3:11 PM
Also, I have to go, Have a nice evening guys!
 
@EasterlyIrk If nethack people like it, you should feel bad :P
That's like saying the Spice Girls really like your new album.
 
._.
I like nethack...
 
Oh. Then you should feel bad for that, then. Not the game thing.
 
don't most commercial servers have backups? Or is that something people say they should do, but in practice it's rare?
 
Anyone else in here playing Black Desert?
 
3:14 PM
Haven't played a Korean MMO in a looooong time.
 
@Solver Chat/mother meta is really really not the place to ask this at any rate
 
@NathanMerrill I think most do. Now whether they do backups often enough, have an offsite location, etc, is up in the air.
 
Contact SE or something
 
@Geobits then I'm correct in assuming that ransomware is really only effective against servers that don't backup or do it rarely?
 
@EasterlyIrk Oh yeah I never fixed that
I should get on that
 
3:16 PM
which seems like a difficult thing to test, so they're basically hoping there aren't backups
 
I guess it depends on the backups, yea. It seems like a good method: target a bunch of places, strike gold on one or two.
 
Hello, I was just going back from the bus stop to home
 
Much like most spammer operations.
 
I never realized that VLQ/NAA flags show up in the little people review queue
 
@Solver Details of your daily travel noted. Thank you for providing this information.
 
3:19 PM
@quartata Little people?
 
@zyabin101 non-diamond people
 
@Geobits I can't pretend that I am someone else, no matter how hard I try.
 
@Solver My point was rather that this is the kind of reason that COPPA and laws like it are implemented in the first place. In the interests of "think of the children" mindset that creates these laws, you probably don't need to add your daily schedule to the list of other personal info given here.
Granted, I intended it mostly as a joke. Mostly.
 
@Geobits Okay. Will note in the future.
@Geobits I think I will just stay online and not bring too much attention to this :P
 
That's probably the best course of action ;)
Although applied retroactively would be even better.
 
3:25 PM
@Geobits I was referring to:
19 mins ago, by Geobits
@Solver Why in the world would you say that publicly? ;)
 
I was referring to all of it. If you just drop the whole thing, it's possible that nothing will happen. Keep mentioning it, and somebody will eventually "fix" the problem.
 
okay, everything is normal now. :P
 
A good (if of neutral morality) life lesson: If you act like you belong somewhere, most people will let you get away with a lot.
 
@Geobits Thank you. My spirit has matured.
now lets doe talking about node.js
 
:D
But... node.js? Surely there's a better topic to pivot to?
 
3:30 PM
okay, how bad is java?
wait - the end has come:
 
wait did that happen?
 
@EasterlyIrk yes. :(
 
Apparently. No profile now on PPCG at least.
 
no profile anywhere.
 
well bai @Solver
how old are you?
 
3:34 PM
why i am still here?
 
idk
DON"T LEAVE
 
Blame (or praise) caching
 
KEEP THIS PAGE OPEN FOREVER
 
@EasterlyIrk less than 13, older than 9
 
okai
 
3:34 PM
@EasterlyIrk i was gonna say that.
maybe i will code out a challange to show my age :)
 
good
 
you do realise that was sent one hour ago
the mail
 
It's like talking to a ghost...
Farewell, and rest in peace.
 
Goodbye @Solver!
Come back when you are 13, and we will blow your mind with golfing.
 
wait, when i re login i am still here
how zis this
 
3:37 PM
idk
check all your accounts
 
or i will take another form
 
ohey your chat profile didn't get nuked
 
if the account is gone forever
@EasterlyIrk woah, cool
so i can still chat!
 
Ok, I think I'm going to allow default code values. If you declare a variable of a certain type, but you don't assign it, the default will be used.
if the class doesn't have a default, then a compile error is thrown
 
@EasterlyIrk
please say something there.
everyone pleez do
 
4:01 PM
just saw this which looks interesting... stackoverflow.com/questions/36603712/…
an algorithms people know an answer?
 
0/10 needs moar latex
 
@Lembik You are Eleanora?
 
no!
:)
 
@Lembik yes, there is. start at the end, select the largest, and work backwards, I believe
 
@Lembik the identicons are identical!
 
4:04 PM
@EasterlyIrk I could explain it.. it's a bug in SO
but I have explained it too much :)
basically, I share a computer and it seems that sometimes SO remembers me as one of the other users
which is annoying
 
#Fail every heard of network accounts?
 
so there is someone called eleanora who also uses this computer
 
oh
really?
 
right
but that's not really the interesting topic :)
 
are you sure?
^_^
 
4:05 PM
I am more interested in the algorithmic problem
@NathanMerrill that would work if the rows were sorted, right?
 
er, yes. I guess I assumed they were
 
I don't think that is part of the question
there is a longest increasing subsequence algorithm
it looks a little like that
but not quite
hmm
dynamic programming?
 
@El'endiaStarman o/
 
ohai @El'endiaStarman
 
4:20 PM
@QPaysTaxes Hiya @QPaysTaxes!
My account was nuked :(
But my chat account is still alive. :D
and that's kinda all that matters to me.
 
Uh, anyone know what to do when your answer is "wrongly" accepted? codegolf.stackexchange.com/a/42534/31625
 
yo dawg we heard you liked unions inside structures
struct value {
  union {
    double doubleValue;
    char* stringValue;
    double* doubleListValue;
    char** stringListValue;
  } value;
  enum { DOUBLE, STRING, DOUBLELIST, STRINGLIST } type;
};
I love C
 
Surely MATLAB isn't an esoteric language :P
 
Yeah, Matlab isn't esoteric. MATL is.
 
Idk mine is like 90% builtin too...
There's also a J answer
 
4:28 PM
@QPaysTaxes By the way you should pop into the desert survival room
yes
 
is there a term for "hard drive failing to write a bit"
not necessarily the same bit, just the rate for how frequently a write fails
hmmm, maybe?
 
@QPaysTaxes I think so.
But he liked it. ^_^
 
hai @EasterlyIrk
 
Oh, and I added vim/nethack movement keys and a drop command when you are overweight.
@CᴏɴᴏʀO'Bʀɪᴇɴ HAI
@QPaysTaxes also, he mentioned runnning it on a smartwatch?
Quote:
> I liked that Desert Survival game you've been contributing to. I'm a huge fan of minimalistic roguelikes. It looks small enough to play on a smartwatch, which is interesting.
 
ikr
@VTCAKAVSMoACE explain your name again?
 
"Vote to close a known answer (VTC'S) so my oranges are crazy exceptional"
 
"Vintage Trench Coat, also known as VSMoACE" (don't know the last seven)
 
JOLF IS NOW FUNCTIONAL ON IE!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ WAT? IE?
I HAVE AN OLD IE!
 
4:59 PM
I use IE at school :P
 

« first day (1901 days earlier)      last day (2943 days later) »