« first day (2012 days earlier)      last day (2822 days later) » 

12:14 AM
0
Q: Lead Your Turtle by a String

Helka HombaWrite a program or function that takes in a nonempty single-line string of printable ascii characters excluding space: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ You may assume the input is valid. Based on the input, draw a new string arrang...

 
12:26 AM
@MᴀʀsUʟᴛᴏʀ @quartata with submodules, if A is a submodule in B, then A updates, when B downloads, do they get the older code (before A updated)?
 
@NathanMerrill ?
if you update a manually in b, you get whatever version you updated to
if you commit that, people get that version
 
In a repo containing a submodule, each revision is tied to a particular revision of the submodule.
Getting a new version of A into B requires a commit in B to change the associated version.
 
1:08 AM
another question, then. I cloned KoTHComm into StockExchange/src/KoTHComm. But now the package names are all wrong. Where exactly is the submodule supposed to go?
if its outside the /src folder, then I'm not sure how to access it
but if its inside the src, then I have to update all of the packages (which seems like a terrible idea with git)
 
I imagine there must be a flag to get around the Java directory layout thing if that's what you mean.
E.g. to have two root paths for packages.
 
man
sometimes
I wish I could look in 'THE BOOK'
like Erdős's book of the most elegant proofs for each theorem
imagine how much you could learn if you could see the smallest program for a certain problem for each language...
 
> These programmers are stupid people who care little for others.
 
lol did he just copy-paste his book twice
 
1:24 AM
> did he copy-pasted
 
and you quoted wrong
 
@LeakyNun is that you in your profile pic?
 
@orlp are you in the netherlands?
 
@orlp Yes
 
tfw my favorite walking spot has a pokemon go gym
I'm scared to go there because I'm sure it will be infested with people
 
1:35 AM
@quartata rip :(
anyone know ruby well in here?
 
What's your question?
 
why does 1 == 1 == 1 syntax error :/
 
@EᴀsᴛᴇʀʟʏIʀᴋ yes
@CᴏɴᴏʀO'Bʀɪᴇɴ what language
 
2 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
anyone know ruby well in here?
 
@LeakyNun what is behind you
 
1:46 AM
@feersum @MᴀʀsUʟᴛᴏʀ @quartata as far as I can tell, there's no way to have a root inside another. Either I go the route of Maven/Gradle, or people download both repos and include both sources
 
a root?
 
a /src folder in another /src folder
(for Java)
 
Apparently, this is valid ruby syntax:
array = [1, 2, 3]
array.each{
|
x
|
puts x*x
}
 
@orlp light
 
@orlp cool, I have family there
 
1:52 AM
@LeakyNun well of course
that's all a camera does
capture photons
the question is, what emitted those photons
 
@orlp a light projector
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Is that unusual? JS is whitespace insensitive too
 
@quartata no, it's a pleasant surprise. I thought ruby had its statements ended by newline. just surprising
 
Actually was that in IRB?
 
We need a LWQ filter that removes posts of the form:
#\w+, \d+
    .+
>_>
 
why not just
#.+
    .+
 
true
but that could also skip posts with no bytecount, which needs to be fixed 90% of the time
 
<h\d>.+<\/h\d>
<(pre|code)>.+<\/\1>
there, use regex to parse HTML
 
Err, wait, context?
 
1:59 AM
._.
3 mins ago, by Eᴀsᴛᴇʀʟʏ Iʀᴋ
We need a LWQ filter that removes posts of the form:
2 mins ago, by Eᴀsᴛᴇʀʟʏ Iʀᴋ
#\w+, \d+
    .+
@CᴏɴᴏʀO'Bʀɪᴇɴ pls no
 
@EᴀsᴛᴇʀʟʏIʀᴋ I'm deaf, not blind.
 
38 secs ago, by El'endia Starman
Err, wait, context?
 
what do you mean then?
 
Yeah. I asked that after looking at your messages and trying to figure out what you were talking about.
 
2:01 AM
low quality posts review queue gets tons of reviews that are just code with no explanation
 
dead("You greedy bastard!")
 
I was saying to filter out those
@CᴏɴᴏʀO'Bʀɪᴇɴ o_o
 
learning ruby the hard way is kind of mean ._.
 
@EᴀsᴛᴇʀʟʏIʀᴋ Ahhh, okay. I don't normally man the review queues here, so I didn't know.
 
2:04 AM
Are comments on rejected edits shown to the user that suggested it?
 
yes, but he doesn't normally get notified of the rejection
 
@EᴀsᴛᴇʀʟʏIʀᴋ wouldn't you want #\w+ \d+ (bytes)\?
 
@NathanMerrill There's no need to have a root inside another. You could have foo/src and foo/submodule/src.
 
2:07 AM
@DrGreenEggsandIronMan (?:bytes|char(?:acter)?s?)
 
@feersum then how does foo/src reference foo/submodule?
 
@NathanMerrill Put multiple classpaths in the java invocation.
 
> If you follow these simple rules, you will start writing better code than most programmers.
oh my are there that many bad programmers
(simple rules = simple things about if statements)
 
@CᴏɴᴏʀO'Bʀɪᴇɴ great. Now handle blytes and keystrokes, and zeroes for all.
I mean ones, not zeroes. Properly pluralize submissions with a score of one.
 
@MartinEnder im intereesting in making a k-o-t-h cahllenge called enders game. MAy I?
It will involve playing enders game in four dimensions
*three
 
2:16 AM
Ender? As in, Ender Wiggin?
Or Martin Ender?
Or Minecraft's Endermen?
 
@DrGreenEggsandIronMan (?:bl?yte|char(?:acter)?|keystroke)s?
 
ender wiggin, and Martin Ender I guess
it would be to honor his 100k
 
Alright, I think I know what game you're talking about. "The enemy's gate is down.", right? How would that work for us?
 
Martin likes it when people make challenges referencing him. Especially if they involve superimposing his photo on tubs of margarine.
 
@El'endiaStarman Why not all of them? Martin Wiggin Endermen!
 
2:18 AM
Oh wait, nvmd.
We're used to different flavors.
 
@MartinEnder Prove it
 
No one likes turtles :(
 
@HelkaHomba ;_; @everyone y u no liek trichoplax
 
I like turtles
 
2:38 AM
 
I am deeply disappointed at ruby for requiring module variables to begin with a capital letter :/
 
@LeakyNun Congrats, you outgolfed Dennis! Now you just wait and watch as he turns the tables on you...
 
@El'endiaStarman lol
 
@El'endiaStarman it would be similar to the dogfighting tournament
 
2:50 AM
@El'endiaStarman each bot is a box. and can only move and shoot in one of the 26 directions around it. It can only change its trajectory when it is touching something else, but it can shoot at any time. The map is a cube
The winning team is the first team to get a bot into the enemies gate
 
@EᴀsᴛᴇʀʟʏIʀᴋ Hahaha nice.
 
@RohanJhunjhunwala Oooh, neat. I'd suggest doing it in 2D, since I think that'll be just about as interesting and it'll also be easier to implement, both for the framework and for the bots.
 
ok
I like it
I will sandbox it.
I am currently working on another k-o-t-h. so once I release it I will add that one
 
You can sandbox multiple KotHs at once.
 
2:55 AM
yeah I know
thats what im doing. Im just adding a work in progress sandbox post
so ican flesh it out tomorrow after i get some sleep\
 
I have a koth idea
 
@El'endiaStarman It has happened.
 
@LeakyNun Ha ha! The race begins!
 
:D
Dimitry what is ur idea?
 
Here it is.
Bot can move in the 8 directions around it (2d game based on cells)
there are walls and other obstacles. each bot gets 1 bullet per turn and starts with 5 health
bot can shoot in the 8 directions around it as well
play field is something like 20x20 cells
every time you shoot another bot their health decreases by 1
you can shoot max 3 bullets per turn. you can save them up across turns
obstacles/walls block bullets
there are also health packs that can be picked up by anyone once.
they provide +3 health. max health is 10
they are pretty rare though.
Bullets move until they hit a wall or the edge of the playing field.
If you try to move into a wall you lose your turn.
All turns happen at once
You can move or shoot in a turn, not both.
@anyone
@RohanJhunjhunwala
 
3:08 AM
what if you move into another bot?
 
you can't. they are treated like walls
Also, the bot can only see in a 5 cell radius square
9 cell diameter/sides
 
I think there is already such a challenge
like a tank battle challenge
but ur idea is diffferent enough to make it interesting
post a sandbox post and flesh out the mechanics
 
OK, sure. I'm about to make a mockup in Notepad
 
@DmitryKudriavtsev Implement and post it in the sandbox. There's lots of potential and unused ideas for koths but actually executing them is the tricky part
 
OK, sure.
Making a mockup right now!
 
3:13 AM
I hope the mighty Martin Ender will approve of the game i made in his honor
 
0
A: Sandbox for Proposed Challenges

Rohan JhunjhunwalaThe Enemy's Gate is Down! (Ender's Game) Please note this is a work in progress Your challenge should you choose to accept it is to play ender's game to win king-of-the-hill style, in honor of Martin Ender first receiving 100k rep! You will split up into teams. You are red if you are an even po...

 
@NewSandboxedPosts @Rohan, can you not use Os for empty space? Use plain spaces instead.
 
yes, that would be better
 
3:20 AM
Oh wow, that's so much better. I didn't see most of the walls.
 
@DmitryKudriavtsev if you are interested, I have a KoTH framework that can help you write your controller
its still in active development, and I'm close to finishing the piping module so you can talk to other languages
 
Thanks @NathanMerrill
 
Hello
 
there's not a whole lot of documentation, so if you have any questions, feel free to ask
 
@NathanMerrill Do you have to write the game in Java too?
 
3:28 AM
@Sherlock9 yes, the controller has to be in Java. The players don't
 
Well, nuts. I don't know Java.
 
Mockup incoming
Also, can you rewrite it in Ruby please?
There's the mockup
 
I'd advocate JS, if only so anyone can instantly run the battles in their browser (see codegolf.stackexchange.com/questions/48353/…)
 
@DmitryKudriavtsev Hastebin is a IPFS file viewer.
AFAIK.
 
3:32 AM
@DmitryKudriavtsev how was that generated?
 
WAIT, HOW THAT CAN OPEN/SAVE FILES? o_O
 
bah
 
black sheep
 
3:33 AM
Hastebin is a pastebin.
 
@El'endiaStarman \o/
 
Huh, someone downvoted all the golfing language answers on that question.
 
@HelkaHomba have you any wool
 
@El'endiaStarman He obviously hates golflangs so much, that he wants to downvote them by opinion.
I thought downvotes are if the post adds nothing to the discussion.
 
3:38 AM
@zyabin101 sure?
 
@MᴀʀsUʟᴛᴏʀ I realized that it can possibly open/save files q_q
 
@HelkaHomba wouldn't be too hard, but running other languages via js isn't easy
 
Yeah, that's the tradeoff
 
@zyabin101 ???
@HelkaHomba unless you use node
 
@MᴀʀsUʟᴛᴏʀ Although ;)
 
3:42 AM
esolangs won't be too hard, it's normal langs that are the problem
 
@HelkaHomba oooh, it'd be cool if I could make a stack snippet that AJAXed a submission in, and get results back
 
i'm trying to create a universal fungeoid/stack-based language interpreter, doesn't seem too hard
@NathanMerrill like the design userscript's auto-tio?
 
I don't use that userscript
 
but it would be something like auto-TIO right?
 
sure. I'm guessing it takes a script, and runs it on TIO, and puts the results somewhere?
 
3:50 AM
not realły, it just runs any TIO links
and shows the results
but for the koth: yeah it'd need to take the language as well
 
4:10 AM
@zyabin101 downvotes are if you dont think answer is good. while downvotes shouldn't be influenced by opinions, that doesn't really happen, our candidates for mods have voted by opinion
 
@Downgoat So, the one who hates golf langs doesn't think answers in these are good.
 
@Dennis does try it online backend take UTF-8 encoded code?
@zyabin101 EMBLEM?
 
The transmission is done in percent-encoded UTF-8. The backend can use whatever encoding you need.
 
@Dennis does it send response back in source encoding or language-specific encoding? auto TIO on userscript has trouble with non-ASCII langs
 
It depends on the interpreter and the encoding that is specified for it. What's auto TIO?
 
4:19 AM
@Dennis userscript queries tio for output
basically shows any tio output below tio links
 
TIL you can duplicate the current tab by dragging the current tab to the new tab button
 
question: should it be fd.readc or fd.read(1) or fd.readchar?
 
wouldn't read(1) be readline?
 
@Downgoat fd.nextByte(), because methods should start with next....
 
also, idk, c uses get, js uses camelcase
 
4:27 AM
@MᴀʀsUʟᴛᴏʀ no .read reads certain amount of bytes
@zyabin101 cheddar doesn't use camelcase
 
@Downgoat Then I choose none of the above.
 
@Downgoat cheddar needs a convention to stick to
so either shorter or more readable
read(1) should stay, plus pick one of the other two
 
.readc then as i've done .vfuse
 
@Downgoat when Cheddar gets released?
I can change the names to a normal format.
 
@zyabin101 pretty soon. just gotta finish some stuff. I'm having less and less time as the weeks go by though.
 
4:34 AM
Hello
 
@Zwei guten tag
 
@Downgoat wait why
don't normal people have the same amount of time every week
 
@MᴀʀsUʟᴛᴏʀ Oh dear, that sounds like a lot of unnecessary load for the server.
Does it at least cache the responses?
 
@Dennis yeah, just realized that, and it doesn't cache responses
 
@Dennis yes i believe so
 
4:40 AM
@Downgoat but last time i checked it didn't
 
wait wat ._.
well i added option to disable
 
maybe hyperdrive + browserify + indexeddb would work?
 
wat
 
hyperdrive to share existing output from TIO across users, indexeddb to store locally otherwise localstorage dies
which means TIO would only need to run + send once, reducing server load by a lot
 
Option 6: memes
Option 7: directional boats ;)
 
4:57 AM
Option 8: Python
@HelkaHomba -1 for being mean to goats :(
 
Goats?
@Downgoat Alright. I'm sorry 🍰
 
0
A: Hofstadter H-sequence

Leaky NunPython 3, 72 bytes def f(n): a=[0];i=0 while n:i+=1;a+=[i-a[a[a[i-i]]]];n-=1 return a[i] Ideone it!

Ugh, new challenge
 
that challenge looks like a good fit for functional programming languages
 
5:14 AM
0
Q: Hofstadter H-sequence

Leaky NunDefinition a(0) = 0 a(n) = n-a(a(a(n-1))) for integer n > 0 Task Given non-negative integer n, output a(n). Testcases n a(n) 0 0 1 1 2 1 3 2 4 3 5 4 6 4 7 5 8 5 9 6 10 7 11 7 12 8 13 9 14 10 15 10 16 11 17 12 18 13 19 ...

I EAT SPAM FOR BREAKFAST
3
 
@NewMainPosts Please make that go away.
Bang.
 
@HelkaHomba apology/cake accepted 🍰🍽🐐
@HelkaHomba I don't take the goat bashing/eating/foodnotfriends personally but it does get irritating because i like goats and, for example, I'm pretty sure people would get pissed if I started talking about "oh dogs are so tasty, golden retrievers are the best, especially when fried" (additionally because I'm obviously a goat i dont like my brethren to be eaten). Also rather against SE's "Be Nice" policy.
 
5:35 AM
@LeakyNun you might be interested in this
I(n) = I(n − 19 − I(n − 3)) + I(n − 28 − I(n − 12))
there are many sequences like hofstadters
in that sequence I(1) == I(2) == ... == I(29) = 1
a sequence can die (is invalid) if either you access a negative element somewhere (A(-1)) or a future element (A(n+1))
the above sequence is valid until n = 19517559
 
I see
 
it is unknown for many sequences if they're valid (never die) or not
you can make sequences for which it is undecidable whether they're valid or not
by emulating turing machines using these sequences
 
@orlp perhaps u can make a challenge out of that
 
nah
it's kinda involved
 
so does everyone that's not American spell 'colour' with a u?
 
5:42 AM
@MᴀʀsUʟᴛᴏʀ nou
 
@Downgoat wat was i online then
 
idk it showed your avatar come on
 
@Downgoat >:P
 
question: if ctrl+r is redo what should undo be?
it can't be ctrl-u
 
@Downgoat Ctrl-Z of course!
 
5:44 AM
of course undo and redo are c-z and c-y
 
^
refresh is c-r :P
 
@zyabin101 oh yes!
duh
@MᴀʀsUʟᴛᴏʀ oh no
I just relized i've been typing CR all this type to redo
D: D: D: D:D D: D:D:D:DDDD: D: D: D:
 
@Downgoat wow so many faces
 
cheddar> var fd = IO.open("README.md", 'r')
cheddar> fd.read(1)
< Instance of "Buffer" >
cheddar> Array::fd.read(1)
[112]
cheddar> Array::fd.read(6)
[32, 97, 108, 105, 103, 110]
\o/ \o/ \o/ \o/ \o/
 
@Downgoat Can you do my new challenge with Cheddar?
 
5:47 AM
link?
 
God it's my 1234th new challenge
 
@Downgoat is there String::Buffer?
 
1
Q: Hofstadter H-sequence

Leaky NunDefinition a(0) = 0 a(n) = n-a(a(a(n-1))) for integer n > 0 Task Given non-negative integer n, output a(n). Testcases n a(n) 0 0 1 1 2 1 3 2 4 3 5 4 6 4 7 5 8 5 9 6 10 7 11 7 12 8 13 9 14 10 15 10 16 11 17 12 18 13 19 ...

this one?
@MᴀʀsUʟᴛᴏʀ oh brilliant idea
 
yes
 
oh cheddar is functional it should do great at that
 
5:52 AM
@Downgoat wat how are you not on c9
 
@MᴀʀsUʟᴛᴏʀ ?
oh i switched to vim
local machine is lot faster than c9
i also get SSH keys and GPG
 
Argh, why does a(0) have to be 0?
 
Nothing fancy. ! is simply the function's name. — Dennis ♦ 4 mins ago
wat ._. julia is crazy
 
@Dennis what would your value of a(0) be?
 
@Downgoat Pretty much, yeah. All operators in Julia are actually functions. You can call 3+4 like +(3,4) if you want to. The lexer actually turns the former into the latter, and that works for the left hand of an assignment as well. Not sure if that's a bug...
7
A: Tips for golfing in Julia

DennisRedefine operators to define functions Redefining operators can save a lot of bytes in parentheses and commas. Recursive unary operators For a unary example, compare the following recursive implementations of the Fibonacci sequence: F(n)=n>1?F(n-1)+F(n-2):n # 24 bytes !n=n>1?!~-n+!(n-2):n ...

@orlp 1 so I can save a byte.
 

« first day (2012 days earlier)      last day (2822 days later) »