« first day (1893 days earlier)      last day (2950 days later) » 

3:00 AM
23 hours ago, by Alex A.
goat rekt
son
 
@quartata of course you can! It's JS, it's not like it'll stop you from doing something bad (like using JS)
 
@AlexA. HEC
 
@QPaysTaxes -1 not enough ES5
 
> doing something bad (like using JS) —Downgoat, 2016
 
@QPaysTaxes Welcome to Texas! We're sorry, but you're in the wrong place! Perhaps you meant to pay your taxes?
 
3:01 AM
@Doorknob I feel so dirty, saying that.
> newbiedoodle
goat/10 nice username
 
@Downgoat It doesn't look like indexOf is respecting my valueOf at all; it's not getting called
 
llama@llama:...misc/RandomBits/DesertSurvival$ ruby survive.rb
/usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- perlin_noise (LoadError)
	from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from survive.rb:3:in `<main>'
:(
 
@quartata uhhh, jist use a recursive object equsls
 
@quartata use jquery
 
3:03 AM
@Geobits HELP I'M SCARED
 
Oops, I made a mistake
 
@Downgoat ಠ_ಠ
 
I'm serious
@quartata or use JSON.stringify(a) == JSON.stringify(b)
 
^ better
ಠ︿ಠ
 
or you can use:
function deepCompare () {
  var i, l, leftChain, rightChain;

  function compare2Objects (x, y) {
    var p;

    // remember that NaN === NaN returns false
    // and isNaN(undefined) returns true
    if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {
         return true;
    }

    // Compare primitives and functions.
    // Check if both arguments link to the same object.
    // Especially useful on step when comparing prototypes
    if (x === y) {
        return true;
 
3:05 AM
OK, turns out it's not good enough to do store.data
 
Or you can just use a <= b && b <= a....
 
I have to do store.data.all
And even then the resulting array is a bunch of wrapper objects; I have to do store.data.all[0].raw
Who made this
 
@Downgoat JS: Where copy/pasting a 100+ line function to compare two things is not only considered but encouraged.
 
3:06 AM
"Hai I bash JS because I think it makes me look cool"
3
 
@Doorknob this is why yuo shoukd use jQuery
 
Give me a fucking break >_<
 
@Downgoat JS: Where loading a 95kb library to compare two things...
 
Anyway, @quartata:
function equal(x, y){
  return x <= y && y <= x;
}

equal({
  a: 3,
  b: {a: 1, b: 2}
}, {
  a: 3,
  b: {a: 1, b: 2}
}); // true
 
OK nevermind I found something
store.findBy(
takes a function
 
3:07 AM
@Doorknob -10
 
@quartata Lesson learned: read your docs.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ that alawys retuens true
 
Oh I did
 
I'm tired, I should probably get lost before anything worse happens.
@Downgoat wait really?
 
I just assumed that I wouldn't have to go overkill
 
3:08 AM
yup
 
Awkward.
WAIT! If you cause a syntax error, it doesn't return true! So just make all unequal objects raise an error, and it should be okay.
 
equal({
  a: 3,
  b: {a: 1, b: 2}
}, {
  a: 3,
  b: {a: 1, b: 3425}
}) // true
 
@QPaysTaxes because they're both non-[object Object]s
 
@QPaysTaxes yah
 
3:11 AM
Even if you like JavaScript, you have to admit at some point how ridiculously long the discussion of how to compare two things has gone on. Isn't that supposed to be one of the easiest things to do in a language?
5
The fact that it's causing any difficulty is troubling.
 
@MarsUltor the problem with that, is that if you are really concerned about load times of JQuery, you should just use a CDN, meaning that most visitors don't need to load it at all
 
@AlexA. it's because quartata's code is trying to compare something that shouldn't be compared
 
@AlexA. Objects should never be compared
 
Get out your 2D regex parsers
 
Many languages return false if they reference different memory locations
 
3:12 AM
^
like C
 
@QPaysTaxes oh, I was just trying to figure out how to install gems into a local folder. I didn't want to install the perlin noise gem globally :P
but then I can't try new versions of your game :P
 
@Downgoat But all good languages provide something like equals to compare them properly
 
most do, but still...
 
nah, I'll just install them globally. It's not like two gems is that much clutter anyway :P
ooooh, this is really neat :D
... how do I control it?
I held down the a key
and survived for 43 days
¯\_(ツ)_/¯
 
3:15 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Pourquoi tout le francais?
 
@Doorknob Wait what
 
@Downgoat Parce que j'ai ete en mon ma classe du francais (sorry for the bad off-of-the-hand french)
 
but in all reality, other languages aren't free of the problem of object comparison, its simply that element access is easier in Javascript. Consider having two arrays with the same objects (in the same order), and both of those objects point to its containing array
 
@CᴏɴᴏʀO'Bʀɪᴇɴ *ma but aside from that that was OK
 
3:17 AM
oh, I figured it out; it's WASD
 
And accents of course :P
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ok
 
recursive structures aren't unique to javascript, its simply that other languages have built in equals operators where smart programmers can identify loops
 
OK, how do you cast an Object in JS?
 
@QPaysTaxes oasises (oases?) can be abused for infinite water :D
you should probably make them run out eventually
 
3:18 AM
@Downgoat My teachers can see what we're doing on our tablets, but they don't look too closely :P
@quartata to what?
 
To another object
 
@quartata give me some context/an example?
 
... yeah, I just noticed that >_<
 
@quartata What
 
3:18 AM
I can't call my valueOf function because it's treating it as a regular object
 
You mean like "cloning" an object?
 
@quartata wat.
 
not as an article
 
@quartata everything in JS has valieof
 
I think this is something exclusive to ExtJS
 
3:19 AM
until I died :D
this time I found a sword
 
@quartata cast to what?
 
You stumble across a deserted camp.
You hear a distant rumbling.
Generated worm at [-48, 26]; pos=[-55, 34]
Water:  21
Health: 51
pos is [-55, 34]
Worms on map: 1
Moving worm from [-48, 26]
Direction: [-1, 1]
New pos: [-48, 26]
Rejecting worm at [-48, 26]? false
 
+5 b4 nmp plz
 
oh, I see the worm!
 
OK, so basically I have this function foo
I'm using Ext.define and Ext.create to make these objects
 
3:20 AM
... whoops, I pressed q expecting to move diagonally and it quit :D
 
@QPaysTaxes Screenshot(s)?
 
Actually, nevermind. This is dumb
 
@quartata why ext not not jquery?
 
@QPaysTaxes nice work! Looking forward to what you do with this in the future :)
 
31 secs ago, by El'endia Starman
@QPaysTaxes Screenshot(s)?
 
3:21 AM
ok
 
var oldObject = {hi: "world", q: 5};
var newObject = {};
for(var prop in oldObject) newObject[prop] = oldObject[prop];
 
@QPaysTaxes I survived until there were 4 worms and now the debug output is filling up the entire screen and I can't actually see the map haha
The worm attacks you. The worm attmpts to eat you, but you cut at it with the sword.The sword strikes its venom gland, killing it.
survive.rb:147:in `<main>': undefined local variable or method `worms' for main:Object (NameError)
Did you mean?  worm!
hey, no fair :P
 
@Doorknob ahh yusss you switched to scp
 
global variables no
3
 
@AlexA. thanks for the recommendation, by the way :)
 
3:24 AM
(says the person who uses global variables all the time in Ruby)
 
@Doorknob ( ͡° ͜ʖ ͡°)
 
Oh boy, it's time for round two with my favorite JS constant, NaN!
 
@AlexA. elennyven
 
:O
also lol
 
3:26 AM
@QPaysTaxes o/
woah what happened while I wasn't watching
 
Your garden likes you more than mine likes me. :(
 
3
Q: Rectangle Detection

Helka HombaWrite a program or function that takes in a multiline string of 0's and 1's. No other characters will be in the string and the string will always be rectangular (all lines will have same number of characters), with dimensions as small as 1×1, but otherwise the 0's and 1's may be arranged arbitrar...

 
I removed all my lights for now. I don't want anything growing in my sleep :P
 
Finally figured this out. forgot to do record.raw
 
Actually, it would be fun to focus a light on a tiny area overnight and see what grows...
 
...okay. :P
 
Confirmed: @trichoplax really likes red light. Which is funny, considering he's cyan.
 
OK, that deer looks uncomfortable.
 
:D MY REP IS PALINDROMIC
 
brb upvoting
 
@Doorknob Only octopi spawn in blue light? Gonna change the color of that one then...
 
@El'endiaStarman Well, blue light combined with other colors might make other things.
It's also possible that that user just removed everything that wasn't an octopus.
 
@EasterlyIrk ಠ_ಠ
 
3:39 AM
don't worry i didn't
 
I've left a light coming out of the ground but I don't think it's doing anything particularly special
 
@Sp3000 I actually had something spawn in the ground and I have no idea what it is.
 
does anyone know if the proof of the four-color theorem is constructive?
i.e., it gives a polytime algorithm to produce a four-coloring of a planar map?
I'm failing at googling this
 
I don't think it is.
It was proved by figuring out all the sufficiently-different kinds of maps, and then exhaustively checking them with a computer.
 
3:46 AM
@Sp3000 Mine grew a bush when I put all three lights in the center on the bottom
^^
 
Has anyone tried to shine a light at a light?
 
@xnor Even if the proof was constructive somehow I don't think the algorithm would be polytime
 
do I just wait for it to grow now?
 
3:52 AM
Pretty much.
 
ok
 
@El'endiaStarman @Sp3000 Actually, looks likes there's an algorithm: people.math.gatech.edu/~thomas/PAP/fcstoc.pdf
 
@xnor Not only that, but the previous algorithm was polynomial too. Cool.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Difference is _ in Jelly. - is for negative literals.
 
3:53 AM
Oh. Okay XD
G'night y'all
 
G'night!
 
night!
 
@xnor nvm then :P
 
Can you always solve a Rubik's cube using only half turns?
 
@HelkaHomba Take a solved cube. Turn one face a quarter turn. I'd guess not.
I'mma try it anyway. :P
 
3:59 AM
@HelkaHomba can't each edge cubie only go to 4 spots?
 
@El'endiaStarman I'd guess no too. But how do you know there isn't some convoluted half-turn way to correct that?
 
xnor got it. With only half turns, each edge piece can only be in one of four spots. When you use a quarter turn, you shift an edge from one group of four to another group of four.
 
my garden isnt growing...
 
@El'endiaStarman Ah, right
 
4:04 AM
@MarsUltor The purplish one has a spurious red light.
 
> Relax.
 
Finally got this working
Now all I have to do is implement the settings pane and I can be done with this accursed thing
 
@El'endiaStarman IDK. It looks kinda purple (Also, there's no purple, the closest is probably blue + red)
Wait what there are cartoon cats?
 
Ah, I see. I usually tend to label deep blue as purple.
 
Probably looks more like magenta though
 
4:13 AM
0
Q: ASCII to binary/hex/oct and back

DanielYour mission is simple: Take file or stdin input of ASCII, and convert to binary, octal, or hex (depending on -2, -8, or -16 flags or similar). When the input is binary/octal/hex, convert to ascii. The program should be able to take stdin or file input, and output to stdout or a file. Simple ...

 
Hello
 
@zyabin101 hi!
 
Wait, what color do Megans grow in?
 
My people grew in yellow/blue overlap.
 
4:24 AM
I just took this screenshot, someone has to make a dank meme out of this:
 
@HelkaHomba Slip can almost do rectangles, but output would be the wrong way around :/ I should really add a negation option somewhere...
 
@Downgoat How did you take a screenshot of a dog unless it was already an image?
 
@HelkaHomba Took a screenshot from a video
 
how does one define a permanent alias in bash?
 
@GamrCorps add it in your .bashrc or .bash_profile on mac
 
4:35 AM
By putting it your .bashrc
ninja'd
 
So do I just put alias ... in that file?
 
@Sp3000 You can add a noncompetitive answer :)
 
@GamrCorps yeah
 
ok thanks
 
don't forget to restart your terminal
 
4:38 AM
Hmm maybe I should get ZGarb to patch Grime :P feersum's probably going to come along with Snails though
 
@Zgarb you're needed
 
has there been a "parser a formal grammar" challenge yet?
 
@Sp3000 I thought identifying the checkerboard would not be that hard even in a normal language
 
The challenge is okay for normal languages (assuming my algorithm's correct), but I think it's just more interesting for the 2D matching ones
 
Good luck to everyone in the elections! Only 15 more hours!
Also, I'm off to bed, goodnight!
 
4:50 AM
0
A: Sandbox for Proposed Challenges

xnorContiguous blocks code-golf Given a string of letters A..Z, output whether every letter exists in a single connected interval. In other words, no two of the same letter are separated by a different letter. Is it a dupe?

 
@GamrCorps Thanks! Good night!
 
0
A: Sandbox for Proposed Challenges

DowngoatParse a Formal Grammar Given a type-1 (right?) formal grammar, and a string, parse the string using the formal grammar and output the matches for the non-terminals. Examples First line is string, following lines are grammar, last line is output, examples are separated by --- 123 n -> any of ...

 
5:16 AM
0
Q: Are the brackets fully matched?

My Ham DJYou must write a program or function that takes a string of brackets and outputs whether or not that string is fully matched. Your program should print a truthy or falsy value, and IO can be in any reasonable format. Rules and definitions: For the purpose of this challenge, a "bracket" is any...

I'm pretty sure this has been asked before.
 
0
Q: Are the brackets fully matched?

My Ham DJYou must write a program or function that takes a string of brackets and outputs whether or not that string is fully matched. Your program should print a truthy or falsy value, and IO can be in any reasonable format. Rules and definitions: For the purpose of this challenge, a "bracket" is any...

 
Probably
@AlexA. NMP random avocado message rewrite time
 
What
 
double post kinda
 
0
A: Are the brackets fully matched?

Mama Fun RollRetina, +`{}|\[\]|\(\) .+ Try it online! The output values are a bit contrived: 1 is falsy, 0 is truthy. Hope this is okay.

 
5:21 AM
What about it?
 
btw, is it okay to make 1 falsy and 0 truthy?
 
nevermind
 
@MamaFunRoll Caching. You posted that after I closed it.
@HelkaHomba Oh, rewrite one to say something about avocados? I stopped doing that when you asked me to a while back.
 
@MamaFunRoll Generally no unless the language works that way
 
^
 
5:23 AM
55
A: Interpretation of Truthy/Falsey

Peter TaylorConsider the following pseudocode: if (x) { print "x is truthy"; } else { print "x is falsy"; } If it results in a runtime or a compile-time error then x is neither truthy nor falsy.

 
@HelkaHomba How would I test that in Retina?
 
I'm not sure about Retina
@AlexA. It's kinda too bad since the new challenge has cleaner goals and scoring, and it could probably get a lot more votes and answers (cc @MyHamDJ)
 
Yeah, the old one is kind of a mess, but it's the same task and the whole "answers can be copied with minimal changes" blah blah...
 
Um now why are there 2 duplicate Retina answers?
 
we have the same solutions. You posted before me, but I got the valid solution before you :/ what should be done? — Downgoat 24 secs ago
@MamaFunRoll ^
 
5:30 AM
@Downgoat Ninja'd
Who wants to delete?
 
I guess it's like a cross ninja
 
Hello, what do you think of my answer to Fibonacci's Roman numerals? Any golfing suggestions? codegolf.stackexchange.com/a/77086/47581
 
@AlexA. Because in this case I think it's a silly policy.
 
@HelkaHomba But but but it's a DUP!
 
I've voted to reopen because it's a much improved version, and doesn't have weird scoring
 
5:33 AM
@Downgoat Still a duplicate nonetheless.
 
15
A: Should "Code the Huffman!" remain closed as a duplicate of a very old question?

Martin BüttnerTL;DR: They are duplicates. Close the old one. First, I'd like to clarify that I do think the questions are duplicates. I agree with Peter that a difference in the output format counts as a "minor modification" to existing answers, unless the output formatting is the core of the challenge (which...

 
It's literally just the same solutions.
 
@MamaFunRoll They can be easily modified but aren't the exact same so that is incorrect use of the word "literally"
 
Sometimes I think duplicate checks should have a 2 year limit.
 
Any feedback on this challenge? I want to post it tomorrow morning:
0
A: Sandbox for Proposed Challenges

DowngoatParse a Formal Grammar Given a type-2 formal grammar, and a string, parse the string using the formal grammar and output the matches for the non-terminals. Examples First line is string, following lines are grammar, last line is output, examples are separated by --- 123 n -> any of 0 1 ...

 
5:36 AM
@Downgoat Not layman friendly
 
@HelkaHomba My thoughts exactly. Grammer not is my tihng.
 
@MamaFunRoll I am fine with formal grammar, not grammar grammar
 
@HelkaHomba Why not propose that on meta?
I would tend to disagree because every two years we'd just have a bunch of the same challenges.
But maybe people would agree and policy would change
 
@HelkaHomba any ideas on making it layman friendly? I can't really describe Chomsky form, and CGF all in the spec...
 
@AlexA. Maybe I will, just lazy
(And I don't really care if people know I voted to reopen :P)
 
5:41 AM
0
A: Double-duty quine

Mama Fun RollRETURN, 94 bytes "34¤¤,,,,,,,,,,,,,% 'H'e'l'l'o',' 'w'o'r'l'd'!'"34¤¤,,,,,,,,,,,,,% 'H'e'l'l'o',' 'w'o'r'l'd'!' Reversed: '!'d'l'r'o'w' ','o'l'l'e'H' %,,,,,,,,,,,,,¤¤43"'!'d'l'r'o'w' ','o'l'l'e'H' %,,,,,,,,,,,,,¤¤43" Try it here. Outputs to STDOUT. Until I find a better quine framework, th...

Most ridiculous quine I have ever made.
Ever.
 
@NathanMerrill if the repo is a black hole, why am I not sucked in 4/10
 
its actually a pretty cool game, found it here:
 
@NathanMerrill -1 for being a Tom Scott video not about emojis
 
Oh hey. I just missed out on all the discussion of my own challenge. =(
 
5:47 AM
I do like his emoji ranting
 
It's not a huge deal to me, but this has been done in the past
 
making a language is physically dangerous, with all the hours of head banging surely you will eventually get some brain damage...
 
@MyHamDJ Hm, that's a good point.
The old one is, after all, a huge mess.
Especially by our "ಠ_ಠ @ bonuses" attitude that's come since then
(which I 100% agree with, death to bonuses)
 
Yeah, I'd agree with that. Personally, I think that any challenge that allows for a negative score has some serious issues.
 
@Sp3000 How did dennis help without making any comments? o.O Telepathy?
 
5:56 AM
Jelly chat
 
my next challenge will score everybody with the formula -1*bytes, highest score wins
 
huh, Music.SE just got their design
 
oooh pretty yellow
 
how did I not notice ._.
 
@AlexA. Do you think the old one should be dupe-closed?
 
5:57 AM
that's new
 
their logo is pretty interesting
I wonder what our logo would be. It better not be a golf ball or a puzzle piece...
 
All in favor of marking the old messy challenge a dupe of Dr. Ham Jam's mega new one, say aye.
(or rather, cast a close vote)
@MyHamDJ Yes
 
@Downgoat its a piano that starts at a B?
that's an odd note to start at
 
@MyHamDJ That would be a very good idea.
 
@MamaFunRoll Then cast a close vote ;)
 

« first day (1893 days earlier)      last day (2950 days later) »