« first day (1547 days earlier)      last day (3591 days later) » 
00:00 - 19:0019:00 - 00:00

00:06
I've made some edits to the sandbox post: meta.codegolf.stackexchange.com/a/4921/2867
00:21
Like. +1
00:35
look who finally showed up
Who
What
?
you
now
!
Oh
me!
shit
Got distracted.
^ Story of my life
2
00:44
Right now I'm trying to wrangle some Snippets.
Using Martin's meta post?
As a basis, yeah.
If you used it verbatim you'd be scoring the wrong challenge. :P
The problem is that I can't really test it until I actually have something to test it on.
You could make a meta post like Calvin's battle bots
01:02
I wouldn't mind if you did that. Just delete it when you're done (or flag it for deletion).
Also, I apparently need to brush up on my regex.
I need to create a new regex for a second number in the header.
Look around the first one
01:36
Well, I finally got it to do something different than it was doing already.
does it involve nasal demons?
No, I just changed a line of code and nothing broke.
@MartinBüttner Nasal demons?! I've missed more than I thought in the past day...
I've definitely heard that before, come to think of it.
01:43
for the "Escape the black hole!" challenge: the win/whatever_in_linux keys stay untouched so if you write an AHK script like LWin::O you can calmly write a Lenguage code with only one Win key
how much rulebending it is? :)
Well... so much for stack snippets.
I don't exactly know JavaScript.
@randomra let's say, I wouldn't upvote it. ;)
@MartinBüttner On a scale of 1-10, how important is it that I have the scoring snippet ready before I post EOEIS?
well, I had some hope for ><> with something like !E">o<PLH but it's far from possible
01:56
integer overflow
Why would this break something?
languages[user].size = toString(parseInt(languages[user].size));
Wouldn't just convert to int and then back to string?
It should be parseInt(languages[user].size).toString()
I need to figure out how to write a regex to capture the depth of an answer.
These are the regexes already listed:
var SIZE_REG = /\d+(?=[^\d&]*(?:&lt;(?:s&gt;[^&]*&lt;\/s&gt;|[^&]+&gt;)[^\d&]*)*$)/;
var NUMBER_REG = /\d+/;
var LANGUAGE_REG = /^#*\s*([^,]+)/;
I think size_reg will match any number, but depth is also going to be a number.
This is what I have so far:
It just add together all of the users' scores (program lengths only right now) and sorts from highest to lowest.
That's under the "leaderboard by language" column, even though it's not by language anymore.
Maybe someone has some advice.
I'm going to bed for right now.
02:43
@PhiNotPi I have no advice.
 
1 hour later…
03:57
0
A: Sandbox for Proposed Challenges

nderscoreShifty XORryption code-golf Write a program or function (or set of programs/functions) to encrypt and decrypt data given the following specification: Encryption Calculate an XOR hash of the input by XOR-ing every byte with eachother. XOR every byte of the input by this hash. Shift the result...

 
3 hours later…
06:31
hmm, so even 2 upvotes later, I was stuck on 190 only :/
 
1 hour later…
07:45
how does del(mylist[5]) work in python? i.e. how does del() know the context of the object(?) it is given?
08:22
@randomra AFAIK it's a language construct like print int Python 2, not a function.
>>> type(print)
<class 'builtin_function_or_method'>
>>> type(del)
SyntaxError: invalid syntax
>>>
Also colored like a keyword in IDLE
08:56
@Pietu1998 I see, thanks. Seems a bit unnecessary, maybe will be removed in python 4. :) Are there some other similar language construct which looks like a function?
09:35
@randomra Not sure, none that I'd remember of right now. You can replace that by
mylist[n:n+1] = []
10:16
@randomra Technically, yes. .__del__():
>>> class x():
	def __del__(self): print("No way.")


>>> foo = x()
>>> del foo
No way.
 
1 hour later…
11:42
Types are complex.
@Sieg In which type system?
Mine.
Mostly I mean solving them is complex.
I mimic Haskell's system.
Are you implementing type inference?
11:58
Yeah.
A golfing language with type inference... I'd use that!
Nah, this isn't Joe.
Joe is way too complex for type inference.
But, I already have something that works. f = lift ticker infers type Signal Float -> Signal (Signal Float)
My original idea was to use dynamic typing but that made it impossible to detect signal-creating functions at compile time.
12:50
(in addition to borrowing your favourite paradox I also built the snippet based on your pearl necklace snippet. ;))
also I just had to preserve this:
Haha :P
Apparently my type system is already so robust that it detects my unintended errors in my tests.
Code: i.imgur.com/xz830dX.png -> type checker's output: i.imgur.com/XDRZ5we.png
This all is very interesting to me, because I haven't read about type systems or compilers due to my laziness.
13:25
@MartinBüttner While messing around with your scoring stack snippet, I think I found a bug.
That's very likely.
The language score sorting mechanism was doing lexicographical sort, not numerical.
So 110 was appearing before 19
@PhiNotPi that is intentional
you can read off the numerical order from the main leaderboard (which also contains the languages)
Really?
Well, I'm repurposing the language leaderboard to be the user leaderboard, so I'm changing it.
sure, do whatever you want :D
13:35
Actually, I think your original snippet doesn't have that as a bug, since it was sorting by language title and not score.
oh wait, did you mean it was sorting the numbers lexicographically?
well yeah that would be a bug. but yes, it's meant to sort lexicographically by language name.
No, I'm pretty sure I was the one who changed it to sort numbers, and thus caused it to be a bug.
13:52
0
Q: Testing for "Evolution of OEIS" Stack Snippet [Sandbox]

PhiNotPiThis question is basically being used to host some test answers for EOEIS. Feel free to contribute your own test answers, following the format below. You don't actually have to do any programming. # [language], [number] bytes, depth [number], A[new sequence] from A[old sequence] Like this: ...

I made a meta post to test stuff.
Please add some answers of your own, so I can have more than one user.
@PhiNotPi I can still add an answer to the depth 1, right?
Yes.
That's something I added to the challenge spec (which I should probably add a link to).
@NathanMerrill I'm pretty sure your answer needs the sequence start
(i'd assume the snippet checks that)
It doesn't check it yet.
But I want it to.
13:56
@PhiNotPi are you planning to handle links around language names?
(CH did that with Programming Languages through the Years if you want to check out some existing code that works)
I might want to add that.
I'll add a test case
@PhiNotPi am I allowed to make an additional level 1?
@NathanMerrill yes. (Is this the same question you just asked me, or something different?)
@PhiNotPi you probably shouldn't have extended your own level 1. (I'd hope the snippet checks that that doesn't happen?)
13:59
Probably not, I guess.
well... :D
But it doesn't check any of that yet.
oh there's nothing building on it yet, so you can still delete it
oh yeah, leaving it is actually a better idea
@PhiNotPi The first was whether tree structures were allowed, the second was whether multiple roots were allowed
yes to both
I want a new, fourth person to answer a depth 1, 0-byte answer.
To test some of the scoring.
Or a 0-byte answer at any depth, really.
14:05
Huh. Maybe I should have started with type declarations. I have type inference but no type declarations.
How do I change the snippet to point to a meta question?
I assume I change site=codegolf to something else.
meta.codegolf
ummm
something...
Do I need to change answer_filter also?
ah yeah, meta.codegolf, you already looked it up
@PhiNotPi I don't think so.
but I guess you'll see.
you might need a different filter anyway, depending on what info you need.
Okay, it's reading answers now.
Now I need to work on changing some regexes.
14:16
you could also try doing it right, and feed the HTML body to jQuery and extract the data with that. that should be much cleaner.
This thing doesn't work though: "54 + 3 = 57 <s>63</s> bytes"
It reads the 54.
How do I gave each "answer" more properties? There's {{SIZE}} and stuff, but I need to add {{DEPTH}}
14:39
@PhiNotPi put a placeholder in the HTML template
I've made these changes:
  <tbody id="answer-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td>{{DEPTH}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
.replace("{{DEPTH}}", "a")
But I don't know why it's not happy.
I would expect it to insert the letter "a" on the table.
hm, so would I
I also changed the header of the table.
If I remove the "replace" then it works fine with a {{DEPTH}} where the depth should be.
and what appears otherwise?
Just the table header and nothing else.
14:52
Check the console for errors
It works now.
I think it might have been due to whitespace between the new replace and the previous ones (even though the problem wasn't visible).
This works:
answer = answer.replace("{{PLACE}}", lastPlace + ".")
               .replace("{{NAME}}", user)
               .replace("{{LANGUAGE}}", language)
               .replace("{{SIZE}}", size).replace("{{DEPTH}}","a")
               .replace("{{LINK}}", a.share_link);
But this didn't:
answer = answer.replace("{{PLACE}}", lastPlace + ".")
               .replace("{{NAME}}", user)
               .replace("{{LANGUAGE}}", language)
               .replace("{{SIZE}}", size)
               .replace("{{DEPTH}}","a")
               .replace("{{LINK}}", a.share_link);
Whatever... :/
Okay, depth works now.
15:20
codei:
f x y = x+y
main = f 10 2
type info:
f = (a1 -> a1 -> a1)
main = Number
Am I proud? Yes I am.
@PhiNotPi That looks syntactically valid. Not sure why it wouldn't work.
also, here, have a string templating trick:
answer = answer.replace(/\{\{([^}]+)\}\}/g, function(x,y){
    return ({
        PLACE: lastPlace + '.',
        NAME: user,
        LANGUAGE: language,
        SIZE: size,
        DEPTH: 'a',
        LINK: a.share_link
    })[y];
});
@nderscore Also, it seems to work now. Mysterious bug is mysterious.
all I can think of is that somehow you were triggering automatic semicolon insertion
Or site cache fooled around.
@nderscore that's quite neat, I might steal that.
15:30
feel free haha
15:49
2
A: Is there a fast divisibility check for a fixed divisor?

orlpYes, there is an algorithm that only uses multiplication. This algorithm uses a lot of precomputation, but generates a simple expression that can be used to check for divisibility. For example, if you have an 4 bit integer, and want to check if it's divisible by 3 it's enough to check (using 4-b...

okay, I have it working correctly for "54 + 3 = 57" and the list of answers now sorts by sequence name.
16:24
15K finally . I am getting slow .. -._.-
I'm trying to work on the feature that detects valid chaining.
So, I basically want to create a "list of lists"-type-thing in Javascript, which I don't know how to do. The list will be the sequences that have been used, and a list of which people are ineligible to chain off those sequences.
I think I know a way to do it, but it's super hacky.
chaining of ?
Evolution of OEIS, to answer your question
It's in the sandbox
16:58
two nice challenges in a row. Oh the dilemma!
Which challenges are you talking about?
do you .. visit the main site often ?
no
he just computes digits of Phi
that's all he does
all day
We can't all refresh the questions page on a 30 second interval :P
Oh, then okay.
@nderscore its live
16:59
1.61803398874989484820458683436563811772030917980576286213544862270526046281890
244970720720418939113748475408807538689175212663386222353693179318006076672635
443338908659593958290563832266131992829026788067520876689250171169620703222104
321626954862629631361443814975870122034080588795445474924618569536486444924104
432077134494704956584678850987433944221254487706647809158846074998871240076521
705751797883416625624940758906970400028121042762177111777805315317141011704666
599146697987317613560067087480710131795236894275219484353056783002287856997829
3
it keeps on giving updates
oh yeah, I forgot about that
17:09
@nderscore do we have to pad each character to 8 bit before appending and prepending the hash's 4 bits ?
'G0lf'.split('').reduce(function(x, y){ return x ^ y.charCodeAt(0)}, 0).toString(16) // 7d
because my final answer is a bit different from yours.
in that G0lf example
@nderscore can we assume that the input strings are within extended ASCII range?
@MartinBüttner not for decryption
@Optimizer the nibbles of the hash should fill in the space on either side of the original input after the shift so that the end result is 1 byte longer than the input
17:12
at the very least
the output of the encryption can result in non-printable characters
@nderscore which are still in extended ASCII range
wait, what do you exactly mean with extended ASCII?
17:13
ASCII code 0 to 255
so no 255 itself?
both inclusive
a solution that reads a raw stream of bytes would be acceptable
then the question is a trivial yes
extended ASCII maps one to one with binary data that's a multiple of 8
@nderscore not 1 byte, but N bytes where N is original input byte length, right ?
oh... padding is not to each character...
17:15
the resulting hash will always be a single byte
padding is on the entire result after XOR-ing the input by the hash
starting to think I shouldn't have posted that challenge a few minutes before I have to leave for a few hours...
post any additional questions in the comments and I'll check my phone periodically to answer them haha
I think the question is clear
wow, 39 bytes just for encryption
I tried to create the char-topology based esolang but didn't turn out as fun as I expected.
So I modified it into a stack-based one: gist.github.com/randomra/c6b0a5f74a3d552a7df4.
what is the opposite of a XOR operation ?
17:25
double XOR fixes things ?
or do you need 2 bit info from 1? that's more difficult
@Optimizer a^b^b==a
ok
@MartinBüttner assuming you are doing the XOR challenge, what are your numbers ?
u just posted
you are treating things as 16 bit ?
oh nvm
@aditsu and once again, I could have saved four bytes if characters coerced to integers when used with b ;)
17:35
@MartinBüttner What's the problem here? cjam.aditsu.net/#code=q_%3A%5E_%40f%5E%3AiGfbe_%5CGbYUe%5B%5C*2%2FGfb%3Ac‌​%0A_oNo%0A%3AiGf%7BbYUe%5B%7De_)%5C(G*%40%2B%5C2%2FGfbf%5E%3Ac&input=G%090lf
oh, good catch, thanks
fixed
I propose we rename PPCG to Pyth puzzles and CJam golf
13
hmmm, is there a non-vulgar synonym of "butthurt" I can safely use now that I'm a moderator? ;)
17:50
butthurt is a very scientific term
my butthurts
but are you making a pun out of your last name itself ?
shortest way to remove ith element from a CJam list ?
ummm...
that's bullshit
yeah, I was thinking that too
(not that its bullshit, but swapping to end and removing part)
that only works if the array order doesn't matter though
17:54
damn
Stop being so bütthurt
mr. buettner
are your array elements unique?
no
otherwise its a-
I think array order does not matter afterall . let me see
17:57
best I can think of if the order matters: _2$<@@)>+
18:09
shortest way to find a repeating element in an array ?
the only repeating element
this is quite long, but it's one way: $e`{0=(},~1=
@MartinBüttner
RETINA: Regular Expression Teletypewriter Interface for .NET and Alternatives
Best I can come up with
haha, thanks :D
Teletypewriter ?
Yeah, TTY
You could make it terminal, but teletypewriter is more old-school
18:17
$e`$W=1=
$e` is actually a nice way to do tallying now
doesn't that do RLE encode ?
(which I have no idea what it is)
"RLE encode" :)
but yes, it does
so if you sort first, it tallies
Run-length encoding (RLE) is a very simple form of data compression in which runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run. This is most useful on data that contains many such runs. Consider, for example, simple graphic images such as icons, line drawings, and animations. It is not useful with files that don't have many runs as it could greatly increase the file size. RLE may also be used to refer to an early graphics file format supported by CompuServe for ...
Ah...
@MartinBüttner What settings do I use when creating a stack snippet?
There's options for jQuery version and stuff.
ummm, I don't know.
I just used the most recent jQuery version and nothing else
18:29
(Oh, by the way, I'm working on a J compiler. Not finished at all yet, but I thought you guys might be interested. github.com/Synthetica9/HyperJ)
@ɐɔıʇǝɥʇuʎs holy crap, why? :D
@MartinBüttner Performance, experience, 3 months off
haha, fair enough
@PhiNotPi you know, I'm expecting you to actually produce some visualisation of the tree ;)
Yeah, I know.
I've finished the stuff that really counts (scoring and rule-checking)
What's the best (easiest) way to display the tree?
18:38
nested <ul>? then again snippets to provide d3 support :)
I don't know what that is.
@Jakube your example 2, both 1 and 8 can be removed
and similarly in many other examples..
@PhiNotPi a visualisation library: d3js.org
Any clue how I would use it to create a tree?
no, I've never used it, but I've seen it produce amazing results. :D
@Optimizer The 8 cannot be removed.
why not ?
Do you speak about the 8 in the [1 2 8] cell?
yes
no, I mean the removal happens from the next cell
so basically, you can convert [[1 2 8] [1 8] [8 9] [1 9]] to [[1 2 8] [1] [8 9] [1 9]]]
and you can even apply the logic again to that result to get [[2 8] [1] [8 9] [1 9]]
@MartinBüttner I'm looking at this: bl.ocks.org/d3noob/8329404
18:47
@PhiNotPi did you check this link ?
4 mins ago, by Optimizer
https://github.com/mbostock/d3/wiki/Gallery
@Jakube what do you think ?
@Optimizer I think the Y-wing technique only works if the other three cells contain only 2 options each
No. The logic works only if there are 3 cells with only 2 candidates. So in this example [A B] has to be [8 9], [A C] has to be [1 9] and [B C] has to be [1 8]. The only cell that is allowed to have != 2 candidates is the cell [C D].
if you place an 8 in the second cell, there's no contradiction, because you can still place the 2 in the first cell.
@Jakube then what about [7 8] [7 8] [4 7] [4 8] example ? here 4 can also be removed
I think this example is invalid to begin with
the two [7 8] make 7 and 8 impossible in either of the other two cells, so they'd both need a 4
18:52
so that example is invalid and even 7 cannot be removed, right ?
oh wait
I'm talking nonsense
it's valid
but I don't see why you could remove the 4
@Optimizer The value that your gonna remove has to be in 3 cells. Look at [A B] [A C] [C D] [B C].
put a 4 in either cell and you can still find a valid combination.
s/4/8
@Martin
18:53
@Optimizer nope
8 cannot be removed ?
I am confused now.
You can remove 8, but not 4.
yes, 4 was a typo. I was talking about 8 only
so both 7 and 8 can be removed, right ?
18:54
The 8 of the second cell.
@MartinBüttner middle one
ah yeah, I was looking at the one that was together with the 4
ok, so in this case, I can output any of the two solutions ..
@Optimizer wait a moment, now I'm confused.
wait, if I could remove the 7 of the second cell, surely that means I can only remove the 8 of the first cell?
18:56
@MartinBüttner correct
thus, 2 solutions
well you could also do both, obviously
yes, but the task is to remove 1 candidate
not all possible.
because of the two [7 8]s are connected
O.k. There are really 2 solutions. Remove 8 from the first cell or 7 of the second cell. Either solution is valid.
(and I am still not convinced that by the similar logic, example 2 doesn't have 2 solutions)
18:58
which is the other one?
[1 2 8] [1 8] [8 9] [1 9] -> 1 from first cell, 8 from second
nope
[2] [8] [9] [1] is a valid solution that has 8 in the second cell
the additional 2 in the first cell breaks it
I see
00:00 - 19:0019:00 - 00:00

« first day (1547 days earlier)      last day (3591 days later) »