« first day (2157 days earlier)      last day (2981 days later) » 

00:22
@TuxCopter it does stuff in .pyi files
What are .pyi files
@TuxCopter python yourself it
Oh, stub files
00:47
Chat mini-challenge! Print anything to stdout in Python 3 without using parentheses.
@xnor @Dennis ^ You Python golfers might like this. I might be missing something obvious, but my solution is pretty tricky/fun
Dang it, I forgot about that!!
But I didn’t think of it, so hey, I’ll count it. I recommend looking for an import this-less solution, though~
'night
@Lynn 0 bytes, call python without a file :P
00:53
Why does that even exist…?!
Because Python
>>> import sys
>>> sys.stderr = sys.stdout
>>> 1/0
Traceback (most recent call last):
  File "<pyshell#27>", line 1, in <module>
    1/0
ZeroDivisionError: division by zero
Output is blue in IDLE, not red.
Oh, I like that one a lot!
wait that's good
i was actually just trying the same thing and it didn't work in 3.5.2
00:58
@xnor Huh, they must've changed that after 3.5.0.
oh, it works in the REPL
but not if you execute from a file
C:\Users\Conor O'Brien
λ python -c "import sys;sys.stderr=sys.stdout;1/0" 2>nul
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ZeroDivisionError: division by zero
@xnor Works here. tio.run/nexus/…
@Lynn Does list(map(print, [1,2,3])) count as "using parentheses"? They're not associated with the print function...
That’s invalid; I count four parentheses.
01:00
0 + 3 bytes for non-standard invocation, python -v -c ""
~ % cat q.py
import sys
sys.stderr=sys.stdout
1/0
~ % python3 q.py 2>/dev/null
Traceback (most recent call last):
  File "q.py", line 3, in <module>
    1/0
ZeroDivisionError: division by zero
~ % python3 --version
Python 3.5.2
This one seems to work fine
@ConorO'Brien That prints to stderr it seems
oh, true
uppercase V works
>>> help
Type help() for interactive help, or help(object) for help about object.
Blue in IDLE.
Well, that’s a REPL. 1 would be a valid solution in a REPL.
That’s just a fancy __repr__ (or is it __str__?) of the help object
both, it seems
01:06
Yeah, doesn't output to STDOUT on TIO unless I put parentheses.
Alright Lynn, time for you to show your solution?
I kinda wanna see if someone will come up with my solution…
I’ll narrow down the problem, which is both a hint and a lazy way to invalidate every attempt until now:
Write a Python 3 script, invoked without flags, that imports no modules, contains no parentheses, and prints something to stdout.
darn
oh
this is easy
wait
I was guessing that it was an import-less solution, actually.
python 3, nevermind
Couldn't think of anything though.
01:17
Super-awesome cheddar answer you should upvote (not by me):
1
A: I'm too cold, turn up the temperature

ZavadaCheddar v1.0.5, 61 bytes Unfortunately Cheddar has no built in sleep function, so I need to use cheese with the ping command, meaning I can't sleep in intervals under one second. I understand that the OP doesn't want anyone to increment above 2, but I think the solution is cool so I'm posting an...

Eh, I mean, it doesn’t do what the OP asks
it doesn't?
> The increment time must always be 500 millis per increment.
tbh he could just change it to sleep 0.5
not a big problem
It could though—yeah.
01:23
@Mego ... I don't break everything I touch, it's just always the sudo command that breaks
This feels like a slippery slope: IO.exec("seq 40 2 72|pv -qlL2") is shorter, for example
btw does anyone with node want to help me test another cheddar thing? :3
Anyway, I dunno if anyone is still thinking about the py3 riddle, but here’s my solution (spoiler!)
> PyImport_Import
python api is beautiful
@Lynn what riddle?
01:33
@Lynn sneaky :D
22 mins ago, by Lynn
Write a Python 3 script, invoked without flags, that imports no modules, contains no parentheses, and prints something to stdout.
4
hmmm
oh i got it
can someone explain what the arguments to __import__ are? Python docs say globals[, locals[, fromlist[, level]]] but that isn't very clear
wait nvm
@Lynn Very, very interesting.
@Downgoat importlib.import_module is the preferred function in Python 3+
01:38
oh
> Reference Count
Is Reference Counting Python's terminology for GC?
@Downgoat there's a gc module, I think so
you can use a debugger to see what importlib does on itself
Reference counting is Python’s terminology for reference counting, surely
What is reference counting then ._.
> In computer science, reference counting is a technique of storing the number of references
In computer science, reference counting is a technique of storing the number of references, pointers, or handles to a resource such as an object, block of memory, disk space or other resource. It may also refer, more specifically, to a garbage collection algorithm that uses these reference counts to deallocate objects which are no longer referenced. == Use in garbage collection == As a collection algorithm, reference counting tracks, for each object, a count of the number of references to it held by other objects. If an object's reference count reaches zero, the object has become inaccessible,...
O_o then what is point of decrementing a reference
decrementing a reference seems to have the same effect as queuing it for GC?
01:41
@Downgoat so when it's zero it's deleted
@Lynn oh i got it!
gimme a second to write it up
Nice, what’s your solution?
@Downgoat no, if there are a = FooObj(); b = a, ref count of fooobj is two, deleting either decrements the ref count, so you have to delete both to delete fooobj
@noɥʇʎPʎzɐɹC oh DECREF does to zero?
huh
@Lynn wait nvm
I though decorators would worl
01:42
@Downgoat huh?
but you need parens to define a function
*grins*
C++ Question: is there some macro/compile-time syntax for checking if a variable exists?
I know ifdef can check if a macro has been defined
Wow, you can build pypy with cpython or build pypy with pypy...
@Lynn Ah jeez. Forgot about those.
I'll try to remember to pose this riddle to my coworkers when we get back from vacation. :D
01:50
Sweet, let me know how that goes~
@noɥʇʎPʎzɐɹC so python classes are basically like functions which return an object?
@Downgoat Yeah. Cough, cough, @Maltysen.
@Downgoat I mean, internally, that's basically what C++ classes are too.
@Downgoat and their type is type
they also have handles for __new__, __init__, @property, metaclasses, abc etc.
@El'endiaStarman please do so and come back with results :D
@Downgoat you can use PyPy's RPython and JIT to build a JIT'd Cheddar. They used it to build ruby with JIT, and php
02:09
@Lynn Nice! The closest I got was this, but there's still no way to avoid the parens.
In other words, as far as your CMC goes, I didn't really achieve anything. :P
@Lynn arrghhh nice one!
the closest I got was:
class X:
 __neg__=print
-X()
The simplest solution I figured out with only two parentheses was [x for x in map(print, [1,2,3])].
Actually, help() also works, even on TIO.
@El'endiaStarman I would have thought that would be print("hello") :P
@Maltysen Ah right, duh. :P
Still operating under the constraint that print not have any parentheses associated with it...
02:28
$ find B-files/ -maxdepth 1 -mtime -1 -type f|wc -l
68
It's Christmas Eve, what am I doing with my life
(68 OEIS b-files created since yesterday)
TBH I thought tomorrow was Christmas Eve
@ConorO'Brien In some U.S. minor outlying islands such as Baker Island, it's about 2 in the afternoon on Dec 24 (UTC-12:00)
And it's 4:30 PM on Dec 25 in LINT (UTC+14:00)
@Lynn very, very hard. closest I got was:
a=1
a.__getitem__=print
a['hi']
will continue trying.
@noɥʇʎԀʎzɐɹƆ that's what I said about overloads not using the instance versions of the methods
yeah
It turns out scammers claim to be from Nigeria because only gullible people answer scams, and only gullible people are gullible enough to believe a scam from nigeria (the most common). (microsoft.com/en-us/research/publication/…)
@Lynn I found a cheaty solution:
def a():
  try:
    a()
  except RuntimeError:
    a()
a()
02:51
@noɥʇʎԀʎzɐɹƆ btw can you tell me of a python library that exports a class?
it makes python segmentation fault, I doubt that's "allowed"
@Downgoat huh?
I need to test if classes work in my binding
@Downgoat from collections import defaultdict
it's builtin
ok thanks
02:57
@noɥʇʎԀʎzɐɹƆ I can also do import collections; collections.defaultdict right?
@Downgoat no, why would that be?
wait see updated
@Downgoat no?
defaultdict is not a module
02:58
oh
then what is it?
@Downgoat a class in the collections module
wait I did a stupid. See updated
ok thanks
03:14
Got a Google Home for Christmas. Fun so far :D
@Geobits nice!
It's quite a bit more capable than the OK Google on my phone. I'm liking it so far.
I probably should've seen that kick coming, given the fact that I removed the context to that joke
I'm honestly not sure what part of that was supposed to be context. Or a joke, for that matter.
:( I missed joke now
        return Nan::ThrowTypeError("No exception found");
TIL I have to throw an error that there was no error found
03:29
@Lynn actually that solution does stderr ...
2 hours ago, by Lynn
Anyway, I dunno if anyone is still thinking about the py3 riddle, but here’s my solution (spoiler!)
^ This solution?
Anonymous
I have a 2-hat lead :D
Anonymous
And I'm #7 in the network
Who's #1?
Wait what's the highest upvote-to-views ratio question on PPCG?
Also I want to post Pyramid on "Showcase your language" but it's locked :(
03:40
@Dennis no, mine
@Qwerp-Derp Not sure if I'll have time today/tomorrow with it being Christmas and all, but I'll try to edit and unlock the showcase by Monday.
I rarely self-answer, but I need that Egoist hat. :P
Dec 19 at 2:24, by Dennis
The next person who abuses his privileges to get hats will get a suspension instead, until the day after Winter Bash.
answer privledge abuse eleven!11!!! :P
Anonymous
@Dennis Trying to catch up? :P
Self-answering is neither a privilege nor abuse thereof, but I could use a vacation.
Try? Do. Or do not. There is no try.
Anonymous
So you're going with the second option :P
03:46
23 hours ago, by Mego
@Dennis I'll let you guess :P
If it's unlocked, can I make another Clojure showcase? The old one is completely abandoned
Actually it's been abandoned for 3 months
04:04
As part of reopening, the thread is going to be made Community Wiki, so you can (and should) edit the pre-existing Clojure answer instead of making a new one.
I'll probably write a vim answer. Fun!
Screw it, I'm going to advertise my challenge.
8
Q: Maths Metagolf Mania!

Qwerp-DerpMathemania Specs: Every piece of Mathemania code starts off with the number 2. From the 2, you can do the following operations: e: Exponentiation. This command's default is squaring the number. f: Factorial. This command's default is using the single factorial on the number (using f on 2 = 2! ...

Are the specs in my challenge good enough? Or are there still some caveats?
I kinda like Mathemania, might make a full language spec out of it
04:19
Great! I managed to get a splinter under my fingernail.
congrats!
how in the world did you do that though o_O
@Dennis How did you get it in in the first place
It wasn't easy, but I'm skillful like that.
Old wooden table, finger slid over edge.
*winces in sympathy*
04:28
Nah, it's already out.
Quite frankly, it doesn't even compare to finding out another one of my favorite TV shows was canceled before it got a proper ending.
Masters of Sex
Not as bad as the title makes it sound.
04:46
> When political beliefs are challenged, a person’s brain becomes active in areas that govern personal identity and emotional responses to threats, USC researchers find
political beliefs -> existential crisis and threats
I kinda want to golf the first 100 integers of Mathemania by hand
> "Then I'll huff, and I'll puff, and I'll blow your house in." said the big bad wolf, only to perish as the blazing inferno of vacuum oblitterated him, the three little pigs, their houses, and everything else actually.
05:03
@Dennis Another one? May I ask what the other ones were?
Merry Christmas. It's 12:05 AM here.
@noɥʇʎԀʎzɐɹƆ ayyy same time zone
@Sherlock9 John Doe, Arrested Development, Futurama, Alcatraz, Alphas, Terra Nova...
:)
heh, google changes it's bg if you search christmas or hanukkah
Sigh, that's a very long list
05:27
Question: when answering via anonymous function, is it okay to have other setup code outside the function? Contrived example in Python: x=42;lambda n:n+x
Of course I would count the bytes for x=42; as part of the answer.
yes
imports are a common use
Okay, good. It made sense when I thought about it in Python terms (and I think I've actually done it before in tinylisp), but it looked odd in Pip.
Probably because 97% of Pip answers are full programs, not functions.
Still kinda weird... I'm writing an answer for Incremental quine, and to actually call the function, you have to put extra code in the middle of the "quine." But, them's the rules, I guess.
Well, okay, now I'm puzzled again. The task is "write a function that outputs [the characters] of its source code"... which technically doesn't include the setup code? Hrm. I'll just post my two-bytes-longer version that doesn't require any setup.
"could not establish or maintain a connection with the server" is TIO backend borked?
Oops sorry forgot the TIO room
07:02
@Dennis Can you push Pyramid to TIO?
I might have to change it around a bit though
 
2 hours later…
08:47
Hello?
Yes. Hello.
Finishing off the Pyramid interpreter
 
1 hour later…
10:09
Hey
10:25
BREAKING NEWS: Christmas is cancelled, it was closed as a dupe from last year
17
ono Q_Q
@flawr Not for me.
@flawr Hammered by Santa
Eastern Orthodox Christmas will happen to be a dupe from this year, January 7th.
@LuisMendo because santa is hammered
@LuisMendo Did you see this? :D
10:30
@flawr Hm no
Oh, now I see. I quickly saw something in CHATLAB
hm it was edited numerous times, thet tilte in chatlab was even better=)
The tree image :-)
> Error in matlab, can you please run this?. [this is not duplicate] [this is wrong->] [duplicate]
This is the best question title I've seen since I am on SO
:-D
I've just upvoted just for the tree image
10:34
@LuisMendo The comment?
@TuxCopter I need to remember this the next time one of my questiosn get closed^^
> Subscript indices must either be real positive integers or logicals. ERROR halp
20/20 title
avocad is missing
right
@zyabin101 ?
10:39
The comment with the link to the tree.
The code actually produces the tree when run in Matlab
11:05
Honestly I don't get what's goign on here, but it looks beautiful!
11:22
0
Q: Merry Golfmas, Everyone!

FishProHDIt's Christmas, everybody, and here's a code golf challenge to celebrate. You need to make a program to print out a present. Specifically, the words "Merry Christmas". BUT, there is a catch, this program must only work if it is the 21st of December, if the code is run on ant other day then the pr...

Pretty sure it's a dupe but can't find it...
0
A: Sandbox for Proposed Challenges

WinnySprunge this! Your task is to create a program that creates a paste on sprunge.us. Your program must receive the text to sprunge from your language's usual input mechanism, such as standard in. This is a code golf, so shortest answer wins. Here is an example solution taken directly from the spr...

Any thoughts on my sandbox question
11:38
@Winny Input is clear (the sprunge content), but the output?
The URL of the newly created sprunge, the ID, or...?
@zyabin101 just the output from the webserver (which is the url)
i can clarify that
Okay.
In other aspects, it SeemsGood
Fun fact: The Community spirit participates in the Winter Bash. So far, it has 3 hats on PPCG.
I've updated the uestion @zya
@zyabin101
Abominable, ??? and Just Here for the Hat.
@Winny Thanks.
My hat overlaps with my chat textbox.
11:58
Lol
I still only have 5 hats (Vader, Solstice, Trophy, Christmas, Hanukkah)
@PhiNotPi XD
0
Q: Holiday Headache

ErresenI have a headache. I need headache pills. I'll tell you the last few doses I've had, and you tell me when I can have my next dose, without overdosing. I'll give you this string: P: 00:00, I: 02:00, P: 04:00, I: 06:00 And you'll give me this: Next Paracetamol: 08:00, Ibuprofen: 10:00 Input: S...

@Sherlock9 I'm Your Father, ???, Just Here for the Hat, Buche de Noel, (don't know the last hat's name).
"Where in the World" and "I Have A Little Dreidel"
12:10
my resistor network brute-forcer I wrote recently (just posted on Github): github.com/PhiNotPi/Resistors
The former is meant to be question marks, since it's secret.
I've considered adding more than just series and parallel connections, but I'm not sure if the added functionality will improve the results at all.
What will it be used for?
Antichamber is borking my brain halp
Nothing really, it was an attempt to answer questions similar to this puzzling.SE question:
8
Q: Use a circuit to multiply two resistances

ghosts_in_the_codeGiven two resistors of unknown resistances and an infinite supply of wires and other resistors, create a circuit using multiple series and parallel combinations such that the effective resistance of the circuit is equal to the product of the two unknown resistances. Mathematically (for those who...

12:20
@TuxCopter the non-Euclidean space thing game right?
But it turns out that even an approximation is impossible, since it is impossible to create a circuit in which doubling all resistors more than doubles the overall resistance (thus making x^2 impossible).
0
Q: Sprunge this! Sprunge that!

WinnyYour task is to create a program that creates a paste on sprunge.us. Your program must receive the text to sprunge from your language's usual input mechanism, such as standard in. Your program will POST the text read from input to http://sprunge.us/ as multipart/form-data with the form field name...

It's possible to approximate sqrt(X*Y) though
@Winny thought: 1 hour is too short
12:27
ah :(
how long should I let a proposed question sit in the sandbox @betseg?
@Winny quite some time.
Aug 11 at 17:33, by zyabin101
@VTCAKAVSMoACE We don't and we won't. The time to accept is whenever the heart feels.
should twelve hours suffice? @zyabin101
@Winny whatever the heart feels.
:)
I suppose I better make a splash than never post a question at all.
I had put a similar question in the sandbox half a year ago and got several negative responses (all for good reasons), mainly because it was too precise and constraining.
A few days to a week is a good length of time to wait to make sure several people have had a chance to give feedback on a sandbox post. If there isn't much feedback after that, I usually post a link to the sandbox post here in chat, to ask for last minute feedback before posting.
12:45
^ regarding the most recent "Golfmas" challenge
@PhiNotPi I would say it's a dupe of the Is it Christmas? challenge.
@El'endiaStarman I think you'll like some the gifs in this collection: szimmetria-airtemmizs.tumblr.com
@noɥʇʎԀʎzɐɹƆ stderr or not, I count like, eight parens
@Maltysen I was very convinced you (or someone else) would find the solution after you mentioned decorators :)
13:22
@flawr Wow, there's definitely a lot of amazing stuff in there.
I just finished scrolling through the entire collection... :P
ohboy
another secret hat
Too bad the bert hat doesn't really work with my profile pic

« first day (2157 days earlier)      last day (2981 days later) »