12:00 AM
@Downgoat Not sure what you mean, I guess I don't know what your addressing scheme is but usually buckets are linked lists

@Downgoat it isn't, if you have the same bucket for two keys the second entry in the bucket is just linked to first one like quartata said
wait the first one is linked to the second one

That's not the only way of doing it though

Buckets are linked lists if you are implementing in easy mode.
Or quadratic probing if you are fancy.

@ASCII-only do you want to implement hashmap in VSL. because seem hard

@Downgoat ok
or more hashtables, or if it's an enum hashmap just an entry

12:04 AM
@Downgoat Oh boy you'll love your first data structures course

@quartata :| I skipped the data structures course

You really shouldn't
It's the first intro course that actually teaches you something usually

@quartata :| are you saying CS in university will not be like CS in high school

Yes, actually

ono

12:06 AM
It should still be one of the easiest majors if you already know how to code.

@feersum It sounded easy so I skipped it
Plus I'm not even doing CS major anyway

Skipped CS major?
Well there you go.

@feersum no, I skipped data structures, it was a recommended prerequisite

@ASCII-only pls tell me doing major in goatology instead :D

@ASCII-only Of what?

12:07 AM
@Downgoat not really i'm doing biomed probably doesn't count

@ASCII-only oh ok, cool

@feersum genomics

goats ∈ bio. bio ∈ biomed. so by transitive property goat = biomed

I like how there's a horse called Cloud Computing

The funny thing is I've done 0 programming in that course

12:09 AM
@Downgoat any data structures course worth its salt will ask you to implement at minimum an open addressing hash table, might as well get started now
once you get how it works none of the hash table implementations are really that bad

speaking of implementations: I did a bogosort on CS final and got an A :D :D :D

So I tried to make at object in Python which would be like super(), except that it would be able to look up magic methods (super doesn't).
But somehow I made one that appears to return a randomly chosen method instead.

I'd have to see that

Let me see if I can untangle it from the other code.

Question: how do you know what to multiply load factor by if you don't know hash table size at initalization?
do you dynamically expand the hash table

12:20 AM
yes
and what do you mean you don't know hash table size at initalization

well you do
var hashtable = new HashTable()
hashtable.add(foo, bar)
so do I realloc the hash table everytime entry is added?
that seem reaallly slow

@Downgoat no

No, it's like a vector. The internal array starts at a certain size and expands when it goes over capacity

hm ok
how to determine when is "over capacity"?

12:24 AM
@Geobits Please I would be so happy
I would screen with joyz

@Downgoat since you're doing chaining you want to pick a load factor
when keys / length of array > threshold you reallocate
trying to find what Java uses by default

Anonymous
@Christopher If you bring Marky in TNB, you will feel the wrath of all of us
2

@quartata hm ok

Looks like it uses .75

IIRC 70-75% is common load factor

12:27 AM
yes

Marky is in timeout anyway. He needs to learn that there is a time and place to be a smartass, and it's not always and everywhere.
No idea where he might have learned otherwise >_>

@Arjun why specify only 1 truthy/falsey value can be used in your challenge?
the one I answer in julia
it breaks my answer, it errors for the empty string

is an answer that clearly hasn't been golfed (and is old, so unlikely to be edited by answerer) a valid reason for removal?

yes
I'd suggest mod flagging also

2

POOR JAVA void makePalindrome(long number){ String input=""+number; String temp = ""; for (int l=input.length()-1; l>=0; l--){ boolean isPalindrome=true; for (int m = 0; m < input.substring(l).length(); m++) { if (input.substring(l)...

12:34 AM
Behold, my Python 3 random attribute generator.
class TypeUnion: pass
def super_serious(obj): # super() is stupid and doesn't find magic methods
class t: pass
proxy = t()
for superclass in type(obj).mro()[:0:-1]:
for name, val in vars(superclass).items():
if not callable(val) or type(val) is type: continue
try: setattr(t, name, lambda _, *x, **y: val)
except AttributeError: pass
return proxy
print(super_serious(TypeUnion()).x)
@quartata ^

@numbermaniac edit approved

It randomly selects some method of object and prints it.

oh cool, thanks @Riker

It's deterministic
But

Not on my machine.

12:36 AM
I don't know why
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
>>> union.super_serious(union.TypeUnion()).x
<method '__dir__' of 'object' objects>
But restarting Python changes the method

Yeah, I'm running it as a program.

I suppose deterministic was a poor choice of words
It relies on non-deterministic behavior
but it doesn't change

Where?

Presumably the order of vars(superclass)
It's a dictionary right

Yes.
I don't see why that should affect the outcome.

12:37 AM
@Geobits he get flagged or Geobits-induced timeout?

that's what I'm trying to find out

Oh, maybe because setattr is overridden?
__setattr__ that is
Nah, why would that matter
object.__setattr__ is the only one that could possibly be used, right?
But I override it with a function that does nothing.
Must be it.
No, that doesn't seem to be it.
If I put lambda... print(3)
then it only prints 3 once.
Another mystery is how x is not a NameError...
But not really because getattr is overridden and that's why the lambda is called.

Can you help me in golf rules? I'm unfamiliar with the rules you apply here.
In codegolf.stackexchange.com/q/121056/6691 , if I have a solution that outputs the right output to stdout, but also outputs some warning to stderr that you have to ignore, does that qualify?

yes
STDERR is ignored by default

Good! Then I can save one byte!
Now can you refer me to how I should format the writeup if the program has a control character in it?

12:52 AM
Anyone think this would make a fun SO question?

This is a short golf, going down the 7 bytes, so the control character is absolutely essential to gain that last byte.

I would write ^C or whatever and add a note that it is a control char.

@Downgoat Well he did get a timeout from flags once or twice, but this one is Geobits-induced.

Anonymous
@b_jonas Including a hexdump (xxd <file>) is the usual approach

@b_jonas Most control characters have a corresponding Unicode control picture e.g. ␃

1:02 AM
@b_jonas or if it's only one character use a placeholder and explain that it is really the control character

␀ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎ ␏ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ ␠ ␡ ␤

TIL there's a race horse named "Cloud Computing"

1 hour ago, by Helka Homba
I like how there's a horse called Cloud Computing

Is there some computing-involved sponsor, or did someone just think that would be teh lulz?

Like no repeats I guess?

1:16 AM
I don't see anything that says you can't put RTL characters in your horse name.

or emoticons
🐎

Anonymous
@feersum I think the Jockey Club has significant overlap with the portion of Americans who don't realize ASCII letters aren't the only letters

That's good for us, they won't be able to see the invisible Unicode in our application.

Or just feed in a bunch of null bytes

Anonymous
I wonder if someone's tried to name their horse "Esroh" yet

1:26 AM
Probably, and I'd say it isn't valid.

I posted the weird Python thing on SO... time to see how many downvotes it gets.

0

class TypeUnion: pass class t: pass def super_serious(obj): proxy = t() for name, val in vars(object).items(): if not callable(val) or type(val) is type: continue try: setattr(t, name, lambda _, *x, **y: val) except AttributeError: pass return proxy print(sup...

Hmm it looks bad when the code is first in the excerpt.

1 hour later…
2:42 AM
0

Background The tabs versus spaces war in programming has been going on a long time, basically because spaces are too low-level to have all the properties you'd want for alignment and indentation, but tabs can't be relied upon to work in all contexts (with some programs optimizing the use of tabs...

3:03 AM
Is this answer really allowed? Do standard quine rules apply to out current Quine question?

3:18 AM
CMC: print "CMC"

@LeakyNun Python 2: print "CMC"
Also print"CMC"
Charcoal: CMC

@ASCII-only You don't need the space

@WheatWizard Yeah ^^^

Oh I thought that was a language called Also, mb
4

Anonymous
@WheatWizard Dibs

3:21 AM

CMC: the nearest demonic number (a denomic number only has 6), ties are undefined behaviour
6543 -> 6666, 1021 -> 666

ties are on 36, 366 etc if that helps anyone

and f(x)=10x+6 is a useful function, as well as its inverse

@LeakyNun Wise 26 bytes

3:38 AM

0

A demonic number is a positive integer whose decimal representation consists of only 6. The list of demonic numbers starts with 6, 66, 666, 6666. Given a positive integer, output the nearest demonic number. If there are two, output the bigger one. Testcases: n output 1 6 2 6 3 6 6 6 ...

4:29 AM
@Mego Are you going for a record? :P

Anonymous
@Dennis Nah, just was browsing through some old challenges and decided to do some comment cleanup

Anonymous
Also I wouldn't want you to get bored :)

Anonymous
Also this was nice motiviation:

Anonymous
10

4:40 AM
Congrats!

Anonymous
Thanks :)

5:37 AM
Hey, Dennis, did you ever post your tio quine? It seems that the old permalink method is going to be replaced soon.

5:53 AM
@Mego that's not what I meant the changes were all on PPCG

@Phoenix There's no challenge to post it on.

@Mego oh my congratulations for this exciting accomplishment!
also when you say Geobits did something wrong you probably mean Big Toes right?

6:08 AM
@Dennis you can just post it here in tnb

I'm still hoping that AdmBorkBork will eventually return.
It has been a month though. Hope he's alright...

Oh, didn't notice he was gone. Yeah, I wonder what's up with that...

@Phoenix one day I wanted to ping him with an amazing PowerShell answer and I couldn't that's when I realized he was gone...

Are PHP quines considered legitimate?

6:18 AM
I don't think cat-like quines are considered legitimate, since a part of the code must identify another part of it
but PHP is more than just cat so there can be a legitimate quine as well

@Dennis What do you think, Mr.%?

I believe we have a php quine.

One part of the code must identify another part of it? Is this type of thing allowed? The encoder is also the decoder, it just depends on how you run it
@Phoenix We also have a Quine that reads its own source. I don't think the standards apply to the actual Quine question.

@WheatWizard I think there's a meta consensus that literal quines (like one of Jelly's 0123456789) are considered invalid that's why

It is my opinion that we need a new, rules-compliant quine challenge.

6:23 AM
So, is this valid?

no we actually don't since it's a catalog already
@Arjun I've downvoted it almost a year ago
it's clearly cat-like and a poor golfing attempt...*flags*
oh wait this is from 2012...*checks consensus*

But is it valid?

I don't think its valid.

apparently it is, since the consensus was made in 2015
this is from 2012

Where can I find the consensus?

6:25 AM
although we could flag it as poor golfing attempt instead

18

The basic definition of a quine is a program that, when run, produces its own source code as output. There are a number of techniques and a number of way to implement those techniques across a number of different languages. However, not all quine programs are equal. Clearly, any quine in HQ9+ or...

@Arjun here
ah ninja'd

@EriktheOutgolfer Precisely why we need a new quine challenge to reflect new rules

oh so that's what you and Phoenix meant

I think a new quine challenge warrants it's own meta post.

6:27 AM
although not sure if it will be accepted by the broader community...

Probably ^

So, if I post a quine challenge now, then such PHP answer will not be valid?

of course not

Good.

ok who upvoted that PHP quine from 2012

6:28 AM
I feel like it would make more sense to clean up the existing Quine challenge

BTW, I am going to post a challenge any time soon.

but thats also kind of a gray area because the user that asked it is inactive now

oh wait we can't flag it as poor golfing attempt either serious contender consensus was made in really early 2016

I don't have access to a computer right now, wheat, do your want to make a post regarding what to do about the quine challenge?

oh...I guess we should make a new quine challenge or something, who's going to post it?

6:31 AM
Some types of consensuses are retro active

it isn't clear which are though right?

@Phoenix I'm waiting for my phone to charge so I can go to sleep, I'm not going to do it rn
> that means that you can't just read the source file and print it

maybe I or Arjun should post it instead?

If the question disallows reading one's own source code why is
40

HQ9+ (1 character) Not quite as short as the 0 char one, but here it is anyway: Q

allowed?
That broke the rules even when it was posted

@WheatWizard do you have a note 7 or galaxy s8 or something that would probably explode if you let it in the charger for too long?

6:33 AM
Because no one cared too much about rules back then.

I flagged it last month though

flag declined I guess?

@EriktheOutgolfer My phone is my alarm clock, if its dead when I go to sleep then I can't wake up

I mean leave it in the charger it would still beep right?

Yeah, I just need to charge it enough to turn it on
@EriktheOutgolfer disputed, is that the same as declined?
Oh wait that was another answer

6:36 AM
I hardly think you'd be the first to flag it

I think that consensus for programming languages didn't exist back then...and the corresponding loophole actually isn't effective anymore?
let's see

It doesn't really exist anymore
We have a definition but you don't have to follow it

oh it was deleted or something
that means HQ9+ is now valid again...crap

It wasn't deleted, there was a consensus where it was decided that non-programming languages should be allowed.

where?

6:40 AM
22

Answering in non-programming languages is allowed The best challenges are written in terms of input and output. We avoid Do X without Y challenges because the Y is usually not defined in terms of input/output. Disallowing non-programming languages is like disallowing arbitrary classes of langu...

we should delete the loopholes answer
there's a consensus now

I think the whole loophole system is confusing and messed up
see:
8

Currently on the defaults for IO this answer is does not have enough positive votes to be instated. At press time it has +11-6, defaults are required to have: 5 net votes and at least twice as many upvotes as downvotes. However only a day ago this method was valid (If memory serves it was ...

> due
it should be "do" right?

yes, I don't know how we made that mistake

> we
is should be "I" right?
:P

6:45 AM
I don't know how we made that mistake either

ah my ":P" was ninja'd
also who is "we"?

I don't know, I meant to say I

you said "we" twice though

The second time was a joke.
and judging by the fact I had to explain it not a very good one
Ok my phone is charged, so I'm going to go. If no one has posted a meta question by tomorrow I'll be more than happy to get a question towards socratic. :p

good night

6:51 AM
@WheatWizard Good night!
Are trailing newlines or white spaces allowed for quines?

@Arjun If its in your output it should be in your source

@WheatWizard Okay, so should I add [kolmogorov-complexity] to my quine challenge?

One thing before I go to sleep, Whoever writes the meta question should try to be as general as possible, there are other old questions just like the quine question that are out dated. If we could get a consensus on all questions instead of just that one that would do good.
@Arjun I don't think so.
Ok now I'm going to sleep for real. I need to wake up in ~3 hours.

That's always fun
I don't have it quite that bad though. I only need to be up in 5.5 hours

@WheatWizard Good night! :)
You remind me of Modi.
@DJMcMayhem You remind me of Obama

7:01 AM
o_O
Uhm... OK?

He too sleeps 5.5 hours a day.
Guess how much I sleep?

@Arjun -5.5 hours/day

Nah
~10-12 hours/day

I usually get around 7-8, but anywhere 4-10 is normal

:P
It's proven that the more you sleep, the more your height grows.

7:04 AM
I sleep 14 hours when I can but 6-8 hours most days

@Arjun Not when you're twenty :P

Good thing tomorrow is Sunday

:D

Also, there's a significant correlation showing those who sleep less live longer.

"Death is the ultimate cure!"
-Socrates

7:09 AM
Wasn't Socrates kinda an idiot?

Yeah, a lil bit. :P

5 rep away from rep cap yesterday...

Can you guys review my sandbox post?
0

Don't break the bridges! Introduction: You are a worker, who is in charge of managing a set of bridges, connecting a square grid of "nodes": N - N - N | | | N - N - N | | | N - N - N (the grid here is 3 by 3, but they can be larger). Each of the bridges has a set capacity from 1 to ...

@Arjun don't think he would have used a "!"

Anonymous
7:35 AM
@DestructibleLemon Yeah Socrates always struck me as more of a "‽" kind of guy

@DestructibleLemon True. :P
@NewMainPosts Come on!

"Death is the ultimate cure!"
"are you okay? please calm down"

I am going, bye

2

The Task In this challenge, your task is to write a program which takes in no input and whose each anagram (or permutation) outputs itself. Standard Loopholes and rules of standard quines apply. Note: Your program must have at least 3 characters. Input Each anagram (or permutation) of you...

2

Golf you a quine for great good! is a great example, since it was posted before the quine consensus was made. That means it's cluttered with answers not following it. Should we repost challenges containing a lot of answers affected by a consensus change?

7:47 AM
@NewMainPosts I don't even think this is possible

@DJMcMayhem Nelson Mandela.....

Actually, I guess it's possible in unary

CMC: given 4, print:
   x
xxx
xxxxx
xxxxxxx
xxxxx
xxx
x

@NewMainPosts Is Charcoal printing a literal string a valid submission
@LeakyNun Output for all other numbers is undefined?

7:51 AM
Oh then that's easy
@LeakyNun Charcoal, 4 bytes: ＧXＮx

wat
what the hell

@LeakyNun what's wrong :P

how does it work?

@fergusq :D

7:54 AM
what is X?

@LeakyNun Up right, then down right, then down left, then up left

where is it documented?

Could someone review my sandbox post? I think it's ready for posting but I'm not sure. codegolf.meta.stackexchange.com/a/12485/66833

oh thanks
@ASCII-only but it isn't included as one of the directions here

7:58 AM
@LeakyNun Yeah, it's a multidirection, meaning it can onyl be used in certain places

Hello

@ASCII-only do you have any practise for charcoal

@LeakyNun what do you mean

practice*
for me

I am disappointed at how ungolfy this is

8:11 AM
@LeakyNun not yet but that's a good idea

@mbomb007 You can also put unprintables into the source code like so: Try it online!

1 hour later…
9:30 AM
1

Do you ever look at 3D shapes and think that we have 2 many dimensions. So let's make 3D into 1D! (See what I did there?) Task Given a 2D representation of a cube (layout below), flatten it into a single string, based on pointers. The CUBE This is the layout of the cube filled with no-ops (,)...

9:45 AM
@fergusq Do you know why f a,b,c{[_${=*a}_]} errors? But if I change the =*a into "="*a it works 10:09 AM 0 Sum my Fibonacci divisors! The famous Fibonacci sequence is F(0) = 0; F(1) = 1; F(N+1) = F(N) + F(N-1) Your challenge is, given n, to output the sum the Fibonacci numbers index at index d for every divisor d of F(n). Input: a positive integer n Output: the sum of the Fibonacci elements of its... 10:21 AM CMC: given [a,b,c,...] output [a,a*b,a*b*c,...] (×\ in Jelly) ×\ in Dyalog APL as well monring Alternative using ×/: ×/¨,\ dang, summer's coming fast, 6:30 and the sun's already coming out let me try a recursive approach 10:37 AM 3 Sometimes, I have lists of constant matrices in my code: [ [[1, 0], [0, 1]], [[1, 0], [0,-1]], [[0, 1], [1, 0]], [[0,-1], [1, 0]] ] That's a terrible use of screen real estate. I'd much rather write them next to each other: [ [[1, 0], [[1, 0], [[0, 1], [[0,-1],... 10:52 AM @LeakyNun jelly doesn't like your cmc 0 Make your keyboard into a keyboard WIP 11:18 AM Does anyone have a Glypho interpreter? I might try solving my own challenge in Glypho there's TIO it has shorthand too @Okx Do you know Glypho well? If so I might need your help eh sort of How do I get the sign of a number? ¯_(ツ)_/¯ 11:29 AM @Qwerp-Derp does it need to work for zero? @MartinEnder Nah, I'm using it for a sorting algorithm But could you provide a version that works with 0? btw, iirc TIO uses the Java interpreter which uses a different assignment of the commands to patterns 35 Glypho, 74 + (74 - 36) = 112 1. Run (74 bytes) !!#%QTQT@=A@$!!$)()*!&))+...1449:@HILOQZ\\^eefmpx|||{~~~~~~y~|~ ~ 2. IO (36 bytes) !!!#!$!\$4419TAHT\ee\OQQQ))*+)..)|~~~ Explanation Glypho seemed like a fairly good choice for this challenge, because it doesn't care about the actual ...

@Qwerp-Derp what I would probably do is to put a 1 at the bottom of the stack. then have two copies of the input on top, and then loop, incrementing one and decrementing the other, while swapping the sign of that 1 at the bottom until one of the two input copies is zero

@MartinEnder Ooh, I didn't think about that before, thanks!
Is there a way to output the number on the stack instead of the character code?

11:48 AM
0

Make a Minecraft Crafting Table WIP

Anyone help me make the new language 'EQ8'

@SIGSEGV depends on wt the language is
CMC: print the following:
aaaa
aaab
aaba
aabb
aabc
abaa
abab
abac
abba
abbb
abbc
abca
abcb
abcc
abcd

@LeakyNun I thought I told you about it before
(On discord)

@SIGSEGV I might have forgotten it

EQ8: A language where a program is an equation

11:58 AM
detailed description plz
best if you have a doc

. is input, everything else is a whole equation and directs to the output
For example:
Adding two numbers: .+.`
(I might add some functions tho)

how will it be TC?