« first day (2319 days earlier)      last day (2517 days later) » 

12:07 AM
0
Q: Tips for golfing in V

DJMcMayhemWhat general tips do you have for golfing in V? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to V (e.g. "remove comments" is not an answer). Since V is heavily based on vim, most of the tips for golfing vim would apply too. But th...

 
12:21 AM
I've been meaning to make ^that^ for way too long
 
The deed has been done
 
@DJMcMayhem it says vimgrep do I need a plugin to make it work?
 
No, that's a default command
 
I think I've got all the serverside code set up for this, I just need to write the userscript itself...
 
0
A: Sandbox for Proposed Challenges

GryphonBattle of the Bots Your Task Program a bot to compete in a battle with other bots. You have fifteen flags situated around the exterior of your (sadly imaginary) bot (I wish I could actually do this for real, but budget cuts forced a change of plans :). Your goal is to be, on average, the robo...

 
12:44 AM
@Christopher It took 4 users almost 24 hours to come up with 17, I don't think using less chars to come up with 18 qualifies as a mini-challenge :P
 
Almost got the client side working.
It just doesn't display who's typing anywhere.
 
@ATaco I think pretty much everyone who codes for themselves agrees with this motto, including myself
 
@ATaco does everyone need to install userscript to see if they're typing?
 
Only those with the userscript will be visible.
 
speaking of userscript. would a chat redesign userscript be helpful
 
12:56 AM
The grad script works in chat though.
 
yea, i did a little bit of char stuffs for chat but I couldn't get the avatars for each message to resize
 
1:18 AM
I am Typing now should work.
10
You may need to update the preview script to see it properly.
@Downgoat
 
Hmm, does it work?
I don't see anything different on my end when I type, but I suppose that's expected
@ATaco What preview script?
 
Do you not have Chat Preview? It's pretty baller.
(Also, make sure to refresh)
It is also optional.
 
Installed and trying again
Hey, that's pretty cool
 
But there's also no reason not to install it, because it's awesome.
 
Hmm, strange, I can't see you're typing.
 
1:27 AM
I'm still not seeing any change from the I am Typing script
 
I wish it supported s though.
 
"It was working just a second ago"
 
I'm on Firefox, should that make a difference?
 
Oh wait!
I can see you now!
 
I saw you too :-)
 
1:28 AM
I guess refreshing myself helps... ;-;
 
/me facepalms
 
Is SE Chat open source?
 
It's beautiful, I'm so proud of my little baby.
 
Hey, maybe your chat command userscript could have a /me thing too
 
I've added the typing thing, can anyone test it out?
 
1:29 AM
@Phoenix Nope, I had to hack most of my things.
 
Oh, I see it now
 
I saw your name pop up there
 
Hello!
 
I see other people as well
 
This is very cool :-)
 
1:30 AM
@ATaco When you and someone else are typing, it displays "and username are typing"
 
Looks fine for me..?
 
Try typing something
 
I see the same thing: "and Mendeleev are typing."
 
Someone grab a screenshot.
 
accidentally hit enter :D
 
1:32 AM
 
jjhjhjhjhjhjhjhjhjhjhjhjhjhjhjhjhjhjhr
 
Strange....
Until I can replicate it on this end, I can't work out what the problem is.
But, other than that, I think I did pretty well.
 
yup
helps a lot
BTW is the team spirit thing still going?
 
Well, strictly speaking it exists.
I think most people have turned it off.
 
Clearly @ETHproductions doesn't
 
1:40 AM
I keep it turned on, just incase.
Red is winning.
 
I can see that
Can you update your formatter to delete the second parenthesis in a pair if the first is removed and there's nothing between them?
Same with the other brackets
Also, only the curly brackets actually work - the others don't recurse
...this is turning SE chat into Discord
ಠ_ಠ
 
Oh, I can replicate it now.
Neat.
 
Neat
Someone should pin Am I Typing
so everyone has it
 
@Mendeleev The entire reason chat commands exists is because I complained I couldn't do /shrug. This was the first Tacoscript.
 
Best we can do is star it.
 
1:44 AM
@Mendeleev Took me quite a while to figure out what you meant... maybe I should go to bed >_>
 
Right
 
Unless ATaco independently had the same idea at the same time, which is unlikely.
 
@Phoenix The first TacoScript was technically AutoChatJax
 
Followed by Prettify.
 
1:45 AM
Oh, right. Forgot.
 
@Phoenix How did the olympiad go?
 
brb turning off team spirit
 
They all came into existence within like two days of each other.
 
what
 
@Mendeleev I only got 3rd ;-;
 
1:45 AM
@Phoenix ;-;
Sad
 
@ATaco would it be possible to have formatting appear in the chat window as you type? Like how HackMD does it.
 
@Phoenix Not sure how to, not yet.
Can someone start just typing for me.
 
That'd just make it harder to edit anyway IMHO
 
Hmm, that's interesting.
Ah, Found the cause, the problem is I'm an idiot.
 
@ETHproductions Still show the formatting marks. Again, like HackMD.
 
1:48 AM
I've been tempted to overlay an Ace editor with the mode set to Markdown.
 
But everything is monospace in the HackMD editor
 
Which basically solved that problem.
 
I get your point though, that might be nice
 
@ATaco That would be excellent.
 
Alright, someone start typing for me please..?
Yay! Fixed!
 
1:51 AM
 
@Phoenix @Downgoat
 
Oh have already seen many time
 
They are good goats brent.
 
1:54 AM
CMC: Given an int N >= 0 that is a number of items in Minecraft, output it in terms of stacks and items, like AsBi where A is N//64 and B is the remainder. e.g. 65 = 1s1i, 128 = 2s0i, 9 = 0s9i, 300 = 4s44i
 
Can output be a set of two numbers?
 
no
must be string with that form
 
@HelkaHomba so it's basically divmod 64?
 
(x=QuotientRemainder[#,64];x[[1]]<>"s"<>x[[2]]<>"i")&
That seems too long.
 
@DJMcMayhem yeah (but an extension could be to not print things if 0, like 128 = 2s)
 
1:58 AM
@HelkaHomba If not for boring string boilerplate answer would be #~QuotientRemainder~64&
 
what are the squigglies?
 
Infix operator. Equivalent to QuotientRemainder[#,64]
At least I think that's how it works.
 
Finished and submitted my Minecraft submission for the "random pixel" challenge. This is my first submission on this site, can someone check my answer to see if I've followed all the rules?
1
A: Display random colored pixels

Kevin CruijssenJava 7 with JavaFX, 686 674 bytes import javafx.scene.*;import javafx.scene.canvas.*;import javafx.scene.layout.*;public class M extends javafx.application.Application{public static void main(String[]a){launch(a);}GraphicsContext g;public M(){}public void start(javafx.stage.Stage x){BorderPane...

 
I've never gotten it to work right because order of operations is not my friend, and adding parenthesis gets rid of the one byte savings over prefix form.
 
@HelkaHomba Ruby: ->s{"#{s/64}s#{s%64}i"}
 
2:01 AM
@BradC Sure looks to me like you did. I'm incredibly impressed.
 
BTW helk
Any news on OPPCGMCS?
Also, have you installed the i am typing userscript?
 
@BradC You linked a Java submission by someone else.
 
no and no
 
Yep, oops, wrong link. Here go: codegolf.stackexchange.com/a/124610/70172
 
@HelkaHomba You should install it'. It's really cool.
It's in the starboard
 
2:02 AM
@BradC Minecraft is scored in 'blytes'
 
@MDXF Thanks. Learned a lot about command blocks.
 
I'll look up the meta post
 
@Phoenix that was the old way, isn't the new way via size of the saved structure block?
 
Yes it is! I didn't realize a change was made.
 
2:04 AM
Well that puts a crapton of overhead
Same as the new Scratch scoring. Before, it was atomic
Now, it's ScratchBlocks2 syntax which is bad
 
Yeah, probably a lot of overhead. At least it'd be apples-to-apples against other MC submissions
 
@BradC So did I, from reading that (wonderfully detailed) description. You'll probably get at least two bounties.
 
No one actually follows the "all competition is intra-language" rule
 
@BradC Technically that means your code is the 4,355 bytes, which means you're supposed to paste them into your answer, presumably at the top, perhaps in hexdump form. However, that's silly, so it's fine if you don't.
 
@Phoenix Got it down to 4243 by removing the two signs. I guess I can make the structure file available, but not sure if anyone would actually use it or check it
 
2:07 AM
My point exactly.
Altogether, excellent post.
 
@Phoenix Thanks. For what it's worth, you can see the structure file size in the linked YouTube video
 
Oh, and, Welcome to PPCG!
 
@Mendeleev idk if I'd trust a tortilla based keylogger ._.
 
@HelkaHomba You can read the code
 
Hmm... this feels like cheating (even though it's noncompeting). Anyone want to look over it to see if it's valid?
 
2:14 AM
@Phoenix Thanks!! Hopefully future challenges won't be quite so time consuming, since I've leveled up my command block skills
 
@HelkaHomba it's only logging messages you're going to post in a public chat room, any way.
 
if you really want to see someone who knows what they're doing, you'll have to check out lorgon111's Minecraft command block mandlebrot set generator:
 
@Phoenix I know. I'm kinda joking, I see the code is not nefarious. But I'm sure I have typed or pasted things into this textbox that would have been embarrassing to send.
 
I have no challenges that could be interesting in Minecraft ;-;
codegolf.stackexchange.com/questions/106749/output-a-pretty-box might be interesting to golf, if wool and not ascii was used.
 
@Mendeleev Would you mind linking all of your super-simple questions (e.g. "Add two numbers together") so I can solve them in Decimal? One of them helped me find a fatal flaw in my language so I'd like to do the rest
 
2:21 AM
@MDXF Just go to my profile
 
@Mendeleev Do you only have challenges like that?
 
@Phoenix Graphical/drawing ones are the most obvious, but Minecraft can output to the console, so other kinds of more traditional challenges aren't off the table as well
 
But outputting to console is boring.
 
@Phoenix Well, if it requires a crazy redstone contraption to calculate the right value to output, it still might be worth it :)
 
@Mendeleev Got one of them done...
 
2:25 AM
@MDXF I see
 
Should I mark it as noncompeting? @Mendeleev
 
Hmm... "Generate chord charts for ukulele"
no, NOT TONIGHT! Later all, thanks for the warm welcome
 
go ahead
 
2:47 AM
@Mendeleev Have pretty much all of your challenges been featured?? Most have >2k views
 
No idea
 
(okay it's not all but one)
but still, that's quite a few
Nooo I'm #2 in the monthly league :( probably 'cause I haven't done anything for two days
 
3:15 AM
Is someone pen testing my Websocket..?
 
@ATaco Maybe
(I'm kidding, it's illegal)
I'd need your permission
If you'd like me to pentest it I'd be happy to
 
I saw a poorly formatted message come through.
 
I am trying out your userscript
 
I can see that.
 
...anyone else want this reopened?
2
Q: Dankify this string

Nathan PriceChallenge An ascii string is made 'dank' when a exactly one space is inserted between any two consecutive letters and all capital letters are replaced with lowercase ones. In this challenge I would like you to write a program that takes a string (not necessarily 'dank') as input and outputs a 'd...

 
3:23 AM
nice, so how does it work?
 
Pls... just let me post the answer I took a few hours writing...
 
Just uses a websocket because apparently Same Origin Policy doesn't matter to those.
If you're curious, the data being sent is, after connection a couple of objects with your Room ID, User ID and User Name, then, when you start or stop typing, just a single message to the server. When the serverside list for a room updates, it informs clients.
 
Come on, people...
> Differences: the string has to be converted to lowercase, all non-alphabetical characters have to be removed, there's no need for a trailing space.
@xnor What's your reason for hammering?
 
That's unneeded complexity.
It's a dupe imo.
 
> Unneeded complexity = dupe
 
3:34 AM
Really..?
I'm not discussing this.
 
3:55 AM
Well, it's reopened. :P
 
Anonymous
Not anymore
 
Anonymous
The differences are exceedingly trivial
 
4:15 AM
0
Q: Expand that Australian state

Steve BennettThere are 8 Australian states and territories, each with a 2 or 3 letter abbreviation: ACT: Australian Capital Territory NSW: New South Wales NT: Northern Territory QLD: Queensland SA: South Australia TAS: Tasmania VIC: Victoria WA: Western Australia Your task is to write a function/progra...

 
4:46 AM
My home has two wifi routers. One of them has good internet speed and the other is connected to the printer. #firstworldproblems
 
Quetion: should you put WIP projects on your resumé?
 
Anonymous
Why wouldn't you?
 
the project I'm thinking of doesn't really have a public website/any public infos yet so idk if I should put
I've described it though
 
@Mego What if they ask to see it and it's garbage.
@Downgoat You could put it on your website. Nothing fancy, just stick the files on vihan.org/p/
 
5:36 AM
0
Q: Do two numbers contain unique powers of 2

ATacoBreak two numbers up into their powers of 2, if they share any, return a falsey value. Otherwise, return a truthy value. If one input is 0, the answer will always be truthy. if one input is 255, the answer will be falsey if the other is not 0. Example Given 5 and 3 5 = 2⁰ + 2² 3 = 2⁰ + 2ⁱ B...

 
@Mego You are faster than me in both of the golfing languages I know XD codegolf.stackexchange.com/questions/124627/…
 
Anonymous
Ninja robot penguin
 
@Sherlock9 that's a link to my answer :P
 
Whoops
Meant to link to the challenge
Like so (since I can't edit at this point): codegolf.stackexchange.com/questions/124627/…
 
There are a few other languages in which this is two bytes still.
 
Anonymous
5:50 AM
I'm searching for a language with a one-byte NAND builtin :P
 
I was personally thinking | == + when writing it.
 
Dyalog APL has nand, but it is logical and not bitwise
 
I thought wise might have saved the day, but it lacks NAND.
 
6:14 AM
@KritixiLithos Maybe input may be input in binary :-P
 
Is Covfefe still a thing?
 
Hopefully not.
 
I sincerely hope not
 
Also, I am very happy with the results of I am Typing.
 
I turned it off
 
6:22 AM
Was there an issue? I'd like to know how to improve it.
 
no no, it's nothing to do with the extension
it's a bit creepy, that's it (as if we aren't already being monitored)
 
That's fair.
 
6:37 AM
I suppose it doesn't feel as creepy if it detects everyone, because you are watched no-matter what you do.
Shame I can't force TNB users to use my code.
 
@ATaco that's what's weird about the society we live in today
 
Discord already has it
I think iMessage, Hangouts, Allo, WhatsApp have
 
It's less creepy for me to force code upon you than to let you turn on the code.
 
Slack has it
 
Skype has it too, but skype is skype.
 
6:50 AM
@ATaco How do I use it?
 
If you've installed it via something like Tampermonkey, just Refresh and you should se who's typing/ show you'reself as typing.
Probably won't do much if no-one with the script is talking, for obvious reasons.
 
hmm...sorry this seems like privacy invasion
 
Anonymous
I would just constantly leave a single character in the text box to mess with people
 
you won't mess with me I've disabled it for now...
 
Idea; Language based on the lyrics to Daft Punk's Technologic.
 
7:09 AM
Last check before I post this. Any more suggestions? codegolf.meta.stackexchange.com/a/12662/47581
 
@Sherlock9 basically binary search?
 
Anonymous
It looks good to me
 
3
Q: Do two numbers contain unique factorials?

Greg MartinBreak two numbers up into their factorials; if they share any, return a falsey value. Otherwise, return a truthy value. (inspired by this recent question) In other words, write each input number as the sum of factorials (of positive integers) in the greediest possible way; return a truthy value ...

 
Thanks Mego
@LeakyNun What do you mean?
Sorry about the late replies. Having Internet connection trouble
 
@Sherlock9 well, I mean, it's just a binary search for r given n, right
 
Anonymous
7:19 AM
I don't think a binary search would be a particularly efficient solution
 
I don't see how you can do it more efficiently
 
That could work, but I've mostly been using the approximation of n * (log n + c) from the OEIS page
The trouble isn't just finding the r. It's computing P(r, n) efficiently
At any rate, going to post it shortly
 
I'd probably hold a list of cumulative probabilities of seeing at least n sides of the die, then evolve the system and count the iterations.
 
7:48 AM
1
Q: How high can you count in different languages?

Ole TangeBased on How high can you count? let us give an advantage to the polyglot people. Challenge: Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer 1, the second one 2 and so on. ...

 
8:02 AM
2
Q: Roll to see all sides!

Sherlock9Let's say you have a 20-sided die. You start rolling that die and have to roll it a few dozen times before you finally roll all 20 values. You wonder, how many rolls do I need before I get a 50% chance of seeing all 20 values? And how many rolls of an n-sided die do I need to roll before I roll ...

 
CMC: given two vectors, return their dot product
 
Hovering over the dot in the Dyalog IDE shows +.× as an example, which I believe answers the CMC
 
@Adám APL, 3 bytes: +/×
 
Right, both of you, but actually, what I was getting at was: Wouldn't it be cool to have HAL/S on TIO?
HAL/S, 1 byte: .
 
Anonymous
@Adám Actually, 1 byte: *
 
8:10 AM
HAL/S has quite a few nifty features I've never seen in other languages. Are there any other practical real-world use 2D programming languages?
 
@LeakyNun I can't believe it took me 3 minutes to figure out what that does
 
@LeakyNun Yeah, I was about to say you made a typo (slash being next to period).
 
@KritixiLithos that's the definition :p
it takes 2 bytes in jelly tho
 
@Adám I'm looking at some HAL/S code on the wikipedia article and wow
 
CMC: give two vectors, return the cross product
HAL/S, 1 byte: *
 
8:15 AM
Yeah, I would consider learning HAL/S if it was on TIO
 
@LeakyNun yay æ.
 
@KritixiLithos Me too, even just for the fact that it would run on a friggin' space shuttle.
 
HAL/S is also the only language I know of which overloads space (no pun intended).
 
"overloads space" how so?
 
Anonymous
8:24 AM
Naming a programming language HAL and putting it on a space shuttle seems like not the best idea
 
@KritixiLithos a space means different things depending on its arguments. E.g. if both left and right arguments are vectors, it makes a multiplication table. If the arguments are scalar, then it means regular multiplication. HAL/S doesn't have a symbol (other than space) for multiplication.
 
Nice trick with n
 
@KritixiLithos thanks
 
9:05 AM
@DJMcMayhem The "roll to see all sides" question is up codegolf.stackexchange.com/questions/124654/…
 
0
Q: Create a Parrot Program

MayubeGiven an input, output that input followed by a newline endlessly. Input will be a string consisting only of printable ASCII characters (0x20-0x7E) and newlines (0x0A). If input is length 0, endlessly output newlines. This is code-golf so fewest bytes in each language wins!

 
@NewMainPosts Concerned this might be a duplicate, probably should have posted to sandbox first for that reason.
 
Anonymous
The closest thing I can think of is the Truth Machine, but that's different enough IMO
 
9:30 AM
I'm learning Haskell right now, it's really weird
 
9:47 AM
yo @Okx you around? Playing around with fireball but I don't see any documentation on loops in the wiki, does it have loops?
 
@ConorO'Brien Sorry if this seems like I'm nagging, but are you done with the CPP version of Stacked yet? You said it'd be done ages ago.
 
Is there a shorter bit trick for turning off the lowest bit than ((N OR 1) XOR 1)?
I seem to recall there being one but I can't remember it
 
Language idea: a 2D language based on interweaving circuits
 
n-n&1?
 
10:02 AM
@KritixiLithos Unfortunately doesn't work for all numbers (4 & 3) == 0.
ah wait, I read it wrong
 
yeah, it's n - (n&1)
 
@Qwerp-Derp like Chip?
 
N & ~1
 
@Mayube Link please?
 
@JanDvorak Perfekt. Thanks!
 
10:04 AM
nice!
 
@Qwerp-Derp chip
@Qwerp-Derp it's also on TIO
 
Anonymous
@JanDvorak Only works with fixed-width ints
 
Mnyehh not really
 
@Mego false. Ruby can handle bitwise operations on negative numbers just fine.
 
Anonymous
@JanDvorak Even with Bignums?
 
10:06 AM
Yep
 
My language idea: it's a 2D language, with a bunch of circuits, which are really just "wires" with an input and output
 
Bitwise operations don't become undefined past 64 bits :-D
 
You can "reference" other circuits along the way
 
Anonymous
@JanDvorak Well sure, but it's a lot more complicated to do with bignums
 
And bits will get sent from the main circuit to the referenced circuit
 
Anonymous
10:07 AM
Granted everything is more complicated with bignums
 
Not if they're stored in base 2**n
 
And then the referenced circuit will run
And output a value
 
Anonymous
@JanDvorak But that's inefficient
 
Which is then spat out the other side of the reference
 
Anonymous
@Qwerp-Derp Sounds like Marbelous but with circuits
 
10:08 AM
What do you mean? I would store my bignums as base-2**32
 
@Mego Does it? Huh
 
or similar
 
Anonymous
@JanDvorak Oh I misunderstood what you meant
 
If you store your numbers in base-256, you can perform bitwise operations digitwise.
 
This is a sample circuit thing
┌────┐   ┌─┐
│main├─&─┤@│
└────┘   └─┘
It takes two bits, and ANDs them together
 
10:15 AM
0
Q: Dodge your death!

Qwerp-DerpIntroduction "Muhuhuhahahah!" The mad scientist laughs. "You're trapped in my own little game!" In front of you is a deadly pit of snakes, while behind you is a bottomless chasm. There's no way out, you're stuck! "Two steps in front of you is the snake pit, and two steps behind you is the chas...

 
Okx
@Mayube Fireball is kinda abandoned - I wasn't very happy with the way it was coded, I'm currently working on Neim. The only thing that could be considered a loop is the for each token.
 
@Qwerp-Derp Reminds me of funciton
 
It does, I'm drawing a lot of inspiration from it
 
@Okx ah okay, was just looking through some of the random languages in TIO and hoping to use a lesser-used one to answer the parrot program challenge
 
You can also interweave different circuits, so it'll look like a maze of circuits
 
Okx
10:17 AM
Yeah, sorry
 
I might post this as a challenge for people to make an interpreter for
 
I found Arcyóu now though and it has potential, although it seems unfinished and there's a lot of unexpected behaviour
 
@Qwerp-Derp Did you look at Funciton's parser? It's rather complex to parse these graphical languages.
 
Okx
@Mayube Since Neim is pretty good at integer manipulation (one thing being it can represent all numbers 0-174 with a single byte), I might make one good at string manipulation
 
I might make a more complete superset of Arcyóu to practice my new-found knowledge of proper interpreters.
 
10:30 AM
    >-1-!-1-[*l]
    |
[l]-%
    |
    >-0-!-[/l]

[main]-[*l]-[/main]
This is a truth machine in my language
[main] is the main circuit
[l] is the looping circuit
Exiting out of a circuit is [/{circuit name}]
You can "call" another circuit by [*{circuit name}]
 
Anonymous
@Qwerp-Derp Wouldn't just embedding [l] into [main] be shorter and simpler?
 
Hmm, yeah it would
But this is for demonstration
 
Anonymous
Also needs more box drawing characters
 
does it have tail call optimization or will it run out of memory?
 
Hmm, yeah
I'm still planning the language, might make a repo soon
 
Anonymous
10:35 AM
Call it Circuitous
 
    >-0-!-[/l]
    |
[l]-%  [main]-[*l]-[/main]
    |
    >-1  >-[*l]
       | |
       !-1
is this ok
 
or Sir Cuit
 
Sir Kit?
 
Sir Cute
 
the language looks like funciton
lol
 
10:37 AM
@betseg Yes that's fine
 
Anonymous
It is very reminiscent of Marbelous as well
 
In fact you can overlap circuits, but I need to add specs for that later
 
Okx
Sir. Cut is not a permutation of Circuit 0/4
 
10:53 AM
1 basically pushes a 1
0 pushes a 0
 
Okx
@Qwerp-Derp Jaw drops open
 
% is a splitter - if the result is a 0, you move up (or right), if the result is 1 you move down (or left)
^v>< are directional pointers, you change your movement to that direction
Yeah that's basically it
 
@Qwerp-Derp or maybe make % change the rotation of the wire by either 90 degrees clockwise or 90 degrees anticlockwise.
 

« first day (2319 days earlier)      last day (2517 days later) »