« first day (2648 days earlier)      last day (2187 days later) » 

12:02 AM
well, using a different variable wouldn't help, since the input is in that variable
 
@Neil crap that is the problem. it's because I implemented the preset variables badly (not as presets, but as defaults). scopes don't count those as existing variables which is why that happens. brb fixing
@Neil hmm. actually, should this be the case for preset variables too (well, those other than inputs)
 
yeah, I seem to remember trying to add the digits to the end of the alphabet for some challenge or other
 
1:08 AM
Can I get chat.stackexchange.com/rooms/73683/playing-dirty unfrozen, pretty please someone.
 
@Οurous done
 
1:36 AM
@NewMainPosts What should be done with that? Is this on-topic?
 
@user202729 yes
 
@ASCII-only Technically it's possible for everyone to post their question as challenge on PPCG and still get answer, and that's allowed.
 
@user202729 well sure. but this is better than the challenge right after it...
 
CMQ: How do I access a thing from a server using javascript on a website if there's some CORS error thing or something
Failed to load queried-source.com: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://my-site-origin.com' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
something like that
 
@HyperNeutrino You can't.
 
1:44 AM
oh
then why does it say "set request mode to something to do something"?
or is that for the other server's side
 
Wait a minute, do you control the deatination?
 
Yes, IIRC that's for the destination. Last time I tried.
 
@HyperNeutrino setup a proxy on your own domain :P
 
1:46 AM
@ASCII-only Not that it's a bad challenge, but in this case the OP's intent is to get help.
 
yeah, CORS is set on the server to determine who can access a particular url
 
Apr 18 at 13:43, by user202729
Can anyone help me, I can't get rid of CORS. MCVE and error messages below. /* I tried google and found nothing. Thanks. // comment out because SO */
 
hm okay thanks
 
for example, if you don't want to serve your images on other websites, you basically say "don't load this image on domains other than my own", and browsers will respect that
 
@user202729 >_> <_< i thought googling would tell you that you can't work around CORS though...
 
1:49 AM
but its more for security. It's so you can't ajax a webpage (with a form token), and then use that token to make a POST request you shouldn't be able to do
 
I can just load it from python using requests module
and then just flask server and send it to the webpage where i need it lol
 
@DJMcMayhem Then why are they suspended then...
 
@HyperNeutrino exactly :P
 
@ASCII-only The problem was I could not understand that it was for the destination.
 
@user202729 :| did you actually read anything
 
1:53 AM
@user202729 1. SE isn't perfect; I got my account deleted for age violations when I was a month off of 15 once. 2. don't talk publicly about suspensions [don't reply to this because that's just further extending the conversation about someone's suspension].
 
@user202729 not everyone is omniscient and/or has direct access to SE's DBs...
 
 
2 hours later…
3:50 AM
@quartata would you happen to know where docs are that specify how @property generates the names for the getter/setters?
./out.itf.h:3:12: warning: class '__vsl_ocpp_UIApplicationDelegate' defined without specifying a base class [-Wobjc-root-class]
@interface __vsl_ocpp_UIApplicationDelegate : UIApplicationDelegate {
           ^
./out.itf.h:3:44: note: add a super class to fix this problem
@interface __vsl_ocpp_UIApplicationDelegate : UIApplicationDelegate {
                                           ^
                                            : NSObject
you what objective C
 
4:07 AM
like there is #import <UIKit/UIKit.h>
 
how does it think there's no superclass
did you use unicode colon
 
no it's exact same clon :|
 
@Downgoat yeah ok either 1. time to file a bug report or 2. you forgot -luikit or something
 
Can't be, we've specifies the correct path and all:
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/Developer/SDKs/iphonesimulator.sdk/System/Library/Frameworks/
 
0
A: Sandbox for Proposed Challenges

aoemicaHow far can I throw the ball? code-golfmathnumbergeometry Given an initial velocity and an angle, determine how far my ball will go before it hits the ground. Inputs The velocity the ball is thrown at (m/s) The angle from the ground that the ball is thrown at (radians) Output The numbe...

 
4:23 AM
@Downgoat You mean @synthesize? (only Clang auto-synthesizes properties last I checked)
 
@quartata yeah
I figured out that problem though, do you know why the above "defined without specifying a base class" would happen
wait a second i am a complete sheep
 
@Downgoat O_o that path is way too long
 
Uhhh UIApplicationDelegate is a protocol....
that should have thrown a better error
 
 -ObjC++ -isysroot <syspath> -Wno-deprecated-declarations -F<blah blash blah>/Library/Frameworks/ --target=x86_64-apple-ios11.3 -mios-version-min=11.3 out.impl.m -emit-llvm -S -o out.bc -framework UIKit
it's compiling with all those
and it does look like UIKit is found as the other files don't throw any errors
 
@Downgoat did you read
 
4:38 AM
(sounds like you're too used to Swift :P)
 
5:09 AM
@DJMcMayhem any news regarding my ban ?
 
 
2 hours later…
7:09 AM
0
Q: Maximize score on a array of integers processed as a stream

PrakharSuppose I have an array of positive integers. It is required to bundle integers into certain subsets to maximize score. Each set has a certain score associated with it. For example ${1, 2, 3} = 10 $ , $ {3,4,5} = 1000 $ , $ { 1} = 1 $ etc. Now one has array iof integers. One can solve the pr...

 
8:00 AM
0
Q: Want to generate Series of two given values min and max

Sanjay GuptaI have two values which are min and max. Between these two values, I want to generate a series with patterned growth of n steps. For example I have 0.001 and 1000. Between these two values, I want 30 values. You can think these values are Zoom factor. Any idea to get that series in C# or any oth...

 
0
A: Sandbox for Proposed Challenges

BubblerCircular Limited Sums code-golf restricted-time Challenge Let's imagine an integer-to-integer mapping F(n) on 1 <= n <= N and 0 <= F(n) <= M. There are (M + 1) ** N possible definitions of F in total. Out of those definitions, how many Fs satisfy all of the following inequalities? F(n) + F(n...

 
 
1 hour later…
9:07 AM
CMP: What practical languages (that you think people should learn) do you think are underused on PPCG?
 
Swift
 
@Mr.Xcoder good idea :P
 
BMO
Haskell :)
 
If Haskell's underused on PPCG... :|
 
BMO
Oh, I misread. Yeah it's definitely not underused around here
 
9:21 AM
@ASCII-only Prolog
 
9:38 AM
@Adám oh yes. that too
 
10:20 AM
@Mr.Xcoder :| Swift is super ungolfy
Well, so is Prolog, but at least in Prolog it's because of the paradigm and not because of Java-length builtin names :P
 
I don’t think it’s the Java-length built-in names that make Swift ungolfy, I think it’s the function definition style and the very strict type system. Many things also require the use of import Foundation or some other standard library module, and that sucks for golfing purposes. Other than that, String and Array slicing are incredibly, incredibly annoying and the fact that some functions don’t automatically cast ints to doubles or to floats or vice-versa too :/
 
@Mr.Xcoder and the lack of a chr builtin :((((((( (and print with no newline for that matter)
 
print(...,terminator:"") does the latter
 
@Mr.Xcoder yeah. but that's super ungolfy
@Mr.Xcoder also -1 for =
 
For chr, you can either do String(Character(UnicodeScalar(...))) which is awful, or "\u{\(...)}", so I see your point ;P
 
10:35 AM
@ASCII-only What's about =?
 
@Mr.Xcoder clearly it can be confused with an assignment in a function call. so people should use : instead :P
 
@Adám That was pointing out my mistake. I initially wrote terminator= instead of terminator:
 
@Mr.Xcoder does the latter even work
 
I thought it did?? Let me check
Yes it does work, but it excepts input in hex, not decimal.
 
@Mr.Xcoder link pls
 
10:40 AM
Actually nevermind, only \u{...} works, not \u{\(...)}
 
@Mr.Xcoder >_>
 
Aww that’s so ugly :(
 
@Mr.Xcoder ?
 
@ASCII-only The fact that Swift doesn’t let you do that :((
 
@Mr.Xcoder well, they are escape codes...
 
10:41 AM
Still...
 
@Mr.Xcoder not even JS lets you do `\${'n'}`...
@Mr.Xcoder that would be the worst behavior possible... input modification outside of a format string
or `\u{${'1111'}}` for that matter (or however JS does unicode escapes)
 
Gosh, that all looks so complicated. Wonder if there is a comparison of programming langauges page which compares ints-to-chars and chars-to-ints…
 
10:57 AM
0
A: Sandbox for Proposed Challenges

AngsCode 39 barcode encoder Write a function or program that encodes a string into a Code 39 format barcode, where each character is encoded as five bars separated by four gaps. Either two of the bars and one of the gaps are wide and others are narrow, or three of the gaps are wide and none of the b...

 
@ASCII-only Emojicode :p
 
@Adám Do you know any Prolog
 
@ASCII-only No. I know more Brachylog than Prolog. Brachylog caused me to be intrigued by Prolog.
 
i wonder what i'm doing wrong :P
oh yeah, re: the first two lines, is it possible to exclude the condition on the second line
also is there a golfier way to get a single character from a string
@Adám wow, nice
oh. prolog has nl O_o. +1 for languages with nl
 
11:16 AM
@ASCII-only Hm, should I add APL: string to integer/long integer/floating point: ⍎string; integer/floating point to string: ⍕expression.
@ASCII-only What is nl?
 
@Adám newline method
 
@ASCII-only What does it do?
 
@Adám yes, definitely
@Adám prints a newline >_>
 
@ASCII-only Found a way to golf your Swift answer by 13 bytes :P
 
@Mr.Xcoder :| but is repeating a string even allowed
 
11:20 AM
Yes... Half of the answers do that
 
:|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||‌​|||||||||||||
ok then. time to golf basically everything because string repeating is usually shorter
 
Neim, Proton, APL WIN, Python, JS etc. Maybe not half but a fair amount
 
@Mr.Xcoder Which Q?
 
@Adám Return the highest possible placement value based on the input.
 
@Mr.Xcoder O_o it's less golfy in tcl, a string-based language
 
11:25 AM
Ø_ø come on tcl
 
huhwhat. it's also less golfy in Prolog and Lisp
 
@Mr.Xcoder Danish eyes, that's a new one ∘.○
 
Also I should really try to avoid Leaky Nun-ing the trivial challenges (oops)
 
11:48 AM
0
A: Sandbox for Proposed Challenges

AngsPPCG Generalist Countdown Write a function or program that takes no input and returns or oututs the current minimum number of new questions required for PPCG to hand out Generalist badges. The badges are handed out when the top 40 tags (measured by question count) each have at least 200 questio...

 
12:11 PM
@ASCII-only Hah, I managed to find a 32 byter using that :P
 
@Mr.Xcoder :|||||||||||
 
How is that approach even shorter?? O_o you were right about Java length built-in names
 
@Mr.Xcoder oh btw. what exactly is _ in"9"
 
Hey
 
@ASCII-only .map{_ in"9"} maps the closure {_ in"9"} over the given sequence. _ in just lets the compiler know that the closure will not use its variable, and "9" is just a literal. Basically each element gets mapped to "9" :P
 
12:22 PM
@Mr.Xcoder is in only for closures with unused arugments
 
@ASCII-only Nope. Example: You can also use it as {a in a+1} (instead of {$0+1})
 
@Mr.Xcoder ah
 
0
A: Sandbox for Proposed Challenges

Galen IvanovIntegers as "polynomials" Suppose we use successive digits of an non-negative integer for coefficient, base and power respectively and construct a "polynomial". For a 4-digit number we'll have: abcd -> a*b^c + b*c^d + c*d^a + d*a^c. Each digit must go through the three roles exactly once. For...

 
This syntax is useful when you also map inside the closure. Example: You cannot use {(...).map{$0+$0}} as that is ambiguous, but you can use {a in(...).map{$0+a}}
 
@Mr.Xcoder wait. does it throw an ambiguity error
 
12:25 PM
I don't want to know what was inside r/ooer creator's mind
 
also 0/10 swift should just specialcase $ variables
 
@ASCII-only IIRC yes
 
@Soaku that's relatively normal compared to a lot of reddit
 
@ASCII-only I see that I haven't seen the deepest of Reddit.
 
@Soaku no. no you haven't.
 
12:28 PM
since that is the weirdest thing on it I've seen yet
 
Actually it depends
 
@Mr.Xcoder well of course? because the outer closure has no args?
 
@ASCII-only IDK what I was thinking, see this
 
@Mr.Xcoder of course? because it would be confusing for the inner closure is using the outer closure's arg as an anonymous arg
 
yes, precisely.
Anyway, I wanted to illustrate how the in syntax is useful and partially failed :P
 
12:32 PM
@Mr.Xcoder but this shouldn't be ambiguous though? or is it
 
Basically $0 reffers to the innermost closure’s variable, unless you explicitly specify a variable it should use.
My example was a bad one in the first place.
 
clearly they should do it the VSL way and make the first argument from one level up $$0 :P
 
Hmm I think that’s actually cool... Jumps into VSL :P
 
@ASCII-only Actually r/ooer is mentioned quite frequently here. Sad that some Reddit update removed old CSS, because other funny CSS destroying subs are mentioned there too.
 
@Mr.Xcoder note: VSL doesn't really work yet
 
12:37 PM
Ik, the goat’s still making big changes to it
 
12:53 PM
oh yeah.
 
What? reddit removed old CSS? :V
not my poor /r/1000thworldproblems
 
CMP: how to override outfix operators if operators are just objects
 
@moonheart08 Some lost it, yes. r/csshalp
 
luckily for me, I don't need reddit. i can get my daily fix of internets from here and bay12
totally not a lie
yea i'll die without /r/talesfromtechsupport
 
actually.
how to have overloads if functions are just objects
i.e. the only way to declare a function is name = function (<name> (<args>)) { <body> }
 
1:04 PM
@ASCII-only Just reassign... no that would remove "other functions".
Maybe ... are functions statically typed?
 
yes
 
@ASCII-only What does that verb mean...?
 
hmm. actually, nvm
@user202729 Leaky Nun had a habit of answering challenges in too many languages :P
 
@ASCII-only So perhaps alternative :: (a -> a -> a) -> (b -> b -> b) -> ((Either a b) -> (Either a b) -> (Either a b))
@ASCII-only Mr.Xcoder too...
For HNQ that often gives more rep, so why not.
 
1:20 PM
@user202729 wait. how would that even work
 
 
2 hours later…
2:53 PM
Because it's Gauss's birthday today, I was going to try to create a challenge, but there are already two good ones:
10
Q: Constructible n-gons

SefaA constructible n-gon is a regular polygon with n sides that you can construct with only a compass and an unmarked ruler. As stated by Gauss, the only n for which a n-gon is constructible is a product of any number of distinct Fermat primes and a power of 2 (ie. n = 2^k * p1 * p2 * ... with k be...

4
Q: Print cos(2π/17) exactly

anatolygOne way to construct a regular heptadecagon starts with drawing a horizontal line of length 1 from the center to a vertex. Then the distance along that line from the center to the second vertex is cos(2π/17). All other vertices are easy to get. The goal of this challenge is to print (or produce ...

 
Something random that occured to me: is DNA turing complete?
It probably is, as the ball of DNA and proteins that is humanity has made computers, and came up with the term in the first place
So, a better question: If something can describe and model a turing complete system is it itself turing complete
 
3:20 PM
Asking whether DNA is TC doesn't really make sense
Also humans are FSMs and are not turing complete
 
Probably not. I'm a programmer, not a mathmatician or similar.
Plus i'm also a complete derp
 
@mbomb007 You noticed that, too, huh? :D
 
we don't understand the brain well enough to know whether or not a human is TC. We always determine TC based on the model of computation, so we would need a similar model for a brain (aka, defining a brain in mathematical terms)
 
The brain can only store a finite amount of information and is thus not TC.
 
right, but that's true of every computer
and that's why we would need a model of computation
anyways, DNA is the same way: we'd need a model of computation, which is really hard
although, I do think we understand that far better than the human brain, so that sounds more reasonable
maybe not, I'm not a biologist
 
3:36 PM
@WhatWizard [citation needed]
 
In physics, the Bekenstein bound is an upper limit on the entropy S, or information I, that can be contained within a given finite region of space which has a finite amount of energy—or conversely, the maximum amount of information required to perfectly describe a given physical system down to the quantum level. It implies that the information of a physical system, or the information necessary to perfectly describe that system, must be finite if the region of space and the energy is finite. In computer science, this implies that there is a maximum information-processing rate (Bremermann's limit...
 
0
Q: p command in Funge-98 quines

IQuick 143Should the p command be considered cheating in Funge-98 quines? I'm asking because: Unlike the g command it does not read source code, so it doesn't break "No reading source code" rule. But it does modify source code so it may be considered cheating?

 
@WhatWizard OK, with that reasoning, no Turing complete entity can ever exist.
 
Not within finite space with finite mass.
 
@WhatWizard Do you know of any infinite entities?
 
3:38 PM
Not any physical ones.
 
God is TC.
 
God is probably uncomputable.
 
@WhatWizard Most humans can quite easily be instructed to evaluate BF, so if BF is TC, then most humans are TC.
 
2
Q: Staircase nums (TRUE/FALSE)

Muhammad SalmanChallenge : Check if the given number forms a number staircase or not Input : A integer (greater than 0 and not decimal) Output : a truthy / falsy value depending on whether the number forms a staircase or not Number staircase : A number staircase is an integer that , when read from ...

 
@WhatWizard Well, so are computers. You have to assume we have infinite lifespan and memory.
 
3:41 PM
Humans are extremly buggy though, so at each operation there's a small chance of errors.
 
@ngn Never book a judge by his cover
4
 
@Pavel Humans aren't buggy, we just have a lot of unintended features.
 
@Pavel I don't think that proves non-TCness. Computers have a small chance of errors too
 
computers are not TC
 
@DJMcMayhem Physics has a small chance of errors.
Cloudy with a chance of errors.
 
0																												'
3:52 PM
@Adám It is possible to create FSMs that are capable of evaluating some BF. Humans are not capable of evaluating all BF programs because I don't know about you but I can't remember a potentially infinite number of things.
 
<-- has no clue what you lot are talking about and just wanted to thrown in his two cents
 
this is why we need a model of computation. For programming languages we have this model, and we assume an infinite computer. We could do the same if we had a model of computation for a human
 
@mbomb007 not in the world of theoretical physics. That's the perfect world.
 
@Pavel A penny saved is better than two in the bush.
 
"hot cross buns"
that's how that goes, right?
 
3:56 PM
@J.Sallé Reminds me of xkcd.com/669
@0 ' Neither can brainfuck
Talking about TCness becomes pointless if you're talking about the real world.
 
brainfuck has an infinite tape?
 
Could you say that, given that people can construct an infinite number of, well, numbers, then people can actually remember an infinite number of things?
Metaphysics usually has my brain in knots >.>
 
....going back to the original question: Can the "language" of DNA take input?
 
@WhatWizard My point is more just that if you're going to say X isn't TC because <insert physical limitation>, then nothing could ever possibly be TC. It's only useful to talk about TCness when you're talking about abstract computational models
 
Exactly, my point.
 
4:01 PM
@J.Sallé Probably not. I can't count for very long without forgetting what number I'm on.
 
There is no point in discussing things in the real world.
 
@WhatWizard Cool. I guess we can freeze all chat rooms then. We proved they aren't needed.
 
@J.Sallé Real brains? Definitely not. Hypothetical models of the brain with an infinite number of neurons? Maybe? I'm not sure
 
Which i wasn't. I know enough to know that nothing can be TC IRL.
 
...don't we have languages on this site that can only input via inline source code?
 
4:02 PM
@mbomb007 but if I give you a set of rules regarding numbers, you can always construct another number.
 
That doesn't mean I hold all previously constructed numbers in my mind.
That only takes like 2 "registers"
 
@NathanMerrill ///, I think
 
Turing was first and foremost a mathematician. He was also a computer programmer, computer engineer, cryptanalyst, and biochemist, but above all else he was a mathematician. Math itself is inherently abstract, and TCness is squarely in the realm of abstract numbers
Just like '2' doesn't exist in the real world
 
 
ngn
@Adám wow, so you believe God is a FSM? :)
 
4:05 PM
I think they're working in production D;
 
Ok...so I'd be curious if DNA programming is possible. Your input is at the start of a DNA strand, and your output are the various proteins
 
@DJMcMayhem Like the quote from Charlie and the Chocolate Factory: "Two?! I can't do just two."
 
...so, could you do something like "take two numbers, add them together, and output N proteins"
 
On a semi-related note, I recently (like a week ago) wrote a paper on Turing and the history of computers. It was interesting learning more about Turing's life and works given all the talk we do about him here
@NathanMerrill That would be really cool, but so far outside of my domain that I don't even know how feasible that is or where to start with that
 
@Blue that's why you never look at the source code D:
 
4:07 PM
yeah. To me, this is more what the original question is. How practical is it, really, to actually write programs in DNA
I have no idea.
 
But seriously, invalid syntax and requests to internal. It hurts
 
@NathanMerrill Maybe something like given a number n encoded in base 4 using DNA, output the nth fibonacci number in the same format.
 
@mbomb007 yeah, exactly
 
@NathanMerrill So has everyone's DNA been run through a minifier?
 
@mbomb007 how would you decide what protein relates to what number?
 
4:10 PM
@J.Sallé I said output DNA
 
can you get DNA to output DNA (except through copying)?
I don't actually know the answer to that
 
Even clicking the login button gives a 500 error
 
@flawr Was it given the death penalty?
 
0
Q: If DNA is the input, what is the output?

Ilya GazmanHow does cells use the DNA inside them? I am looking on DNA as a strip of tape of Turing machine, but with machines its easy. I can read the tape and calculate the behavior of that machine. With cells its different we don't really understand the language of DNA. So instead of trying to understa...

 
4:13 PM
@mbomb007 yes, but what I meant is, how would you translate the nucleobases into numbers? A=0, T=1, G=2 and C=3?
 
Base 4
 
yeah, some schematic. All that matters is that there is a definition, the definition itself is arbitrary
if you wanted to, you could do base 2, or some more complex structure
 
@J.Sallé Maybe that's where Star Trek got their "-quad" nomenclature.
 
@mbomb007 @Adám CALL THE DYALOG POLICE
 
4:19 PM
@DJMcMayhem i also don't exist in the real world
 
@AdmBorkBork perhaps :p. I don't like ST:VOY that much though, didn't even remember quads existed
 
@Cowsquack Because you're a quacking spherical cow?
 
don't <=> doesn't (it's a weak pun)
also how did I become spherical?
 
29 mins ago, by J. Sallé
@mbomb007 not in the world of theoretical physics. That's the perfect world.
 
4:42 PM
I'm trying to do hello world without numbers. I feel like i'm cheating

Hello: ; This is the world "Hello" encoded as x86 instructions.
rex.W
gs ins BYTE PTR es:[rdi],dx
ins BYTE PTR es:[rdi],dx
outs dx,DWORD PTR ds:[rsi]
Wd:
push rdi
fs
hmm
NASM doesn't like a lone rex.W (read: unrecognized)
Hum. I guess NASM really dislikes my shenanigins
 
@ngn No, quite the contrary. God is truly TC in that God can compute anything.
 
ngn
@Adám pity... that ruins my joke about His Noodliness, the FSM :)
 
4:57 PM
@Blue I also use TSB, but I do suspect that their security is actually worthless. We may or may not see, one day. Hopefully not.
@ngn Yeah, yeah, I got that already when FSM was used about God.
 
@Adám It looks rather awful right now. I don't want to know what monstrosity lives under it on the backend. In the JS you can see commenting in both Spanish and English
 

« first day (2648 days earlier)      last day (2187 days later) »