« first day (1820 days earlier)      last day (3030 days later) » 

5:03 PM
@Doorknob yeah sorry I'm just a bad person
 
@grc Hello
Also, what is the best way to block the main thread until a gui button is clicked?
 
10
A: How do I make Javascript beep?

HoushalterThe top answer was correct at the time but is now wrong; you can do it in pure javascript. But the one answer using javascript doesn't work any more, and the other answers are pretty limited or don't use pure javascript. I made my own solution that works well and lets you control the volume, fre...

2
 
5:27 PM
0
A: Sandbox for Proposed Challenges

ՊՓԼՃՐՊՃՈԲՍԼExploding Quines! code-golfquine You will be making a program/function of length n that: Puts the kth char at the center of the space, where k = (n+1)/2. This will be the location of your ground zero. Puts the rest of the chars randomly arranged around ground zero. The Pythagorean distance ...

Tips?
I just rewrote it completely.
 
I've decided to resurrect Rotor since it's the closest I've ever gotten to actually making a full-featured golfing language
Too bad I'm too stupid to figure out how to make a safe Groovy eval that will let it work online
 
@MartinBüttner To be fair, Tan is not the first to take it out of chat
 
5:49 PM
I'm winning by 42 bytes. Somebody fix this.
5
Q: Building a Metronome

PEARIntroduction Some days ago I needed a metronome for something. I had none available so I downloaded an app from the App Store. The app had a size of 71 MB!!! 71 MB for making tic-toc...?! So code-golf came into my mind and I was wondering if some of you guys could improve this. Challenge Gol...

 
Don't complain if your child gets good grades.
 
Heh. Improved by the fact that Vitsy is and will be my child.
3
 
goodbye for now
 
@SuperJedi224 peace
 
6:06 PM
0
A: Building a Metronome

Adnan05AB1E, 31 bytes Code: I60s/[7ç?D.etime.sleep(#.pop()) Uses the ISO 8859-1 encoding.

Could have been 11 bytes if I had it built in
dammit
 
I'm adding one to jolf :P
 
Hey, Conor, how do you delay in JS?
 
@FlagAsSpam setTimeout(<function>,<milliseconds>)
 
Cool, thanks.
 
6:12 PM
JS is not good for timelines :(
 
0
A: Building a Metronome

DoᴡɴɢᴏᴀᴛJavaScript, 36 bytes a=6e4/readline();while(1)print("\7") Uses the JavaScript shell. Uses the SpiderMonkey shell. It might work on rhino but I'm not sure

Only 5 bytes from the 05AB1E answer!
not bad for javascript
 
s/5/14/g
 
@CᴏɴᴏʀO'Bʀɪᴇɴ @FlagAsSpam you both created a new language!
 
6:26 PM
from: 5 to: 14
 
@zyabin101 ...that's just a regex replace statement.
 
I've created several.
:27052210 stares
 
Hey @CᴏɴᴏʀO'Bʀɪᴇɴ how do I get input in JS?
From console?
 
@FlagAsSpam prompt()
Oh
 
Huh that was weird, the page just updated with the conversation.
 
6:27 PM
You can't.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ stares at recipient
 
@zyabin101 s/recipient/PhiNotPi
 
Somewhat annoyingly, watch only supports 2 decimal place precision for intervals
Otherwise this would be 30 bytes for the metronome: watch -bn`bc -l<<<$1/60` false
oops backticks
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I stared at you. And you can only create one language every day.
I can make text gray out over time!
 
@zyabin101 I've made more.
I made Brainbash and Jolf on the same day.
 
6:30 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ I meant, regex replace statement based language.
 
oh, I see.
That should be a language though.
 
....Retina?
 
^
:P
 
@El'endiaStarman I mean, with s/.../-style syntax
I didn't know that either of you were in the room o_o
 
I am disappointed that this gives me a type safety warning in Java: ArrayList<Ingredient> ings = (ArrayList<Ingredient>)ingsOrig.clone();
 
6:32 PM
lolz :P
 
Wait for it...
TADA!!
 
I can make text go gray at any time.
 
v
 
6:33 PM
@PhiNotPi That's a tag!
 
1
A: Sandbox for Proposed Challenges

Cᴏɴᴏʀ O'BʀɪᴇɴParse an "Efficient" Encoding Let us define a fictitious encoding "ENCWID", that follows this general form: there are three bits that denote the length of the following character, for each character. This looks something like this: WWWN..N ^^^^--- the actual character ^^^------- width bits; ...

>v
 
^
 
Did we just make an infinite loop?
 
^
 
6:34 PM
Yes, we did.
That could be a challenge: finding an infinite loop made by chat messages
 
^
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I never did comment on this last night, did I? Well, it occurred to me that your encoding scheme will never be better than Huffman coding. That said, it is an encoding that I don't think we've had a challenge on, so I think it should be fine.
 
@El'endiaStarman what is Huffman coding? :/
 
In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding and/or using such a code proceeds by means of Huffman coding, an algorithm developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes". The output from Huffman's algorithm can be viewed as a variable-length code table for encoding a source symbol (such as a character in a file). The algorithm derives this table from t...
 
6:37 PM
^
-  -
  ^
 
Is it sad that I have 3 versions of Java 8 installed on my flash drive so that I can access my Eclipse workspace anywhere that I'll need it?
 
> Is it sad
> Java
yes
 
^
 
sigh It's so I can run Vitsy, to be honest.
 
I have about 5 different JDKs on my computer
 
6:45 PM
@quartata On my flash drive.
I have Java 1-8 installed on my computer. :D
 
Just saying that JDK hoarding is perfectly normal
 
Oh, good. xD
I feel vindicated.
 
@FlagAsSpam you know about -source right? :P
 
@FlagAsSpam By the way, we had two "Vitsy"s on the Discord server some time ago and we deleted one but we don't know if that was the right one because a) we forgot to ask and b) you haven't been on in a while... I think
Could you check?
 
@Sherlock9 VTC's, you mean? Yeah, I purposely did that. :D
 
6:48 PM
Why? And as I said, I deleted one
 
Idk.
Felt like it. xD
 
Alrighty then. This is Mego and their silliness all over again :D
Are you going to come back in, by any chance?
 
Eventually.
 
Also, everyone else in PPCG is welcome
Very well. I'm going to go restart my computer now. See you later
 
I should use discord more
Now that you can mute whole servers
I used to constantly get notifications about Splatoon and I like splatoon but I don't need constant notifications about it
 
6:54 PM
How do I type a ` in an inline code block?
 
Iirc backslash backtick
`
Yep it looks like it works
 
wait, got it it's: `` `\7` ``
 
@Doᴡɴɢᴏᴀᴛ comment/chat, or actual post?
 
@MartinBüttner actual post.
 
ah yeah, in an actual post you can use multiple backticks
in mini-markdown you'd need to escape the backtick instead
 
6:59 PM
I didn't know about the multi back tick thing
That seems very useful
 
Halp.
2
0
A: Building a Metronome

FlagAsSpamBash, 53 bytes Okay, truth time: I'm terrible at golfing bash. Any help would be so very appreciated. read a;while true;do printf \\a;sleep $((60/$a));done

 
By default, can I take input from a file?
 
I think so.
@Doᴡɴɢᴏᴀᴛ Not the most popular option, but it has a positive score:
4
A: Default for Code Golf: Input/Output methods

Martin BüttnerPrograms may take input from a file

 
Have you guys done a cops/robbers sort of thing where the cops post a challenge to output one pattern and the robbers change it to output another pattern by only changing, adding, or removing a maximum of X characters?
 
I think so.
Make another, cause that sounds fun. :P
 
7:10 PM
@Dennis +15/-11 isn't exactly a consensus though (now +15/-9, but it's probably still something I ask the OP about)
@Hosch250 "pattern"?
 
I was considering doing a Trump vs. Immigrants, where the Trumps build a wall and the Immigrants install doors in the wall.
6
 
rofl
 
lol
I already like the name of it
 
^
 
...how did "Halp" get starred?
 
7:11 PM
Which side of the wall are the immigrants trying to cross from?
 
As much as I'm on board with ridiculing Trump, I wish people would keep politics out of their challenges.
8
 
@feersum Either side. The Trumps print an ASCII art wall, and the Immigrants print an ASCII wall with a door.
OK, I'll change the names.
 
Aw.
@MartinBüttner I guess I agree.
@FlagAsSpam By me. :P
I thought it was funny.
 
oh god what have I done
 
IDK, tell us
 
7:14 PM
who here runs windows?
 
I do.
 
Me too
and I hate it
 
I'm not going to try experiments just now. I've got a college assignment to finish.
 
a=InputBox("")
Do
WScript.CreateObject("WScript.Shell").Run("cmd /k echo"&chr(007))
Sleep 60/a
Loop
DO NOT RUN THIS
IT IS FOR REFERENCE ONLY
 
lol
 
7:15 PM
okay
So, this script opens up a new command prompt every N seconds.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I almost ran it because you said that.
 
Don't. I had to manually turn off my computer.
 
LOL.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I almost crashed my computer with the same challenge
 
XD
a=InputBox("")
Do
WScript.CreateObject("WScript.Shell").SendKeys("echo "&chr(007)&"~")
Sleep 6000/a
Loop
This may work.
Don't try it yet.
 
7:22 PM
What language is that?
 
bash
I think.
 
that is most definitely not Bash
 
hahaha
Looks like basic or something like that
 
It's something similar.
 
yeah looks like VB
 
7:25 PM
VBScript
 
@Doorknob What do you use? I though quartata said zshell?
 
Useful AppleScript builtin?
0
A: Building a Metronome

FlagAsSpamosascript, 39 bytes on run a repeat beep delay 60/a end end There is literally a command called beep? Sweeeet! Runnable only on Mac OS X due to restricted license, but to run, do: osascript -e "on run a repeat beep delay 60/a end end" bpm

 
@Doorknob BTW, does a scroll of create monster let you choose the monster?
 
I've made too many answers to that question now. xD
 
^
:P
 
4, right?
 
0
A: Building a Metronome

Cᴏɴᴏʀ O'BʀɪᴇɴVBScript, 113 bytes a=InputBox("") Do WScript.CreateObject("WScript.Shell").SendKeys("echo "&chr(007)&"~") WScript.Sleep(6000/a) Loop Hey, look, Java won! Oh heavens...

 
Bash, Applescript, JS, and Java?
 
Java didn't lose.
 
Wow, you are right!
How did that happen? :P
Sup @PEAR?
 
7:30 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Can you do 6000/InputBox("") instead of 6000/a?
 
We are discussing your challenge.
 
Or does that give an error
 
Hi :)
 
Hello :)
 
Nice challenge.
 
7:30 PM
@Adnan That will call an input box every time it calls a.
^^
 
=^)
 
Aha!
 
Uh, what?
 
damn
I thought this would give a better score than 4889 :(
 
First post on code golf... got that amout of answers xd
 
7:31 PM
 
What?
 
Try blurring it.
 
I mean, compare to 5701:
 
lol
 
 
7:33 PM
@RikerW zsh
@RikerW no
 
@PEAR Great first post!
Very good.
Have you seen our Sandbox for proposed challenges?
 
a slight blur is better scoring
4829
 
Yeah, it throws off the scoring calculation.
 
@orlp I wonder, what happens if you run an image comparison that highlights which regions are more / less similar to the original. As in, color each pixel according to its accuracy.
 
I mean
to me, as a human, my version is SIGNIFICANTLY better than the 5701 version
 
7:37 PM
I agree.
 
while the algorithm says it's 15% 'better'
(for the record, the above image is non-competing still)
it's an upscaled version of a 945 byte image
 
Bounty expired. @Dennis got it. :(
 
but I haven't found a programming language that can embed the image, scale and output it in 55 bytes
 
@orlp I was considering trying to compress the greyscale image. greyscale itself has an error of about 2800 or so, but it might be easier to avoid additional errors if there's only one channel to compress.
 
Does the validation snippet accept SVGs?
 
7:41 PM
@MartinBüttner (my algorithm right now is optimized 16 color pallete)
 
@mınxomaτ It's a vector image, so no.
 
downscaled 8 times
 
@mınxomaτ That proves the following fact:
One does not simply outgolf Dennis.
 
@zyabin101 SVGs can have viewports with fixed dimensions ;)
 
386 * 320 / 8**2 = 1930 pixels
 
7:42 PM
@zyabin101 The bounty wasn't for a shorter solution. Just for any other solution. :)
 
Does someone there know where is the Lord of Rings meme image with that fact?
 
1930 pixels * 4-bit (16) pixel values = 965 bytes
then some image compression magic
 
\o/ I've added sound to Jolf
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Good! Now do Twinkle Twinkle in it. Or Happy Birthday.
 
XD Maybe after I take a shower
 
7:49 PM
you're just gonna pick one up? Those things are heavy
 
While doing the van Gogh challenge, I found this neat tool: optimizilla.com
 
@mınxomaτ garbage
optipng -o7 img.png && advdef -z -4 -i 100 img.png
that's 100% lossless, though
 
8:21 PM
@Doorknob Is there any way to create a specific monster?
 
 
@FlagAsSpam printf \\a -> echo "<raw 07 byte>"
Also take input via command line args: $1
Also this doesn't work since bash does integer division
You'll need to use bc: bc -l<<<60/$1
Overall 0/10
@RikerW Reverse genocide
Read a cursed scroll of genocide and specify the monster you want
It'll create a bunch of them
 
@RikerW either cursed geno, wish for a figurine, or ^G in wizard mode
 
Ah yes I forgot about Control+G
Be warned that figurines will spawn monsters tame most of the time
If you want to sacrifice them bad things will happen
 
Finally finished my new laptop setup. Triple boot between arch, Win10 and OS X. No more switching PCs between OS's.
 
8:36 PM
nice
 
@quartata Okay, thanks.
@quartata Nah, I want an awesome pet.
 
You want figurines then.
 
^
 
I have 3 blessed scrolls of taming.
 
8/10 times it spawns the monster tame though.
It does the work for you
 
8:46 PM
@quartata Okay, have a magic lamp.
@quartata Cool, thanks.
Gimme a mo, brb
 
@RikerW unless you're pacifist wishing for a figurine is usually a waste of a wish
 
Welp, I now have a pet arch-lich.
Just for fun.
They sound cool.
 
liches are horrible pets
... not to burst your bubble or anything :P
 
They can't wield weapons :/
And they can't do anything against undead
Archons are the best pets.
 
Okay.
 
8:51 PM
@quartata [citation-needed]
 
@Doorknob Your opinion
?
 
@Doorknob it's a fact not an opinion
 
@quartata "best" is an opinion
 
^
 
My preferred pets are purple worms and balrogs
 
8:52 PM
Okay.
 
IIRC you can't get an Archon out of a polytrap, so I've never had one as a pet
 
Purple worms are nice too
@Doorknob You can't.
 
So Archon or Balrog?
 
@RikerW Archon
 
I don't like engulfing monsters, but if they are really that good okay.
 
8:53 PM
Why don't you like to engulf monsters?
 
IDK.
Too freaky.
Whatever.
Archon, I choose you!
brb
Okay
Pet archon and arch lich.
I had 4 magic lamps, and got lucky I guess.
 
We are playing Pokemon here? I forgot to bring.
 
Nethack
Thanks @Doorknob and @quartata.
 
Then, I have Fido!
My little dog that I carried into dungeon!
 
@RikerW did you seriously find four (!!!) magic lamps and waste two of them >_<
 
8:59 PM
Yes.
Sorrry..........
@zyabin101 Yay!!! \o/!!!
 

« first day (1820 days earlier)      last day (3030 days later) »