« first day (2297 days earlier)      last day (1615 days later) » 

12:10 AM
1000
Q: Why is reading lines from stdin much slower in C++ than Python?

JJCI wanted to compare reading lines of string input from stdin using Python and C++ and was shocked to see my C++ code run an order of magnitude slower than the equivalent Python code. Since my C++ is rusty and I'm not yet an expert Pythonista, please tell me if I'm doing something wrong or if I'm...

nice even number on the votes
@Phoenix cc @SimplyBeautifulArt
golfing edits aren't allowed
 
@Riker Aw, my bad
 
it's ok
no harm done, and now you know :p
 
@Riker shit brb fixing cheddar
 
sigh
just me or does cheddar need to be fixed a lot :p
 
@Riker Bleh, I just want to give everyone bigger numbers xD
@Riker I like cheddar
And cheese
 
12:12 AM
@SimplyBeautifulArt cheddar.vihan.org
 
:D
xD
Well of course that's a thing.
 
@Riker I mean it doesn't really because no one use cheddar ;_; but better wording is "cheddar should be fixed a lot"
 
@SimplyBeautifulArt yes, it's @Downgoat's WIP language
 
well it's kinda finished
 
lol, nice @Downgoat
 
12:14 AM
I'm moving onto VSL since cheddar turned out an absolute POS
 
kek
 
Question: is it bad idea to leave magnet on comptuer
 
@Downgoat Depends how you want the computer
 
 Cheddar v1.0.1 (interactive)
 run `help` to get started

cheddar> help

 Welcome to Cheddar!

 If you are using Cheddar for the first time, we reccomend following
 the getting started guide at: cheddar.vihan.org/quickstart

 The following commands are available:
    help  - outputs this
    clear - clears the screen

cheddar> 1+1
 Chedz is not defined
^ @Downgoat
 
12:18 AM
@Downgoat Then why don't you link to that on the main site?
 
good question
 
Anonymous
@Downgoat The parts that would be affected by the magnet (mainly the hard drive(s)) should be protected well enough that the magnet wouldn't affect it. Still, it's not a good idea.
 
does this link scroll weird for anyone else?
 
Anonymous
@Riker Looks fine to me
 
try scrolling right
 
12:22 AM
I'm on desktop
 
does it have roughly a page width of blank space?
*2 pages
@LegionMammal978 does that still for me
on my laptop
 
... no?
 
Anonymous
@LegionMammal978 No repro on that
 
I thought you meant half the horizontal width was empty?
 
12:24 AM
o_O it's not?
oh, no not that
1 sec
 
Anonymous
 
Anonymous
@Riker 404
 
whoops, fixed
@Mego yes, that
 
12:26 AM
If I'm storing a key-value dict in a file that I need to look things up in, what's the best way to do that?
 
Anonymous
@LegionMammal978 Middle-click and scroll right
 
Anonymous
@Phoenix Database?
 
JSON is all the rage
 
I'm not storing anything too huge, and it should be editable by hand easily.
Oh wait, CSV is a thing.
 
@Mego Just goes vertically
 
12:30 AM
user image
9
 
@Riker Maia* (not Man)
 
not clickbaity enough
:p
ok how'd this get 2 stars here but 0 in the scifi and fantasy chat
lol
@HelkaHomba also, I recently read watership down (since your name is supposed to be from it): the book is so dark
like
I thought it was a cheerful book, judging from the bunnies on the cover
nope
 
Heh, well it ends
 
uh-huh
 
@HelkaHomba spoilers!
 
12:37 AM
he's just saying the book has an ending
it's not that big of a spoiler /s
but seriously it's not :p
 
oops, that's sorta a spoiler
 
spoiler?
@Riker actually it was a spoiler until he edited it
@HelkaHomba you should probably delete that
 
BRB reading watership down
 
I just won't say any more (and that wasn't much of a spoiler)
 
Anonymous
Watership Down... I'm guessing there's a watership, and it doesn't go up.
2
 
12:46 AM
What's the max upload image size?
 
Only one way to find out starts uploading 1GB image
 
@numbermaniac Formatting only works on one-line messages
 
Of course stackexchange would do that
 
@Mego guess again
@LegionMammal978 2MB :P
 
12:48 AM
oh
 
1:19 AM
I'm guessing the title is an attempt to throw us off and it's actually a spaceship.
 
1:34 AM
@feersum note that most of the characters are bunnies
 
@HelkaHomba Are you implying that bunnies are undeserving or incapable of space travel?
 
Wow, that book was awful, probably one of the worst books I've read
 
-.-
 
One of our english teachers called it "wacky wabbits in the woods" (this was an honors brit lit class in 11th grade)
 
I mean most people assume ships are in the water by default. So explicitly saying "water ship" seems like a suspicious attempt to trick us.
 
1:40 AM
It's the name of a hill.
It's where there final goal is (I don't want to say too much more based on where you are in the book)
 
A spaceship disguised as a hill.
My location in the book can't be expressed as a real number.
 
@feersum probably the best comment I have seen in tnb
 
Which one?
 
"A spaceship disguised as a hill"
 
codegolf.meta.stackexchange says: this question [the Sandbox] has more than 30 answers already. Did you read through all the existing answers first to make sure your answer will be contributing something new?
all 4179 of them?
 
1:53 AM
Yes, and since this is the Sandbox, you should also read through the 7626 questions on main as well.
 
there are occasions in the past in which I've read through every question in a tag
in order to ensure that the question has no correctly tagged duplicates
 
@JanDvorak Pyth kind of has that with =>TZ meaning T = T>Z
 
in Jelly, that means Z((input = input) > T(input)), in monadic context
hmm, I wonder if it's ever useful to use = to create an array of 1s the same length as the input
 
totally cool programming language: alpha.trycarbide.com
 
2:15 AM
Need some help : People are commenting here asking me to accept both the Truthy/Falsey values for ""(empty string). What should I do?
(PS: It's been 9 hours since posting the challenge, and 28 answers are already there!)
 
you should probably have allowed either answer, or even a crash, in that case
the logically correct thing to do in that circumstance is to crash
 
@Arjun hm. either both, or true imo
 
however, if many existing answers have already special-cased an empty string, then you should probably just leave it
 
Plus, people are complaining about the consistency of the Truthy/Falsey values. They are saying that multiple values for Truthy/Falsey should be allowed.
 
@Arjun oh god, not this again
16
Q: Keep your golfing in your code, not in inputs and outputs

FatalizeI am becoming more and more annoyed at the ever-increasing number of rules about what is deemed acceptable as inputs and outputs to programs Here is a compilation of such rules that I found: Interpretation of Truthy/Falsy Empty string as a truthy value Can numeric input/output be in unary? Sho...

please refer anyone who complains about that there ^
 
user165474
2:24 AM
Hey I have more rep than Mego on SO :D
 
user165474
:P
 
@Downgoat thanks!
Question : Does Turing equivalent mean Turing complete?
@HyperNeutrino Congratulations!
 
user165474
Thanks :)
 
user165474
lol :P
 
:p
CMC : Given input, output input.
 
2:30 AM
@Arjun pretty much yes in practice; there might or might not be a semantic difference in the case of "uncomputable"/"superTuring" languages
@Arjun Jelly, 0 bytes:
 
@Arjun Bash, 3 bytes: cat
 
0
A: Sandbox for Proposed Challenges

Stephen SInfinitely Print 1/(2^n) code-golf kolmogorov-complexity An infinite number of mathematicians walk into a bar. The first one orders a beer. The second one orders half a beer. The third one orders a fourth of a beer. The bartender stops them, pours two beers and says, "You're all a bunch of i...

 
@Arjun _=>_ 4 bytes, JavaScript
 
actually there are a ton of languages where cat is zero bytes long
 
Cat?
 
2:31 AM
it's probably the second-most common interpretation of the empty program (after a no-op)
 
user165474
Every language with implicit input and output, 0 bytes:
 
@Arjun cat is the "copy input to output" operation
 
user165474
@Arjun cat = concatenate ~= output the input
 
user165474
ninja'd :(
 
Oooh.
 
2:32 AM
it's named after a UNIX command (which can actually do a few other things, but concatentating a list of one thing is a fairly vacuous operation)
 
poll: do you like ice cream with chunks in it
i.e. chocolate chips, cookie dough chunks, etc.
 
there are some languages where cat is much harder
e.g. Malbolge
 
@Riker Yup
 
cool
 
user165474
@Riker Yes
 
2:33 AM
if you do
 
user165474
haha "cool"
 
@Riker that's an interesting question: yes in theory, but I'm not sure I like any of the foods that are commonly used as chunks in ice cream
 
do you ever try to get all the little chunks out?
 
user165474
Er, no.
 
from the surface of the ice cream
 
user165474
2:33 AM
:P
 
Yup
 
without getting the ice cream itself
 
I eat the chunks first
 
yes
 
Then swallow the ice cream
 
2:34 AM
i'm feeling quite fulfilled, as I was able to spoon out all the little chunks of cookie dough from my ice cream
and then I ate them separately :D
 
user165474
Congrats! :D
 
Wow!
 
:p
 
user165474
@Arjun Were you Dobby at one point?
 
Yes, Master
 
2:35 AM
huh, cool
@Arjun "Dobby is a free elf Arjun!"
 
:p
 
user165474
Ah I see. :P
 
user165474
You were also HyperNeutrino at one point >___>
 
Yup
 
lol
 
user165474
2:36 AM
Hey my rep divided by 100 is the answer to life.
 
user165474
Thus my rep is the answer to having 100 lives
 
user165474
@HyperNeutrino logic
 
@HyperNeutrino Not anymore!
 
user165474
Yay :D
 
user165474
Ooo thanks :D now my question has a score of 50 :D
 
user165474
2:38 AM
+52/-2
 
Got any badge?
 
user165474
Nope, there's no badge for that.
 
For 50
 
user165474
nope
 
okay
Am I the only one who plays Clash of Clans in this chatroom?
 
2:40 AM
No.
 
Trophies?
And TH?
 
user165474
Eh that was my brother I think he just went offline for a bit, I'll ping him
 
user165474
@TauNeutrino See Arjun's questions.
 
user165474
Also there's a badge for question score 10, 25, and 100.
 
user165474
And 1k, 2.5k, and 10k views.
 
user165474
2:42 AM
I haven't gotten gold on either of those categories.
 
Portugal won Eurovision
 
@TauNeutrino are you a sock of somebody
 
I must say, I disapprove.
 
i.e. an alt account
 
user165474
No, that is my brother.
 
2:44 AM
Really? Don't think so.
Your brother or You?
 
user165474
That is my brother.
 
I am a sock
 
user165474
>_>
 
user165474
I will unupvote that one answer of yours if necessary to get you out of here. It was a nice answer but I can do that. jk lol that's not acceptable behavior
 
2:45 AM
No
 
> I'm convinced that mattress/furniture stores exist in a quantum superposition of grand opening and going out of business sale.
It is both and neither at once until an observer records the state at which point it becomes one or the other.
But because you know exactly where the store is located, you cannot know how fast it is going out of business because of your uncertainty about its business momentum.
All around us, all the time pairs of anti-discount mattress stores and discount mattress stores are popping into existence, forming the quantum memory foam that is the basis for the universe
this is scarily accurate
 
<img src="http://www.wigwam.com/products/images/Product/large/F7215_1_.jpg" alt="Image result for sock"/>
 
user165474
Ehhhh. Sure. Well that is very accurate. Scarily so I would say.
 
Nope dang it it didn't copy
 
@TauNeutrino no html needed
just post the image link
 
2:46 AM
Yup that is a selfie of me
 
user165474
"A selfie of me"
 
Dobby loves Socks!
 
user165474
No, it's a selfie I took, except it's of someone else.
 
@HyperNeutrino Exactly
 
user165474
Yes you do.
 
user165474
2:47 AM
You can edit your messages.
 
user165474
Press "up arrow" to edit your messages.
 
user165474
Or...you can do that...
 
kek
 
smek the snek in the neck
 
I wish you could do s/foo/bar like in Discord
 
user165474
2:49 AM
You can do that in Discord?
 
Yes
 
and skype for mac
 
It edits your last message
 
user165474
:O
 
not skype for windows
 
user165474
2:49 AM
Wow!
 
Doesn't take regex tho
 
you can use trailing slash or not on discord, need it on skype
@Phoenix skype does
supports full sed
 
user165474
Aw...
 
Right, but Skype is shite, so it isn't worth mentioning.
 
user165474
If you use trailing slash on discord, it will edit the slash into your message
 
2:50 AM
not for me idt
huh, it does
@Phoenix I like it <shrug>
 
why tho.
It's worse than discord in nearly every way.
 
user165474
@TauNeutrino
 
And we're promised screensharing soon, too.
 
You called?
 
user165474

Sandbox

Where you can play with chat features (except flagging) and ch...
 
user165474
2:52 AM
You should go here and fiddle around with SE chat.
 
Yee
 
Question : To be Turing complete does a program need to have all the characteristics of Turing Machine (ie infinite tape and conditionals)?
 
user165474
You should go here and fiddle around with SE chat.
 
@Arjun You have to be able to emulate a turing machine, so yes.
 
@Arjun it doesn't need to be able to implement everything a Turing machine can do directly, but it needs some way to simulate it
perhaps through many levels of abstraction
 
2:56 AM
Well, you do need infinite memory, or you have at most an FSM.
 
there are some languages which don't look at all like normal programming languages but are nonetheless Turing-complete, such as Fractran and But Is It Art?
 
/// is I think the best example
 
however, there are some hard limits that all Turing-complete languages must have: the two most frequently violated are that the language must have some way to store an unbounded amount of data, and (assuming the Church-Turing thesis) must have some way to write an infinite loop
(that said, someone came up with an esolang that's Turing-complete but in which you can't prove that any specific program has an infinite loop; it is, however, known that at least one program must, we just can't prove it)
 
I think needing to be able to have an infinite loop is pretty easy to assume.
Otherwise the halting problem stops making sense.
 
right, both those requirements should be obvious when they're pointed out
 
2:59 AM
@ais523 What lang?
 
they're insufficient by themselves, but necessary
@Phoenix onoz; sorry for the slow answer, I was stalling trying to search for it
oh, hmm, it hasn't been proven TC, just computable
I'm pretty sure it's TC though
 
@ais523 There's an example of a truth machine, which is an infinite loop.
So.
 
How do I enter Image?
 
@Phoenix you can't prove it, though
 
3:03 AM
I see.
 
Well, bye everyone
 
\o
 
\o/ > Help, I'm sinking!
 
Help granted.
 
I don't think Onoz is TC. It has to be able to interpret BF for that, and it's possible to make a proovable infinite loop in BF.
 
3:05 AM
Question : Is there any good Computer Science YouTube channel worth watching (like ComputerPhile)?
 
TomScott, but he does a lot of things other than CS.
Suckerpinch
(Also does non-cs things)
 
0
A: Sandbox for Proposed Challenges

ais523Elastic tab expansion Background The tabs versus spaces war in programming has been going on a long time, basically because spaces are too low-level to have all the properties you'd want for alignment and indentation, but tabs can't be relied upon to work in all contexts (with some programs opt...

 
I guess he's got a PHD in Linguistics.
I like the way he explains things.
I have seen few videos of him both on CP and his own channel
@Phoenix Any channel other than these two?
 
Techquicke, sometimes.
It's usually more basic stuff
 
@Phoenix the thing is, my guess is you can compile BF into it, but you can't prove the compilation works
perhaps it's TC but not provably TC?
 
3:11 AM
Everything about that feels wrong, but it makes sense in a way.
 
3:22 AM
How exactly does the unanswered queue work
codegolf.stackexchange.com/q/98821/65532 this question has an answer from november 2016
but it shows up at the bottom of the unanswered list
 
@numbermaniac sorted by votes, requires questions to have no upvoted answers IIRC
that question has a negative score (so it's going to appear near the bottom of the unanswered list), and its answer is not upvoted
SE assumes that if a question has no upvoted answers, probably none of its answers are useful; it makes a lot of assumptions that don't make sense on this site
(given that we typically ask questions not to find out the answer, but to give people something to compete over)
 
user165474
@Mego
 
user165474
user image
3
 
Mego IRL
 
user165474
3:37 AM
I found you at last, Mego! :D
 
noot noot
 
Is there an easy way to make a tuple that contains itself in Python?
 
user165474
Um, does that even work?
 
OCaml has a builtin for creating structures that contain themselves, but it doesn't work on tuples because it can't infer a type for the resulting tuple
 
@ais523 What if you use the -rectypes switch?
 
3:49 AM
# let rec x = (x, 1) ;;
val x : 'a * int as 'a = (<cycle>, 1)
looks like it works then!
come to think of it, I'm not quite sure why OCaml has that builtin; I've never found a use for it
-rectypes is pretty neat, actually
it lets me implement SKI combinator calculus without complaining
 
That flag really came in handy when testing my own HM implementation.
 
# s i i ;;
- : ('a -> '_b as 'a) -> '_b = <fun>
seeing the mockingbird in a strongly typed language fills me with fear and dread for some reason
that's just so wrong
 
Uh oh, the dreaded weakly polymorphic types.
 
that's just because I'm trying to create a mockingbird value
I don't think that'd have happened if I gave it an argument
# let m () = (s i i) ;;
val m : unit -> ('a -> 'b as 'a) -> 'b = <fun>
right, if I create a mockingbird generator it's fully polymorphic
# let l () = (s i i) (s i i) ;;
val l : unit -> 'a = <fun>
and there's proof that you can use recursive types to escape the type system
if we try to use Curry-Howard on OCaml -rectypes, we can get it to prove anything
 
How is that different from let rec f () = f ()
 
3:56 AM
no recursion
 
It's an infinite loop either way, no?
 
your suggestion is the more common way to break out of OCaml's type system, though
and yes, it's an infinite loop; I think you can prove that all type system breaks either go into an infinite loop, or throw an exception, or run unsafe code
 
Can you evaluate it without an infinite loop in Haskell?
 
what do you mean by "evaluate"?
(interestingly, Haskell's spec treats exceptions and infinite loops as semantically equivalent; either can be optimized into the other)
 
Like l ()
Or maybe 2 + (l ()) would be more fun.
 
4:00 AM
the dummy argument in OCaml is a trick to prevent the thing running as soon as it's defined
Haskell doesn't need that; that sort of dummy argument is just ignored
however it'll go into an infinite loop when it's forced (e.g. by adding 2 to it)
 
4:14 AM
3
Q: Gilbreath's Conjecture

isaacgSuppose we start with the infinite list of prime numbers: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ... Then, we take the absolute differences between each pair of numbers, repeatedly: [1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, ... [1, 0, 2, 2...

 
o0 what is it with the infinite lists
 
user165474
4:33 AM
How can I check my Generalist Badge progress (if it were available)?
 
@Arjun Please don't leave +1 comments on answers. They're not considered constructive and will be deleted at sight.
 
Anonymous
@HyperNeutrino I have a stuffed penguin that looks very similar
 
user165474
Interesting! Yeah I don't know how I was never reminded of you when I saw my stuffed penguin :P
 
I see a lot of "+1 for <something>" comments on PPCG answers; presumably those must be allowed, then?
 
Anonymous
After eating dinner I feel like a stuffed penguin
 
user165474
4:43 AM
lol
 
@numbermaniac If it's actually +1 for this good reason, that's fine. +1 because your code contains this emoji, not so much. +1 without any reason, definitely not.
Also, just because some things slip through the grid doesn't make them good practice.
 
Anonymous
 
user165474
^-^ it looks like a very happy penguin
 
You want a space before the ^ or it will do caret reply
 
user165474
well there's a slight issue to the caretreply script
 
user165474
4:51 AM
yeah
 
5:51 AM
> +1 because your code contains this emoji
unfortunately usually considered a better reason than it actually is, empirically
@Phoenix we have such a script?
 
@EriktheOutgolfer yes
 
Playing Rainbow Six Siege someone else link
 
:37385645 that's cool!
huh? it's just a ping? (continuing trying in the sandbox)
 

« first day (2297 days earlier)      last day (1615 days later) »