« first day (2229 days earlier)      last day (2606 days later) » 

12:00 AM
Maybe the commenters' clock needs syncing then
IIRC you can commit from the future if you manually set the date on your machine
 
would doing a%i check primes if a is input and I is every number less than sqrt(a)?
 
@ETHproductions Yup
 
@ChristopherPeart If a is prime, a%i will be non-zero for all number from 2 to sqrt(x)
 
@ETHproductions sweet
 
for(int i=2;i<=sqrt(input);i++){
	if(input%i==0){
		return false;
	}
}
return true;
Generic Non-specific Lang Prime checker.
 
12:07 AM
That should be i<=sqrt(input), squares of primes aren't prime
 
thanks
I was just coding wrong
 
@ATaco Here's a Ruby translation of that:
 
Wait
Let me try
I want to see if I've figured this Ruby thing out.
 
Oh, one more problem: that returns true for non-integers and integers < 2
 
def prime(input)
  for i in 2..Math.sqrt(input) do
    return false if input % i == 0
  end
  return true
end
 
12:13 AM
ಠ_ಠ
@CheckOutTomato You don't need the return
 
@Pavel yeah, but it makes it look better, and it's more readable
 
def prime(input)
  (2..i**0.5).all?{|i|input % i != 0}
end
 
Do you need the do? I've been leaving it off and this might explain why my could never works.
 
> ddef
d-d-d-drop the bass
 
> my could never works
 
12:14 AM
ok now turn it down, I'm going d-d-d-def
 
???
Also, here:
 
s/could/code
sorry
 
:o this is new
 
require 'prime'
def prime(input)
  input.prime?
end
 
cc @DJMcMayhem because he seemed interested about the https, ^^^
 
12:16 AM
@CheckOutTomato wait, the name of the module needs to be a string? I haven't noticed, RubyMine has been doing it for me >_>
 
@Pavel yes
irb(main):005:0> require prime
NameError: undefined local variable or method 'prime' for main:Object
Did you mean?  private
	from (irb):5
	from /usr/bin/irb:11:in '<main>'
 
Huh
 
No idea why people still use `quotes' for stuff
It just looks weird
 
images are very broken wtf
 
require "prime"
def prime input
  Prime.prime? input
end
 
12:18 AM
{x@0`y=2xšR{x\%¬y|`y=};y¬}`p=
 
PrimeQ
I prefer the Mathematica way.
 
0
Q: Help me juice my avocadoes

MinuetIn this challenge, I have a field of avocadoes which I'd like to juice as quickly and completely as possible. Can you write a program or function to help me work out how to juice all the avocadoes perfectly? As input, you'll get the avocadoes as an mxm square grid, where m is an integer between ...

 
Question: What color do you associate with "watching"
 
@Downgoat Blue
 
12:31 AM
okay, how about commits?
I was thinking turquoise
 
Green or turquoise, yeah.
 
0
A: Sandbox for Proposed Challenges

MinuetLost in Space: Help me get back to civilisation code-golf Your spaceship's radio receives a transmission from an unknown location: To anyone who picks up this transmission, I need help! My hyperdrive malfunctioned during a routine jump to the PPCG Planet. I survived the drop from hyperspace,...

 
@Pavel how about collaborators & branches?
 
Collaborators are definitely green. Branches I imagine are a reddish orange.
 
@JanDvorak Actually, if you've already required prime, you can just use the Integer#prime? method.
 
12:34 AM
@Pavel can you give me a color from above
 
Bottom right
 
Bottom Mid, personally.
 
Wow, Sublime is awesome... I can open src/interpreter.js with Ctrl-P S I Enter
 
There's a reason I like it. :P
 
That's gotta be the most useful feature I've seen in an editor
 
12:36 AM
@ETHproductions :e s<tab>i<tab><enter> in vim
 
top middle
 
Also keep in mind, different monitors will show the colours different, an iphone will show them pretty much the same as all iphones.
 
Oh, right, my monitor has a weird discoloration issue.
 
@DJMcMayhem are you OK with me using V repo when taking screenshot for submission to apple
 
@Downgoat Couldn't you use Cheddar?
 
12:43 AM
When you think that everything was working well
 
@Pavel V is much more full in terms of issues/PRs which I also need to show
 
Then you try and add another operator to the language input
 
You could also use the linux kernel.
 
And it borks
 
That one oddly lists infinitely many contributors.
 
12:44 AM
@Pavel app crashes on that for some reason
 
@Downgoat Infinite contributors. Might be the problem.
 
user image
4
how's this
 
Too colorful.
 
Verizon? Ew.
 
:(
 
12:46 AM
I like the colors
It looks really nice
 
I think I just need the numbers to be bigger
 
@Downgoat too much space between the lbars and the top
*bars
 
I could swap the numbers and the icon
 
I like the colors, but what's the point of a git client for cellphones?
 
@Riker which bars?
 
12:47 AM
code and readme
 
@JanDvorak ugh, I hate this type of question
it is useful okay :P
 
The name of the repo should use a smaller font, not every repo has a one-letter name.
 
@Riker ok, should they be joined?
 
Unless it scales dynamically.
 
@Downgoat it's okay, I can pretend it is
 
12:48 AM
@Pavel kinda, lemme show how it looks on larger repo name
 
@Downgoat no, I mean the space between the top stuff and those 2 bars shouldn't be there
 
@Riker top stuff meaning the colored icons
 
yes
 
okay will attempt removal
 
kk
 
12:50 AM
@mınxomaτ integrating color to make nice looking app is hard
 
You can use the empty space between the README button and the bottom bar to display a map of commits.
 
hm that would be nice
@mınxomaτ mr grey says it's too colorful big surprise ;P
 
take to SO not here ;P
 
i can't
question ban
I don goofed on my last question
 
12:51 AM
@Pavel by bottom bar you mean the thing with "My Repos" & "Profile"?
 
Ye
 
It ended up being a dumb problem
 
@Downgoat You are using alert colors for elements, that's a design no-go. Take a look at GitHub. There's a concept of a primary color. Something that doesn't need a color doesn't get one, like the counters.
 
@Pavel ok, seem like cool idea, should it scroll?
@mınxomaτ github UI is 100% grayscale
 
@Downgoat OK? I'd be honored. :)
 
12:52 AM
@Downgoat No it isn't. It has a primary color and a consistent design.
 
(excluding avatar and language indicator)
 
@Downgoat Definitely, for old projects with a lot of commits, you can't fit everything in that space.
 
There is a bit of green
@Downgoat Don't listen to the haters it looks great
 
@mınxomaτ okay, fine primary color is an off-black dark blue
@ChristopherPeart I need money, I have to make everyone like
 
@Downgoat oh tru
 
12:53 AM
I see your point though, will have to switch to more muted tones
 
De colors are nice
@Downgoat make the colors a option
So i can make it look like dat
 
@ChristopherPeart sadly not how iOS app work :(
 
@Downgoat make android problems solved
 
If I made android it'll likely have same UI
I could attempt to load user avatars in the repo view
great way to kill API quote though
 
I just yelled "HAAAHAAA!" (Like hah hah!!!!)
My language started working
It was kinda awkward my family looked at me
@DJMcMayhem you seem smart. What exactly must a language be able to do in order to be TC. khanacademy.org/computer-programming/melang/5474968288952320 is my current version of a lang for a contest and i need to know what i have to add to make it TC
 
1:05 AM
Changed to some lighter tones
does that look better?
 
I prefer the previous version
 
looks nice
 
still the weird space
 
branches should be a little more orange
 
@ChristopherPeart It's not too hard, NAND gates are enough to be TC. Can you document your language?
@Downgoat I like that one more.
 
1:06 AM
It just has the basic functions in
 
@Pavel eh, no
 
???
 
@Riker google giving bad results on how to remove grouped uitableview top space
 
NAND can't even handle unbounded size input
 
Magic the gathering is TC
Idk how
Please write a proof
 
1:07 AM
Wut
That doesn't work
 
@Pavel yes
 
MTG is not any kind of computational engine.
It is a game.
 
The rules are complex enough that you can have arbitrarily long chains events without player input
 
In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing complete or computationally universal if it can be used to simulate any single-taped Turing machine. The concept is named after English mathematician Alan Turing. A classic example is lambda calculus. A closely related concept is that of Turing equivalence – two computers P and Q are called equivalent if P can simulate Q and Q can simulate P. The Church–Turing thesis conjectures that any function whose values can be computed by...
ta da
Read it
 
1:09 AM
Can you determine if a number is prime?
 
idk
Many games are Turing-complete by accident.

Video games:

Braid[5]
Dwarf Fortress[6]
Minecraft[7]
Minesweeper[8]
LittleBigPlanet[7]
Factorio[9]
Card games:

Magic: The Gathering[7]
Zero-person games (simulations):

Conway's Game of Life[10][11]
 
Sure, just toss it on the tape together with the code to test primality
 
What tape.
This is MTG
 
IIRC, the tape was represented using a large pile of monsters. A monster with one health is the first cell, a monster with two health is the second cell... You read the tape by killing every monster and having the dead guy execute its death action, and you write to the tape by creating a new guy and having everyone give him one health.
 
@Riker how's this?
 
@Downgoat much better
 
@Riker ok, and should like the "repo view" be horizontal and vertical
and what if there is only one branch
 
@Pavel check out my lang it has a bit of specs
 
@Downgoat Grey it out?
 
@Pavel like just show as above?
 
1:19 AM
Yeah
 
hm, can anyone find an iOS code editing library?
I want to allow the ability to edit git files in the app
 
@Downgoat hm
 
but I cannot implement syntax highlighting myself
 
Google Prettify?
 
@ChristopherPeart Can you link the repo..?
Also, Google Prettify is very easy to implement.
 
ugh, someone please tell CS teacher to stop prefixing all fields in class with "my"
 
@ChristopherPeart I'm not really the right person to ask, but an easy way to prove a language is TC is by using it to interpret something TC (like brainfuck or a Minsky machine)
 
@DJMcMayhem You see i am dumb. And i have no idea how to do that
I just write teh codez
 
@DJMcMayhem yeah, BF interpreter in regex is sane :P
 
@Downgoat is sane? or insane? There is a difference
 
1:22 AM
sorry, sarcasm
 
Regex isn't TC though.
 
.NET regex likely is
 
Some variations are.
 
most are not, but close
 
@Downgoat It's one of the saner things people on this site use it for :P
 
1:23 AM
(?R) essentially gives TC.
 
No.
 
@ATaco no
 
(?R) gives it context-free grammar
 
Abort mission
 
:P
 
1:24 AM
@ChristopherPeart how do you loop?
 
@Pavel oh
ok
i was going to do that but i forgot
Copy paste?
 
No.
It's not TC if you can't make an infinite loop.
 
@Pavel well you can make infinite loop :P
 
@ChristopherPeart If you can modify a theoretically infinite amount of memory, and run a chunk of code a variable number of times (0 through Infinity) than it's probably TC
 
though some how PCRE is able to identify infinite loops which is either major computational breakthrough or it's not TC
 
1:27 AM
PCRE isn't TC
And PCRE is superset of .NET last time I checked.
Martin probably knows these things.
 
@DJMcMayhem yes!
 
Let's try with Ruby's regexes, then
 
I think it is TC
yay
 
Interestingly, PCRE doesn't actually identify an infinite loop on regex101, but just calls it out that it probably is.
Your expression caused an unhandled error:

recursive call could loop indefinitely - offset: 3
 
@ATaco Well it identifies that is possible
which is still halting problem
 
1:29 AM
Guess isn't solving.
 
@Pavel no, .NET regexes are crazy amazing and do all great things
 
@JanDvorak What's the difference between PCRE and Ruby regex?
 
A program can guess that in BF just the code +[.] wont stop.
 
Ruby regexes have recursive rules available
 
Does it look good showing avatar?
 
1:30 AM
Time travelling child
9
Q: How to explain the concept of past / future to a kid?

Dmitry GrigoryevI have troubles explaining the concept of past / future to my son. He certainly has some idea of time by now, but can't express it correctly. He has picked up the word "tomorrow" and uses it for both future and past. A typical conversation goes like this: Kid: tomorrow I had carrots for lunch...

 
Now I want to try to write a language with RAM and infinite loops that isn't TC. it sounds like a fun challenge
Well, not RAM I guess. Unlimited memory?
 
The random access isn't actually necessary, see Mini-Flak
 
Unlimited Memory is part of the original TC specs.
It's just that the concept of what counts as memory may not be as solid as once thought.
 
It's necessary, but not sufficient
 
Of course.
 
1:34 AM
I think that sounds like a fun challenge. A useful/powerful tarpit that isn't TC
 
malebolge?
 
Malbolge is TC
 
It's not.
 
Couldn't you just write a Tarpit without looping and call it a day?
 
@DJMcMayhem Tarpit and useful/powerful don't go together well.
 
1:35 AM
Malbolge unshackled might be, though.
 
Malbolge is only not TC due to its memory limitation.
By the same definition, Brainfuck isn't TC.
 
@Pavel Useful/powerful within the realm of tarpits. So something you could write a primality checker in, but not a bf interpreter
 
Brainfuck has unlimited memory
 
Brainfuck's original spec explicitly states only 30k cells of memory.
 
1:37 AM
> The brainfuck language uses a simple machine model consisting of the program and instruction pointer, as well as an array of at least 30,000 byte cells initialized to zero;
 
@ATaco "at least"
 
> It has been argued that Malbolge is a bounded-storage machine with interactive input; that is, that it is Turing-complete. The difficulty in showing this, however, is in showing that 59049 memory words are enough to implement the FSA that simulates a universal Turing machine, as practical Malbolge programs consume lots of memory. But thanks to Hisashi Iizawa, who wrote a 99 bottles of beer program in just 21945 instructions of Malbolge code, there are now arguments favoring the BSM hypothesis.
/Shrug
 
Definitely not "Unlimited"
 
@ATaco Brainfuck's original spec isn't TC then.
 
That was my point.
 
1:38 AM
@Pavel "at least"
 
The fact is that it's still a fixed size.
 
well actually the spec was ambiguous
 
> In the classic distribution, the array has 30,000 cells, and the pointer begins at the leftmost cell. Even more cells are needed to store things like the millionth Fibonacci number, and the easiest way to make the language Turing-complete is to make the array unlimited on the right.
 
infinity > 30k
 
Infinity is an abstract concept.
 
1:39 AM
um, but its still more than 30k
 
Well, yes.
 
regardless of if it is a number
By definition if you have an infinite amount of something you have more than 30k of them
 
But my point was that the original spec, even if it does so poorly, suggests a limited memory size.
 
or any other number you choose
 
The same for Malbolge
 
1:41 AM
Malbolge has limited memory by design.
 
So does Brainfuck
 
So does C...
 
Nope. Brainfuck's memory was bounded by spec, not by design.
 
no it wasn't
 
Spec > Interpreter for the purposes of this conversation.
 
1:42 AM
well, it had a lower bound only
at least 30k
lower bound != upper bound
 
The interpreter isn't TC. The interpreter is being run on a finite state machine.
 
I guess that makes every language ever non-PPCG-compliant
Except for Magic the Gathering, if you are willing to buy extra decks mid-game
 
Actually, being TC is rarely a limitation for challenges.
 
You know, the thing is is that being able to add two numbers is ill-defined
 
Yeah, but you can't test the primality of every number if you can't even store every number
 
1:45 AM
that is what I was getting at as well
 
You can't store $3\uparrow\uparrow\uparrow3$ your language isn't TC.
I'm looking at you, Mathematica
 
the language is, it's just there is no compliant interpreter for that language.
 
well, actually if your language supports infinite vars the number size doesn't matter
as long as they store any info
 
Some languages are TC, they're just running on insufficient hardware.
 
well, again implementation is ill defined
 
1:49 AM
OK: a language is TC iff its spec allows, not requires, a TC implementation
 
implementation, if the implementation is an interpreter, still relies on the hardware to do the interpreting and running at some level
 
hence, the first version of Brainfuck was already TC
 
What if I don't write a Spec and just write an implementation?
My language isn't TC just because Java doesn't support $n\uparrow^nn$?
 
@ATaco BigInteger. Look into it.
 
1:51 AM
well, no, my Ruby implementation is a lego NXT drawing chalk marks on the street in front of my house. If it runs out of roads, it will wait until more are built.
 
@Pavel Trust me, I looked.
Pass it $3\uparrow^33$, See how it likes it.
 
I'm scared now.
 
How does this look?
You can click on the username to access their profile now
 
also, if you have an interpreted language, you have a different implementation for every implementation of the interpreting language
also I had the idea for a language where the interpreter is a polyglot
 
@Downgoat shh... we're talking
 
1:53 AM
It's written in Java, so I have a different implementation for each different hardware it's run on.
 
@JanDvorak >_< sorry, will retreat
 
@ATaco khanacademy.org/computer-programming/melang/5474968288952320 has "non finite memory" given the comments in the beginning sting what can be done would it be TC
@Downgoat i like
looks better
Or anyone can tell me if it is TC
 
languages are different with different implementations of the interpreting lang, but noone makes a distinction
and the difference between a different language and a different implementation is ill defined
 
@DestructibleWatermelon i wrote it so only one implementation is real
:P
 
so would you even need to mention which lang is doing the interpreting? that would be trippy
also it would be really annoying for anyone trying to run it in tio
 
1:55 AM
You would have to mention which hardware for some langs, especially those with JIT.
 
@DestructibleWatermelon It is not a TIO lang
It is just for a challange
39
Q: Write a Programming language of Unknown Completeness

Wheat WizardDetermining whether a Language is Turing Complete is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets kick it up a notch. Lets make some programming languages that are so hard to prove Turing Compl...

 
I'm also pretty proud of my usage of Shift-4 on my custom keyboard mapping.
It's a Deadkey which takes either S, Y, E, P, or Space, and produces an appropriate currency symbol.
¤$¥€£
 
So anyway, Idea: language where the interpreter is a polyglot in a bunch of different languages, so the same source file implements a bunch of different TC langs, but due to how things are they are considered the same lang
 
...why?
 
2:02 AM
Science
 
@JanDvorak ? who are you replying to?
 
have fun
 
2:39 AM
How about a challenge where you write code to identify a language based on the code and output?
 
@MistahFiggins Seems fun, go for it!
 
2:54 AM
@Riker Mission accomplished :)
 
Quite frankly the lack of uppercase letters bothers me more than the color scheme. :P
 
It was a stylistic choice, and now that I know it bothers you, I'll be sure to keep it that way. :P
 
>:U
 

« first day (2229 days earlier)      last day (2606 days later) »