« first day (1755 days earlier)      last day (3071 days later) » 

12:02 AM
does my font look weird?
 
Anonymous
@orlp Yeah you should see a doctor
 
@orlp yeah get something like fira mono
 
Are you sure you want to name it kwik?
It kind of evokes gas stations.
 
@feersum my programming language?
yes
kwik is a funny spelling of quick
and it's dutch for mercury
 
I have a feeling that's been taken
let's see
 
12:05 AM
@orlp what is that editor?
 
@quartata vim
 
@quartata vim
 
That looks nothing like vim.
 
whoops ninja'd
 
What have you done to that thing
 
Anonymous
12:06 AM
@quartata emacs
 
@quartata why not?
 
@orlp Kind of.
 
0
Q: States and Capitals

MegoGiven a string as input, output the US state whose capital it is if it is a state capital, the capital of the state if it is a state, or Arstotzka if it is neither. Examples: Austin -> Texas Alaska -> Anchorage The Nineteenth Byte -> Arstotzka Rules No built-ins or libraries/modules that pr...

 
emacs > vim any day
 
@orlp How do you get line numbers on the left?
 
12:07 AM
@AlexA. get emacs :P
 
set number
set cursorline
 
@TheInitializer
@orlp Thank you!
 
@NewMainPosts @Mego Can you give a list of the capitals pls
 
@AlexA. :(
 
@quartata what part looks nothing like it?
 
12:08 AM
I know the perfect language for that challenge.
 
looks normal to me
 
@orlp The directory bar on the side, for one thing.
 
@quartata NERDTree
I toggle it with <space>n
 
Ah, gotcha.
 
12:09 AM
@ThomasKwa I know. I swear it would save so much time when you scroll away to change something real quick and then can't find your old place.
 
I was wondering what that was...
 
@Sparr Congrats on the interview! Can I ask what company?
 
Also, did you make sure to add "Try it online." at the end?
@Mego can you make them separate lists :3
 
@Calvin'sHobbies In Atom, if the file is under git revision control, it'll show colors on the left with intensity corresponding to the degree of difference on that line from the last commit.
 
But I mean something realtime
 
12:12 AM
Actually wait nevermind
 
Anonymous
@quartata dun
 
@AlexA. Or is that what you mean?
 
Anonymous
@quartata no
 
@Calvin'sHobbies Yep
 
@Mego that's fine I didn't want them I got confused
thanks
Time for.... TeaScript!
First I gotta compress all these damn strings
 
12:14 AM
@AlexA. there have been a few lately. This one was with Splunk.
 
Also +1 for the Papers Please reference @Mego
 
Anonymous
@quartata Glory to Arstotzka
 
Anonymous
Cause no trouble.
 
@Mego so this might work? and how does M work?
 
Anonymous
12:17 AM
@TanMath It will be closer to correct, but I'm not just going to hand you a correct solution :P The rest is left as an exercise for the golfer. M is described in commands.txt, along with the hundreds of other commands.
 
@Sparr I hadn't heard of Splunk but I just read a bit about them and it sounds like an interesting place to work! I assume some kind of software engineering position. What other companies have you been applying to? (Sorry if I'm asking too much about this, just curious)
> The rest is left as an exercise for the golfer.
lal
 
@Mego oh.. so what exactly wouldn't work with it?
 
Anonymous
@TanMath Probably everything. I didn't keep track of the stack all that well in my head while I was writing that
 
Anonymous
But it should give you some idea of how to proceed
 
Anonymous
6-day streak of 100+ rep days :D
 
12:22 AM
 
Anonymous
top kek
 
this is how I golf
best workflow there is
 
@AlexA. I'd be going for more dev ops than software engineering. some coding, some sysadmin, some both. I'm also interviewing at Samsung right now. I've got a long-pending interview with Google that might come to fruition some day. And a couple of other companies you've never heard of.
 
I'm in the interviewing stage too!
 
@Sparr Try me, I may have heard of them. ;) I wish you luck! You're clearly a smart, talented fellow so I'm sure you'll have no trouble finding a good fit.
 
12:26 AM
though, I'm boring and just want a standard programming job
 
What constitutes a "standard programming job"?
 
Anonymous
@AlexA. Being a code monkey
 
I get assigned tasks, I write code to do said tasks
 
Oh, okay
 
Anonymous
 
12:29 AM
lol Pandora literally started playing Code Monkey by Jonathan Coulton
 
Anonymous
@NathanMerrill see linkydink
 
I know
I don't even know what the chances of that are
but they are small
 
Anonymous
disappears
 
@Mego so I shouldn't trust this code? I thought you were going to help me find what was wrong!.. oh well...
 
@TanMath if it's your answer shouldn't you write it?
3
 
12:37 AM
@TanMath Although no one is giving you a ready made solution, it seems like you're getting quite a lot of help, from people who just like helping
 
12:52 AM
@xnor Nice :D Didn't think of selecting a format string instead
 
@Sp3000 I noticed that right before posting, that I'm using the same string variable in every option
 
Too bad '%%s, %s.'%s is the same length :/
 
yeah, but that's a nice trick to remember to avoid the tuples when you're subbing 2 things
i wondered about an alternative approach to the whole thing, where you generate a single big string with lots of %s, %%s, and %%s, then sub in the moving parts
 
Sounds nuts :P
 
the main issue is that the list 99, 99, 98, 98, 98, 97 ... is not actually short to generate
 
12:58 AM
Hmm it's backwards too, damn
 
I have to get this out: I sincerely apologize to @quartata for unknowingly "stealing" his challenge from the sandbox. If there is anything I can do to make it up to you, let me know. Also, I have learned my lesson and I promise to check the sandbox and main site before posting any new question. Similarly, I apologize for the problems that have arisen from the challenge itself. It was poorly written and the rules did happen to change a few times. Doing this ashamed myself, I'm sorry for it all.
4
 
@isaacg I can't get packed-str to work
I'm escaping null characters, quotes and backslashes
data = macros.Pchr(macros.to_base_ten(l, 28))
data = data.replace("\\", "\\\\")
data = data.replace("\"", "\\\"")
data = data.replace("\0", "\\0")
print(".\"_z" + data[:28])
yet somehow the parser still stops midway
 
@orlp What language? (Python?)
 
@AlienG yes, to generate a pyth program
 
Oh, i see.
data = data.replace("\"", "\\\"") - I'm not sure that works...?
Unless I'm mental.
 
1:12 AM
that escapes quotes
basically it replaces " with \"
 
Right, but the " will start another string if I'm not wrong?
 
that's why we escape it
 
Oh, I'm also blind.
@orlp You're right.
data = data.replace("\0", "\\0") Aren't you just replacing \0 with \0?
I'm not sure why I'm trying to help, I suck at python.
 
@AlienG He's replacing null bytes with a backslash followed by a 0.
 
1:22 AM
I'm just going to stop trying, probably just making it worse.
 
In javascript you can JSON.stringify things other than generic objects
You can also JSON.stringfy strings and arrays and whatnot
 
JSON.stringify(whatnot)
 
@SuperJedi224 Though, isn't that equivalent?
 
No
One is a null byte and the other is two separate characters: backslash + 0.
 
Eh, this is why I don't try helping C:
 
@SuperJedi224 THEY CHANGE COLORS ~(OUO~)
 
@AlienG Yeah, I don't know why they do that in the video
 
@SuperJedi224 Because it's not hard.
 
It seems a bit silly though
 
Well, they assume you'll be looking at the video so they add something to look at. (When you're really not)
 
1:36 AM
0
A: States and Capitals

orlpPython2, 1006 bytes s="Baton Rouge,Louisiana,Indianapolis,Indiana,Columbus,Ohio,Montgomery,Alabama,Helena,Montana,Denver,Colorado,Boise,Idaho,Austin,Texas,Boston,Massachusetts,Albany,New York,Tallahassee,Florida,Santa Fe,New Mexico,Nashville,Tennessee,Trenton,New Jersey,Jefferson,Missouri,Richmo...

pretty cool trick if I say so myself
 
@orlp Can you drop the try/except and use s.find instead, where 1^-1 = -2?
 
@Sp3000 lists have no find
I had already thought of that
 
Ah, right. Keep forgetting that
I=input();s+=[I,"Arstotzka"];print s[1^s.index(I)] <-- something like that?
 
think that should work
 
@GamrCorps It is really not a big deal :P
I had kinda scrapped mine since we had just done the fizzbuzz catalog
 
1:44 AM
oh I have to use Python3
to get input()
 
Probably shorter as a function, tbh
Hmm maybe not
 
nope
at least not with def
maybe with lambda
 
I in s is too expensive for lambda :/
 
@Mego ooh ooh ahh ahh banana banana jQuery something
 
pretty funny
I golfed 270 characters off the other python answer
without resorting to base compression or stuff like that
 
1:53 AM
tbh the other one's pretty badly golfed, even without xor :P
 
@TanMath Hi
 
@SuperJedi224 hi!
 
@Sp3000 quick quizz
let's say I have an integer n and a floating point f
I want a function that returns f if n is even
or -f if n is odd
 
I am surprised somebody said hi the moment I entered
 
(f is IEEE754 double and n is uint64_t)
 
1:55 AM
Is Mego gone?
 
@orlp f-f*(n%2)*2 would do the trick, though it may not be the shortest.
 
@orlp Can't you just do (n%2?f:-f) ?
Or am I not understanding what you are asking?
 
Or that. ^
 
let's say you want to do it fast
so let's not use a conditional (branch predictions are slow)
 
@orlp Ah, gotcha.
 

« first day (1755 days earlier)      last day (3071 days later) »