« first day (1888 days earlier)      last day (2957 days later) » 

2:20 AM
@PhiNotPi ping. Looking for advice on my KoTH framework if you're there
 
An example.
 
awesome!
oh, you want an example?
 
That I'm here?
 
yes, thought you were afK
 
Yeah, as in implement some generic KOTH, and show what parts of the KOTH need to be written where, in order to get it to work.
 
2:22 AM
Thanks @Doorknob & @KennyLau :)
 
no problem
 
@PhiNotPi the one I've been thinking about is quite a bit different than yours (games are only 2 players, a fixed width triangle map). I'm assuming that's ok?
 
Sure
If I add bases and multiple bots to my KOTH, how should I do it?
As in, if I let them control 5 bots, should I allow them to edit each bot individually?
 
yes, but similar to how the rules do it
aka, only let them edit 1 bot per turn
maybe all 5
not sure
Anyways, I was thinking about your skip command, and while its really cool...I think its too powerful
When I first looked at the game, it appeared that one of the core concepts was code reuse
 
I am considering cutting back on the maximum number of instructions, to like 8 or something.
Code reuse is a big concept.
 
2:29 AM
but with skips, you're able to simply able to segment your code
reducing the total number of instructions would definitely help, but I'm still not sure what you see that is appealing about skips
 
I wanted to encourage the creation of more complex programs.
 
I can see the appeal: perhaps a fixed number skip?
skip 2 instructions?
too few to be overpowering, and too many to be useful
:P
 
I want to avoid the problem of people limiting themselves to super-simple (1-token) programs, since those are the most "responsive" (quickly changeable).
 
very true.
 
Maybe, here's two statistics to keep track of: average # of insertions/removals per turn, and average # commands executed per turn.
 
2:38 AM
that was definitely a problem I ran into with codebots
 
I want to have both number be high.
 
although, super-simple programs are at a major disadvantage
they perform less commands
 
waffles
 
That's the main advantage to having longer programs.
Which is also the reason I want to limit program length to 8 instructions: imagine a series of 24 forwards/turns/grabs by a single bot in a single turn.
 
I have another window open and the only things I saw on screen were waffles and That's the advantage to having longer programs.
 
2:42 AM
The original game had 3. I might need to make it even shorter than 8.
 
I think that 8 is fine
I mean, commands are built up one at a time (ignoring initial loading)
so, making all 8 useful is really hard
the more you reduce the code length, the less "code reuse" matters
 
I don't know if the skip command is that overpowered when there's only 8 instructions.
 
I don't think so either
using it uses 2 spots in your code
and the more you skip, the less commands you execute
 
Question: how should Z,J,H,L work? (where J is jump/skip) Should it work the same as Z,L or simply do nothing?
The robot zaps, and then skips, and then turns left.
Should the skipping "preserve" the zapping or expend it?
 
zapping basically says "hey bot, execute my code here"
so, zapping says to the other bot
"J,H,L"
so, it jumps
and then you Jump, then left
 
2:53 AM
That's actually not how I have zapping working.
 
I should have said "execute the first command of my code here"
but how do you have it working?
but yeah, zapping a jump (in my mind) is a no-op
 
Z,F,L (an arbitrary example) is executed like so...
There's the "host" bot (whose turn it is, since it's where the program is hosted) and the "mover" bot (which is the one that actually moves in response to the command).
At first, the host and the mover are the same.
The first command, Z, changes which bot is the mover, so now the mover is the one being zapped.
 
found an error in the userscript background!
escaping FTW
 
The F is the next command, and causes the mover to move forward 1. The mover is reset to be the host.
 
that doesn't change anything
 
2:59 AM
The L command is executed on the host, which turns left.
So ZFL causes some other bot to more foward and the original one to turn left.
 
in your original example, J is the next command, which doesn't do any moving
oooh, clever idea
maybe ZJ will cause the moving bot's instruction pointer to start at the next skip
no, I don't like that
 
And so, the non-zap command at the end of the zap chain is the only one executed on that other bot, and then the zapping is "reset"
 
@Cyoce I thought I removed those... :|
 
@Downgoat ¯\(ツ)/¯
 
I was feeling that you were misunderstanding that ZL causes another bot to turn left and then the original to turn left as well.
Although my spec description of that behavior is probably not the most effective.
 
3:03 AM
yeah, I assumed that zapping didn't progress the pointer
 
Zapping doesn't progress the pointer, it changes where the next instruction is executed.
 
a KotH
 
4
A: Sandbox for Proposed Challenges

PhiNotPiMeta Code Bots I'm just giving this a "code bots" title because that's the most similar previous KOTH. This version is based on the Twin Tin Bots board game, and will probably be given a better name before posting. On a far away planet, dozens of small mining robots compete for resources in the...

 
@PhiNotPi but it does, because the zapped command progressed the pointer
anyways, now were just getting into semantics
 
Well, maybe I should say that all commands progress the pointer, after execution. Clear? Moving on.
 
3:05 AM
yes
 
The original question was "how should Z,J,H,L work?" and, as of right now, the zapping doesn't do anything.
 
The J command still jumps the instruction pointer, as if the zap wasn't even there.
I could make it so that Z,J is a no-op, so that Z,J,H,L just does nothing overall.
Maybe a better way to phrase the question: Should ZJHL cause the bot to halt, turn left, or cause other bot to turn left?
Causing it to halt is probably the most consistent.
 
progression of the instruction pointer always happens on the host bot
not the mover
therefore, I think its reasonable that J would still occur on the host bot
and therefore, turn left
and the other bot to not move
 
Okay, in that vein, what should ZHL do?
 
3:12 AM
Halt
 
Right now (and in the spec) the zapping does nothing, but causes the original bot to turn left.
Okay
 
wait, no
hmmm, I'm indecisive on that one
perhaps we do what is more interesting?
 
halting is probably more consistent
 
the most interesting is that zapping a jump makes the other bot do the command after the jump
and ZH halts the other bot (no-op), but not your own
 
The 1-letter abbreviations are both convenient and slightly confusing.
 
3:16 AM
In CJAM, is W=-1 documented?
 
@KennyLau Yes.
 
Where?
 
Thanks
 
Always my pleasure. :-)
 
@Downgoat stuff is broken
 
@MarsUltor isn't it always D:
 
@PhiNotPi What language is this?
 
a KoTH
5
A: Sandbox for Proposed Challenges

PhiNotPiMeta Code Bots I'm just giving this a "code bots" title because that's the most similar previous KOTH. This version is based on the Twin Tin Bots board game, and will probably be given a better name before posting. On a far away planet, dozens of small mining robots compete for resources in the...

lol, I got unpinged
 
waffles
 
3:24 AM
-.-
would flag for edit abuse, except that simply goes to the perpetrators
 
@AlexA. Dutch babies >= that
 
@HelkaHomba .... the Dutch eat their babies?!?
 
._.
 
@El'endiaStarman When they look like this:
 
Wow, Dutch children are very flat and appear to be covered in a fine layer of powdered sugar
 
3:27 AM
Reminds me of crepes. Flat and covered in powdered sugar.
 
@AlexA. There go your Dutch voters
 
@El'endiaStarman Aren't those French children?
@HelkaHomba ono orlp y
 
@AlexA. tres tres bon croissant
 
Should I allow tabs for indenting in Cheddar?
 
@Downgoat no
 
3:29 AM
@Downgoat No
 
Tabs should be a syntax error
 
that's what I thought
 
@El'endiaStarman No, dutch babies are eaten. There is a crucial difference: anyone can enjoy a dutch baby, not just a dutch you racist.
 
Except in strings
 
@AlexA. even if it appears in a string
 
3:29 AM
@AlexA. they will return a CheddarError.UNEXPECTED_TOKEN
 
@AlexA. Except in GolfScript.
Then it's just another variable.
 
Oh wait
 
@Downgoat yes
 
@Downgoat ABSOLUTELY.
 
\t in a string != tab
 
3:30 AM
@NathanMerrill Yep. No tabs anywhere. Tab-free 4 life.
 
okay, tabs do not count as whitespace in Cheddar anymore
 
@ChrisJester-Young Oh right. I forgot that you can do that kind of evil stuff in GolfScript. :P
 
._______.
 
although, life would be better if we simply got tabs right the first time
 
And because you can define the value of tab to be different from the value of space, you can do Whitespace-like behaviour in GolfScript. :-P
 
3:31 AM
@AlexA. forces Alex to watch patronizing documentary of a World Without Tabs
 
@AlexA. Remember, before I embarked on the idea of making an independent implementation of CJam (because it's saner than GolfScript), I actually wanted to make an independent implementation of GolfScript.
 
Anyone want to take the pain of explaining how the second level of this diagram is being constructed?
 
@AlexA. In fact, I created some code for that project too: gist.github.com/cky/3392271
 
@AlexA. Tabs are silently stripped in Jelly.
 
@Dennis \o/
> package nz.kiwi.chris
Beautiful :D
 
3:33 AM
@Dennis +1000
 
@AlexA. These days I'd use nz.cky, but I wrote that before you were able to register second-level domain names in .nz.
 
@AlexA. Can I turn your treehouse hill into a forest?
 
@HelkaHomba Uh, why?
 
(Yes, I own both cky.nz and chris.kiwi.nz.)
 
anyone?
 
3:34 AM
Also it was your hill, I just invaded nearby.
Very close by >_>
 
@AlexA. It looks so bare since I moved
 
C: clone. Creates a bot on the square in front of you that will keep executing your string of commands until the next H (halt) — Cyoce 1 min ago
^ worst idea ever
 
@PhiNotPi C:
 
@DemCodeLines I'd try to help if I could but that's well outside of my area of expertise.
 
@PhiNotPi No. best idea. You can create bot-ception. Who doesn't love bot-ception?
 
3:38 AM
:(
 
.=...
.^^..
.....
.....
.....

GRAB
.....
.^^..
.....
.....
.....

RIGHT
.....
.>^..
.....
.....
.....

ZAP
.....
.>^..
.....
.....
.....

JUMP
.....
.>^..
.....
.....
.....

FOWARD
..^..
.>...
.....
.....
.....

DROP
..^..
.>=..
.....
.....
.....

HALT
..^..
.>=..
.....
.....
.....
^ example of execution of GRZJHFD by the left bot.
 
`P` (`POSSESS`): the bot in front of your current bot works for you now, bitch! (the owner of that bot now controls yours, but ppphhhhhh, who cares about that? The new one is so much cooler!) (unknown
side-effects)
 
4:04 AM
 
@KennyLau It's an esolang?
 
@MarsUltor Why is it not?
 
J is an esolang in the same way APL is. Which is to say, it's not, but it almost is. :P
 
alright
 
4:15 AM
Which should I use for OR: or, |, or ||?
 
| = bitwise, or = logical w/ short-circuit, || = logical w/o short-circuit
or something
 
Is there any language that distinguishes between short-circuit and not?
 
R and Julia
& and &&
 
Is it ever useful to have the distinction?
 
@El'endiaStarman C#
Yes
for unreadable chaining stuff
foo & bar always performs both operations
useful sometimes, probably not very often though
 
4:19 AM
@El'endiaStarman In R, & applies element-wise over arrays, so if you have two arrays of booleans, you can efficiently do logical calculations on each element.
 
On the other hand, foo() && bar() only performs bar() if foo() returns true
 
waffles
 
Yes (whoops)
 
I smell the lua's ternary idiom
 
@AlexA. Huh, that's neat.
 
4:22 AM
@AlexA. that was random, why not pancakes?
 
@El'endiaStarman Yeah! Like x <- c(TRUE, FALSE, TRUE); y <- c(TRUE, TRUE, FALSE); x & y returns the vector c(TRUE, FALSE, FALSE).
 
Nice. That would be x \pair(&) y in Pytek.
 
Ah, so infix operators are specified like \pair(<op>)?
 
What \pair(<op>) does is that it applies <op> to the left and right arguments in a pair-wise way.
You can define additional operators yourself.
I had an example in the Pytek room yesterday...
 
Isn't applying an operator to left and right arguments in a pairwise way exactly what an infix operator is...?
 
4:26 AM
Oh wait, I posted it in here.
@AlexA. Not necessarily.
 
(Also why was that starred?)
 
>>> [1,2,3] + [4,5,6]
[1, 2, 3, 4, 5, 6]
\pair() modifies the operator you put in to become pairwise.
 
@El'endiaStarman Oh right, stuff like that. In R land, + and similar operators are always element-wise over arrays.
 
Gotcha.
 
@El'endiaStarman Oh that makes sense. That's neat.
 
4:29 AM
I will also have \each() which basically splats the right argument (probably). So [1,2,3] \each(*) [1,2] would be [[1,2,3], [1,2,3,1,2,3]].
 
I'm very confused why the result has only two elements
(sublists)
 
>>> [1,2,3] * 2
[1, 2, 3, 1, 2, 3]
 
Oh
Python is weird
 
lol
It's a natural extension of using + to mean concatenation when applied to lists.
 
In R and Julia, scalar * vector = [scalar * v for v in vector]
 
4:31 AM
I figured.
 
Overloading arithmetic operators for stuff like lists turns me off a bit when it comes to Python, but it's not too bad.
I still have to think really hard before I do anything like that though
 
Should probably also be noted that Julia uses . to indicate element-wise operations as well, e.g. .* is the element-wise version of *. Just if you wanted something to compare to \pair
 
@AlexA. How do you mean?
@Sp3000 Ah, cool.
 
@El'endiaStarman If I write [1,2,3] * 2 I sure as hell don't expect [1,2,3,1,2,3] offhand; I have to remember that what I'm using isn't what I'm used to. :P
 
And, y'know, I haven't really implemented much of anything beyond working on the parser. I'm probably gonna make concatenation ++ (it won't be an increment operator), so I could probably do +* for repetition and make + and * vectorize by default.
 
4:36 AM
@Sp3000 Yes. Julia is great and does all things.
@El'endiaStarman +1
 
@AlexA. I'm starting to appreciate it a bit more, don't worry :)
 
@Sp3000 Worried? Hell, I'm thrilled.
 
Pytek is not going to have parseInt though. That's just silly. :P
 
So you won't be able to parse integers out of strings? :/
Btw, does anyone have a good resource on ASTs and stuff like that that are useful for making (pars|lex)ers?
 
4:41 AM
@AlexA. 'course you will! int
 
@El'endiaStarman Oh, then what was your comment about parseInt about?
@Downgoat Those are tools I'd have to integrate into something though, right? I'm looking for a way to build my own.
 
@AlexA. Trips me up in JavaScript. I was thinking that Julia had that too, but it's something a bit more complex, isn't it?
@AlexA. I could tell you how I wrote mine.
Not sure if you want to do it all by hand though.
 
@AlexA. no, that is a compiler compiler, so you write your compiler and it compiles your compiler so you have your own compiler
 
@El'endiaStarman parse returns an Expr unless it's super obvious, like parse("1") makes 1. Otherwise you give a DataType as an argument, like parse(Int, "1").
@El'endiaStarman Sure!
@Downgoat What
 
@AlexA. Oh, I thought they changed it to something ugly in 0.4.
 
4:44 AM
Yeah, they deprecated int in favor of parse(Int, )
 
@AlexA. It is a compiler compiler 1. you write your compiler 2. Compile your compiler to a compiler in your language of choice 3. Profit
I hope that made sense
 
@Downgoat That's not clearer than your other sentence. :P
 
@AlexA. Ah, not as bad as I thought. Still, less convenient.
 
Eh, I don't like int. Too Pythony. :P
 
Essentially you write your compiler in an intermediate language and it generates a compiler.
It's so you don't write an entire compiler by hand, unless you want to be stupid like me and write your entire compiler by hand
 
4:46 AM
I want to write an entire compiler by hand
 
._.
why
 
Wat
 
To learn how to do it
 
no need to reinvent the wheel
 
Did you know: VS is written using VS
 
4:47 AM
I'm not trying to reinvent anything, just trying to learn.
 
I have no idea whether text editors are written with themselves
@AlexA. Hand = asm?
 
I highly recommend against it, if you heed my advice, you will save yourself from weeks of head bashing on your desk and crying
 
Wait
Compiled compiler = any compiler
 
I think "compiler" isn't what I'm going for; I'm not trying to generate machine code or bytecode. I'm just making an interpreter.
 
@AlexA. well you still need to compile it to something so your language can interpreter it whether it be an object or array.
 
4:49 AM
Were you thinking of something like how Element converts the program to Perl code and evals it?
 
So are you going to use Python as your interpreter interpreter?
 
@PhiNotPi Not really, though I had considered that
@MarsUltor Nope
@Downgoat I know
 
> interpreter it
 
@AlexA. Aww, but Python interpreters are all the rage! :P
 
Mar 22 at 4:33, by Downgoat
ugh, stupid spelling. we should all just communicate in code...
 
4:51 AM
@Downgoat What is you in code?
 
@El'endiaStarman I thought JavaScript interpreters were what the cool kids were using :P
 
@El'endiaStarman pffft, Python? Node.js is where it's at! :P
 
@AlexA. JS is good as well
 
@MarsUltor u
 
@MarsUltor "you"
 
4:51 AM
@MarsUltor That's false
 
@AlexA. ?
 
@MarsUltor +1
@AlexA. ಠ_ಠ
 
@MarsUltor JavaScript is not good
 
pls stop spam replying
 
Nobody is spam pinging. We're using replies as they're intended to be used.
 
4:52 AM
0
A: Merge two sorted lists

DennisJavaScript (ES6), 69 79 bytes f=(a,b,c=[])=>(x=a[0]<b[0]?a:b).length?f(a,b,c.concat(x.shift())):c.concat(a,b) How it works f = (a, b, c = []) => // `f' is a function that takes arguments `a', `b' and `c' - // `c' defaults to `[]' - which returns the fol...

@Dennis +1 for JavaScript
 
@MarsUltor Click the speaker button next to "all rooms".
 
5 replies in one page :(
 
-1, not enough jquery.
 
@MarsUltor People really are using replies correctly.
 
It's stars that we're not using correctly
 
4:53 AM
but you should silence your speaker if you don't want that nasty sound with every reply.
 
@MarsUltor That's not bad. And, the replies are not without purpose, as others have said.
 
...
 
@Downgoat Oh the irony...
 
/me elevens the stars off that post. :-P
 
@ChrisJester-Young I do
Just I have desktop notifications on
 
4:54 AM
@ChrisJester-Young :(
 
@ChrisJester-Young Wat. [restars]
 
Fuck, I just realized literals can start property chains ;-;
 
@Downgoat "you"?
 
...I can't?! ಠ_ಠ
 
$.message("How is this meant to reduce spelling errors?")
 
4:55 AM
@Downgoat my stars :(
 
$.message($.like($.this))?
 
@El'endiaStarman Nope, you can't. In SE chat, stars are treated as votes of score 1 in the backend. When stars are cancelled, their corresponding vote scores are set to 0, but the votes aren't removed.
 
@Downgoat My bad, grammar errors
 
@ChrisJester-Young What if you clear the stars, and then someone else stars it?
Does that count?
 
4:57 AM
@MyHamDJ Then the new stars have score 1, and the original stars still have score 0.
The number showing on the starboard is simply the total score of all votes on that message.
 
Ok, so it will be on the starboard again?
 
What if the stars are cancelled within the timeframe that I'm allowed to undo my star?
Could I undo the cancelled star to star it again?
 
@PhiNotPi Good question. Since I don't have the code any more, I can't tell you the definitive answer. You'll just have to try it and see.
 
@Downgoat Dark times...
 
5:02 AM
ಠ_ಠ
 
Any plan for April Fools' Day's Special Question?
 
Yes!
HAH GOTCHA! April Fool's! ( ͡° ͜ʖ ͡°)
No
 
Hahaha! You totally got me!
 
@AlexA. ಠ_ಠ
I should change my avatar to upgoat for april fools
Or I could become Chatgoat...
 
What do I change my avatar to then?
 
5:14 AM
It'll be another Maria Tidal Tug
 
Uh oh, election begins on April 1st...
 
._.
 
That seems incredibly fitting for PPCG somehow.
 
^
> nor am I fond of avocados
>:U
@Dennis your nomination says "almost 70,000 reputation", you should update it now that you've hit 70K
 
I wonder if Martin will get to 400 in the primary before the election begins
 
5:20 AM
$ rm -r julia-*
 
@Dennis WHY WOULD YOU DO THIS
 
Because I managed to install it from the repos.
 
@Dennis From source?
 
No, a packaged binary. 0.4.5 is the latest version, right?
 
Yes
 
5:21 AM
Sweet. openSUSE science repo has it.
 
Oh
Nvm
@Dennis +100 to openSUSE
+100 to science
 
Dr. openSUESS
 
lel
 
5:42 AM
Anyone know a famous tune that can be played in exactly 27 or 28 beats? Like the first two lines of Ode To Joy, but that's 32 beats.
 
8
A: Element names above 118

edc65JavaScript (ES6) 164 (unhexquadium) 171 The capitalization is the tricky part. (Test in FireFox) Edit 3 bytes saved thx user2786485 f=n=>[([...n+(l='')].map(c=>(c='nil,un,bi,tri,quad,pent,hex,sept,oct,enn'.split`,`[c],n=l?n+c[0]:c[0].toUpperCase(),l+=c)),l+'ium').replace(/i(i)|n(nn)/g,'$1$...

According to the leaderboard, this is 3 bytes. ¯\(ツ)/¯
 
The stack snippet is messing it up I bet
 
@Cyoce Are you using the userscript?
 
@AlexA. yeah.
 
@Downgoat [bug] ^
 
5:46 AM
I like it a lot, but I'm finding bugs. finding bugs makes it more fun
 

« first day (1888 days earlier)      last day (2957 days later) »