« first day (2235 days earlier)      last day (2614 days later) » 

Wait who can protect questions?
 
@WheatWizard mods I guess?
 
This question was protected by a non-mod non-community user
 
I think theres a rep thing
 
5:06 AM
You can protect at 3,500 Rep.
 
Oh wow, then I can protect questions
 
@ATaco Is there some other condition too? I'm not seeing the place to click.
 
...I just wrote "laptop" as "altpop"
fml
 
Yeah I don't see any button myself
 
That's all I know.
 
5:08 AM
You can click on that to bring you to the privedges page where they have more info (I can because I got all the privledges ;_;)
 
Figured it might be something like that.
Also, the privilege comes at 15,000 rep on fully graduated sites.
 
Oh man I need to get more rep before we graduate
 
I was just about to say, "Guess I need 2500 more before graduation" X^D
 
I just need to hit 10k so I can keep my review access
I really don't care about site analytics
 
For a moment there, I was excited that we graduated
 
5:26 AM
Speaking of graduation, what's the latest news from SE for this site?
 
I...just...what?
 
@betseg what language?
 
JS
 
I knew JS was broken.
I didn't know it was that broken
does >= compile to the same thing as if(null>0 || null == 0)?
because it could be a bit thing based on how it compiles
or is interpreted*
78
Q: Why `null >= 0 && null <= 0` but not `null == 0`?

C. LeeI had to write a routine that increments the value of a variable by 1 if its type is number and assigns 0 to the variable if not, where the variable is initially null or undefined. The first implementation was v >= 0 ? v += 1 : v = 0 because I thought anything not a number would make an arithmet...

 
It seems ( a >= b ) is defined as !( a < b )
 
5:34 AM
@betseg probably
bad design, is that just chrome? FF and IE use different JS interpreters
 
ES designed it that way :(
Saw a link in Reddit to some ES guide
 
damn, they must've done that for a good reason though.
 
@betseg Not true in all cases it seems.
 
Just to save code I assume
@ATaco example case to counter?
 
a=function(){};console.log(!(a<1)==(a>=1))
 
5:37 AM
If you're comparing null with greater & lesser signs, you're probably doing something wrong regardless of the language
 
Is it true?
 
@Phrancis fair enough
@betseg no false
 
@Phrancis well in c you're just comparing with 0
 
@Phrancis but what if I need to know if(null>null+1)????!?!??!?!?!??!?!?!?! :(
interestingly enough, JS considers null+1 =1
 
Plz feed me with more information, I'm on mobile and have no console :p
 
5:39 AM
@AshwinGupta Because == is itself borked
===?
 
null < null+1 and !(null > null+1)
For the curious.
console.log(null<null+1, null>null+1)
 true false
 
Since JS can't afford to crash the browser or web page every time it encounters something unexpected, it has to play fast and loose with some things
 
Makes sense
 
help me out here, I'm a linux noob: I've downloaded a microcontroller (MSP430) GCC compiler onto my rpi, where should I place such a thing?
like good practice: where in the file system? Certainly not the desktop.
ex: in windows I'd put software under Program Files (x86) or Program Files for x86-32 and x86-64 bit applications respectively.
 
The equivalent of Program Files on Linux is /usr/local/bin/
 
5:52 AM
@ГригорийПерельман ty
 
Technically there's multiple directories like that, but /usr/bin/ should only be modified by the package manager and /bin/ should be things that come with the system.
 
@ГригорийПерельман oh wait no this GCC version I'm installing manually through compiling source
so i shouldn't put that in /usr/bin. Where do i put it then?
 
Still /usr/local/bin
 
oh I see /usr/local/bin vs /usr/bin
got it
thanks
 
But still check if the variable $PATH has /usr/local/bin/ in it
 
5:56 AM
@betseg i'll add it if it doesn't
 
-f    If the destination file cannot be opened, remove it and create a
           new file, without prompting for confirmation regardless of its per-
           missions.
 
@KritixiLithos yeah Ik I just manned it
not the end of the world, it found the file
 
6:11 AM
I have officially started Pre-Calculus
 
But does it include calculus?
:p
 
Pre-Calc? Oh boy.
If you don't already hate graphs you will now.
Right up until the point where you realize everything makes sense and is sort of beautiful in a way. If you don't hit that point god save you.
 
6:26 AM
I enjoyed pre-calc a lot
 
The first semester was review of Alg 2, and the second semester was entirely Trigonometry
¯\_(ツ)_/¯
 
We're starting calculus next school year
 
We too
 
We? Who exactly are you speaking for?
 
My class
 
6:29 AM
I'm taking Calculus next year too, eh.
@KritixiLithos Oh, for us we all take math classes in whatever order.
So I'm taking Stats now but took Precalc last year
But the people I took precalc with are mostly in Calc now.
 
The teacher decides the order for us. Right now, our unit is statistics
 
Oh, for me Stats is a class, not a unit.
I suppose different places have different systems
 
The government decides our order :D
 
Well, there is some order. I can't, for example, take calc before pre-calc.
But if I really wanted to, I could take a test and waive the requirement.
 
@KritixiLithos Wait, I think the IB decides the order for us, not sure
 
6:35 AM
@betseg and they change the order every year
 
@ГригорийПерельман I see you have a similar program to mine
 
It's standard across most of the United States if you're in a public school.
 
@ГригорийПерельман No, I mean the online/choose your own class thing
 
Well, considering we live in the same county
 
Well, in a traditional high school, I would be sitting in an actual classroom...
 
6:49 AM
Oh, right, I forgot you did that.
 
Your school does it similarly to mine, where all classes are online and can be completed as needed
 
No, most classes are not online, but you can take them online if you want to fulfill a requirement for a more advanced class.
 
I see
 
Oh, OK
$300^{google.com}$
OK, that broke the userscript @ATaco
 
7:01 AM
@Mendeleev Nonsense, beautifully typeset
 
@DLosc No, the second one, ChatJax chokes on that
Like, usually I can $\LaTeX$ and it's fine
It just gets rendered by $ChatJax$
 
I was afraid you would misunderstand me. I meant that 300 to the power of google.com is nonsense, but with LaTeX it still looks beautiful.
 
I can't test from here, on my phone.
 
@DLosc Oh, I see what you mean now.
 
Should've gone with Beautifully typeset nonsense
 
7:07 AM
@DLosc yes
 
Wait, LaTeX in chat?
 
@MatthewRoh sigh
2 hours ago, by Григорий Перельман
@MistahFiggins https://github.com/TehFlaminTaco/TacosUserscripts/raw/master/autochatjax.user.js https://github.com/TehFlaminTaco/TacosUserscripts/raw/master/autogoogleprettycha‌​t.user.js https://github.com/TehFlaminTaco/TacosUserscripts/raw/master/chatcommands.user.j‌​s
 
7:42 AM
@MatthewRoh You have Tampermonkey, right?
 
@ГригорийПерельман Yeah, I do
 
Yeah, with those three links you get syntax highliting, chatjax, and commands.
Commands are /tableflip and the like replaced with emoticons, for the full list you need to look in the code.
 
So, basically discord chat commands in SE chat?
 
That was the original inspiration, in fact.
Also, /$\LaTeX$ inserts the $\LaTeX$ as an image so people without the script can see it.
 
o_o
 
/o_o
 
Huh
I think you need to refresh chat
 
okay..
ಠ_ಠ
 
ctrl+f5 clears the cache for the current page
 
there
 
7:53 AM
0
Q: Make a 'Logical' interpreter

Matthew Roh'Logical' is an esoteric language I am working on. It involves 4 logic gates, AND(&), OR(|), NOT(!) and XOR(^). Since only having 4 logic gates, the IO is only true or false (We are not discussing Qubits here :P) It will have some lines in the format [input 1] [(not included in not gates) inpu...

 
8:10 AM
0
A: Sandbox for Proposed Challenges

Matthew RohMake a 'Logical' interpreter code-golf 'Logical' is an esoteric language I am working on. It involves 4 logic gates, AND(&), OR(|), NOT(!) and XOR(^). Since only having 4 logic gates, the IO is only true or false (We are not discussing Qubits here :P) It will have some lines in the format [i...

 
@MatthewRoh Why do you even post a challenge with "coming soon" in the test cases?
10
 
:\
Good thing I moved to sandbox
 
8:34 AM
(ノ°Д°)ノ︵ ┻━┻
 
9:07 AM
hi all
 
hi anyone here
 
hi
 
do you know counting sort?
 
yes!
 
sigh currently doing tough algebra
 
9:16 AM
@Qwerp-Derp it's good for you :)
 
On a tangent, I feel like my science teacher has a private rainforest or something, because she gives out so many worksheets
 
I have reposted my challenge codegolf.stackexchange.com/q/112739/9206
 
I swear, before every lesson, she cuts down a tree, turns it into pulp, and prints out our worksheets
 
@Qwerp-Derp in the phrase on a tangent, is tangent meaning perpendicular to a line ?
as this seems the opposite of a tangent
just asking :)
 
0
Q: Count how many distance sequences are far from all others

LembikThe Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. Let P be a binary string of length n and T be a binary string of length 2n-1. We can compute the n Hamming distances between P and every n-length substring of T ...

 
9:17 AM
@Lembik Tangent also means "sidenote" of the currently discussed topic
 
Anonymous
@Lembik That's not what tangent means at all
 
So you could be talking about the history of communism, and then you could "on a tangent" talk about Karl Marx's beard or something
 
Anonymous
A tangent line is a line which touches a curve in exactly one location
 
I don't know if that was a good example but it was the one that came off of the top of my head
 
@Mego yes.. I was asking how it comes to mean completely irrelevant
 
9:19 AM
I thought tangent was trigonometry
 
@Qwerp-Derp yes.. I was wondering how the math meaning informs the non-math meaning
 
@JesterTran It means that as well
 
Anonymous
So a tangential discussion would start somewhat relevant to the original discussion, but would move away from the original topic
 
@Mego ok so this assumes that conversations are curved
and not a straight line
 
@Lembik I think it's probably the other way arround
 
9:20 AM
because the tangent of a straight line is the same line
I really hope people like my question! I worked hard to improve it
comments/questions gratefully received
 
Anonymous
Well technically the tangent thing could also be a curve, but the usual usage (in calculus and trigonometry) is a tangent line
 
right
 
0
A: Sandbox for Proposed Challenges

Michael VehrsMnemonics for Pi As a rocket scientist, you frequently need to refer to Pi, but you are really bad at remembering large random numbers. Fortunately, you are familiar with the mnemonic major system, which uses sounds to represent digits, and words to represent numbers. /s/ and /z/ represent the...

0
A: Sandbox for Proposed Challenges

Qwerp-DerpThis is the sort of challenge that bytes code-challenge code-golf sorting I need to stop thinking of punny names Your task is to create as many programs as possible that sorts whatever your language's version of integer arrays is in ascending order, but for each program, you're only allowed to ...

 
Anonymous
y = x^2 and y = -(x^2) are tangent to each other at the origin, and neither are lines
 
good point!
 
9:40 AM
argh :(
 
What happened
 
@betseg reposted my question after much work and I am worried that no one will like it again.. normally I get upvotes very quickly if people like a question
0 so far
 
Lol
 
Anonymous
Stressing about how many upvotes you've gotten is a really silly thing to do. Also consider that it's a really quiet time of day for PPCG. Not many people are online right now.
 
@Mego Thanks.. you are right
 
9:47 AM
Also fastest code always receives less upvotes
 
@Fatalize good point... I was misled by codegolf.stackexchange.com/questions/26323/… :)
 
10:15 AM
@MartinEnder Thanks for the help
 
10:32 AM
any talented coders able to extend this sequence for me ? math.stackexchange.com/q/2183085/66307
my pathetic skills have run out :)
it might be too boring for a ppcg challenge
 
0
Q: anagram pattern search

Rudraksh GandharGiven a text string and a sample string. Find if the characters of the sample string is in the same order in the text string. Eg:- TextString: abcnjhgahgjhfhaljhrkhgrbhjbevfho Sample string: nagarro

 
11:19 AM
Hello
 
11:30 AM
hi
I just learned another reasons to love/hate python
for any pythonistas here
a = [1, 2, 3]; b = a; b += [1, 2, 3] versus a = [1, 2, 3]; b = a; b = b + [1, 2, 3]
anyone want to guess what you get?
 
two different results, unlike you would expect?
In Ruby they are equivalent
 
I'd expect identical results
 
In the first a changes but not in the second
Right?
 
Anonymous
@Lembik That works perfectly fine when you understand what is going on
 
Anonymous
In the first example, a and b refer to the same object, so the volatile += operation modifies both. In the second example, a and b still refer to the same object, but + is non-volatile, so a copy is made and stored in b.
 
Anonymous
11:44 AM
If the object in question was immutable, then += would likely be implemented as self = self + other, so the two would be equivalent, but lists are mutable.
 
12:00 PM
What I'm wondering is how something like a = [5]; b = [a]; b[0] += [2] is implemented.
There's no 'in-place setitem' magic method, but the last statement modifies a.
OK, the previous Python puzzles are NOTHING compared to this one.
What does this print?
b = [[5], [3]]; b[-1] += b.pop(); print(b)
 
let me guess
[[3,3]]?
 
You cheated!
 
I really didn't :)
I did this.. b[-1] = b[-1] + b.pop() . Evaluate RHS first from left to right
 
0
A: Sandbox for Proposed Challenges

ʰᵈˑRock Paper Scissors Lizard Spock This game is from The Big Bang Theory, an extended version of the classic Rock Paper Scissors game. Objective To create a full program that I can run to play Rock Paper Scissors Lizard Spock against an "AI". The opponent ("AI") will pseudo-randomly choose their...

 
so the RHS is [3]+[3]
and b has changed to [[5]]
 
12:08 PM
b[-1] = b[-1] + b.pop() is not what happens though.
 
then assign [3,3] to b[-1]
 
The second array is mutated.
 
ah well then I was lucky :)
is that in the "b has changed to [[5]]" part
 
b = [[5], [3]]; a = b[1]; b[-1] += b.pop(); print(a) also gives [3,3].
So you can't explain it by expanding the += to a +.
 
that's more confusing
so b = [[3,3]] in that example
but a becomes [3,3]
why?
 
12:14 PM
this seems reasonable (for Python's standards) if LHS evaluated first
 
The challenge is to explain both the immutable += and the mutable += case.
 
which one is the immutable case? Is it the one I gave?
 
Mutable is when we're doing a[i] += x and a[i] implements __iadd__.
 
Anonymous
The LHS gets evaluated first. b[-1] evaluates to a reference to the list that is currently [3] (the same list that a references). Then, b.pop() removes that [3] element from b and returns a copy. The += modifies the referenced list, appending the 3. Since a references the same list, the output of print(a) is [3,3].
 
This bit seems somewhat reasonable. What's the immutable case?
 
12:26 PM
@Mego This explanation fails against the example in the starboard.
 
@Mego we are supposed to evaluate the RHS of an assignment first
 
Anonymous
LHS getting evaluated first may seem weird, but remember that there's a reference to it in the method call. a += b is really __iadd__(a, b), and the arguments are evaluated in order.
 
@feersum that would be the immutable case, wouldn't it?
 
@JanDvorak Yes, that's an immutable case
 
Anonymous
@feersum I don't see anything on the starboard
 
12:27 PM
17 hours ago, by Wheat Wizard
CMC: Without running it, guess what this python snippet prints.
a=[1,2,3]
a[-1]+=a.pop()
print a
 
I'm okay with LHS being evaluated first. I'm not as okay with being able to overload +=.
 
Anonymous
@feersum Huh, that's strange. I suppose it's due to the difference between list.__iadd__ and int.__iadd__
 
There's a facile explanation for a[i] += x in the immutable case (a.__setitem__(i, a[i] + x)), or for the mutable case (b = a[i]; b += x), but neither can be correct since the iadd-ability is dynamically looked up.
 
isn't it all a little simpler
 
The difference being int.__iadd__ doesn't exist.
 
12:30 PM
Isn't there any good language that starts with "P"?
 
Anonymous
I'm pretty sure int.__iadd__ doesn't explicitly exist, so it's implicitly defined. list.__iadd__ is explicitly defined. That makes the difference.
 
Anonymous
@JanDvorak Python is a good language. The issue with all of this is that it's doing it wrong.
 
Anonymous
When you do something the wrong way in a language, you shouldn't be surprised when something weird happens.
 
@JanDvorak P... no :)
 
Piet!
Which reminds me...
 
Anonymous
12:33 PM
Nobody says C is a terrible language when UB is invoked. Why should it be different for Python?
 
@JanDvorak Processing
 
UB?
 
Anonymous
Undefined behavior
 
and lots of people say C is a terrible language!
 
That's a good one, but I'd argue whether Processing is a language
 
12:34 PM
Au contraire, many people find that C has a lot of unnecessary UB.
 
Anonymous
Technically integer overflow is UB in C, but people tend to assume it's intended behavior
 
Why would you even have such a doubt?
 
Anonymous
@feersum Sure, but the reaction isn't "C is bad because X doesn't work". It's "your code is bad for trying to do X when it's clearly not a good idea".
 
Processing is a legit language. It's a language specialised in graphical output and animations and is based off of Java
 
Anonymous
Garbage in, garbage out
 
12:35 PM
@Mego It can be that way. One can hold that it's bad the integer overflow is an undefined behavior rather than merely an operation with an unspecified result.
 
@JanDvorak Processing is TC, Processing can take input and output. It's just that it has a Java interpreter, like CJam
 
There's also processing.js
 
Anonymous
We shouldn't point fingers at the language when some deranged piece of code produces an unexpected result that is totally explainable upon further inspection of the language's mechanics. Instead, we should blame the code, and the programmer who produced that particular sequence of eldritch glyphs.
3
 
Pff processing.js is fake :P
 
so, boo @WheatWizard for having given us the CMC? :-D
 
12:44 PM
@Mego You say that because Actually produces unexpected results given a random input
 
Let's see what Actually has to say ;)
 
@KritixiLithos D:
 
@Mego I think there are different views about program semantics
some people like languages where this is set out in a formal way
that is not python
 
Anonymous
@Fatalize Nope, the results are perfectly predictable, if you can understand the language :P
 
Anonymous
I really don't think there are any "surprises" in Actually. If you look at the commands page and follow the sequence of commands, no program should produce unexpected results.
 
12:55 PM
Everything is predictable if you know the intricacies and internal state of your random number generator.
 
@Mego I thought you said it tries to keep going if a memory allocation fails...
 
Anonymous
@feersum If any command fails, it skips over it and goes to the next one.
 
Anonymous
That's like rule #2 of the language, though
 
Whether there is sufficient memory for an operation is hardly easy to predicte
 
Anonymous
Skipping commands that error is as fundamental to Actually as curly braces are to C
 
12:57 PM
Trigraphs!
 
Anonymous
@feersum Well sure, but that's always hard (regardless of language or implementation details)
 
Anonymous
@feersum ...are being removed as of C++17 (and whatever the equivalent standard name is for C)
 
Note to self: as a chaotic character, don't eat holy wafers. It hurts.
 
a = [1, 2, 3]; print(a, a.pop(), a)
Totally did not expect the output.
What do you think this will output?
 
Depends on version.
 
1:12 PM
@feersum I tried 2, 2 PyPy and 3 on TIO and all were the same
 
If nothing else there should be parentheses in one and not the other.
 
3 3 2
 
@feersum 2 puts it in a tuple but except that outputs were identical
@JanDvorak no
 
[1, 2] 3 [1,2] is what I would naively expect
 
... oh, nvm.
[1, 2, 3] 3 [1, 2]?
 
1:14 PM
I would've expected the same as @Jan but @feer is right
 
That's not even tricky. Get out :P
 
Well, Feersum's idea would be the sensible one, so it can't be it
 
hi.. I was reading math.stackexchange.com/a/2136950/66307 and am obvious more dim than everyone there. There is a comment "t seems you are missing that Os can be positive or negative" . How can they be negative if k is positive?
 
I realise this is a little OT but this is my favourite chat room :)
 
1:20 PM
@Mego UB
 
Anonymous
@Lembik O(something) means "on the order of something". O(1/k) means "some expression variate with k whose leading term is 1/k". 1/k - googolplex is still O(1/k), since googolplex is a constant, but it's very very negative.
 
And -2/k would also be O(1/k).
 
@Mego tio.run/nexus/c-gcc#RY3BCsIwEETv@xVDRUlsEA/… 4 5 5 using clang, 5 5 4 using GCC, 5 5 5 using tcc
 
UB. Enough said.
 
Mego's version is defined, I believe.
Since only one parameter is by value.
 
1:25 PM
@Mego oh !
thanks
 
@Lembik "OT"?
 
What happens if you have 1 rep, then get downvoted, then get upvoted?
 
Then you gain rep
 
5 rep or 10 rep?
 
Neither. 6 or 11.
 
1:39 PM
@Doorknob I think you mean total and he means gained
You'd gain the same amount regardless of the downvote
 
@betseg Answer or question upvote?
 
OT?
 
Obvious sTarrer
 
@KritixiLithos just asking if the first downvote affects the upvote
 
@Fatalize Did I say OT?
@Mego I don't think this is right
 
2:10 PM
@Fatalize off-topic I'm guessing
 
@Lembik "I realise this is a little OT"
@DJMcMayhem Oh right
 
If big O notation is off-topic in TNB, what the hell is on-topic?
 
Well, "OT" also stands for "on topic". So big Oh notation is surely OT
 
I know what Big O notation is, but is OT actually something that exists in the context of Big O?
 
@Fatalize off-topic
If I get to 2000 points I will give a 200 point bounty.. because why not :)
 
2:23 PM
@Lembik Eh? I see +1/-1
 
@ГригорийПерельман yes! My mistake
I wonder why the downvote?
 
Wait it's at +2/0 now
 
oh that's confusing
 
@Downgoat :o nice!
 
What's a test flight?
 
2:28 PM
It's a really nice way beta test apps
 
But you can still get the app on the Apple Store, right?
 
2:43 PM
@Downgoat That's cool! Congrats!
 
0																												'
2:54 PM
Anyone here familiar with lambda calculus?
 

« first day (2235 days earlier)      last day (2614 days later) »