« first day (2287 days earlier)      last day (1923 days later) » 

6:00 AM
CMC: available operations: assignment (1 point), NAND (1 point). task: all variables are 8-bit. implement bit-shift to the left by 1.
e.g. 01100110 becomes 11001100
 
YAY!!! TYVM!
 
@LeakyNun What about 10101010?
 
the leftmost bit is discarded
btw constants can only be used in assignments
:37155026 the input is stored in the variable i
the output must be stored in the variable o
available operations:
[variable_name] = [constant]
[variable_name] = [variable_name] NAND [variable_name]
both lines are 1 point
 
Can we declare other functions? Gotos?
 
there are no other functions available
no loops
btw I'm not sure if it is possible lol
I don't think it's possible, because each bit is basically independent under my allowed operations
so I need to come up with a better challenge
 
6:08 AM
> implement bit-shift to the left by 1.
So multiply by 2
 
yes, but I just showed that it isn't possible
I think it would be possible if we include jnz (jump-if-not-zero)
 
6:21 AM
o = 11111111

a = 11111110
b = 11111101
c = 11111011
d = 11110111
e = 11101111
f = 11011111
g = 10111111

n = 11111111

i = i NAND n

k = i NAND a
JINZ k TOTAL_A
::TOTAL_A_END

k = i NAND b
JINZ k TOTAL_B
::TOTAL_B_END

k = i NAND c
JINZ k TOTAL_C
::TOTAL_C_END

k = i NAND d
JINZ k TOTAL_D
::TOTAL_D_END

k = i NAND e
JINZ k TOTAL_E
::TOTAL_E_END

k = i NAND f
JINZ k TOTAL_F
::TOTAL_F_END

k = i NAND g
JINZ k TOTAL_G
::TOTAL_G_END

JINZ n OUTPUT

::TOTAL_A
k = 00000010
o = o NAND k
JINZ n TOTAL_A_END
(The TOTAL_A_ENDs should be replaced with their respective letter)
63 Points, if you're curious.
Counting Jumps as 1 point.
It's simple enough, takes each bit, if it's on, flip the one to the left of that on in the output.
 
Anonymous
@HelkaHomba There could very well be a signal that didn't even get started because the user didn't bother trying to cut through the noise.
 
@ATaco thanks for doing my challenge lol
 
Yay, Recognition!
 
@ATaco oh no, red team is winning much
 
6:43 AM
Charcoal: What if a there was a golflang for ASCII-art that's slowly becoming less ASCII-art focused?
 
Hey! Finally reached the benchmark of 1000 rep! With the help of my old friend, HTML!
I am really happy!
(PS : I find that HTML solution, which is linked with my first comment above, really cool!)
 
@Arjun are you new to this chatroom? If so, welcome.
 
Anonymous
@Arjun Please stop with the excessive promotion of your posts
 
7:04 AM
J: |/|/H.a.t:&i:f.&A.L:l.&L.e.T.t:E.r.s:&H.a.D.&D:o.t.S:?
 
@Adám why does your name has an acute accent?
your profile says that you are from London
 
@LeakyNun Doesn't mean he's of English descent though
 
@LeakyNun I don't see the connection :-)
@ASCII-only True, I'm Danish.
 
@ASCII-only I see
@Adám I thought Danish has no acute accents
only Æ, Ø, and Å
 
@LeakyNun It is because the Hebrew name Adam אָדָם has emphasis on the last syllable while Danish stresses the first syllable of Adam. Acute accent is used in Danish to indicate stress.
 
7:09 AM
@Adám does any Danish native word have actue accents?
 
@LeakyNun Acute accent is often important in written danish as many words are otherwise spelled the same.
 
@Adám you speak Hebrew also?
 
Whoa, I broke chat.
@LeakyNun E.g. in Danish én means one, while en means a.
@LeakyNun Yes.
 
@Adám oh TIL
@Adám I see
@Adám why did you use niqqud?
 
@LeakyNun Because copying from en.wikipedia.org/wiki/Adam was faster than switching keyboard.
 
7:19 AM
@Adám oh heh
 
The Danish and Norwegian alphabet, called the Dano-Norwegian alphabet is based upon the Latin alphabet and has consisted of the following 29 letters since 1917 (Norwegian) and 1948 (Danish). (Listen to a Danish speaker recite the alphabet in Danish.) The letters c, q, w, x and z are not used in the spelling of indigenous words. They are rarely used in Norwegian, where loan words routinely have their orthography adapted to the native sound system. Conversely, Danish has a greater tendency to preserve the original spelling of loan words. In particular, a 'c' that represents /s/ is almost neve...
 
@Adám thanks
 
@LeakyNun How did you even know that the ⊤⊤ is niqqud?
 
@Adám I know some basic Hebrew orthography
 
@LeakyNun Nice. Btw, the Gemara is written in a strange Hebrew/Aramaic with a structure is much like a programming language. Complete with reserved keywords and control structures.
 
7:23 AM
@Adám I know next to nothing about Judaism though, sorry
 
hmm, turns out the power programming is slightly more complex than I realised. what I mean is that getting input once only may be annoying
also in python you have to declare the variable
so that complicates my approach
 
:O why have I been getting so many upvotes these past few days
 
@ASCII-only should we counter some?
 
wait: I can use a predeclared variable
namely: max
(which is a function)
um. now I just need to come up with the operations...
 
7:42 AM
@Adám Ah, I finally understand the meaning of én
 
halp. would [0]*2**int(input()) be 2^n time complexity?
 
@DestructibleLemon I don't know, but printing it sure is.
(refer to my answer)
 
@DestructibleLemon yeah
 
@LeakyNun golf: use max
instead of print
or min
I won't judge
 
CMC: given positive integer n, add 1 if odd, minus 1 if even (hint: n XOR 1 doesn't work)
@DestructibleLemon thanks
 
7:47 AM
hmm
 
@LeakyNun JS, f=a=>a+a%2*2-1
 
Braingolf, 2,%?1+:1,-|
 
@LeakyNun nice hint
 
@JanDvorak thanks
 
I think anyway, should probably test
wait it'd be .2,%?1+:1,-|
oh nice endif isn't necessary if it's the last char in the code, that's nifty
so I guess it'd be .2,%?1+:1,-
 
7:51 AM
@Mayube link to language?
 
@Mayube typo: confusion between its and it's
 
Seems like it could be shorter
 
@ASCII-only doesn't work
f(1) gives 0
 
ooh, I got it nvm
 
7:56 AM
@LeakyNun it's is correct, it's refers to it is, its refers to possesive
 
> "Flip" - Causes the next diadic operator to swap it's 2 values. (Eg 2 / 4 becomes 4 / 2)
to swap it is 2 values?
 
oh right thought you meant in my message earlier :P
 
JS, f=n=>(n+1^1)-1
 
@KritixiLithos nice
but the byte-count is the same
@Downgoat hi
 
@LeakyNun fix'd
 
7:59 AM
alright
why "fix'd" instead of "fixed"?
 
couple pixels shorter
 
sure
 
I have an answer now too, that I will soon submit. however it is disappointingly long
 
@mbomb007 Huh? I've been busy, that's why I didn't do that yet. No need to remind me every now and then.
 
@EriktheOutgolfer BTW I outgolfed you in ><> in that challenge
 
8:04 AM
@LeakyNun golf it already!
 
@DestructibleLemon nah it's just 4 bytes shorter
 
42 bytes
 
and the graphics is less nice
and there's no guarantee that the command will be executed
 
int a(int n){return n%2==0?--n:++n;}
I *think* that's as short as C# gets for this one, 36 bytes
 
certainly not the shortest
 
8:06 AM
^ yup
 
Did anyone suggest -(-n^1) yet?
 
@feersum oh that's nice
I feel stupid for not coming up with that
 
@LeakyNun fairly sure that it is not only defined behaviour, but that the behavior of lang is the implementation not the spec anyway
@feersum is that correct? or should it be ~?
 
@Mayube for one, you can do n%2<1 instead
 
No, it doesn't work with ~.
 
8:08 AM
@DestructibleLemon that is correct
>> f=n=>-(-n^1);[f(1),f(2)]
<< Array [ 2, 1 ]
 
I'm a little confused. doesn't - not affect the last bit?
 
@LeakyNun Firefox?
 
@KritixiLithos yes
 
I use Google Chrome
 
@DestructibleLemon That's right. XORing with 1 does, though.
 
8:09 AM
@DestructibleLemon 6 = 00000110, -6 = 11111010
 
@feersum but why does it not come out to the same thing as just regular xoring with one?
 
1
Q: I have some problem that i am sending email verification link with SMTP but that is now working so resolve that problem

shivapublic function sendEmail($email) { $mail=base64_encode($email); //configure email settings $config['protocol'] ='smtp'; $config['smtp_host'] ='mail.google.com'; $config['smtp_port'] ='465'; $config['smtp_timeout'] ='7'; $con...

 
@DestructibleLemon 6^1 = 00000111, -6^1 = 11111011
 
-n == ~n + 1
 
if - doesn't affect the last bit, why does it not do the same thing as xoring when xoring doesn't affect the other bits
 
8:12 AM
The adding 1 part of -n can carry from the last bit into the others.
 
oh right
 
@KritixiLithos BTW I saw it and I won't copy.
 
Please refrain from posting any more submissions to my CMC now. You can still discuss the existing solutions.
 
0
Q: Swap the parity

Leaky NunTask Given a positive integer n, output n+1 if n is odd, and output n-1 if n is even. Input A positive integer. You may assume that the integer is within the handling capability of the language. Output A positive integer, specified above. Testcases input output 1 2 2 1 ...

 
8:30 AM
@Mayube you might want to clarify in your docs whether ^ is exponentiation or XOR
 
It's python's pow operator, I'll specify that, thanks.
 
If anyone is familiar with the Chudnovsky algorithm for calculating pi, is there a way to calculate k and the number of wrong digits there could be given the precision you want
 
@Erik​theOutgolfed
 
I knew there would be a shorter way... you planned it right?
 
@EriktheOutgolfer nah I didn't intend to do it
but I saw your answer and your name
and I couldn't resist
 
8:36 AM
Ironically, I answered because I saw your name too (I couldn't even resist!)
 
For an integer power function, what should 1 to a negative power be? 0 or 1?
 
@feersum mathematically or computationally?
 
I'm making k ^ <negative> 0 for |k| > 1.
 
@LeakyNun I think that would've outgolfed Dennis too, hadn't I posted that answer first.
 
Sorry that was a terrible brain fart.
Obviously it should indeed be 1...
 
8:40 AM
Also, it's not that cool to post an answer yourself on your own challenge.
You should wait some time.
 
5 mins ago, by Leaky Nun
and I couldn't resist
 
+1, would frown upon that.
 
@feersum I'm awaiting your -(-x^1)
 
Huh, what language should I post that in
If I use Python, then lambda is longer than the expression.
 
js
 
8:44 AM
On the other hand I despise JS (and golfing languages)...
 
outgolf all of the existing js solutions
@feersum is there a language you don't despise?
 
My life goal is to avoid learning JS.
So it would be bad for me to post in it.
 
so what language would you post in?
 
Well there's the conundrum.
 
use C then
so all your submissions are in python?
 
8:46 AM
That works I guess.
No.
 
what else?
 
Don't say PHP
 
"No" was to the python question.
 
"what else" was to the "no"
 
You can search my answers and see.
Maybe x86 would be a good choice.
 
8:49 AM
go ahead then
 
@feersum JS Then a Groovy closure, or Java/C# lambda?
 
@EriktheOutgolfer What if I do golfing but just don't care about outgolfing people using different languages? :P
 
@EriktheOutgolfer Yes, it's called the Dennis Effect
 
One does not simply outgolf Dennis
 
8:58 AM
@Mayube Huh?
 
@EriktheOutgolfer You're only options were "I want to outgolf Erik" "I know that Erik will always outgolf me" or "I don't golf"
What if I golf but I just don't care about Erik because he uses a different language?
 
No, the last option was "I don't use golfing languages", i.e. "I only golf in mainstream languages" or something like that. If you don't golf at all you aren't supposed to vote.
That's because I use golfing languages a lot.
 
k but what if I use golfing languages, but just not the same golfing languages as erik?
 
Then you can still outgolf me, I didn't say anything about a specific language.
 
nevermind
@EriktheOutgolfer Also for the record, your name makes me want to outgolf you, but not enough to make me put the effort into actually doing so
 
9:05 AM
Well, Braingolf isn't as golfy as I would expect anyways, so I dunno if you can outgolf languages like Jelly, 05AB1E or such using it.
 
0
A: Sandbox for Proposed Challenges

MayubeIs my integer balanced? Your task is to write a function that takes an even-digit integer and compares the 2 halves of the integer. If the sum of the digits in the first half is greater than the sum of the digits in the second half, output a truthy value, otherwise, output falsly. For example: ...

 
@EriktheOutgolfer no it definitely can't, despite it's name it's not really super golfy, it's more just a fun language to use :P
 
@EriktheOutgolfer have you ever actually outgolfed anyone?
 
oh dang
 
9:18 AM
link pls
 
This is an example.
 
um
it doesn't count as outgolfing if it is a different lang
 
@EriktheOutgolfer you mean this?
 
aw SNAP!
 
@LeakyNun It was posted way later than mine, so I had outgolfed at that time. Now, I could argue that the accepted answer should change though.
Also I have another example, in the same language.
 
9:23 AM
I don't think it really counts as outgolfing if everyone else is using nongolf langs, or langs with bad support for the challenge
I mean it was jelly that beat pyth, not you beating the person using pyth
 
This was the answer I outgolfed.
 
non competing?
hmmm?
 
That only means it can't get the tick though, nothing else.
 
it means you're using new features
the other one is competing
unless it isn't?
 
@EriktheOutgolfer I don't understand why the answer is so long. Is it because of the restriction of not storing too many data at once?
@EriktheOutgolfer I shall hunt down your answers one by one and out-golf all of them. /s
 
9:30 AM
@EriktheOutgolfer you can't outgolf a competing answer with a non-competing answer
because the non-competing answer uses new things
 
So based on the answers to the parity question by @LeakyNun Braingolf is the least golfy golf language that can still outgolf non-golf languages :P I'm okay with that outcome
 
@DestructibleLemon I don't think it's competing though.
And I think I checked for that.
 
@ConorO'Brien holy what
 
How much highlighting is too much...
 
This is fine.
 
9:42 AM
@mınxomaτ The regex has not enough highlighting
 
True it doesn't.
Even the ()s and | are the same color.
 
everyone gets one or two outgolfs anyway. I have outgolfed too
 
I think it's only Dennis who constantly outgolfs, if not for someone else.
 
what I'm saying is that your username is inapt
 
Since I've outgolfed at least once, I'm an outgolfer. Also, it's just my username, and I've finally settled on it after some changes.
 
9:55 AM
I N A P T
:P
 
But it is apt, as I've explained above.
Also, a username doesn't need to be apt.
 
One more time
I n a p t
 
"inapt" means that a username isn't suitable. That's not the case.
And I like my username.
 
I would post inapt again but then I'd be crossing the line into pure noise
 
@EriktheOutgolfer he kinda had a point but I agree with you
 
10:05 AM
What point? Points without explanation aren't points.
And saying "inapt" repeatedly isn't explanation IMO.
For the love of God, please don't direct this question to SO. — Leaky Nun 2 hours ago
Directs question to SO.
 
5
Q: Make text triangle waves

ChristopherI was messing around on my 'ol TI-84 CE and made a program that produced this output (it was actually bigger but that is not the point): * * * * * * * * * * * * * * * * * ... I evolved it to take input text and make the triangle waves out of that. The final step was to also ta...

I would like some more answers. I put 100 rep up for grabs.
 
@EriktheOutgolfer Leaky nun has split personality?
 
10:27 AM
@Christopher lever answer?
@Christopher about your answer: Promp? Also doesn't TI-Basic encode multi-character tokens in their code page?
 
10:51 AM
Regarding this comment - How could I have phrazed the reply differently? Do we have a "rule book" to point to somewhere?
 
32
Q: Default for Code Golf: Program, Function or Snippet?

Martin EnderOne of the things many (new?) users forget to specify in code-golf challenges is whether the answers should provide a full program or a function (or even just a snippet). For most such things, we have defaults in the tag wiki (like scoring by bytes), but not for this. The conclusion in chat was ...

 
67
A: Default for Code Golf: Program, Function or Snippet?

Martin EnderThe default should be "programs or functions" This includes function-like constructs, including J's verbs and GolfScript's and CJam's blocks.

 
The rules are not terribly clear. I think we have a consensus on meta that REPLs count, but as a separate language, which would allow snippets in many cases, but snippets are not permitted according to this meta post ^
 
@EriktheOutgolfer You linked the question not the accepted answer
 
10:57 AM
17
Q: When is code that requires a REPL acceptable?

trichoplaxQuestion in brief: For what challenge types and in what circumstances should code that requires a REPL be acceptable in an answer? There seems to be an understanding in chat that code that only works in a REPL is not valid as an answer, but I can't find any consensus here on meta to back this ...

 
@ASCII-only Yes because accepted answers can change, so it's better to link to the question.
 
Thanks!
 
Meta is becoming more like the internet - you can find evidence for any arbitrary point of view if you look hard enough
7
 
@EriktheOutgolfer Well it's not like someone in the future will scroll to this exact message though
 
How would you find this if you didnt know what you were looking for?
 
10:58 AM
I just searched for "program function snippet" on Meta.
@ASCII-only daniero might.
 
@daniero I just looked up "function"
 
A meta search for "snippet" or "REPL", depending on what you want the answer to be...
 
But we consider REPLs to be separate languages, although same for polyglots? It gets confusing...
 
hehe. I just searched for "answer" and was overwhelmed by the number of hits :P
 
 
1 hour later…
12:11 PM
0
A: Sandbox for Proposed Challenges

SteadyboxOutput the Name of a Number Idea from a recent question on math SE. Write a program or a function that takes an integer from range 0 to 255 (inclusive) and outputs the name of its unsigned 8-bit binary representation. Input can be in any integer format you like, but the outputted name must ma...

 
Geez, quiet in here today
 
user165474
RANDOM LOUDNESS
 
LOUD NOISES
 
Please don't make noise. If you don't have to contribute anything, don't post anything. Silence is precious.
 
Silence is the most abundant resource in the universe
 
user165474
12:17 PM
Sorry.
 
@EriktheOutgolfer This is actually true, at least for me
Me just now: Oh look, seven new messages looks oh wait it's mostly noise
 
user165474
Yup. Sorry.
 
@ASCII-only Except for the one message which was a sandbox post? Well, I catch noise early enough ;)
 
wait, so we're posting noises now?
 
user165474
@DestructibleLemon No, we're not.
 
12:26 PM
I did it I win
 
user165474
I can't see it.
 
user165474
(School WiFi)
 
(it is a noise waveform)
 
user165474
Oh, okay. I guess that's not really noise then.
 
user165474
Unless people start spamming waveforms.
 
12:28 PM
That's what I'm afraid of...
 
Everyone else gets stars for their bad puns!
;_;
I guess I can wave goodbye any chances of this getting stars too
 
user165474
You can wave hello.
 
oh no, the wave of noise is still going on...
 
I won't post anymore waveforms, Otherwise I'd LMMS up the chat
 
0
Q: Binary Puzzle Solver

Kevin CruijssenIntroduction Rules of the puzzle: The puzzle Binary (also known as Takuzu or Subiku) is very simple to understand, and has only a few rules: Since the name of the game is binary it's pretty obvious, but you can only fill in zeros and ones. No more than two of the same digit can be vertically ...

 
12:33 PM
(because I screenshotted the DAW lmms to get the waveform image)
 
Please control the pun wave too...
 
also I'm not sure how clear the last one is, but LMMS is being pronounced as separate letters
 
My monitor doesn't like the waveform image, btw
 
It shows lines of different widths?
 
It shows plenty of faint horizontal lines over the vertical ones
 
12:37 PM
It's not your monitor.
 
@JanDvorak There are horizontal lines at -100%, -50%, 0%, 50% and 100% maximum amplitude I think
 
And then there are gridlines.
 
@EriktheOutgolfer DAW, you're messing up the good vibeds
 
user165474
@DestructibleLemon This is getting a bit out of hand... it doesn't even make sense anymore.
 
I can't even understand what DAW and vibed even mean, so this is definitely getting out of hand.
 
12:41 PM
@HyperNeutrino it does
 
Like, in a pun sense of course.
 
(DAW is digital audio workstation, vibed is one of the instruments/synthesizers)
 
user165474
But that's half of the play-on-words; what's the other intended meaning?
 
@EriktheOutgolfer wow how did you see those I almost broke my eyes trying to see them
 
user165474
Either way, it's getting a bit out of hand. It was funny the first two times.
 
12:43 PM
d'aw, you're messing up the good vibes
@HyperNeutrino I don't think you understand serial punning
also luckily you will be spared of more puns
 
serial punning === noise
 
because I have to leave
 
user165474
I understand it, but at a certain point it time, it stops making sense
 
user165474
Bye! o/
 
12:57 PM
Related to the "reverse the parity challenge", can someone please explain -(-n^1) to me? I feel like I'm being very stupid.
11
A: Swap the parity

feersumC, 20 bytes f(x){return-(-x^1);}

Why does it work?
(I don't know C, but lots of people have written equivalent answers in other languages so I presume it's not just a quirk of the language)
 
Think about why a simple XOR doesn't work
 
XOR always works with two's complements, right?
Even though there may be signed integer support.
 
0
Q: how to change variables in stata

user68863I have 10 variables same in nature but for 10 different waves. Now i want to rename all of them into 1 name because i do not care about waves (years), i just care about the value of these 10 variables and would like to use all of them at one time as a independent variable in a regression. how ca...

 
@EriktheOutgolfer yeah
 
OK, thanks, I think I get it now. ^ means something different to me (I mostly use R)
 
user165474
1:08 PM
Can we get more CV's on the above New Main Posts post?
 
@user2390246 Yeah, in most languages ^ is xor not power, it's only in math oriented languages like R or Math.JS that it is power
 
to be fair ^ is pow in python too
oh wait no it isn't nevermind
 
user165474
No it isn't.
 
** is pow in python
 
user165474
(ninja'd)
 
1:17 PM
Haskell has **, ^ and ^^, each with slightly different semantics
 
user165474
Yes. ^^^
 
well ^ is pow in braingolf, which is made in python :D
 
user165474
Well * is pow in Jelly which is made in python :D
 
Jelly using regular typable characters!? Blasphemy
 
It's not blasphemy, it's restricted-source
 
Alt+numpad shenanigans don't count
 
^^^
 
Implemented ^ = pow in C++ :p Try it online!
 
0
Q: Find the coterminal angle on [0, 2π)

DopappThis challenge is very simple: Given an angle measure in degrees or radians (your choice), output the angle between 0 and 2π non-inclusive [0º, 360º) that is coterminal with it. Input A positive or negative angle measure. You can pick if you want to take it in degrees or in radians. Output...

 
11/10
apparently everyone survived, only minor injuries
 
1:36 PM
@betseg 0/10 hacks + insanely inefficient
 
@betseg Can you do floats?
 
@Riker Wanna see a video of the most russian airplane ever? youtube.com/watch?v=dPAWfG5hNkc
 
Looking for a word meaning "prone to be bad"
anyone?
 
sounds like 'english language and usage' is what you need.
not TNB :P
 
not that worried about it
 
1:41 PM
@KritixiLithos sure, just change every int with float/double. Try it online!
 
oh, I thought you actually implemented the operator without using the pow builtin
 
Heh
 
That's why I asked floats
So can you? :P
 
I'd need a built-in for every prime number-th root, but I can do it
And a library for arbitrary precision arithmetics
Oh wait, not every prime number-th root, every 10^nth root
Because a^b.cd=a^(bcd/100)
 

« first day (2287 days earlier)      last day (1923 days later) »