« first day (2439 days earlier)      last day (743 days later) » 

12:02 AM
By careful repeated modulation you can get the interval down to [0,258]
Alright, gtg now
 
Remove spaces, convert from base36, modulo 542 produces unique values.
 
12:20 AM
But then you still need to compress the chapter count array
 
12:31 AM
(b36(n)-length(n)^2)%325 works, too.
 
12:53 AM
someone should go answer OEIS
the next sequence is finite so you can hardcode it
 
1:39 AM
I'm curious if I can modify a SystemUI to have software power/volume keys
phones are changing to software home keys, those power and volume keys could go software
 
On which device?
 
Any, mostly galaxy s8
o brb breakfast
10am here
 
Android, almost definitely.
 
wat is this next sequence ._.
 
I interpreted it as "Not my problem"
 
1:48 AM
ಠ_ಠ
I hope I don't need to pull a Python last-minute answer again... especially since SOMEONE KEEPS WASTING PYTHON
 
It's just python, no loss :P
 
ಠ_ಠ
I don't know any other languages in which I can actually implement an idea without a thousand lines of boilerplate (java)
I should learn more languages
 
Try Lua
 
there's also Proton which is only half-broken
I might look into learning Haskell, maybe Lua? I heard Crystal and Rust are quite nice too
I feel like rather than learning more languages I should learn how to use them better :P
 
Me and Leaky are here if you need Lua help. I'm sure Pavel would help you with Ruby.
 
1:51 AM
I've also heard that Ruby is bad
it looks somewhat nice but I don't like having functions be able to be called without parentheses
like really, "123".to_i is so ambiguous, is that a property or a niladic function? (I know it's a function in this case but still)
 
It's always a function
 
what do you mean by always in this case
 
Well, indexing is calling a function in most languages.
 
Also, Enlist (my new language) is now set up and ready to start loading with functions! :D
 
The dot notation calls a function. Period. It's up to the receiving object to interpret the method as property access and oblige.
 
1:53 AM
hm okay
that's still somewhat unfamiliar to me but interesting.
 
IIRC, things in parenthesis (And or blocks) are additional arguments, not an explicit call.
 
attr_reader is just a function that generates getter within your class.
 
also the map and filter syntax with the blocks is quite cool
@JohnDvorak wait so "properties" are really just nilads
 
Yes
 
Properties are dyads in Lua :P
a[b] calls getmetatable(a).__index(a,b)
 
1:55 AM
attr_accessor :foo is the same thing as def foo; @foo; end; def foo=(x); @foo = x; end
 
._. is confuz
but that looks interesting :D
@ATaco is __a like the equivalent of python __a__
 
back
 
hi nobody
I should become friends with you just so I can say "Nobody is my friend"
 
@HyperNeutrino Yep.
 
Wait you can override the functions of built-in classes in Lua?
 
Yep, but it falls under the premise of "Please don't"
 
Oh, and in Ruby, foo.bar(arg) is actually a shorthand for foo.send(:bar, args) :P
... or foo.method(:bar).call(args)
 
@ATaco yay \o/ I should learn Lua I really don't like not being able to override Python things
also how do you add strings in Lua
oh wait the answer was literally right there for me to see
 
a .. b
 
1:59 AM
And, of course, foo.call(args) can be abbreviated as foo.(args)
 
irb(main):006:0> class Foo
irb(main):007:1>  def method_missing(name, *args)
irb(main):008:2>   p [name, *args]
irb(main):009:2>  end
irb(main):010:1> end
=> :method_missing
irb(main):011:0> Foo.new.(1)
[:call, 1]
=> [:call, 1]
 
@ATaco whoa cool :D
 
And, of course, a method definition evaluates to the method name as a symbol and a class definition evaluates to its last expression.
 
2:03 AM
is metatable the "don't touch this but I won't die if you do" thing?
 
Metatables are designed for working with user's tables.
They're the closest things to classes Lua has.
 
the former is actually useful as private is actually a function that takes a method name and makes the method by that name private.
 
_G is the scope, and that's conveniently a table, and Strings are also conveniently tables.
 
@ATaco wait so lua doesn't have classes?
 
Not without making them yourself, no.
 
2:04 AM
hm interesting
 
But you don't particularly need them with the glory that is nothing but tables.
 
hm okay
what if somebody does a (ノ°Д°)ノ︵ ┻━┻ to your code
 
attempted to call a nil value
 
hm?
also what is with nil, None, and null lol
pls decide on actual standard
 
That's like, 90% of the errors that lua throws.
 
2:10 AM
lol
 
null is used in typed languages, nil is used in dynamically typed languages, None is used in bad languages.
:P
 
ಠ_ಠ
 
what about undefined
also am I null, nil or undefined
 
undefined is like null but prior to definition, it has its uses, but I don't like it.
 
undefined means that it's not defined. null means that it's defined to mean nothing.
I think. If that even makes sense :P
 
2:15 AM
hm
 
oh programming languages can you step up your game
 
not defined... and defined as nothing?
 
If programming languages were consistent than concatenating strings would make sense.
 
We really need an esolang physical keyboard
 
2:17 AM
most languages use + which makes sense because you're adding them end to end. Lua's .. which typically means "range' makes no sense IMO
 
PHP: `.`
Lua: `..`
Javascript: `+`
C: *Screams in the distance*
 
lol, C, step up your game
 
Haskell: ++
 
Jelly: ;
Python, Proton, Positron, etc: +
 
2:18 AM
Brainf**k: *Holy Brainf**k I'm not doing this*
oops
 
Stares in horror at that markdown
Jelly: Also ,, but only sometimes
 
better
 
Brainfuck: >.[>.].[>.]<[<]>[,>]
 
whitespace:
 
@ATaco well no technically "ab" , "cd" => ["ab", "cd"] and "ab" ; "cd" => "abcd"
(keeping in mind that a string is really a list of characters
 
Whitespace: screams loudly without sound and form but unknown matter
 
@ATaco well that's just because of the way Jelly outputs :P
@ATaco that is a literal
 
Well, it works anyway.
 
not really
 
For the string it did.
 
2:22 AM
well it appeared to but try using [OE]R :P
or whatever the Python Stringify atom is
 
Forte: You don't get strings, that's not a thing you're allowed.
 
ಠ_ಠ my program wasn't working because I had - where it should've been +
 
Vigil: +, but carefully.
 
what is vigil and why does "but carefully" sound familiar... :P
(Also, I'm wondering when the number of GitHub repositories I have will surpass my IQ)
 
Vigil is a programming language that punishes bad code.
 
2:25 AM
wait so it just deletes bad code :o
 
C++: + meh I have this, you dont have this, my -- counterpart, bleeeech
 
C++ has std::string, but I don't like to use it because it's strange and probably heresy.
 
huh
use wstring or something then
 
char* or bust.
 
typedef char* string
 
2:31 AM
#define #define #include?
 
MathTM, My experimental unfinished not started fictional lang: nope this doesnt have string processing its just math so duh
 
Also, Enlist golfing language :D
which is definitely in no way TC yet because it just became functional
 
#include <stdlib.h>
int size(char*c){int i;for(i=0;c[i];i++);return i}
char* concat(char*s1,char*s2){
	int size_1 = size(s1);
	int size_2 = size(s2);
	char*out = (char*)calloc(sizeof(char),size_1+size_2);
	for(int i=0;s1[i];i++){
		out[i] = s1[i];
	}
	for(int i=0;s2[i];i++){
		out[i+size_1] = s2[i];
	}
	return out;
}
There, much better!
 
umm
 
2:32 AM
true coding at its finest
 
I think theres strcat
 
There is, yes.
but it's in string.h and thus is heresy.
 
umm
 
I'm a terrible C programmer.
 
Also in Java "0" + "1" == "01" and '0' + '1' == 'a' which is great :D
 
2:33 AM
at least its not "string"
 
Does anyone have any idea why this segfaults?
 
a+b=(random chunk of memory)
Thanks C
 
@HyperNeutrino character literals. even C has them
 
I know :P
(well actually I didn't know that about C, that's cool :D)
 
@HyperNeutrino overflow?
 
2:35 AM
what is overflow
 
hm
lemme see
 
Hold on, let me explain.,
 
a is overflowing
 
a is allocated the memory that is the length of the string, "Hello, ". Then, you try to set the character at the position just after that, when you start looping through b. char*a cannot be longer than "Hello, ", you need to allocate a new chunk of memory.
 
c strings have constant length
crap
ninjad
hmm
apparently iPhone 8 is following the way of Note 7
they're swelling
 
2:55 AM
112 bytes for concatenation (btw strlen is a thing and sizeof(char) is always 1)
@ATaco
 
@LeakyNun Although true, it's not in the documentation as such.
 
@ATaco hmm?
 
The documentation for C doesn't explicitly state that sizeof(char) returns 1.
 
@ATaco interesting
 
3:13 AM
@ATaco Yes it does. 6.5.3.4§4 of the C11 Standard: When sizeof is applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1.
(Page 90, which is page 108 of the PDF)
 
My apologies, I stand corrected.
 
oh snap you just got wrecked by ANSI
 
@quartata ISO, but close :P
 
3:44 AM
If I'm writing a challenge asking users to create a Turing-complete language, what tests can I provide for them to check that it is Turing-complete?
 
@MDXF implement any other tc lang
 
Oh that's a good idea thanks
 
Implement brainfuck. It's easy and well-known.
 
I feel like there's already been a challenge like this
 
The description I gave was not even scraping the bottom of the challenge.
 
3:51 AM
Oh OK
 
I don't think it's even ready for the sandbox though, I'm working on it in a Gist atm
 
I'd suggest some of ais's stuff
Some of it it much easier to implement than BF, even
 
Link to one? (I can't see how something can be easier to implement than BF)
 
You don't have to handle matching brackets.
 
Oh true, that does make it difficult
 
3:58 AM
Consider 7 or Portable Minsky Machine Notation
(7 is confusing though)
 
@Challenger5 Portable Minsky Machine Notation is string-based as opposed to character-based, making it much harder to implement in esolangs
 
ResPliCate It's basically an automaton with no IO, not sure if it will suit your needs
 
I'll just leave it open saying 'you must implement or prove equivalence to any other Turing-complete language'
 
How about BitwiseCyclicTag?
Or "CT" as described on the page for Bitwise Cylcic Tag
Which is basically just BCT but 0 is 10, 1 is 11, ; is 0
 
Those look interesting
On a definitely related note, where could I buy a Zero Instruction Set Computer?
 
4:08 AM
CT should be really easy to implement: https://pastebin.com/i6MzgMgN
 
That's remarkably simple
 
I still don't understand how it's TC
 
Where's a webpage for BCT or CT?
 
Thanks
 
4:11 AM
It's a tag system, check Wikipedia
wrong on both accounts actually, I thought it was older lol
1943 anyways
 
> A tag system is a deterministic computational model published by Emil Leon Post in 1943 as a simple form of a Post canonical system. A tag system may also be viewed as an abstract machine, called a Post tag machine (not to be confused with Post-Turing machines)—briefly, a finite state machine whose only tape is a FIFO queue of unbounded length, such that in each transition the machine reads the symbol at the head of the queue, deletes a constant number of symbols from the head, and appends...
It's not really a very readable aritcle...
 
Well it is once you understand the (many) terms used
 
The last sentence you cut off actually explains it
You read the first character in the string, delete characters at the end and append a new string and then repeat until the first character is a special halting symbol
 
Fair enough
It said my message was too long
 
4:25 AM
If you are going to let a language that requires bracket-matching be on there, I suggest Underload. It does require brace-matching, but it's easier
I also submitted a ResPlicate interpreter in CJam, which was 2nd place at the time
 
4:46 AM
@flawr Thanks for the tip. I'll see if I can use that in a different challenge
 
5:27 AM
@DJMcMayhem RProgN 2, 9 bytes ]Ly=³y*w;
 
 
2 hours later…
7:07 AM
0
Q: Back to the Basics of Math

Kevin CruijssenIntroduction: We all know these three basic arithmetic math tables I assume. ADDITION: + | 1 2 3 4 5 6 7 8 9 10 ---------------------------------- 1 | 2 3 4 5 6 7 8 9 10 11 2 | 3 4 5 6 7 8 9 10 11 12 3 | 4 5 6 7 8 9 10 11 12 13 4 | 5 6 7 8 9 10 11 12 13 1...

 
 
2 hours later…
8:39 AM
has there been a challenge on zooming a unicode box e.g. ╶┼╴⇒╺━━╋━━╸ (but also vertically)?
 
0
Q: Elliptic system

Donny FrankIntroduction Given five points in the plane, your task is to compute the area of the ellipse passing through these points. You can assume that exactly one non-degenerate ellipse can be constructed with the given input values. Rules Input is 10 integers in any convenient form, corresponding to...

 
9:41 AM
@flawr why did you delete your math question?
I don't think it's a problem to ask for help for PPCG challenges
 
@orlp cause I found a solution
 
10:00 AM
@orlp Now I still used your formula, as it is shorter, so thanks!
 
@flawr well it isn't my formula :P
 
Just updated my answer
now I have to golf it
 
11:01 AM
is there a closed form for a specific roll of codegolf.stackexchange.com/questions/144146/… ?
or in other words
a closed form for the nth coefficient of (x^b - 1)^a / (x-1)^a
 
It is possible to ping multiple people in chat?
 
@Adám I believe it is, yes
I don't know if there's a limit
to be honest I think the ping limit on comments should be raised to 2 or 3
there's many valid cases where you'd want to notify multiple people
 
@orlp I agree. And we have flags for abuse.
 
7
Q: How can I (algorithmically) count the number of ways n m-sided dice can add up to a given number?

dimo414I am trying to identify the general case algorithm for counting the different ways dice can add to a given number. For instance, there are six ways to roll a seven with two 6-dice. I've spent quite a bit of time working on this (for a while my friend and I were using Figurate numbers, as the ea...

 
@Neil thanks
 
11:15 AM
dunno how easy that is to calculate compared to the brute force methods
 
@Neil have you changed name recently? or were you not in the chat a lot?
because you have quite a high reputation but somehow I don't recognize you too much
or maybe I have dementia
 
I haven't been in the chat
 
oh now I remember you often answer in javascript
 
I came to chat for some reason and I haven't had to reboot since so I'm still here
 
Interesting metric: Post bytes/Code byte for a code golf submission post.
 
11:41 AM
that reminds me, i need to fix everything >_>
CMP: Is implicit input at the end of a program a good idea? If so, how would Charcoal tell whether it's a number or a string? (implicit input meaning any missing operator args are filled in with input commands)
 
@ASCII-only CMP?
 
Chat mini poll
 
@ASCII-only Gosh. Is that official now?
 
@ASCII-only IC. I'll add it to
27
Q: What are the PPCG specific abbreviations and terms?

AdámNewcomers to PPCG are often compelled to ask what many of our abbreviations and terms mean. Let us list them here so this information always will be easily available.

 
11:48 AM
@Adám :P That's what I was thinking when you asked about the acronym haha
@DJMcMayhem Charcoal, way too many LOC
 
hi
can someone send me a link to the discord channel for codegolf?
 
thank ou
 
@ASCII-only What is that?
 
wait crap wrong channel lol
@JesterTran oops this one
@Adám a link to the wrong discord >_>
 
12:03 PM
0
A: Sandbox for Proposed Challenges

Stewie GriffinCops and robbers I have not determined exactly what the task shall be yet, so I'll use a placeholder task that has been used before. I want feedback regarding the cops/robber part. Are there any pitfalls here? Will it be too hard to write an uncrackable Cop post? The task Write a piece of c...

 
12:31 PM
TIO bash quine: cat .code.tio
 
@Adám -1 source reading
 
@flawr Was that really necessary?
 
I'm pretty sure he's gonna like it
 
Ven
@Adám I got the package! Thank you so much! 👍
 
12:38 PM
@orlp Have you tried looking into generating functions?
 
@Ven Great. Btw, maybe you or your students would like to participate in apl.codegolf.co.uk?
 
Ven
@Adám I'll forward the message. Thanks :D
I'm not sure I'll have time to participate
 
1:33 PM
@flawr that is the generating function silly :P
 
Ven
@Adám If I may: I think it'd be a good idea to have a "hole 0", that's easier for newcomers, just to get them into it.
 
@Ven You mean a walked through example?
 
Ven
@Adám That'd work as well, I guess?
 
@Ven What else did you mean?
 
Ven
@Adám A "guaranteed hole"
Currently pondering how I should go about partitioning myself
 
1:41 PM
@Ven Something trivial? Like the average of a vector?
 
Ven
Probably a bit less trivial, but yes, that's the idea.
 
@Ven Partitioning? Like using or ?
@Ven … with the added requirement that Avg ⍬ should be 0.
 
Ven
Well, doesn't work the way I want to, and there's no in tryapl.org
 
@Ven Soon, hopefully. What are you trying to do? Or shall we take this in

 The APL Orchard

Learn and teach, questions about both golfing and general codi...
?
 
Ven
(By "there's no" I mean yields an "invalid token")
 
1:54 PM
CMC: Normalise a numeric list – keep the same relative differences between the elements, but let the minimum be 0 and the maximum be 1.
E.g. 2 5 2 8 2 80 0.5 0 1 0 1
 
Ven
Should I post the answer from the APL room? :P
well, it doesn't do the same thing.
 
@Ven It almost does.
 
@Giuseppe Yeah, R was pretty much made for this, no?
 
@Adám it does its job, for sure.
 
2:09 PM
@Adám that's hardly what "normalize" means :P
make the mean 0 and the s.d. 1
 
@LeakyNun It is when I say so. ;-)
 
Is sd = mad?
 
@Adám Jelly, 10 bytes: Ṣ.ị_/÷@_Ṃ$
@Downgoat standard deviation
 
@Adám MATL, 8 bytes, tX<-tX>/
 
@Adám 05AB1E, 4 bytes: W-Z/
 
2:21 PM
Conjecture: All solutions will have at least one slash /
 
@Adám I think Julia has the division sign (÷) for division...
 
@Giuseppe So does APL (and without paying UTF-8 price for it), but the APL solution still needs a slash.
 
Or even x\y == y/x
 
@Adám Jelly, 5 bytes: _Ṃµ÷Ṁ
 
@Adám why does {⍺[⍋⍺]} 2 5 2 8 2 8 error?
 
2:25 PM
@Neil Conjecture disproven.
@LeakyNun Can you provide a TryAPl or TIO link?
 
@Neil lol I'm an idiot
 
Julia, 45 bytes
https://tio.run/##yyrNyUw0@/8/rTQvuSQzP08hTSNHkyvHNkc3NzMvM7c0F8TNTayAMmNyuFLzUv4XFGXmleTkaaRpRBspmCoYKViAcKym5n8A

function f(l)
l=l-minimum(l)
maximum(l)\l
end
 
@LeakyNun Because is the LEFTmost letter in the Greek alphabet, not the RIGHTmost one – that's .
 
@Adám PowerShell, 56 bytes -- param($a)$b=$a|%{$_-($a|sort)[0]};$b|%{$_/($b|sort)[-1]} -- port of the R answer
 
@Giuseppe No markdown in multi-line msgs.
 
2:27 PM
@Adám and (⊢[⊃⍋])?
 
@Adám now they tell me
 
@LeakyNun Because [] does not fit into the harmonised APL syntax, and so cannot be used for indexing in trains. Try ⊃∘⍋⊃⊢ or simply ⌊/
 
@Adám oh lol
 
@LeakyNun Learning APL?
 
@Adám APL, 10 bytes: (⊢÷⌈/)⊢-⌊/
@Adám just doing your CMC in your language :P
 
2:33 PM
@LeakyNun Nice, you actually outgolfed me. Your solution has a beautiful symmetry when written as the equivalent (⊢÷⌈/)(⊢-⌊/)
@LeakyNun Maybe participate in apl.codegolf.co.uk?
 
@Adám what was yours?
 
@LeakyNun No, I had (⊢-⌊/)÷⌈/-⌊/
 
lol ... all y'all here knowing and answering in multiple languages and here I am barely knowing PowerShell. ;-)
 
I don't know Jelly
 
@AdmBorkBork I can help you learn APL too if you're interested. (I also basically only know one language.)
 
2:35 PM
@Adám No thanks - one language I barely know is enough. haha
 
@Adám when does it start?
 
@LeakyNun Started already!
 
@Adám when does it end?
inb4 "Ended already!"
 
@LeakyNun Oct 22, as stated on the community ad. (I'll ask them to add it on the site)
 
@Adám 19 days to do 9 problems?
 
2:39 PM
@LeakyNun Yeah, managable?
 
@Adám lemme see
 
@Adám For leaky? I'm sure he could do all 9 in 9 different languages in 1 day :P
 
What algorithm did you use for the "normalize" the list challenge? I fail too see it from the Jelly answers
 
@cairdcoinheringaahing I'm sure he can, but can he do it in APL? And can he win?
 
@Mr.Xcoder list <- list - minimum; list <- list / maximum
 
2:51 PM
@LeakyNun What does <- mean?
 
assign
 
Ok, thanks
@LeakyNun But what if the list's maximum is 0?
 
Shhhh
 
@Mr.Xcoder that would only occur when the list is all identical
 
@Adám Can we assume that the list only contains positive integers
 
2:55 PM
@Mr.Xcoder No, but you can assume that the list has at least two different values.
 
@Giuseppe You assume that it doesn't contain negatives, don't you?
 
What's the CMC?
 
1 hour ago, by Adám
CMC: Normalise a numeric list – keep the same relative differences between the elements, but let the minimum be 0 and the maximum be 1.
 
@cairdcoinheringaahing You know there is a search box in to top right? Enter "CMC" there to find the latest CMC.
 
@Adám Didn't work. Linked me to this :P
 
2:57 PM
@Mr.Xcoder yeah but since l - min(l) will only result in zeros where the value is the min so the max of l-min(l) will always be positive.
 
ASCII-only has been awake for the past 37 hours o_0
 
@Pavel Huh how?
 
@Pavel How do you know?
 
@cairdcoinheringaahing Huh? I get this (← bookmark this, everyone!)
 
@Adám Yeah, but the first message on that isn't your CMC
 
2:58 PM
@cairdcoinheringaahing I asked when he woke up and he's been participating in conversation somehwere consistently for the entire time since.
 
@cairdcoinheringaahing Up for some training?
 
@Mr.Xcoder Just about to ask you :P See you in JHT?
 
There already
 
@flawr >____<
lol though
 
@cairdcoinheringaahing The first message which begins with "CMC:" is.
 

« first day (2439 days earlier)      last day (743 days later) »