« first day (2221 days earlier)      last day (910 days later) » 

4:00 AM
maybe you could actually do a thing where it pushes 64 and multiplies em a bunch
Seems useful
@MistahFiggins imma try that 1 sec
with get
wow I forgot about future versions
Wait, I recall hearing somewhere the Befunge-98 has shell access
4:01 AM
Unfortunately, you can't combine commands, like 2 5k(2*) or something
@Pavel woah it does
The next 2d lang I make will have that functionality
@MistahFiggins Why not write a 2d lang with the capability to properly define functions.
4:02 AM
@MistahFiggins still got the ability to push 52 2s to stack
Even a gosub/return would work.
wait, why not push 64, dup a bunch, and multiply...
That might be more than 10
wait, it might not be
@DestructibleWatermelon That too
4:03 AM
well, where can have funge-98?
wait got it myself
For those interested, here are some specs
@DestructibleWatermelon TIO
ok, I'm gonna try this
well I'm done for the night see y'all
ping me if somebody manages it
@DestructibleWatermelon 2'3k:'2k*. is 10
4:06 AM
you need 52 anyway
also I have a better idea
--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024
print(2^51)--;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>
Why doesn't - error for trying to pop an empty stack..?
4:07 AM
'3k:'2k*. for 9 added
@Pavel Befunge starts with a stack filled with 0s
Basically, pulling from an empty stack yields 0
Feel free to submit.
will do
not working ;_;
on TIO?
wait is working now
I did another one
let me check the edit distance
Ok, real question: where should the extra change go?
See that printf("%?
Stick a d to the tail-end of it.
wait, I had too many chars apparently ;_;
wait this is no power of two?
4:14 AM
wew lad
No, seems to be right
o, k
I can edit one more character, what should it be?
wtf this isn't what I thought it was
I got my program right now
4:18 AM
Before you answer, I can change one more character, so you essentially have 11
just tell me what to change/add/remove
@MistahFiggins printf("% with printf("%d
@Pavel add a character, or change
4:24 AM
I think I figured out a shorter way though
to do Befunge98?
if you repeat the 2 command rather than the : command its shorter
4:25 AM
oooh, yea
should I make that change?
Hmmm, the k command is weird in TIO...
wanna try and get bf in there at some point?
I think it does the k, then it executes it one more time as it goes past it
yeah something weird is happening
I think it only works on specific things maybe
Seems that way
Which is wierd
That is weird
you gonna post the befunge or am I?
4:33 AM
98? I already did. Or did you mean normal
oh wait I got trolled by the page break
why didn't you add an extra character with the byte I golfed?
Oh yeah, I do have an extra one now. What should I use it for
um IDK lol
maybe another "?
And I'm back
so that the rest of the cruft can be commented out later?
4:36 AM
I thought I would be gone for longer than that >_>
@Pavel what do we use another char for?
I want to fit C in there, so continue the printf("%d"
also after we get C, should we go for bf?
I'll try and program it
wait how do I make this
have to figure out how to make mod
4:38 AM
Might be hard.
Esolangs has algorithms :P...
As I said earlier, feel free to try.
well, now I need to make the part that prints the number
also I still need to get an unbounded BF implementation
Esolangs has the shorted way to print a BF number, iirc.
right, just found that
4:43 AM
Link to the shortened way?
ok, I need to actually edit what I have already done
Last time I said "Link?", this is what I got... :/
lol it outputted 5
What was it supposed to output?
must be because of modulus
help me find an unbounded implementation?
4:50 AM
This is BF, you can write one yourself if you have to >_>
but it would be many times longer
please help me find the unbounded cell interpreter
Working on it
US INTL can't type š without Alt Codes :(
But special characters is the entire reason I'm using US INTL...
Weird. Czech uses that regularly.
4:58 AM
Gee wow
@wat 8/10, would be funnier if the link was actually looking/appearing to move towards the text.
sorry I'm not that good with GIMP
But then it would have to be a different link
@wat You could find a different pic
5:12 AM
I have a Python question for you. I can import PIL (as in pillow) just fine, but if I try to use from PIL import Image, I get this:
from PIL import Image
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    from PIL import Image
  File "D:\Python\Python35\lib\site-packages\PIL\Image.py", line 29, in <module>
    from PIL import VERSION, PILLOW_VERSION, _plugins
ImportError: cannot import name 'VERSION'
Maybe those are things Image depends on?
You can look at the source for PIL, see what relationship those parts have to each other.
1 hour later…
@ATaco your link is borked
But yes, BigDecimal is cool.
Fuuuu phone
I prefer Rational
6:40 AM
@JanDvorak Does Java have that?
RProgN2 now has Sqrt accurate to 64 places
Although that's arbitrary
Mathematica >= Everything else
Well that's implicit
in price?
6:44 AM
Mathematica has a Free-Beer version now.
I'm writing a bash answer that uses, along other commands, sed, xargs and dc. I checked and these aren't part of the coreutils package. How should I name my language submission? Bash + ?
bash + GNU utils maybe?
I have no idea
7:00 AM
@seshoumara Bash + common system utilities
Have people seen mathics.github.io?
It's on TIO
I also use curl, to access the html source code from an URL
@Pavel that would be a very long title
@wat It's been on TIO since I think late December.
7:04 AM
@wat I think I'll go with Bash + system utilities. I remove common as I don't think curl is one. Thanks.
Who doesn't have curl..?
if you believe their nerve to not package curl by default
I'm on ubuntu, I have curl
then you either installed it manually, or another application that was dependent on it did
I don't particularly remember manually installing it.
I'm going with that second one.
7:07 AM
no, they package curl by default
not wget
wget is the one they dont have
not Ubuntu 12.04
Q: Why is cURL not installed by default?

Bharadwaj RajuMany applications require curl or libcurl for running or installation. Why does Ubuntu not provide it by default?

and that question is recent, 10 months old only
that's ubuntu 15.04 at least I think
scratch that, 16.04
[sarcasm incoming?]
Can I embed html in chat?
7:33 AM
Q: Shortest code to produce infinite non-cycle output

no1xsyzyDefinitions Infinite 'Infinite' means the program doesn't require any further operations after successfully started the program or script. Non-cycle 'Non-cycle' means the output has NO possibility that there are any part of output (no wonder how long) would repeat forever. (Any irrational num...

8:05 AM
I need help with Arduino C :(
I can help
Q: La La Land... no wait, Moo Moo Moonlight

Stewie GriffinThis challenge is in tribute of the winner of Best Picture at the Oscars 2017, La La Land Moonlight! Write a function/program that takes a string containing only letters [AZaz], the three symbols that are common in every day sentences .,' and spaces, and outputs the string, in the style of La...

Uhhh lemme paste my code
int numbers[10] = {
  126, 48, 109, 121, 51, 91, 95, 112, 127, 123

int convert_to_array(int n) {
  int arr[7];
  int temp_num = n;

  for (int a = 0; a < 7; a++) {
    arr[a] = temp_num % 2;
    temp_num = temp_num / 2;

  for(int i = 0; i < 7; i++) {
    printf("%d ", arr[i]);
  return arr;

int disp_num(int input) {
  return convert_to_array(numbers[input]);

void setup() {
  for (int a = 2; a < 9; a++) {
    pinMode(a, OUTPUT);

void loop() {
  for (int a = 0; a < 10; a++) {
I moved to C from Java, so there might be a lot of issues
What should the code do?
Oh, I see an error
What's the error
Uhh I'm trying to wire up a 7-segment display on the Arduino
8:09 AM
you looped with a, inside the loop which is using a
Fixed that
It's erroring on the first int arr[7] = disp_num(a)
It says "array must be initialised with a brace-enclosed initialiser"
You can't set arr[7] of a 7-element arr.
did you mean int arr=disp_num(a);?
How do I get the nth element of a list in C?
I'm pretty sure I've done that wrong
Hmm, why are you returning an array in a function that returns integers?
I'm sure you need a rewrite
8:16 AM
Those variable names...
@MatthewRoh How do I return an array?
the return type should be int* iirc
wait, lemme give it a rewrite
int numbers[10] = {
  126, 48, 109, 121, 51, 91, 95, 112, 127, 123

int* convert_to_array(int n) {
  int arr[7];
  int temp_num = n;

  for (int a = 0; a < 7; a++) {
    arr[a] = temp_num % 2;
    temp_num = temp_num / 2;

  for(int i = 0; i < 7; i++) {
    printf("%d ", arr[i]);
  return arr;

int* disp_num(int input) {
  return convert_to_array(numbers[input]);

void setup() {
  for (int a = 2; a < 9; a++) {
    pinMode(a, OUTPUT);

void loop() {
  for (int a = 0; a < 10; a++) {
I'm pretty sure this is what you wanted
try it
There's an issue with variable lifetimes
Error on this line: int arr[7] = disp_num(a);
array must be initialized with a brace-enclosed initializer
don't ever return a pointer to your own stack space
8:20 AM
Fun fact: C has two dimensional arrays
i know
well, sorta
So fill a two dimensional array with boolean status of each pin
then loop through it and use digital write with each pins boolean status
got it?
yay it works now!
int numbers[10][7] = {
  {1, 1, 1, 1, 1, 1, 0},
  {0, 1, 1, 0, 0, 0, 0},
  {1, 1, 0, 1, 1, 0, 1},
  {1, 1, 1, 1, 0, 0, 1},
  {0, 1, 1, 0, 0, 1, 1},
  {1, 0, 1, 1, 0, 1, 1},
  {1, 0, 1, 1, 1, 1, 1},
  {1, 1, 1, 0, 0, 0, 0},
  {1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 0, 1, 1}

void setup() {
  for (int a = 2; a < 9; a++) {
    pinMode(a, OUTPUT);

void loop() {
  for (int a = 0; a < 10; a++) {
    int arr[7];
    for (int b = 0; b < 7; b++) {
      arr[b] = numbers[a][b];
    for (int c = 0; c < 7; c++) {
8:43 AM
Damn, the system picked me the fanatic tag
9:03 AM
Something as simple as merging repositories into one repository is a fucking impossible task
I fucking hate git
@Fatalize Don't you think git is such a git?
hi all
this can't be the only silent moment in the PPCG chat room ever??
Q: How do we treat old answers in "languages" that aren't real languages?

Stewie GriffinThis is a followup of this meta post about Wolfram|Alpha, but it is probably relevant for other "languages" as well. There seems to be a consensus that Wolfram|Alpha is not a programming language +19/-1 at the time I'm writing this. The question is, should anything be done with answers that use...

9:18 AM
@Lembik there was a 3-hour silence yesterday
@Fatalize wanna star that, but people may complain, so I'll just say "me too"
I'm pretty sure that if git wasn't invented by that Guru, most people would say it's garbage
he admitted it's named after himself
SpaceX announcement tomorrow at 1pm PST
inb4 we're going to TRAPPIST-1
@aditsu no!
@Lembik you want the exact quote?
9:24 AM
yes please
ah yes :)
any comment on codegolf.stackexchange.com/questions/111489/… gratefully received
too easy :)
@MatthewRoh that's wrong!
it's not random
I mean it's not uniform
9:28 AM
Oh, right, seed
I'll add it to the question
depends what rand() returns, but very likely wrong
but most random functions are just psuedo random
@MatthewRoh thanks though. I have added this to the question to save having to downvote lots of answers :)
9:29 AM
what does Math.random() return?
random real number between 0 and 1 afaik
how does that give integers?
9:32 AM
You can floor it with |0
@MatthewRoh well... is that really uniform?
idk :\
@Luke assuming js? also floor won't do, unless you add 1
If you multiply by n first, it'll give a random int in the inclusive range 0-(n-1)
Q: Output a random number between 0 and n

LembikTask Given a positive integer n less than 2^32 specified as input in any way you choose, your code should output a random integer between 0 and n, inclusive. The number you generate should be chosen uniformly at random. That is each value from 0 to n must occur with equal probability (see Rule...

9:35 AM
MartinEnder has asked hard questions :)
I am not sure how to answer them
would (n)=>(Math.random()*n)|0 work
which language is that?
thats a lambda function
Oh, damn, Luke stole my answer
I only know wtfjs :)
@Lembik Anything challenge with randomness tends to have hard questions attached, and especially so when it's simple enough to be a "de facto" randomness challenge
9:38 AM
@Sp3000 :)
@Sp3000 now we have to try to work out if Luke's answer is actually uniform
I think you'll best be prepared for a lot of invalid answers
Q: Generating uniform distribution using Math.random()

Talespin_KitIn the MDN Math.random web page the comment for the example function getRandomInt(..) says that Math.round() was not used since it gives non-uniform distribution, which implies using Math.floor(..) will produce uniform distribution. // Returns a random integer between min (included) and max (exc...

wait, you don't accept something like rand(n+1)?
oh wow, C++ has uniform distribution
@aditsu does that return an integer?
@Sp3000 yes!
9:43 AM
oh wait
n is in the argument
the rules prohibit this
^ there's one deleted answer that you can't see
aww, then scratch that
the question is about to be closed sadly
9:44 AM
Oh, wow, now its closed
MartinEnder has a very tricky argument he wants cleared up
that'll teach you to use the sandbox :p
no one makes those tricky points on the sandbox
that's the problem with it
@MartinEnder are you here?
Sandbox is cancerous (Ok, its just my opinion)
@Sp3000 any ideas how to clear up the complaint?
or anyone?
9:46 AM
gtg, see you later
Bash loves naming commands after creatures
like cat, man, etc
help needed :)
@Lembik fyi please don't take the close personally, I was having a chat with Martin and we reckoned that it'd be better to clarify now because otherwise you'll get a lot of invalid answers for sure
Having said that, I'm thinking about it though
@Sp3000 thanks. I appreciate that
and your thinking about it
9:51 AM
A: Sandbox for Proposed Challenges

LembikTask Given a positive integer n less than 2^30 specified as input in any way you choose, your code should output a random integer between 0 and n, inclusive. The number you generate should be chosen uniformly at random. That is each value from 0 to n must occur with equal probability (see Rule...

In the meantime, I think the "rand()%n will not give a uniform random number in general." comment could do with a quick explanation why (presumably because the number of possible outputs of rand() is a power of 2)
For my question of termination, the only reason I ask is because you can do something like "generate random from 0 to 2^32-1, keep rejecting until you get something <= n" based on the current rules, for example
Hmm I think Martin's comment of constant RNG inputs solves that one
If your INT.MAX is 15 and n is 10, the numbers between 1-5 have double the probability to come than the numbers 6-10
@betseg thanks. That is right
the problem is how to stop people calling something builtin using the input
which ruins the challenge
Doesn't Martin's comment solve that?
ah yes that is nice
@Sp3000 what do you think about floor(randomfloat()*(n+1)) ?
10:10 AM
Seems like it should be invalid for the same reason as rand()%n, could probably add as a note?
@Sp3000 rand()%n has a really easy example for why it is invalid. Does floor(randomfloat()*(n+1)) also?
f(n){m=n*(int.MAX/n);r=rand()%m;return m<r?r:f(n);}
Hmm maybe slightly different then. The way I see it for randomfloat() is that the number of possible outputs of randomfloat() can't possibly be divisible by every valid input integer, since floats have a limited size
Is this (^^) uniform
10:14 AM
To be fair, I'm having trouble thinking of a good uniform approach without rejection sampling hmmm
I guess if the RNG output is large enough you can truncate it to be a multiple of the range
how about that SO answer?
... wait that's still rejection
> The loop is necessary to get a perfectly uniform distribution.
SO answer is rejection sampling
ah yes
how does C++ do it?
(opens question to everyone else because I don't know C++ well :P)
Hmm.. stackoverflow.com/a/20136256/2179021 doesn't mentioned rand(n+1)
@aditsu I see std::uniform_int_distribution for C++ but not rand(n+1)
but I know little about c++. Is there really rand(n+1) to return integers in a range?
10:33 AM
@Riker I think it's a very good translation. I only have a doubt: "En medio de ambos" can be "The centerpieces of both" as indicated, or can be "Between the two", in the sense of something that is equidistant from both. From the original text I don't quite get which of the two is the intended meaning
question is creeping towards readiness
10:44 AM
Such a pity that the cool golfing language answers are immediately taken ¯_(ツ)_/¯
You dropped this: \
Thanks! ¯_(ツ)_/¯
Somehow it won't print though
You have to escape it: ¯\\_(ツ)_/¯
That's a strong right arm!
@Lembik I asked Martin what's left that he can think of and he said "only the unaddressed comment that it would be good to require answers to be based on a built-in PRNG" (and by built-in he means not self implemented, so reading from /dev/urandom would be fine for example, assuming /dev/urandom is indeed uniform which I don't know)
10:49 AM
@Sp3000 I wasn't sure how to phrase this in a way that was immune to nitpickers. What does it mean to be based on a built-in PRNG?
for what question is this chat?
Maybe "pre-existing" is the better word to use
the problem is "based on". I mean how do you stop people writing their own PRNG exactly because it's hard to say which code is doing something equivalent to a PRNG and which isn't.
2 hours later…
12:29 PM
@Lembik do you wish code like this to be acceptable: (which avoids rejection but uses a fixed number of calls to rand() for a given n)
int r(n) {
  int c = 0;
  for (i=0; i<n+1; i++) {
    c += rand();
  return c % (n+1);
I believe that's uniform given the assumption that rand() is uniform on [0, RAND_MAX)
(Might need to add extra code to cover the case where RAND_MAX * (n+1) > INT_MAX)
1:00 PM
Ignore me - that's leaning towards normally distributed...
1:12 PM
Q: How do I program Medication names autocompletion using [MedlinePlus, Dailymed, NLM, RxNorm]

user2620132I want to develop an EHR but I am stuck at the medication autocompleting functionality by typing the medication name in input box using one of the api's that I mentioned at the title of this question so, I want to type medication name for example 'zoco' the system must make request to an api (tha...

2:16 PM
Q: Unicode Analog Clock

Woodrow BarlowIntroduction Let's use unicode to display an analog clock in the terminal! Unicode contains 24 clock face symbols, one for ever hour and another for every half-hour of the clock face. You will get the system time and print the appropriate unicode clock face. Challenge Your program should get ...

@AdmBorkBork The url... k, LEEt
When an answer is accepted, will the poster be notified?
Yep, as reputation change (+15)
aa, didn't knew, ok, thanks
3:06 PM
@Lembik I wasn't talking about C++, nor any language in particular; in CJam it would be )mr, in java it would be r.nextInt(n+1)
rand(n+1) is basically pseudocode for the above
@LuisMendo hm, okay
"El negro que está tan cerca de la naturaleza y de la otra naturaleza." I had some problems with myself
"The black who is so close to nature and to the other nature" or "The black who is so close to nature and the next/other being"?
@flawr I guess that doesn't refer to the honorable professor John Horton Conway, but to a more politically-involved figure who happens to share the same last name :p
3:39 PM
@Pavel answered, was able to get #printf to the start of the second line :D
mildly interesting
he's 1430 rep behind martin

« first day (2221 days earlier)      last day (910 days later) »