« first day (2426 days earlier)      last day (2416 days later) » 

12:01 AM
@HyperNeutrino APL: {,/(⊢,⍵+1-⊢)¨⍳⍵÷2}
 
Nice
Now time to read through that to make sense of it because I'm trying to learn APL lol
 
Yay, atleast it beats APL!~
 
@HyperNeutrino it takes the range of half the input, and for every item gives the item and the input + 1 - the item (7 = 8 + 1 - 2)
@ATaco note APL is not a golfing lang
 
ah ok thanks
 
@Uriel What are you talking about
 
12:15 AM
gtg o/
 
It totally is
What sane language looks like {,/(⊢,⍵+1-⊢)¨⍳⍵÷2}
 
@Adám JS: c=>'A1 H9 IAG NOR UNC WHO XS'.match(c+`\S+`)+''||c
@Adám Wait that doesn't work, JS: ('A1 H9 IAG NOR UNC WHO XS'.match(c+`\S+`)||c)[0]
 
@Pavel I believe the guy who coined the term golfing was not even born when the first APL line was written
 
@Adám JS: c=>c+({A:'1',H:'9',N:'OR',U:'NC',W:'HO',X:'S'}[c]||'')
 
@Uriel I'm sure when Hero of Alexandria invented the steam engine he was already thinking of it's use for powering trains.
 
12:32 AM
@Pavel you can ask @Adám how different is APL nowadays
 
Just because it wasn't designed to golf, doesn't mean it's not golfy.
 
@ATaco oh, surely it is
 
hi
on this code
x,y,z;
double R(){return--y?!z?y=R(),R(z=1):x*R():x;}
main(){
scanf("%d%d",&x,&y);
printf("%f\n",R());
}
i couldn't understand how double recursive function call works
y=R(),R(z=1) in one statement
it's a solution for this problem
https://codegolf.stackexchange.com/questions/5562/implement-hyperexponentiation-tetration-without-the-use-of
 
@Maatouq please format ty
@Maatouq Basically it evaluates y=R(), then returns R(z=1) I think
 
x,y,z;
double R(){return--y?!z?y=R(),R(z=1):x*R():x;}
main(){
	scanf("%d%d",&x,&y);
	printf("%f\n",R());
}
(Boop)
 
12:38 AM
How does that work, R isn't defined to take an int parameter.
So the call to R(z=1) can't work
 
C just forgets the passed parameter, the writer is using it to golf.
 
Oh right, I forgot C functions don't have defined parameters
 
1:19 AM
@El'endiaStarman Is there a way to search by regex? I want to do a search for .*ಠ_+ಠ.*
 
0
Q: Lights out in more than 2 dimensions

user34432What this isn't A rehash of another challenge posted for solving Light's Out. What this is Light's out in 3D... or 4D, or 5D, or even 1D; you get the picture. So, what are the rules? Input You can choose to format your input however you wish. One example could be: number of dimensions, siz...

 
@Pavel PostgreSQL has three pattern matching functions. postgresql.org/docs/9.3/static/functions-matching.html
@ATaco That's the query to use when you want a ':P' anywhere in the message. The ones I linked look for messages that are literally just ':P'.
4 hours ago, by HyperNeutrino
I wonder how many messages of mine contain :P and only :P
 
Well isn't that better fitting? Posting just an emoticon is noise!
Oh... ;-;
 
^ Most frequent Kannadian face users
 
1:25 AM
@El'endiaStarman huh I'm surprised I'm not higher up :P But thanks for the stats! :D
 
That thing has a name?
 
huh apparently i'm seventh for ಠ_ಠ (watch this message push me to sixth)
 
Well ಠ is a letter of the Kanadian language
 
@ATaco It's called the look of disapproval
 
I wonder if you could graph the usage over time to pinpoint exactly when the TacoScript for it was released.
 
1:27 AM
@ATaco Yes you can
 
Probably, but that sounds too fancy
 
I don't know that much SQL/JS
 
You could possibly ask El'endia
 
@Pavel did someone say SQL/JS :P
@ATaco : add user-friendly AM/PM timestamps to chat
 
1:30 AM
(Screams in local timezone)
 
There are a bunch of line graphs on the TNBDE useful queries page. You can modify one of those.
 
@El'endiaStarman speaking of TNBDE, I don't mean to sound pushy or anything, but is there a reason this PR has't been merged?
 
@Downgoat Yeah, laziness. :P
 
@Dennis @MartinEnder @DJMcMayham @Hyper Neutrino @Ascii-Only @ATaco @Downgoat @FunkyComputerMan any of you care if I mention you (in a positive way) for helping me on this website and coding in general? (common app college essay)
 
Sure, go for it.
 
1:39 AM
@Christopher2EZ4RTZ WheatWizard is now @FunkyComputerMan. Also, you added a space.
 
Opps
That edit just pinged a bunch of people
 
I don't mind
 
Also in HyperNeutrino's name.
 
Oh well
It still pings
 
Yep.
 
1:40 AM
@Christopher2EZ4RTZ yeah, that's fine
 
I just wanted to check since I don't want any issues
It is a pretty damn good essay already
 
Scream my name to the heavens as the coder who brought you light!
5
Or something like that I suppose.
 
253 words about PPCG on my 623 word essay
@ATaco brb screaming
 
CMC: Package Hack into an RPM and put the result on COPR.
 
@Christopher2EZ4RTZ I don't mind
reads chat
Haha everyone agreed with a different wording
 
1:46 AM
@ATaco I have pull requests for changing ChatJax delimiter to $$ and for fixing the /o_o bug, please respond.
 
Not funky and you @ASCII-only
 
@Christopher2EZ4RTZ oh btw you misspelt DJ's name
 
@DJMcMayhem The super ping list
@ASCII-only rip
Can I get a few short snippets (working answers) of crazy esoteric code?
 
@Christopher2EZ4RTZ Anything on PPCG :P
 
@Christopher2EZ4RTZ I would say to add JSF or @ConorO'Brien obfuscated JS if this is for your apps
 
1:55 AM
@Christopher2EZ4RTZ Here:
ṡ2EÐḟFs2ḣ€1S€ṡ3M€Fċ2
0;⁸;0Ç
 
@Pavel what does that even do
 
It makes me cry for starters.
 
Now if only Dennis would step down so I could become mod (that would look great on my essay)
 
1
A: How many peaks in my mountain range?

ZacharýJelly, 27 bytes ṡ2EÐḟFs2ḣ€1S€ṡ3M€Fċ2 0;⁸;0Ç

Question: Is codegolf.stackexchange.com/a/143241/60042 valid IO? I understand the need for a C submission to take the size of an array as a parameter, but the output format seems odd to me.
 
Yep, C languages can take inputs as Pointers, and may take the size of an array as a parameter.
 
2:03 AM
I'm not talking about that
I mean the output
It requires a 4th input, an array that it populates.
 
(And may output through those pointers)
It seems valid to me.
 
I know that you can output by returning a modified version of the array, but this is different and to me it feels like the correct way to do that would be to return an int pointer.
Also, what is this "dynamic array" thing? I haven't heard of it. (Note that I am not a C person)
 
@Pavel lol C and dynamic
@Downgoat are you smart?
 
ok @ATaco are you smarter then him?
 
2:09 AM
Apparently
 
I want a 2nd opinion on my paper and want to know if you would read it XD
You just have to read it and say what you think (I have english teacher for grammar and such)
 
if your paper is on CS i can maybe be of use if it is on anything else I am useless
 
@Christopher2EZ4RTZ Sure, mention away. :)
 
@Christopher2EZ4RTZ this is wrong link
you have to give the other one
it should be in yellow like /secret/randomhexdigits
 
2:13 AM
I am an idiot
@Downgoat that makes me saying it once XD
 
its' -> its in the KahnAcadamy sentences
 
@Downgoat muphry's law?
 
"Processing.js that was modified to make it simpler" -> "Processing.js, a language designed to make programming easier than usual." or something sentence kinda confusing at first
@DestructibleLemon yse
 
@Christopher2EZ4RTZ Yeah I'd be fine with that, though I don't recall having done anything to help? huh
 
also :D someone else who learned how to code w/ Processing.js
"Looking back I realize", missing comma after back
StackOverflow and StackExchange have spaces
I recommend defining code golf too
 
2:19 AM
(doesn't include spaces)
 
> One challenge only allowed characters that were not banned by the last answer and each answer banned another character. Quickly code became messes until somebody won using only the number eight 2.13 × 10705 times to print the text “‘Round up the usual suspects.’ - Capt. Louis Renault” (number 32 on the top 95 movies quotes of all time).
 
I remember reading a meta question asking whether golfers can make the challenge harder for themselves by adding additional stipulations, and the consensus was that they could. But I can't find the post. Does anybody know what it was?
 
I think you should re-word this or make it less specific. It's confusing to me
 
ComputerCraft did a lot to teach me how to code.
 
though I think otherwise is 10/10 essay, really shows your passion for programming
 
2:22 AM
wait link to essay
 
ah ok thanks
 
@Downgoat thanks for the help
I will add it all tmr
Downgoat is a good goat. pats on head
 
How should I give feedback for minor/major grammatical corrections / etc?
 
Yes math textbook, when I am driving I obviously solve quadratic equations to determine my stopping distance to the next car so I will not crash. Obviously using graphic utility will not cause that.
 
2:27 AM
@Christopher2EZ4RTZ "and I would like to thank (sniff) all of these wonderful people, comic book characters, hosts, weird computer men, tacos, and others (sniff) (sniff) for helping me create programs abominable to good programming practices"
10
 
how to calculate whether or not you will run into the car in front of you in 3 easy steps:

1. Encounter a situation where there is a car in front of you
2. Press the brakes suitably to avoid crashing
3. If this fails, then you have crashed into the car
@ConorO'Brien don't forget the subatomic particle :( nobody ever notices neutrinos
 
Notices what
 
@Christopher2EZ4RTZ I would not mind at all! I'd be honored :)
 
I am still wondering what I have done to help anyone though... I mean besides JHT I guess
anyway gtg o/
 
2:35 AM
@ConorO'Brien Why are there so many PPCG characters that are named after food? Wheat (that's not really a food, but still...), lemons, watermelons, tacos, etc.
I haven't tried a neutrino, but I've been told they're delicious
 
@Challenger5 lack of creativity? there's a lot of food-related golflangs too
 
There are?
 
@ConorO'Brien I can only think of Jelly and CJam right now
 
maybe not golflangs
ppcg langs
jelly cjam cheddar confiture (obscure fork of jelly with only like 2 commands) sesos (technically)
maybe not that many but its certainly a trend
 
Wait, confiture?
 
2:38 AM
Is it like a tacit tarpit?
 
it's not even TC iirc
I think it has addition and maybe something else
 
TacO
 
Update README.md, THIIIIING, THIIIIING2, alright, let's get rolling! sounds legit.
 
this except I forgot to try
but yeah the idea was to make a turing tarpit based on the evaluation style of jelly
then school started IIRC
 
2:56 AM
Thinking about it, it could be completely bitwise, with vectorizing NAND
 
I already have an esolang sorta like that
 
Of course, you can't talk bitwise langauges without talking bout Wise
 
we were until you mentioned it :P
 
3:22 AM
dumb questio: is floor(a) + floor(b) == floor(a + b)
 
I don't think so
1.6 and 1.6
 
ah yes duh >_<
 
it's ok
I still want to make a koth
 
But is round(a) + round(b) == round(a + b)?
 
Depends on how you round. I think.
 
3:29 AM
The answer is no, 1.3 and 1.3
 
Yeah, I just realized that.
 
(Where round is floor(n+0.5))
 
I was thinking of potential edge cases due to the IEEE standard (I think) that numbers that are exactly halfway between integers get rounded to the nearest even integer.
 
Floating point numbers are bullshit.
 
How might you implement them better?
 
3:31 AM
Not have NaN, negative 0, and all that other stuff.
 
Those have purposes
Very well defined ones at that
 
Explain to me what the purpose of NaN is as opposed to Infinity.
 
NaN may not have a sign, also, 1/0 isn't infinity, as much as javascript argues.
 
Errors and 0/0
 
It's also a nice Null number.
 
3:35 AM
Given that floating point handling is usually implemented at a very low level, I would have expected most invalid results to just return 0, and trust the user to deal with it (after all, this is how integer overflow and /0 is handled)
 
@El'endiaStarman 😡 this is not what they taught us at school
 
@Challenger5 and if the result is 0?
Also signaling NaNs are much better for error handling
 
@El'endiaStarman I can't but that doesn't mean they're good.
 
@DestructibleLemon I was taught that rounding rule in school a couple times. I don't normally use it though; I just round up.
 
@quartata Well, checked overflow is also good for error handling, but it's not done that way. Floating-point is going to be implemented at a very low level, so it needs to be simple
It has too many special cases, and the special cases it defines aren't even mathematically true
 
3:40 AM
I mean errors in user land where a float is to be returned
Also almost all architectures set a flag on overflow
 
Also, Javascript uses Doubles, not Floats.
IIRC, Floats don't handle Infinity & NaN.
 
They do
Also "keeping it as mathematically accurate to our arbitrary definitions of R as possible" is an argument for 0/0 = NaN
 
imo it's an argument for anything/0 = NaN
 
According to the scarce mathematics I know, anything/0 should equal NaN.
 
But in IEEE 754, positive/0 = ∞, negative/0 = -∞, and 0/0 = NaN
 
3:47 AM
anything/0 = 0.5
 
¿!?
 
The idea is that for all x != 0 lim x -> 0+ 1 / x = infinity
only exception is 0/0 since that's indeterminate
 
@quartata Yes but approaching the limit is different depending on whether you approach 0 from the positive or negative side
 
It's more convenient than an exception at low level at any rate, plus kinda fits with the approximate nature of floats
 
And approaching from one side or the other is a bit arbitrary
 
3:50 AM
That number could be close to 0 but result in Infinity
@Challenger5 Other side would be for signed zero is all
 
Sorry, but I don't understand what you mean by that.
 
note the + by the 0
That's a one sided limit
Other side is lim x -> 0- 1/x = negative infinity which is what negative zero is for
sorry for no latex
 
0*infinity = 0?
 
I don't know how to write math help :/
 
oh
 
3:56 AM
But why should approaching one direction or the other be dependent on whether the numerator is positive or negative?
 
I wrote that wrong
I meant for x to be in the numerator
for all x > 0 : lim y -> 0+ x/y = Infinity and lim y -> 0- x/y = -Infinity
 
In IEEE 754, (1 / 0 == Infinity) but (-1 / 0 == -Infinity)
 
That's a good point
But at this point they kind of have to enforce consistency
 
TIL Chef esolang guy is Australian
 
3:58 AM
Since the sign of the denominator makes a difference
 
And also SROMG (and other related webcomics) guy too
 
(-1 / -0 == Infinity). WHY????
 
Negative number divided by very tiny negative number
It checks out
 
@quartata That's not true
It is only true for positive x
 
Can't see what you're replying to
Oh
 
4:00 AM
> for all x > 0 : lim y -> 0+ x/y = Infinity and lim y -> 0- x/y = -Infinity
 
@Challenger5 What about that doesn't make sense
 
x > 0 is right there I changed that after I realized the clause was dependent on the sign of the numerator and I didn't want to type it out
I'm on mobile guys cut me some slack
 
@Pavel The fact that (-1 / 0 == Infinity) but (-1 / -0 == -Infinity).
 
Oh I missed the change
 
If you told a mathematician, "in programming dividing by zero gives a result that is either positive or negative infinity, depending on the sign of the numerator and the sign of the zero," what would they think about you?
 
4:04 AM
They'd understand it if I defined it in terms of a new algebra and explained why that's convenient practically
Along with the limits above
Floats are inherently approximations of real numbers. Sacrifices must be made
 
I still don't see why signed zero and signed infinity are convenient practically.
 
Well signed infinity is most definitely a thing
As for signed zero:
 
Signed infinity might be a thing, but it's definitely not what you get from dividing by 0.
 
Signed zero is zero with an associated sign. In ordinary arithmetic, the number 0 does not have a sign, so that −0, +0 and 0 are identical. However, in computing, some number representations allow for the existence of two zeros, often denoted by −0 (negative zero) and +0 (positive zero), regarded as equal by the numerical comparison operations but with possible different behaviors in particular operations. This occurs in the sign and magnitude and ones' complement signed number representations for integers, and in most floating-point number representations. The number 0 is usually encoded as +0...
@Challenger5 But it's what you get when you divide a number very close to 0, which is common in floating point math due to error
Do you really want 1/0 to throw some bulky high level exception and then have 1/0.0000000001 return Infinity anyways (or even worse a giant imprecise number near the end of the floats)
 
@TuxCopter how to do title case in french? is it like L'indice de la Qualité de L'air?
 
4:11 AM
@quartata Yes. :P
 
Then I don't know what to say, go ahead and make your own standard
It's not easy
 
BRB rewriting modern computational mathematics.
 
I would still prefer if it just had NaN for "universal error" rather than having a bunch
of edge cases (±inf, NaN, etc.)
 
(I just wish Lua had an easier way to detect NaNs)
 
But infinity isn't really an error
Sometimes infinity is legit
 
4:15 AM
Infinity is nice if you want to compare it to other numbers, which may sound strange, but it has its purpose.
 
Also floats don't really overflow, throwing an "error" is kind of a weird concept IMO
@ATaco Another good point. That's what math.huge is if I'm not mistaken
 
Maybe, but inf should be "the number greater than all other numbers" rather than "the number you sometimes get when you divide by 0" or "the number that is returned on overflow"
 
Well it is the former too
Also signed zero should never really be seen unless you're working at a super low level
Or doing something hella weird
It usually works itself out
 
function getClosest(some_vector_table){
	max_distance = infinity;
	target = null;
	for(i=0; i < some_vector_table.length; i++){
		this_distance = sqrt(some_vector_table[i].x^2 + some_vector_table[i].y^2);
		if(this_distance < max_distance){
			max_distance = this_distance;
			target = some_vector_table[i];
		}
	}
	return target;
}
Yay, a practical use for infinity!
 
Lua does use math.huge right
I couldn't remember
 
4:18 AM
Yeah, math.huge is infinity.
 
@ATaco If that's JS, I don't think it works; Infinity is capitalized
 
But it doesn't let you work with -0.
Also, it's just generic code, no particular language.
(And you probably shouldn't use sqrt for best speeds)
 
That reminds me of 0x5f3759df
 
We don't need sqrt because a > b == a^2 > b^2
 
@FunkyComputerMan I am now using your amazing icon for my one of my school accounts.
 
4:29 AM
@Challenger5 The icon is actually taken from my schools information system which despite its appearance of having been forgotten in the 90s was just redesigned this year.
 
is that... legal? /s
 
to have a crappy website? yes
 
Redesigning the site, or propagating the icon?
 
The website also has a rather large security issue I won't point out
 
@Challenger5 well I know Dennis would not do an illegal thing
probably
 
4:31 AM
@DestructibleLemon O RLY?
 
Can C output to STDOUT without any preprocessor directives?
 
@Challenger5 😧
 
@FunkyComputerMan Do you count compilers that #include <stdio.h> if you use IO functions without declaring them?
 
No I'm talking about the C standard not any specific compilers
 
I don't think it's part of the standard.
Actually, I don't think C has any native support for STDOUT.
 
4:36 AM
Ok that is unfortunate
 
But how can the preprocessor add features to a language? That doesn't make sense...
Is <stdio.h> written for every platform?
 
Maybe I should actually ask a SO question (shudders)
 
I don't know enough about C to answer that, unfortunately.
 
@FunkyComputerMan Nah, a question that useful would probably be closed.
 
That seems like a rather unuseful question as a whole
you can usually use preprocessor directives.
 
4:41 AM
But the explanation of why would probably go into a substantial amount of detail about platform-specific IO and how it interacts with the standard.
 
C doesn't have explicit stdio.h definitions because it's designed to compile to a wide variety of architecture, some of which have no support for that form of IO.
 
Ok I guess that makes sense
so stdio.h must not be written in C then
 
Not in standard-compliant C
 
It's my assumption that it makes direct CPU calls, rather than just does C things.
Or, I suppose, OS calls.
 
Ok this is all reather unfortunate
or fortunate
depends on how I look at it I guess
 
4:45 AM
Not sure what you mean stdio.h isn't defined in C
 
C is a rather beautiful language for something made out of spite and excitable devs.
 
Spite? What spite?
 
GCC is just lazy and only throws a warning if you use it without the prototypes from the header
It still gets linked in from libc so it doesn't care
 
Spite for B, the interpreted language of choice prior.
 
4:47 AM
@quartata Do you know if that is compliant with the C standards?
 
Probably not but you can declare the prototype yourself
Just copy whatever hellish one it declares for printf
It'll resolve
 
Ok. I don't think I'm good enough at C for this right now
I'll come back to this later
 
Anonymous
@Challenger5 No. stdio.h usually has all of the standard declarations, some of which are enabled or disabled by preprocessor macros based on the definitions exported by your system or the configuration of your compiler. It doesn't actually contain the code for those functions - that's in libc (or glibc, or whatever C runtime you use).
 
Look for extern blah blah blah printf(blah blah
 
@quartata Oh yeah I found it, it just is, as you said, "hellish"
 
Anonymous
4:50 AM
You can declare printf without including stdio.h, but you have to get it right (or close enough)
 
Close enough
 
How does this even work
I'm very confused
 
That's a forward declaration in essence
Except instead of being in your code the function is in a library
glibc
Which is implicitly linked by default
 
Anonymous
4:52 AM
@ATaco extern is pointless with a single compilation unit
 
(Screams in C)
 
@quartata Oh so if we did not link glibc it wouldn't print
 
Anonymous
@FunkyComputerMan If you didn't link glibc, it wouldn't do much of anything :P
 
It would compile but not link
Try it with -ffreestanding
This is all basically because C compiles to individual object files and then links all of the references to other files later
It's for saving memory
only need to compile one at a time
 
@Mego Really how much of C is in the standard library?
 
4:56 AM
Just functions really
 
Anonymous
@FunkyComputerMan Anything that you don't write yourself.
 
Like all the core language constructs except for variable arguments work freestanding
 
Ok this is good
 
C++ though needs the standard library for exceptions and RTTI
 
are there any types without the standard library?
 
4:57 AM
Hm?
 
Is the int type part of the standard library?
 
No. But technically uint8_t and what not aren't defined without an include but those are compile time macros
Are you writing a kernel or something
 
Hm I seem to get a segfault when I try to remove the standard library
 
What code
Oh
That's because you need to bootstrap calling main I think?
 

« first day (2426 days earlier)      last day (2416 days later) »