« first day (2163 days earlier)      last day (2977 days later) » 

00:00
mypy does static type checking with full support for python features and generics, duck typing, etc. and is by the same foundation
primes: List[int] = [] is valid too
Isn't it only the syntax? Not semantics?
@ZacharyT only syntax, but mypy issues accurate warnings
other_var: int  = 'a'  # Flagged as error by type checker,
                              # but OK at runtime.
Haven't they had that for function parameters?
sane_world: bool
if 2+2 == 4:
    sane_world = True
else:
    sane_world = False
@ZacharyT and for return values
this is an alternative to # type: blabla
Anonymous
@NathanMerrill Screenshot?
00:03
sane_word is not necessarily true in python, you can modify the value of literal 2 and 4
technically it's all syntactic sugar for modifying __annotations__
Anonymous
@NathanMerrill Yeah you should be able to just mine that.
>>> import ctypes
>>> ctypes.cast(id(4), ctypes.POINTER(ctypes.c_int))[6] = -6
>>> 3
3
>>> 4
4294967290
>>> 2
2
>>> 2+2==4
True
>>> 2+2
4294967290
Anonymous
00:07
It will probably be slow with just an iron axe though
hmm.. doesn't let me
probably need an upgraded axe
Anonymous
I don't think so. You can mine anything without any axe at all. The hitbox might just be being weird.
Anonymous
You could shoot it to death.
Oh great. Imagine if JS gets this c***.
00:09
>>> 2+1+1
4294967290
@ZacharyT there is literally nothing called four in python.
shooting it works
its weird, because I can right click the nearby trees just fine, just not the rock
>>> import ctypes
>>> ctypes.cast(id(9), ctypes.POINTER(ctypes.c_int))[6] = 8
>>> 8
8
>>> 8 + 9
16
>>> 9
8
>>> 9/9
1.0
LOLOLOLOL. Ruby. Is. Wat.
NO MORE ESOLANGS LINKS
00:11
1LET4=5
2PRINT2+2
>>>5
@noɥʇʎԀʎzɐɹƆ TBF I'm pretty sure this only works because of a compiler optimization
Here let me disassemble the bytecode to see
@quartata eight and nine still have different ids, which means memory addresses in CPython
No I know.
 class Fixnum
  def +(arg)
    if self == 9 and arg == 10 then
      return 21
    else
      return self--arg
    end
  end
end
@ZacharyT what do you have against esolangs.org
00:14
If TIO runs out of paper, it's this guy's fault.
10
I'm saying that the compiler doesn't realize the cast has side effects so it only loads the 9 you modify once and uses it for all those operations
@noɥʇʎԀʎzɐɹƆ Well I got some... interesting results.
@Dennis @_@
I'm against the random spamming of language links.
I thought power shell only ran on windows
Huh
@ZacharyT it was relevant to the ongoing discussion about 8==9
Anonymous
@Doorknob You changed 2 to mean 3. When print tried to call os.write, it used 2 as the stream number for STDOUT. Since 2 is now 3, well...
00:17
Ah, I... see.
Are you being serious Dennis? Do they even ALLOW that on TIO?
❯ python3
Python 3.5.2 (default, Jun 29 2016, 13:43:58)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.cast(id(9), ctypes.POINTER(ctypes.c_int))[6] = 11
>>> 9 + 10
21
Anonymous
@ZacharyT I highly doubt he has a printer hooked up to his AWS instance.
Anonymous
(or whatever hosting he uses)
Nah, I did it in pure Ruby. Yours is just ... C.
00:18
@Pavel Windows PowerShell runs only on Windows. PowerShell Core is not quite the same thing, but it's open source and runs pretty much everywhere.
Til
>>> ctypes.cast(id(2), ctypes.POINTER(ctypes.c_int))[6] = 3
>>> 2
3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: raw write() returned invalid length 3 (should have been between 0 and 2)
3
>>> 2-2
3
0
>>> 3-5
[1]    37551 segmentation fault  python3
@Mego DigitalOcean. If they plugged in a printer, it's their own fault.
JavaScript: []+[]...
@Mego that's actually really interesting
00:21
@Dennis do you want a mini challenge that turns out not to be so mini?
Well, I do.
given a multiset with L elements, iterate over all its partitions using O(L) memory
that is, you can't get all partitions in a list and check for duplicates
you have to generate them without duplicates right away
I was wrong.
@orlp I'm not sure I understand. If the multiset's elements are all different, you have to generate all partitions.
Golfed two bytes off my code! \o/ Have to entirely rewrite the explanation. /o\
00:26
The bacon one?
Too. Many. Emojis.
All from my phone off course
Tied with Jelly now, yes?
@Dennis but if they aren't...
e.g if you have {2, 2, 3}
then {2, 2}, {3} is a partition
{2, 3}, {2} is as well
but if you now also generate
00:27
off course? We're on a track now?
{3, 2}, {2} you're doing something wrong
because now you generated a duplicate partition
Nevermind, I misread iterate.
@Dennis I didn't see a jelly answer yet
1
A: Happy Bacon Day!

DennisJelly, 26 bytes 4“\ḊƭVṠ’bị“-=()”s5ẋ€ḷẋµ1ịṭ This is a dyadic link (function) that returns a 2D array. Try it online!

@Dennis an equivalent challenge
00:33
In that case yes
is to produce all nonnegative integer vector partitions
e.g. [3, 1, 2] = [1, 1, 1] + [2, 0, 1] is one possible partition
(again in O(l) memory where l is the vector size)
I'll try to take the last one or two off once I have access to a computer so I can test it easier
There needs to be a language just for solving ascii art and Kolmogorov Complexity challenges. Give it it a string and a pattern to repeat it.
Unless there already is one that works like that and I haven't heard of it.
Happy New Year's Eve!
@orlp That sounds painful. Memory golf is really my forte.
00:38
@Pavel V is almost that. Charcoal is also pretty close
Haven't heard of charcoal.
Is it on esolangs.org?
@Dennis do you think this would make a decent challenge?
or is O(l) memory too vague?
@Pavel no. It was made by Mars ultor (ascii-only)
-1
Q: New Year's Eve Ball Drop

PythonMasterThis challenge is dedicated to the day before the New Year (January 1st), December 31st! In order to create a valid answer, you need to recreate the final 10 seconds of the iconic balldrop in New York City, USA. The ball will be represented with simple ASCII art: .-'''-. / /|\ \ | 20|...

I hope someone could explain the downvote
00:40
That's a little late new main posts.
Anonymous
Pestering people about downvotes just makes them not want to explain the downvote more
Anonymous
Someone didn't like your challenge. Oh well. Move on.
@PythonMaster probably because it's not very interesting
Oh...
@Mego I'm asking for clarification like is it too vague, too broad, unclear
if they think that, then they'll downvote. if it's actually too broad/unclear, they'll (usually) comment + downvote
Anonymous
00:41
@PythonMaster If it had major content issues, you would've gotten a closevote. A downvote is nothing to fret about.
@Dennis Do you have any desire to answer the keyboard challenge in jelly?
Unless the user doesn't have enough rep for a close vote.
then they'd comment
I'm the only golfing language that answered, so I have no frame of reference to tell if it's well-golfed or not
00:42
@PythonMaster I was about to comment as it was deleted
The entire challenge is "given a and b, print a n times, then b". I'm not gonna bother searching for dupes, but it's been done.
what Geobits said
@xnor I had that feeling too
the strings don't seem compressible in non-golf langs
maybe the chain can be compressed a bit
I was considered |
00:44
even if it can, then make it just "print the string" and tag it kg
(i don't think that's a good idea though)
@DJMcMayhem TASTE? No, not really.
it's pretty trivial, except in the form of printing that ascii art
and that's just annoying
I'll get the hang of asking soon
OK. Is it just not a good task for jelly?
Try asking in the sandbox first.
00:45
@PythonMaster Pro-tip: If you're going to use the sandbox, wait longer than a few hours. Especially if there are zero votes or comments on it.
Got ut
*it
@orlp If you know that it's actually possible, sure. Does O(L) assume that each integer can be stored in O(1) memory? If so, I'd make that explicit.
@Dennis yes it does
also to be lenient I'll do O(L*L)
so for example if you use L memory in a recursive function L deep you're fine
@DJMcMayhem It don't think it's a good task for me. :P
Haha, I guess I can't argue with that
00:48
0
A: List of bounties with no deadline

FlipTack500 rep - Bubblegum Factorial Bubblegum is designed for constant output - unless the code has a specific SHA-hash, you won't be able to write a program which takes input. So, I will award 500 rep for a factorial program in Bubblegum. I don't really expect this to be fulfilled, as it requires m...

@Dennis is there a tag for restricted memory?
That's definitely my favorite type of challenge though. Heavy string-manipulation. I find it much more fun then the mathy challenges
(probably because of my language of choice)
@orlp I don't think there is. Feel free to create one.
Anonymous
@NewBountiesWithNoDeadlines Yeah that's about as likely as this
suggestions?
Anonymous
00:50
is the best choice imo
Anonymous
It pairs nicely with
Anonymous
I should probably make a challenge at some point
Anonymous
Alright, how many flags in Beep Boop Maggot will it take for the room to be frozen? There have been 10 in the last day.
2
or we can just permanently ban sanbot and noɥʇʎԀʎzɐɹƆ /s
Anonymous
00:55
@EᴀsᴛᴇʀʟʏIʀᴋ Tempting :P
I wish Python's str.join mapped str onto it's arguments
Anonymous
But something needs to be done. 10 flags in one day is beyond excessive. Mos Eisley got frozen for less.
oh, it did? what was going on?
Anonymous
Lots of invalid flags and revenge flags and just general nastiness that you would only expect to see in the actual Mos Eisley Cantina.
I'd say just permanently ban the bot who's getting flagged, but that's just me
@Mego oic
00:58
We totally need a grid of scoring tags
I have too much bacon o_o
Got too much from my question?
Nope, never mind
@Geobits Sunny side ups as well
@Geobits There's no such thing.
What Dennis said
01:00
I usually agree with that. My mind has been changed recently:
5 hours ago, by Geobits
Ok, as much as it pains me to say this, that's probably enough bacon.
@Mego I know it's not likely :P
@PythonMaster Even one sunny side up is too much. Cook those eggs!
I don't like eggs much.
@Dennis challenge posted
I only eat them scrambled.
01:02
@Dennis the reason for the memory limit is so that people will write answers that actually solve the problem, rather than just generate all and filter for duplicates
@orlp I don't see the post?
@Pavel refresh the question page?
do we have a tag for the smallest amount of memory?
I did.
Anonymous
@NathanMerrill Not yet. I proposed one a while back on meta, but I haven't gotten around to actually writing a challenge.
01:04
@Pavel weird, it should show up soon in this chat room anyway
Anonymous
@Geobits Exactly. Scrambled or fried for me.
@Mego you must not like spaghetti carbonara :P
Post a link?
Anonymous
@orlp I don't know what that is but it sounds like burnt spaghetti
01:05
Thanks
Carbonara (Italian: [karboˈnaːra]) is an Italian pasta dish from Rome made with eggs, cheese (Pecorino Romano or Parmigiano-Reggiano), bacon (guanciale or pancetta), and black pepper. Spaghetti is the usual pasta; however, fettuccine, rigatoni, linguine or bucatini can also be used. The dish was created in the middle of the 20th century. == Preparation == The pork is cooked in fat, which may be olive oil, lard, or less frequently butter. The hot pasta is combined with a mixture of raw eggs, cheese, and a fat (butter, olive oil, or rarely cream) away from additional direct heat to avoid coagulating...
it's spaghetti with bacon, cheese and pepper
[tag:restricted-memory], [tag:restricted-complexity], time-limit?, [tag:restricted-source]
smallest-memory?, [tag:fastest-algorithm], [tag:fastest-code], [tag:code-golf]
and then you take raw eggs
and use it as a sauce
basically the idea is that the heat within the pasta half-cooks the eggs
you got memory, complexity, speed, and code length as your columns
What's the difference between fastest code and fastest algorithm?
01:07
algorithm is for big O complexity of the algorithm
and then you have "restricted" on the first row, which sets a limit, and the second row defines it as the scoring mechanism
Yeah but unless there's some obscenely slow interpreter for a language you would write the same code for either type, right?
usually fastest-algorithms are written in psuedo-code, and don't require a huge test case
I like carbonara, and the eggs in it don't bother me. The same way the mayo in potato salad doesn't bother me, no matter how disgusting it is when used other ways.
But if you're serving me an egg on a plate, it better be cooked :D
no sunny side up for you?
retch
01:10
actually, on that graph, doesn't really work
Now I'm no egg expert, but I thought sunny side up was a way to cook an egg. That is,a sunny side up egg is by definition cooked.
because restricted source restricts the characters you can use, not the maximum number of characters you can use
@Geobits I boil my eggs 15 minutes in a 500 atmosphere pressure cooker for maximum cookedness
@NathanMerrill not necessarily
restricted source can be any restriction to the source code
Restricted source can be like no arrays for example.
e.g. "your source code must have a prime length"
01:11
@orlp I don't think I've ever seen a character limit be tagged restricted-source
"your source code must fit in a tweet and generate the biggest number possible"
@orlp that's not an egg, that's a brick
@orlp O_o are they still eggs at that point? :P
@Adnan brick makes you stronk
3
Q: Efficiently generate all vector partitions

orlpA vector partition is splitting a vector up a series of vectors such that their sum is the original. Here are a couple partitions: [3, 1, 2] = [3, 1, 2] [3, 1, 2] = [0, 0, 1] + [0, 0, 1] + [0, 1, 0] + [1, 0, 0] + [2, 0, 0] [3, 1, 2] = [1, 1, 2] + [2, 0, 0] Here vector addition is done element-...

0
Q: Let's Tessellate!

Andrew LiIntroduction From Wikipedia: A tessellation of a flat surface is the tiling of a plane using one or more geometric shapes, called tiles, with no overlaps and no gaps. A fairly well known tessellation is shown below: The rhombi are tiled in a fashion that results in no overlaps or gaps,...

01:12
I like my eggs soft boiled
I like my eggs boiled hardcore
neutron eggs
Prime length'd source code sound like a really bad challenge.
but is all about putting a maximum on the memory you can use. It's not saying "You can store stuff in integers, but not in arrays"
@orlp that's an eggcellent choice
or, even worse: You can store data if the memory address starts with XXX
01:13
@xnor I should probably have asked - are you on a SUMS team? :)
@NathanMerrill I mean, technically you can
for example on the GOLF-cpu
right, but that's not what the tag is about
What's the golf CPU?
an attempt to make measurable fastest-code challenges
29
Q: The GOLF CPU framework

orlpUntil now fastest-code has been limited to big problems - problems that take seconds if not minutes. This was simply needed to choose a winner fairly despite measurement errors. Often these challenges were decided on asymptotic behavior alone. I felt that this left one particular aspect very much...

it failed (I believe) because the GOLF was too powerful
maybe I'll make another attempt
but with an 8-bit machine
01:15
@Sp3000 not really, a group of friends looked at some of the puzzles
I think it was really because it required people to learn a new language
@Sp3000 what did your cryptic comment mean -- are you on a team?
@NathanMerrill eh the golf was really quite standard assembly
right, but how many people really know assembly?
but with an 8-bit machine I could reduce the instruction set even more
@NathanMerrill you see, as someone with autism, I have a lot of trouble placing myself into other people's shoes, so when I learn something somehow my mind believes that everyone in the world knows and should know that thing :P
Anonymous
01:18
@orlp I never would have guessed that you have autism
I think if you were to try again, make it a simple, stack based language.
that's the beauty of the internet
there are so many stack based langs here
@NathanMerrill I was thinking an 8-bit machine
so, the jump would be easy
01:18
with a well-defined machine code
That's not just autism. I do that all the time.
and a stack memory
If you want to make it accessible to the most people, don't make it stack based >_>
@Geobits aren't most submissions here written in a stack-based language?
eh
01:19
No
not really?
CJam is the most popular I believe
@NathanMerrill Possibly, but I'd suggest that they're used by a small minority of the users.
I haven't seen CJam in a long time.
but C/Python/Pyth/Javascript/Jelly/Mathematica all aren't stack based, and those are the most popular I believe
Mostly jelly, 05ab1e, and MATL from golfing languages.
01:21
Jelly isn't stack based?
No
Anonymous
Jelly is tacit, not stack-based
It's based on J.
  template<bool V> struct answer { answer(int) {} bool operator()(){return V;}};

template<bool no, bool yes, int f, int p> struct IsPrimeHelper
  : IsPrimeHelper<p % f == 0, f * f >= p, f + 2, p> {};
template<bool yes, int f, int p> struct IsPrimeHelper<true, yes, f, p> { using type = answer<false>; };
template<int f, int p> struct IsPrimeHelper<false, true, f, p> { using type = answer<true>; };

template<int I> using IsPrime = typename IsPrimeHelper<!(I&1), false, 3, I>::type;
template<int I>
@orlp you kind of have to exclude C, Python, Javascript, and Mathematica because they are all way too complex for making a golf cpu for
01:22
produces a syntaxerror is n is not prime in C++
@NathanMerrill eh what
According to this, the most common languages (top ten) are: python, js, ruby, perl, c, haskell, pyth, mathematica, cjam, java
Not sure how accurate it actually is.
GOLF CPU was never intended as CPU you target
right, but to make an accurate "this command takes X cycles" sounds way too complex
Yeah, but no one wasn't to write a transpiler for mathematica and golf assembly.
01:24
@NathanMerrill huh
nevermind :P
does Pyth still transpile to python, or is it interpreted?
@NathanMerrill transpiles
but the distinction is fairly arbitrary
almost all the logic is in the library
which is written in Python
right, but its easier to track the flow of the program if its interpreted
if its transpiled, its not
why
because you aren't actually the one running the code
01:27
It's at most ten characters, can that be so hard to debug?
@NathanMerrill with eval you are
but you're not making much sense right now
wait, so pyth takes each command, creates the python command, then runs eval on that command?
and repeats for each pyth command?
@Dennis Star cleanse please.
@Dennis someone is spamming stars again.
Ninja'd XD
@NathanMerrill no
it combines them into a big thing and then evals that
01:31
Oh stop this crap whoever is doing it.
On my phone right now, sorry.
Does anyone know if Java has something like eval?
I got rid of a bunch of them
[round of applause]
right. And that is where the problem lies. Lets say you have a nested loop. You need to count how many times that inner loop runs if you're going to do a Pyth-CPU.
01:32
[ standing ovation]
if it was interpreted, you'd be iterating through the code repeatedly, and it'd be easy to count the number of iterations
but since its transpiled, you'd have to insert python statements to do the counting
@Pavel Not in standard java, no. There are (I believe) some third-party libraries that do it, but I can't vouch for them.
@Pavel if you want to parse some math expressions, there are some fairly good libraries. If you want to run a function, use reflection. Or, do things the Java way, and don't eval :P
You could use ScriptEngine, but that's usually not a good idea :P
if you literally want to run some other Java code, there is a compiler in the JDK you can use
but it requires that the .jar is run from the JDK, not the JRE
01:36
I guess technically you could save the string to a file (along with a barebones class), run javac, and run it that way, but uh...
there's a better way to compile it than that :P
but that's basically what it does behind the scenes
There's probably a better way to do whatever besides eval at all :P
yeah. The only time I feel like I legitimately used the compiler was for KoTHComm
but that's because I'm downloading and compiling submissions on the fly
and I didn't want to do it in a different language to reduce dependencies
Yeah, there are legitimate use cases. Most of the time it's an X/Y thing, though.
Hiyo
Holy hell. My Google Home knows what an X/Y problem is. It pulled the answer from meta.se :D
can anyone help me with the development of my koth? (even if it's just with ideas and not code)
I can do both
I have a library full of code :P
> Ok, Google, what is an XY problem? According to meta stack exchange, the X Y problem is asking about your attempted solution instead of your actual problem.
7
01:43
how many times did you ask that to get the transcript?
Uh.... >_>
Three or four. It added more, but I got tired of asking.
There was another sentence or two.
Something about "a massive waste of time for both parties" too.
Anonymous
@Geobits That's crazy impressive
Yeah, I ask it weird stuff all the time to see what it can do. It still catches me off guard sometimes with how well it can find things.
@NathanMerrill cool, there is a room for it
also isn't your library java or something
might have been frozen again though...
Is it bad to post many challenges in quick succession?
01:46

 Maze battle Koth

making a koth! Please halp
@DestructibleWatermelon yeah, its java
Probably.
@AndrewLi If they're all good, not really. You'll sometimes get less attention on each one, though.
@Geobits Ok, thanks
Experience shows that most of the time, a whole bunch posted quickly has some bad apples, though.
01:47
@NathanMerrill care to join the room anyway?
I need to think of more creative challenges
@DestructibleWatermelon just read the transcript: I don't really see any ideas there. Maybe write up a sandbox post, and ask for help filling in the holes?
@NathanMerrill there are ideas there
also I made a sandbox post a while ago
actually I might change the number of turns it takes to respawn
do you think there might be an issue with a lot of subprocesses?
especially since they might need to be reopened
chat mini-challenge: what is the smallest integer with 15552 divisors?
unique divisors, prime divisors or what?
01:59
total divisors

« first day (2163 days earlier)      last day (2977 days later) »