« first day (7 days earlier)      last day (50 days later) » 

11:31
We all know of the prime checker problem.
I added registers, and now we can use them in solving the problem.
So, @KennyLau proposed a pseudocode algorithm for a prime checker and a check for zero function.
So, golfing UGL numbers.
I have an obvious approach.
def golf_ugl_numbers(n):
	return 'c' + ('u' * n) + 'o'
The most inefficient way possible, it reaches a total of 33152 bytes when run over the range 0 to 255.
But I can golf some bytes by using the multiplication table.
1×1=1
1×2=2  2×2=4
1×3=3  2×3=6  3×3=9
1×4=4  2×4=8  3×4=12 4×4=16
1×5=5  2×5=10 3×5=15 4×5=20 5×5=25
1×6=6  2×6=12 3×6=18 4×6=24 5×6=30 6×6=36
1×7=7  2×7=14 3×7=21 4×7=28 5×7=35 6×7=42 7×7=49
1×8=8  2×8=16 3×8=24 4×8=32 5×8=40 6×8=48 7×8=56 8×8=64
1×9=9  2×9=18 3×9=27 4×9=36 5×9=45 6×9=54 7×9=63 8×9=72 9×9=81
@KennyLau golfing UGL numbers right now.
11:51
cuu is 2
@KennyLau Yup.
cuu$* is 4
@KennyLau It doesn't save any bytes over cuuuu.
And cuu$*u doesn't save any bytes over cuuuuu.
cuu$*$*cuu$*+ is 20
  9 = cuuuuuuuuu
 18 = cuuuuuuuuucuu*
 27 = cuuuuuuuuucuuu*
 36 = cuuuuuuuuucuuuu*
 45 = cuuuuuuuuu$dddd*
 54 = cuuuuuuuuu$ddd*
 63 = cuuuuuuuuu$dd*
 72 = cuuuuuuuuu$d*
 81 = cuuuuuuuuu$*
@KennyLau cuuuuu$d* saves four bytes.
11:54
maybe this would be better
001 = cu
003 = cuuu
009 = cuuu$*
027 = cuuu$$**
081 = cuuu$*$*
243 = cuuu$$*$**
729 = cuuu$*$$**
ternay instead of binary
well cuuu$* is better than cuuuuuuuuu
  8 = cuuuuuuuu
  9 = cuuuuuuuuu
 16 = cuuuuuuuucuu*
 18 = cuuuuuuuuucuu*
 24 = cuuuuuuuucuuu*
 27 = cuuuuuuuuucuuu*
 32 = cuuuuuuuucuuuu*
 36 = cuuuuuuuuucuuuu*
 40 = cuuuuuuuu$ddd*
 45 = cuuuuuuuuu$dddd*
 48 = cuuuuuuuu$dd*
 54 = cuuuuuuuuu$ddd*
 56 = cuuuuuuuu$d*
 63 = cuuuuuuuuu$dd*
 64 = cuuuuuuuu$*
 72 = cuuuuuuuuu$d*
 81 = cuuuuuuuuu$*
and then $+ is better than cuu*
postfix notation
1* =
2* = $+
3* = $$++
4* = $+$+
5* = $$+$++
6* = $+$$++
7* = $$+$$+++
8* = $+$+$+
postfix notation
1^ =
2^ = $*
3^ = $$**
4^ = $*$*
5^ = $$*$**
6^ = $*$$**
7^ = $$*$$***
8^ = $*$*$*
1 message moved to Trash
Using 6*6 instead of 4*9 and some other multiplications with six golfed some bytes.
  5 = cuuuuu
  6 = cuuuuuu
  7 = cuuuuuuu
  8 = cuuuuuuuu
  9 = cuuuuuuuuu
 10 = cuuuuucuu*
 12 = cuuuuuucuu*
 14 = cuuuuuuucuu*
 15 = cuuuuu$dd*
 16 = cuuuuuuuucuu*
 18 = cuuuuuu$ddd*
 20 = cuuuuu$d*
 21 = cuuuuuuucuuu*
 24 = cuuuuuu$dd*
 25 = cuuuuu$*
 27 = cuuuuuuuuucuuu*
 28 = cuuuuuuu$ddd*
 30 = cuuuuuu$d*
 32 = cuuuuuuuucuuuu*
 35 = cuuuuuuu$dd*
 36 = cuuuuuu$*
 40 = cuuuuuuuu$ddd*
 42 = cuuuuuuu$d*
 45 = cuuuuuuuuu$dddd*
 48 = cuuuuuuuu$dd*
 49 = cuuuuuuu$*
 54 = cuuuuuuuuu$ddd*
 56 = cuuuuuuuu$d*
1 message moved to Trash
07 = cuuu$+u
08 = cuuuu$+
09 = cuuu$*
14 = cuuu$+u$+
16 = cuuuu$*
18 = cuuu$*$+
21 = cuuu$$*$++
24 = cuuuu$+$$++
27 = cuuu$$**
28 = cuuu$$**u
32 = cuu$$*$**
35 = cuuuuu$uu*
36 = cuuu$+$*
40 = cuuuuu$uuu*
42 = cuuuuuu$u*
45 = cuuu$$uu**
48 = cuuu$+$uu*
49 = cuuu$+u$*
54 = cuuu$$*$+*
56 = cuuu$+u$u*
63 = cuuu$+u$uu*
64 = cuuuu$+$*
72 = cuuuu$+$u*
81 = cuuu$*$*
regex replace c(uuu+)\1 -> c$1:+
also, cuuuu$u* 4*(4+1) is better than cuuuuu$d* 5*(5-1)
05 = cuuuuu
06 = cuuu$+
07 = cuuu$+u
08 = cuuuu$+
09 = cuuu$*
14 = cuuu$+u$+
16 = cuuuu$*
18 = cuuu$*$+
21 = cuuu$$*$++
24 = cuuuu$+$$++
27 = cuuu$$**
28 = cuuu$$**u
32 = cuu$$*$**
35 = cuuuuu$uu*
36 = cuuu$+$*
40 = cuuuuu$uuu*
42 = cuuuuuu$u*
45 = cuuu$$uu**
48 = cuuu$+$uu*
49 = cuuu$+u$*
54 = cuuu$$*$+*
56 = cuuu$+u$u*
63 = cuuu$+u$uu*
64 = cuuuu$+$*
72 = cuuuu$+$u*
81 = cuuu$*$*
12:13
Progress on golfing UGL numbers is tracked here.
@zyabin101 Update 7 and 8, and 6=cuuu$+
@KennyLau Applied.
@MarsUltor Okay.
@zyabin101 Should I edit improve your list by inspection?
@MarsUltor 6 = cuuu$+ applied.
@KennyLau Yup.
Wait a sec
gonna go through the list first, don't update yet
10=cuuuuu$+
12:19
10=cuuu$*u
11=cuuu$*uu
@KennyLau Applied.
@MarsUltor Applied, and also 11 = cuuu$*uu applied.
80=cuuu$*$*d, 79=cuuu$*$*dd, 78=cuuu$*$*ddd, 77=cuuu$*$*dddd, 76=77=cuuu$*$*ddddd, 75=77=cuuu$*$*dddddd
regex replace until idempotent u$(d*)d -> \$$1u
@zyabin101 @KennyLau had the shorter one
12:23
@zyabin101 are you doing regex replace?
@KennyLau Nope.
I'm reading chat messages and applying shorter versions to the gist.
for example
15 = cuuuuu$dd*
replace to
15 = cuuu$uu*
@MarsUltor Applied.
@KennyLau Applied.
so can I start mass-editing?
72= cuuu$*$d*
63=cuuu$*$dd*
12:26
@MarsUltor Applied, and also 63 = cuuu$*$dd* applied.
I think it's time to skip the trivial ones for now
wait
isn't 81 cuuu$^?
wait
@MarsUltor cuuu$^o ==> 3
Oh wait, it's pick
  0 = c
  1 = cu
  2 = cuu
  3 = cuuu
  4 = cuuuu
  5 = cuuuuu
  6 = cuuu$+
  7 = cuuu$+u
  8 = cuuuu$+
  9 = cuuu$*
 10 = cuuu$*u
 11 = cuuu$*uu
 12 = cuuu$u*
 13 = cuuu$u*u
 14 = cuuu$+u$+
 15 = cuuu$uu*
 16 = cuuuu$*
 17 = cuuuu$*u
 18 = cuuu$*$+
 19 = cuuuu$u*d
 20 = cuuuu$u*
 21 = cuuuu$u*u
 22 = cuuuu$u*uu
 23 = cuuuuu$*dd
 24 = cuuuuu$*d
 25 = cuuuuu$*
 26 = cuuuuu$*u
 27 = cuuu$$**
 28 = cuuu$$**u
 29 = cuuuuu$u*d
 30 = cuuuuu$u*
 31 = cuuuuu$u*u
 32 = cuu$$*$**
 33 = cuu$$*$**u
 34 = cuuu$+$*dd
 60 = cuuuu$$+$*%-
 59 = cuuu$$+u$u*+
the algorithm for 40 was 245**
could use as reference
60 = cuuuu$$+$*%-
60 = cuuu$+$+**
I defeated myself again
12:44
@KennyLau :O Applied.
@KennyLau Applied.
The graph should be continuous :)
original
 58 = cuuu$+u$u*uu
 59 = cuuu$$+u$u*+
 60 = cuuu$+$+**
 61 = cuuuu$+$*ddd
 62 = cuuuu$+$*dd
now
 58 = cuuu$+u$u*uu
 59 = cuuu$+$+**d
 60 = cuuu$+$+**
 61 = cuuu$+$+**u
 62 = cuuuu$+$*dd
24 = cuuuuu$*d
24 = cuu$+$+**
same length for 234**
48 = cuuu$+$uu*
48 = cuuu$$u$**
same length for 344**
@KennyLau Applied.
original
 68 = cuuu$*$d*dddd
I need to improve this.
current algorithm 98*4-
new algorithm 4::+:*+
 68 = cuuuu$$+$*+
I defeated myself
@KennyLau Applied.
graph please?
12:54
@KennyLau I can use spark.
please do :)
$ spark < ugl-golf-length.txt
▁▁▂▂▃▃▃▄▄▃▄▅▄▅▅▅▄▅▅▅▅▅▆▆▅▅▅▅▅▆▅▆▅▆▆▅▅▅▆▆▆▆▅▆▆▆▆▆▆▅▆▆▆▇▇▆▆▆▇▆▆▆▆▆▅▆▆▇▆▇▆▆▅▆▆▆█▇▆▆▅▅
Here's a graph of productivity gain after spark: ▁▂▄▆█
Download it from here: github.com/holman/spark
So, to recreate the source graph:
1. Download the gist into a file, say, ugl-number-golf.txt.
2. Run awk '{print length($0)}' ugl-number-golf.txt > ugl-golf-length.txt.
3. Run spark < ugl-golf-length.txt.
def pow(): #base^index
	swap()
	save() #save base
	swap()
	push(1)
	swap() #[base 1 index] <-top
	while peek():
		dec() #[base base index-2] <-second iteration
		swap() #[base index-2 base]
		load() #[base index-2 base base]
		multiply() #[base index-2 base^2]
		swap() #[base base^2 index-2]
	#[base base^index 0]
	discard()
	swap()
	discard()
peep?
does while pop?
so the sudden increase comes from 75 -> 76
13:01
@KennyLau Nope.
sorry, typo fixed
76 = cuuu$$*$d*+u
@_@
@KennyLau Applied.
It should be continuous now
def discard(): #only works when there are at least 2 elements
	dup()
	subtract()
	add()
#def pow():
%R%cu%ld%r*%:$-+%$-+
I heard that it will default to register 0
@KennyLau Yup. Thanks.
@KennyLau I though there's an instruction for discard.
which is?
13:08
_ - DROP the top of stack
oh
#def pow():
%R%cu%ld%r*%:_%_
cuucuuuu%R%cu%ld%r*%:_%_o ==> nothing
How should I enter input?
can you try cuuRo and see what it outputs?
@KennyLau Nothing. R pops the integer from the stack into the register.
current:
 69 = cuuu$*$d*ddd
new algorithm: 3:(23)*
try deleting the last %_
13:12
cuucuuuu%R%cu%ld%r*%:_o ==> 16
\o/
 69 = cuuu$uu$*dd*
 69 = cuuu$*$d*ddd
 69 = cuuu$uu$*dd*
I have not defeated myself
337*2+*
@KennyLau Applied.
well it's not needed lol
 69 = cuuu$*$d*ddd
 69 = cuuu$$$$+u**
still not defeated
@zyabin101 try 4^4 and 5^3
@KennyLau 256125
:o
the power of magic
13:14
Divided into two integers, it's 256 and 125.
The UGL interpreter has no delimiter of integer output.
i see
n^2:    1 4 9 16 25 36 49 64 81 100
n(n+1): 2 6 12 20 30 42 56 72 90
n(n+2): 3 8 15 24 35 48 63 80 99
n(n+3): 4 10 18 28 40 54 70 88
 82 = cuuu$*$*u
 83 = cuuu$*$*uu
 84 = cuuu$$*$*+
 85 = cuuu$$*$*+u
 86 = cuuu$$*$*+uu
 87 = cuuu$*$u*ddd
 88 = cuuu$*$u*dd
 89 = cuuu$*$u*d
 90 = cuuu$*$u*
 91 = cuuu$*$u*u
 92 = cuuu$*$u*uu
 93 = cuuu$$*$u*+
 94 = cuuu$$*$u*+u
 95 = cuuu$$*$u*+uu
 96 = cuuu$$$*$u*++
 97 = cuuuuu$+$*ddd
 98 = cuuuuu$+$*dd
 99 = cuuuuu$+$*d
100 = cuuuuu$+$*
@zyabin101
@KennyLau You got the list up to 100! \o/
@KennyLau Applied! :D
 96 = cuuu$$$*$u*++
 96 = cuuuu$$*$+***
 96 = cuuuu$*$$++$+
 96 = cuu$$*$**$$++
 96 = cuuu$$u$**$+
finally defeated myself after 4 attempts
@zyabin101
13:32
@KennyLau Applied.
@quartata hi!
 99 = cuuuuu$+$*d
 99 = cuuu$*$uu*
@zyabin101
@quartata Welcome to Unipants' Golfing Language! Read the starboard if you're interested.
You have no number literals?
what's the to-do list

TODO list for April 2016, revision the third

Apr 11 at 7:30, 42 seconds total – 4 messages, 1 user, 0 stars

Bookmarked Apr 11 at 7:37 by zyabin101

@quartata Nope.
But that's something I might add to the TODO list for May.
13:41
def isPrime(n):
	stack.push(1)
	stack.push(n)
	stack.pick()
	stack.pick()
	while stack.pop() - stack.pop():
		stack.swap()
		stack.inc()
		stack.swap()
		stack.pick()
		stack.pick()
		stack.push(divmod(stack.pop(),stack.pop()))
		stack.swap()
		stack.discard()
		if stack.pop() == 0:
			stack.push(0)
			print(stack.pop())
			stack.duplicate()
			stack.duplicate()
			stack.duplicate()
	if stack.pop() - stack.pop():
		# loop fell through without finding a factor
		stack.push(1)
		print(stack.pop())
Is this a golfing language or a minimalist esolang like Deadfish?
#def isPrime():
cu%^^-l%u%^^/%_cu%?%d%:%?co$$$:^^-:-cuo:
@zyabin101 works for n>2 only
@KennyLau what is this why can't you just iterate through divisors or use wilson's theorem
i'll go now, and the code likely doesn't work (I make too many careless mistakes)
@quartata I iterated through divisors
13:47
@KennyLau \o/ \o/ \o/
@KennyLau I'll connect @MarsUltor to make it work with n < 2.
@KennyLau Or rather, doesn't work fully.
cuuucu%^^-l%u%^^/%_cu%?%d%:%?co$$$:^^-:-cuo: errors.
Error: Open loop
I'm so confused. What's the command list?
From what I can tell this is supposed to be kinda like a stack based Deadfish but you said it was a golfing language
@quartata ¯\_(ಠ͜ ಠ)_/¯
Why is / divmod and not regular divide?
13:52
@quartata Because I decided I can't make a prime checker without modulo.
Well why can't % be modulo?
@quartata % - SWAP - swap the top of stack and second-to-top of stack (1 2 3 ==> 1 3 2)
I took inspiration from Mouse16.
m?
My point is is that if you want to do regular division you have to do /_
Or if you want regular modulo /%_
@quartata The quotient is pushed to top of stack.
OK so you have to do /%_
14:16
@zyabin101 what's equality? i couldn't find it
@quartata That's because it isn't in the language. I planned it to add it to the TODO list for May. (TODO lists are amended with new items once a month.)
But it would take 2 minutes to add why wait until May
I'll send a pull request
Don't.
I'll add it to the list right now.
1. Make an interpreter.
1b. Add conditionals.
2. Make a prime checker.
3. Golf UGL numbers.
4. Make a GitHub commit feed.

TODO list for _UNK _UNK, revision the _UNK

1 min ago, 39 seconds total – 5 messages, 1 user, 0 stars

Bookmarked 5 secs ago by zyabin101

@quartata ^ star it because I don't want to.
Primality test is i$cu%dlRr*rd:u/_c=o with equality
Hence why I was asking :p
@quartata If it was May. Sorry, no time machine exists.
I only update TODO lists with new items once a month.
I'm already trying to make moments like this never happen.
14:28
But it's not even somrthing that should go on the TODO. It would take 2 minutes
You can time me if you want. Lemme fork this first
@quartata I won't.
The GitHub doesn't even have the code...?
@quartata Nope.
It only has the spec.
Why?
@quartata To prevent people writing arbitrary code not on the list.
14:34
That's absurd. People can't modify the repo without your permission anyways.
@quartata Yup.
You realize you are deliberately alienating people who might want to help, right?
@quartata Nope.
Actually, the GitHub has the code.
Just that I only reveal its location to specific people.
However, it's still public, and you have to search throughout all the repo.
You know I can see all branches right?
@quartata Right.
 
2 hours later…
16:50
'=': ()=>stack.push((stack.pop() == stack.pop())+0),
@zyabin101 Did you actually decline the pull request?
@quartata Yup. ಠ_ಠ
Hm. OK.
Well now, do we stare with disapproval faces? ಠ_ಠ
16:57
@MarsUltor Feel free to add my code from the pull request although I guess zyabin probably won't let you or something
I'm out of here. This is absurd.
@zyabin101 Closed source never wins.
2
@MarsUltor I don't let you.
@quartata I just fooled you!
lol
I better just step away before I say something I might regret.
Suffice to say this isn't exactly the kind of behavior that gets people to work with you.
Please don't ping me again.
@QUARTATA I'M SO MUCH SORRY ಥ_ಥ
 
1 hour later…
18:12
Too bad I'm not a mod...
I could be able to cancel stars...

« first day (7 days earlier)      last day (50 days later) »