« first day (2358 days earlier)      last day (2479 days later) » 

12:11 AM
CMC: Write a valid C11 expression using only the variable c (a char), constants, and built-in operators such that c == 'k' evaluates to 1024, 'M' to 1048576 (1024*1024), 'G' to 1073741824, et cetera for T, P, E, Z, and Y.
 
12:43 AM
0
Q: Ordered sequence of ascending integer combinations

CJ DennisWrite a program or function to produce the following output in the correct order. Take an non-negative integer input n. The first line is always -, even for n=0. If the current line is -, the next line is 1+2+ ... n- n=4: - => 1+2+3+4- If the last integer is equal to n, remove all integers ...

 
-1 offtopic
 
@totallyhuman bottom way of course
 
@DestructibleLemon there :P
 
@Mendeleev you will be happy to hear this: default type in VSL is a Duck :P
 
12:56 AM
Mendeleev will not be here for months
 
That doesn't mean he can't get and read the notification though :P
 
Oh you still get notified?
Didn't know that
 
I think so?
I don't know, I can't remember from back when I had my 1 week full PPCG suspension.
 
Either way, I don't wanna find out
 
lol true
 
1:00 AM
@totallyhuman D: what happen??
 
-7
Q: Very long chat suspension for harmless joke

MendeleevAs usual, I was going about my day, occasionally stopping by SE chat. I replied to this message by @cairdcoinheringaahing ("I really need to stop clicking on every link that is posted") with this other message ("@cairdcoinheringaahing Try this one") as a joke. The link was a rickroll. I was prom...

 
@HyperNeutrino :( 1 year is... ouch
 
exactly
it's a bit harsh to jump from 1 week to 1 month to 1 year but eh, some people don't learn
 
though for a rickroll...
 
0
A: Sandbox for Proposed Challenges

HyperNeutrinoKoTH: Last Bot Standing king-of-the-hill python For this KoTH challenge, you are to write a Python bot that will try to crash or terminate the other bots. The bots will all be started from separate terminal instances in the same directory. There will be a file called signal.txt. It will be empty...

 
1:09 AM
I agree that it's a bit of a strong punishment for a rickroll, which I'm sure all of us have done more times that we'd admit and far more times had it done to us than we'd like to count, but as Dennis says, long suspensions are hardly ever given out for single messages; it's usually a lack of learning or a lack of a change in behavior from the user that causes long suspensions.
Like I was part of a face chain started by Mendeleev and me that wasn't spam when we started it but became kinda spammy (though in retrospect was off-topic anyway) and I only got a one minute kick because I haven't b
>< at least on my display, the last line becomes "see full text" but when I expand it, the size doesn't change at all... you could just display the whole thing in the first place SE ><
 
I don't see the full text.
 
Maybe your display is larger than mine? :P I'm using a Chromebook right now because my laptop's wifi isn't working again.
roughly 26x14cm
 
Definitely not larger. I'm on my phone.
 
oh lol
hm maybe phones just show it all automatically? idk
 
Might have a higher resolution though.
 
1:13 AM
that's a possibility...
 
I had to expand it and I have a 1440p monitor
 
1366x768
 
But I'm not using desktop mode, so it's capped.
 
^^^ same 2880x1440 but in 1440x900 HiDPI mode
 
1440 x 2560 but the browser sees 412 x 732.
.oO(Why does my 6" phone have a higher resolution than my 50" TV?)
 
1:20 AM
wait what
 
@Downgoat how hard is it to add a domain name to a droplet on DO? >:U
 
What do you mean by add?
 
nvm I'm an idiot
like
I forgot to click save
>_>
 
@Riker what are you try to do? do you need a droplet?
 
1:35 AM
I need droplets to live
But I think that's water though
 
So nobody wanted to try my CMC?
 
Also Unix time 1500000000
 
@totallyhuman gasp I could've missed it! Thanks for the notification
 
:o
sigh "only" 3000 seconds left ><
 
1:53 AM
@LegionMammal978 You have a CMC
 
2 hours ago, by LegionMammal978
CMC: Write a valid C11 expression using only the variable c (a char), constants, and built-in operators such that c == 'k' evaluates to 1024, 'M' to 1048576 (1024*1024), 'G' to 1073741824, et cetera for T, P, E, Z, and Y.
 
o
Well, IDK C
 
Now that I think about it, it only has to support k, M, G, T, P, and E because of 64-bit limits
@Phoenix I mean, it's pretty much just standard arithmetic and bitwise operators
 
@totallyhuman There are so many digits I went to wolfram|alpha to spell it out for me rather than figuring out that's around a billion by hand. ._.
 
I mean (Python-ish code) it's just lambda c:1024**'kMGTPE'.find(c)
 
1:57 AM
I've been golfing in Ruby for a while now, and I still don't know how to call lambdas.
This actually saved me bytes one time when the complete program solution ended up shorter.
 
hey I finally made my language no longer use the jelly codepage
 
@LegionMammal978 #define == & 0 + (1024 - (int) 'k') + (int)
 
@Downgoat As in, if c == 'k', then your expression evaluates to 1024 using c's value
 
are chars ints in c
 
@HyperNeutrino They are standard integer types capable of containing at least the execution character set
 
2:07 AM
yay
can we assume an encoding
 
ok
hm will think about this
 
Of course, you'd have to account for standard type promotions
 
hm?
sorry I'm near sighted so I can't C well and I can't C# either
(sorry that was bad :P)
 
You've gotta C%
 
2:13 AM
what
cpercent?
 
Or maybe C@
 
cmod?
cat? :P
 
C* perhaps?
 
yes. I can't C well and I can't C# because I can only C*s
lol
so... charcoal is still like 50% the size of paintbrush every time >.<
what am I doing wrong lol
wait I spot outdated code
that can now be golfed
ehh too lazy
anyway gtg now, wifi dies soon
have fun with 1500000000 :D o/
 
2:25 AM
Like, 900 seconds left
500 seconds!
 
huh, apparently download over Wifi take 1hr+ but over ethernet take a total of 2 minute
 
150 seconds
 
wifi is also AC so supposed to be like 1.3Gbps
 
@Downgoat Ethernet tends to work like that.
 
You should really be using the NIST site, @Phoenix
 
2:38 AM
@LegionMammal978 How do I set the NIST site to Unix time?
 
@Phoenix It's at :40:00
 
K
:40:00 pacific time
It's 1500000000 unix time!
 
As of the posting of this message, there have been precisely 1.5 billion seconds (excepting leap seconds) since 1 January 1970, 00:00:00 UTC.
14
 
Incoming unix time related challenge
 
@Phoenix lol, your Unix countdown site has gone negative
 
2:41 AM
Uh, I don't think you realize which site I was using.
I was just using epochconverter.com/clock
 
Nice
 
The Results of the raycast test.
This is a language with no 3D support, and almost no graphics acceleration.
If they 90's can do it, you know damn well so can I.
 
2:56 AM
@ATaco oh you used python? :P
 
@ATaco are you making a game?
 
What happens when a sentient taco, a sentient goat and a sentient lemon meet
 
@Downgoat Lua ;)
@DestructibleLemon Nope, just a tech demo.
 
why not make game?
 
I don't know how I'd make it stand out.
 
3:11 AM
Does it all explode
 
Probably not.
 
@ATaco game feature: throw fish and tacos at everything
 
why fish
 
Because then you can thank them for all of them
 
3:23 AM
Even though there are "3D" graphics, there is no actual 3D anything.
 
but what
also is it just me or do the walls look curved?
@ATaco is that a glitch?
 
3:39 AM
It's a uh, oversight.
 
sorry to be that guy
 
A mathmatical imperfection.
 
forget a ^2 ?
or something?
 
Nope, some math I need to do.
 
its probably got the number 2 in it
 
3:41 AM
More likely $\pi$
 
hmmm
so, what exactly is the issue
also I would like to discuss the compiler chain thing?
 
#MATH
Also, literally nothing stopping you from continuing the next link in the chain.
 
ye
except procrastination
 
4:07 AM
hmmm
we need a new koth
and it needs to be language agnostic or have its own simple lang
 
I really want a new cops and robbers
Or answer chaining
I wish we could do the languages quiz again. I missed it the first time and it looks really fun.
 
@WheatWizard hey, I can make a simulator for that
while 1: print("foo")
 
@WheatWizard I've got one in the sandbox
1
A: Sandbox for Proposed Challenges

DJMcMayhemMake your language mostly unusable cops-and-robbers arithmetic Inspired by this comment... In this challenge, you are tasked with running some code that makes it so that your language no longer satisfies our criteria of being a programming language. In that challenge, that means making it so...

Thoughts?
 
For your example there is an easier crack
del print will fix it
Not really a problem just something I noticed
@DJMcMayhem Try it online!
Oh is that the "I wont spoil it bit"?
 
4:29 AM
0
Q: Finding the index of the corrupt array?

amod0017What will be the best solution to this question? (Less than O(n)) Given an array of positive integers where successive elements increase by 1 (except for a single element that does NOT increase by one--the start of the "corruption"), return the index of where the corruption starts. Example 1: ...

 
@WheatWizard There are so many ways to crack that it isn't even funny
Originally, I was thinking of __builtins__
 
4:50 AM
@DJMcMayhem I'm not sure about the scoring method. Most safe answers doesn't mean any of the answers has to be particularly good; there only has to be a whole lot of them. Personally, I'd go with code golf, as making a short and safe answer should be pretty hard.
 
Hmm, ok good thought
I was also thinking you can score on length of the crack, longer is better for the cop
 
Not sure about I/O. Having to disable STDOUT and STDERR and exit codes and drawing on the screen etc. makes writing a good cop harder, but might become tedious rather quickly.
 
0
Q: Finding the index of the corrupt array?

amod0017What will be the best solution to this question? (Less than O(n)) Given an array of positive integers where successive elements increase by 1 (except for a single element that does NOT increase by one--the start of the "corruption"), return the index of where the corruption starts. Example 1: ...

CMC: find the index of the corrupt array
[5, 6, 7, 8, 12, 13] gives 4 and [5, 2, 3, 4, 5, 6] gives 1
 
@Dennis What it cops have to reveal their intended IO format?
 
@LeakyNun In1i1
@DJMcMayhem If the robbers have to match it, that would keep the challenge diverse without overcomplicating things.
 
4:59 AM
@LeakyNun Is the array guarenteed to be corrupt?
 
2
Q: Complex Dice Rolling Expressions

MegoBackground I play D&D on a regular basis with some friends. While talking about the complexity of some systems/versions when it comes to rolling dice and applying bonuses and penalties, we jokingly came up with some additional complexity for dice rolling expressions. Some of them were too outrag...

 
@Dennis That sounds good
But lots of the IO methods are for functions, so I'd have to specify that doesn't work
 
@WheatWizard yes
 
5:17 AM
@LeakyNun Javascript, 32 bytes. a=>a.findIndex((x,y)=>x!=y+a[0])
(0 indexed)
 
@ATaco != is logically equivalent to ^ or -
mind the + in the y+a[0] though
 
Smart thinking.
Javascript, 31 bytes. a=>a.findIndex((x,y)=>x^y+a[0])
(Both operations would take precidence, because left-right evaluation, and bitwise > addition/subtration)
 
both operations?
if you use - it would be x-y-a[0]
 
It would calculate as (x-y)-a[0], wouldn't it?
 
yes
I'm just saying that you need to change the + to -
 
5:22 AM
Ah, you're right.
Well, bitwise is safer anyway.
 
CMC: given a doubly odd integer, factorize it into doubly odd primes/square of primes
doubly odd integers are integers of the form 4x+1
 
@Dennis Woah, Jelly representable entirely with ASCII
 
@LeakyNun So N where N % 4 == 1
 
@DJMcMayhem yes
oh, and it's guaranteed to be possible :p
 
example?
 
5:37 AM
Kritixi Lithos?
 
yes
 
85 -> 5 x 17
45 -> 5 x 9
doubly odd (primes; if not prime then square of primes)
 
Wait, isn't N, 1 always a valid answer?
 
@DJMcMayhem N isn't a prime/squared-prime
 
But it's a doubly odd number
Oh wait
I see
@LeakyNun Does the same approach generalize to 2kn + 1 for other k?
Obviously it does for k = 1
 
5:50 AM
@DJMcMayhem I don't know
well, if a prime is odd but not doubly odd, then its square would be doubly odd
 
But what about triply odd? 6N + 1
 
triply odd would be 8N+1
 
Nah that'd be Oddly Oddly odd.
 
@ATaco that would be very odd
4
 
@LeakyNun That would be qaudruply odd I think
 
6:08 AM
@Downgoat I'm not sure if you already know, but sometime ago ETH was saying how stack snippets were borky (while editing the answer that contained the snippet) in the PPCG userscript
 
@DJMcMayhem 8= 2^3
 
Depth of Oddity isn't defined by log(2,n)
 
3
Q: Shoes for seahorses

bushdid911Seahorses, of course, need shoes. However, a seahorse, having just one tail, needs just one shoe. Unfortunately, the shoes only come in pairs. Money is tight for the seahorse government, so they need to buy as few pairs as possible. Each seahorse has a shoe size x. However, a seahorse can wear a ...

 
@ATaco why wouldn't it be?
 
6:15 AM
My mistake, depth is, oddity itself is not defined by log(2,n)
 
So oddly oddly oddly ... odd is defined by depth of 2^n where n is the count of oddly's (-1?), then the oddity of each oddly is defined linearly, so we have a psudo-binary oddity.
 
> the iddity
 
No-one pays me to spell.
 
your definition seems to have changed somehow
 
6:18 AM
I did say "My mistake"
 
7:05 AM
@ATaco how goes your graphics raytracing thing?
 
Decide to make it stereo-graphic for a test.
 
@ATaco put a crosshair or something
so that you can align them better
put a frame around the outside of each view at least
 
It was just a test, naught but a few lines of code.
 
also the things look a bit off, a bit flat
btw
 
Yeah, scaling's a bit weird.
It's one number to squish everything atleast.
 
7:27 AM
I need to make a new koth but what would it be?
;_; I have no ideas
 
8:01 AM
2
Q: Output the n-th Bell Number

bushdid911A Bell number (OEIS A000110) is the number of ways to partition a set of n labeled (distinct) elements. The 0th Bell number is defined as 1. Let's look at some examples (I use brackets to denote the subsets and braces for the partitions): 1: {1} 2: {[1,2]}, {[1],[2]} 3: {[1,2,3]}, {[1,2],[3]},...

 
8:31 AM
Can't wait to arrive home and get my laptop back and answer some good challenges :P
I am really poor (on rep) this week :/
@DestructibleLemon Consider making a CnR instead, it is easier than KOTH
 
8:57 AM
0
Q: Code Golfinator-3000

MayubeAs everyone knows, adding inator-3000 to the end of any noun makes it way cooler. But what else can make a word cooler? Given a string as input, output the coolness of the word. Calculating the coolness There are 4 elements to calculating the coolness of a word. The word itself. The base sco...

 
i have a problem i want to post but i have a feeling it's too hard, I wasn't able to solve it at all until someone explained it to me regardless of golfing
It is widely known that Santa Claus delivers presents to houses all over the world in December. However, not many people know what he does during the rest of the year. You see, Santa enjoys a jolly good prank, and he'll often find himself pranking entire cities when he's not busy making or delivering toys.
One place that he particularly enjoys pranking is the South Pole. There are h houses in the South Pole, which are conveniently numbered from 1 to h. Whenever Santa is in the mood for pranking, he'll start at a particular house, s. He rings the doorbell, then runs to another house.
The first line contains two integers, h and d
(1 ≤ h ≤ 100,000; 1 ≤ d ≤ 100,000), representing the number of houses and the number of days that Santa pranked the South Pole that year, respectively. The next d lines each contain three integers, s, k, and p (1 ≤ s ≤ h; 2 ≤ k ≤ 10; 1 ≤ p ≤ h), denoting the starting house, the number representing his frequency of visiting houses (he skips k-1 houses), and the maximum number of houses he pranks that day. Note that he will visit p houses unless he passes the very last house.
Output g, where g is the house number that should receive the biggest and best gift (the house that got pranked the most).
 
@bushdid911 what is your intention?
language?
 
9:32 AM
woah wall of text
 
9:48 AM
hi all
@bushdid911 do you know about the sandbox?
 
-10
Q: How can you make your website more professional?

user72199When e-commerce becomes more and more important on these days, a website is an essential for any company. To get access to new customers, you will need an attractive website and easy to use. In case you want to have a professional website, but you don’t have enough time or resources to build one...

please downvote and flag spam
 
@LeakyNun We cleared that up quickly :)
 
nice
 
any thoughts on why codegolf.stackexchange.com/questions/132240/… is getting downvotes?
and what I can do about it?
 
@Lembik people don't like it
@Lembik move on
life is simple
 
9:56 AM
:)
 
@Lembik Only thing I can think of is that it is very restrictive but I enjoyed that about it because I had to find some less than standard ways to accomplish it.
 
@TheLethalCoder C#inator-9999
 
@Mayube Haha! It's a right beast, I'll look into shortening it later.
Good challenge by the way, it's harder than it looks as you start trying it.
 
Thanks, I thought of it while walking to work this morning
Also I totally wanna turn this into a 2d language
 
@Lembik I have a 44 byte HTML/JS solution, idk if i should post as a separate answer
@Mayube isn't it going to be like inherently random
 
10:06 AM
It just looks to me like a nice clean programming challenge!
but what do I know :)
@ASCII-only why wouldn't you?
 
CMC: given a 3-smooth number, output the next 3-smooth number
a 3-smooth number has all its prime factors at most 3
 
@TheLethalCoder thanks
 
@EriktheOutgolfer here's my algorithm:
If I'm not missing anything about my own problem (hopefully not...) you can sort it and then try to pair each element with the element immediately right of it. So if you have 4 1 4 9 1 8 9 1 8 4, you sort it to get 1 1 1 4 4 4 8 8 9 9, then pair 1 and 1, then the 1 is a singleton, then 4 and 4, 4 is a singleton, 8 and 8, and 9 and 9, to get 6. Maybe there is some case I can't think of, I'm new to this — bushdid911 4 hours ago
 
@ASCII-only I'd change O to just drop straight down, and then it's only random if you use ^
@LeakyNun is there an OEIS for that?
 
10:09 AM
can my challenge actually be solved in python?
 
@Lembik which?
 
@Lembik the keyboard one? probably
 
@Lembik oh, not interested :p
 
@ASCII-only some (most?) of the current answers don't actually work it seems
 
10:10 AM
22
A: Polling the keyboard (detect a keypress) in python

S.LottThe standard approach is to use the select module. However, this doesn't work on Windows. For that, you can use the msvcrt module's keyboard polling. Often, this is done with multiple threads -- one per device being "watched" plus the background processes that might need to be interrupted by t...

 
@LeakyNun you have no interest in writing a game where pause is shoot and right Windows key is move right? :)
 
@Lembik example?
@Lembik also does the current html+js one work
@Lembik because it's the same as the current one just with useless parts removed
 
codegolf.stackexchange.com/a/132330/9206 (Running it in DOSBox and pressing some random key (some of which is a special key but note that as a Windows process DOSBox can't capture all the keys))
and ... codegolf.stackexchange.com/a/132251/9206 says that some keys don't work properly or haven't been tested
Can anyone with linux test if codegolf.stackexchange.com/a/132244/9206 works please?
In a VM it doesn't seem to
 
@LeakyNun Hmm...and then I see a <3
 
codegolf.stackexchange.com/a/132288/9206 says "PrtScn -> not verifyable" "
 
10:14 AM
(no pun intended)
 
@Lembik for me they work fine
 
@ASCII-only you mean the bash one works for you?
 
@EriktheOutgolfer well, two seahorses can be paired if their shoe size differ no more than 2
in other words, <3
 
right and then non-negativity is implied
 
@Lembik no i meant the js one should work for every key
@Lembik testing the bash one in WSL, hang on a minute
 
10:15 AM
as I said in my comment, you may want to prepend an to my golf in that case but for me it did work without it for some reason
 
@ASCII-only thanks. I am not sure how to test the JS one
 
@Lembik there's a link near the bottom, if you want i can post my answer as a stack snippet
 
@ASCII-only it takes me to codepen.io/anon/pen/MoLPQM
but then what?
I mean I have to run something so I can test it
 
@Lembik click on the white thing at the bottom to make sure it's focused, press random keys
 
@ASCII-only thanks.. so it fails with PrtScn
where it attempts to print the screen
hence "PrtScn -> 44-0 (not possible to verify it with codepen though)"
also F12 etc.
the problem is that isn't capturing the keyboard
 
10:20 AM
@Lembik is it fine if it shows the alert before doing printscreen
 
oh tab fails competely
 
otherwise that's more bytes :(
 
@ASCII-only Tab gives nothing
@ASCII-only "It shouldn't carry out any other action from the key presses it receives and it shouldn't output anything apart from the unique identifier."
does Tab work for you when you test it?
 
no :(
and printscreen can't be disabled
oh well
 
why doesn't tab work?
I mean the question claims it does
 
10:23 AM
tab is browser reserved for switching between fields, you can make it work but it doesn't by default
 
got you
how did you get on with the bash answer?
 
:| i can't even get xev to work haha
wait it isn't installed yet
also forgot WSL doesn't come with X11 so i'll have to wait a while
 
ah yes
 
hmm.. in python if I have a list of bools, I can use if True in array to check if at least one of the bools are true, right?
 
@Mayube yeah
 
10:29 AM
@Mayube or you can just say any(array)
 
@Mayube if any(array) should work as well EDIT: damnit ninjad
 
oh that's even better, thanks guys
 
someone here must have linux surely
 
i do :P but i'm not using that laptop right now
 
ah ok
I think I am going to have to dual boot this windows machine
it's painful to be without linux and VM linux != linux
 
10:32 AM
i tried getting linux on my new laptop and it didn't like it
 
@ASCII-only interesting! I used to enjoy solving problems like that
 
it was mostly ACPI settings were being annoying + my laptop was a bit broken
 
@ASCII-only partly by reporting the right bugs
 
so like 90% of every bootup i got this weird screen glitch on the bottom half
 
@ASCII-only that's bad! You should report it
 
10:34 AM
@Lembik well idk, it happened (with less frequency) in Windows as well, I think it may have been the connector being partly detached? but that doesn't explain the difference in frequency
 
ah!
 
which is why I use cloud9 for most of my linux stuff now
 
interesting.. what do you think of codio?
if you happen to know it
 
@Lembik it's paid :(
plus more education/class-oriented
 
Anonymous
10:41 AM
@Lembik You could use WSL
 
35 mins ago, by Leaky Nun
CMC: given a 3-smooth number, output the next 3-smooth number
 
@Mego IIRC Lembik doesn't have Windows 10
 
@LeakyNun I'll answer in the APL room.
 
Anonymous
@LeakyNun Actually, 14 bytes: ╗1⌠;yM3≥@╜<*⌡╓
 
Anonymous
Smallest non-negative integer whose largest prime factor is less than or equal to 3 and is greater than the input
 
10:51 AM
@Mego why don't you start from the input?
 
Anonymous
@LeakyNun always starts from 0. It's shorter to do that than to try to count up from the input, unless I missed an optimization.
 
Anonymous
I did indeed miss an optimization. 11: ;WXu;yM3<WX
 
@LeakyNun Jelly, 9 bytes: ÆfṀ<4µ2#Ṫ
 

« first day (2358 days earlier)      last day (2479 days later) »