« first day (4129 days earlier)      last day (706 days later) » 
00:00 - 05:0005:00 - 00:00

5:27 AM
what is this?
 
@NumberBasher r/place but made by emanresuA for cgcc
 
5:46 AM
i'm just looking at some of the standard python library stuff and realizing
there is some truly gratuitous global state shit going on with some of these
like why does the csv module maintain a dialect registry
which reminds me, i still haven't been convinced that there is any legitimate use case for the singleton pattern
 
@UnrelatedString uni assignments
 
Singletons are best replaced by static classes where possible.
 
in flax, 54 secs ago, by PyGamer0
>600 commits !
@UnrelatedString what is a singleton pattern
 
@lyxal which is the worst part--universities that have bowed down to oop orthodoxy are teaching people bad practices
 
class Something{
    public static Something INSTANCE;
    public Something(){
        if(INSTANCE != null) throw Exception();
        INSTANCE = this;
    }
}
 
5:50 AM
public class Singleton {
    private static Singleton instance;
    private int count = 0;

    private Singleton() {
    }

    public static Singleton getInstance() {
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }

    public int getCount() {
        return count++;
    }
}
 
^
a class that has only one instance and can only have one instance
 
What I posted is real code from an assignment Daniel gave out
 
real code from my project
 
/shudder
 
5:51 AM
because it's a requirement to have a singleton
 
That can very easily be converted to a static class too ;-;
 
@UnrelatedString how is it useful?
 
@ATaco no doubt. But it is what it is
 
public static class Singleton {
    public static int count = 0;
    public static int getCount(){
        return count++;
    }
}
Cleaner, does the same thing. ;-;
 
the only class i've had in java so far the professor basically threw singletons in completely gratuitously because he knew it was Something You're Supposed to Teach but couldn't contrive something that made sense
 
5:52 AM
Singletons exist where one cannot avoid writing a singleton due to implementation issues.
 
actually i forget if it was specifically singletons or if singletons were all he could think of for factories--which can be justified without singetons ofc
 
Unity often uses Singleton Monobehaviours.
 
import random
singleton_count = 0
class Singleton:
  def __init__(self):
    if singleton_count > 0: raise Exception("frick you")
    singleton_count += 1
    self.v = random.random()
^ is that a Singleton?
 
class Singleton:
  __instance = Singleton()
  def __init__(self):
    pass
  def getInstance():
    return __instance
that's more accurate, but not fully the same
mostly because python doesn't private members
 
@lyxal that is why python should not be used ...
why doesnt python have private members?
 
5:58 AM
Python can have Private members if you break the language enough.
 
that's the beauty of it
 
Oct 21, 2021 at 8:39, by pxeger
TIL Python has a built-in range syntax! https://ato.pxeger.com/run?1=PY5BasMwEEX3PoXIaqaoIlkUioOz7Am8C0Eo9kg12JIZTQIm5CTdZNNeoWfptiep3YYuPh_e58-ft49xktcUb1_fLXlVg9cPFstC-cQqqi5CKCtvvA19Oro-YxkaE0gskyemKBl8n5wYa9uuEWtxvz7s46GSaSSIGlBfVtYuDbsqezccW6dafdZSsouBoIsCZ9Rh7uAVAQvFJCeOqi66YUwsKjQ6T3k7y2QSYdcQ1Lh9qRayXPbsBoKZzG_-xjaNTWop639SbXZrXb-fxD8-f7Kq1FMx8jLdd1lgYwwj_qW3u939Bw
 
can you even have static class methods in python?
 
Yes
 
there's a decorator for it which iirc just ignores the self parameter
 
6:01 AM
class A:
    @staticmethod
    def static():
        print("hi")
@UnrelatedString it's slightly more complex than that, because when it's called on the class (A.static) there is no self parameter to ignore, but when it's called on an instance (A().static) there still is
 
oh nice
i did not actually know it let you call it on the class
 
@pxeger i forgot about that decorator
 
It actually uses descriptors: docs.python.org/3/howto/…
 
So I'm trying to create a more accurate python singleton class, but I'm having a little problem
It doesn't like creating a new Singleton inside the class
 
@PyGamer0 ok
but it has a bug
 
6:05 AM
dont ask me
ask emanresu there ^^
@lyxal o__o
 
@lyxal This is the standard way of doing it: ato.pxeger.com/…
 
@lyxal wait wont that create recursion?
 
@pxeger ah I see. That's a much better way than what I was attempting
 
Python makes me sad.
 
6:09 AM
hi sad, I'm lyxal
 
but i only know python properly :(
i should try learning C++
 
why is your first choice c++ of all things
 
C++ is cool :P
 
learn c++ on an as needed basis after learning like three or four related languages
Feb 17 at 19:50, by pxeger
> The official mascot for C++ is an obese, diseased rat named Keith, whose hind leg is missing because it was blown off. The above image is a contemporary version drawn by Richard Stallman.
 
@UnrelatedString \o/
@UnrelatedString what should i learn then?
you know, i tried making a text editor in Java once..
 
6:13 AM
depends on how you feel like you need to branch out ig
 
i got syntax highlighting working
 
oOoOo
C > C++
Entirely for personal non-objective reasons
 
well it's true logically too
wait no
no it's not
C == C++
 
@UnrelatedString then i deleted the code :P
 
6:15 AM
nice
good call probably
 
C < ++C
 
@ATaco true
 
Except when C is a non-number. Then who knows
C++ is C's younger brother who acts like he wants nothing to do with him but still ultimately shares a lot of hobbies and at the end of the day came from the same place.
 
6:29 AM
c++ is c's son who's been drifting in and out of rehab for the last 10 years after getting hooked on amphetamines as a rebellious teenager
4
 
6:41 AM
time to C++
#pragma once

template<typename T>
class Array {
private:
    T *ptr;
    size_t len;
    size_t size;
public:
    Array();
    Array(size_t size);

    ~Array();

    Array operator+(Array other);
    Array operator-(Array other);
    Array operator*(Array other);
    Array operator~(Array other);
};
any c++ users here ?
will ^^ overload ~ so i can do: Array~Array?
 
i don't think you can have binary ~
been a while though
 
Honestly missed opportunity.
I use it for Binary XOR, but I also use ^ for Power
 
yeah
honestly surprised that isn't mainstream lmao
 
@ATaco wait so can i overload it or not?
 
like if you're going to have variadic operators for + and - already why not put xor on binary ~ so you can save ^ for exponentiation
 
6:50 AM
i am making binary ~ concat
 
Ah, I usually use ..
But i have the freedom to choose in my project
 
i'd probably go with ++ or maybe something funky like <> or +: if i designed a praclang
 
, is the best option..
 
oh yeah ; is an option
 
@UnrelatedString but thats the statement separator..
 
7:00 AM
in general, not c++
 
Funky2/3 just have you splat onto a new list anyway
 
oh ok
 
c = [a..., b...]
 
considering i'm fairly sure c++ doesn't let you overload the comma operator :P
 
@ATaco is funky3 a practical language?
@UnrelatedString i think it doesnt
 
7:00 AM
More-or-less.
It's not esoteric, but it definitely has quirks.
I'm a big fan of the De-Operator.
 
@UnrelatedString it does
 
wait really
wack but also nice
 
7:17 AM
@thedefault. oh cool
@ATaco de-operatpr?
/deop ATaco
 
Not sure the equivalent in other languages, but it allows one to get a function from an operator
f=@+; print(f(3,5)) $$ returns "8"
An expression can be provided instead of an operator to instead act as a lambda function. EG. f=@print("Hello, World"); f(); f(); $$ prints "Hello, World!" twice.
The main use is as a function argument for something like sort or reduce.
 
isnt that kinda like lambda in python
 
@RadvylfPrograms Is this answer valid? You can't write a valid full program in Haskell without using =, because you need it to declare main, but you can write a valid module which compiles fine: Try it online!
You can write interesting functions, too, like (+1).(*3) to perform one step of the Collatz conjecture
 
7:36 AM
and if it has to be possible to define main there's probably no way to make a worthwhile haskell cop
...except maybe restricting function application somehow?
fuck it i'm writing that up lmao
 
14
Q: Crossing a Lily Pond

NilsterThe Narrative You are a frog who is at the edge of a pond with waterlilies. You would like to cross the pond without getting wet, so you plan to jump from lily to lily. There is, however, one problem: you are a rare species of frog which can only jump one specific distance, and so you might not b...

 
8:09 AM
took me 18 minutes to figure out how to write a program other than main=main
(it's main=sequence_[])
 
 
2 hours later…
9:59 AM
Thanks :) would've gone faster if I'd flagged as spam instead of vlq
 
/tell @a "Hello"
 
@emanresuA funny thing is that it was bound to be spam flagged
It was caught by smokey and given 4 tpus
 
I saw the smokey thing, which is why I found it
And I didn't read the smokey thing lol
And flagged as vlq lol
 
back in my day earrape was more than just heavy bass boosting and a small but noticeable bitrate decrease
 
10:40 AM
omg unrelated unreal string quark electron has an yautawbe chamel°!
 
11:08 AM
DECEARING PREPARATION PREPARATION OF EGG
 
nice
are you going to boil it?
 
blyat
 
hei
 
i feel like this already needs to be moved to offtopic :P
 
d:
perhaps I should solve this in makina?
 
11:37 AM
@Ginger perhaps yes
 
okay then
 
@dzaima there is no preprocessor stuff highlighting (#define blah blah) for C? dzaima.github.io/…
 
11:55 AM
@PyGamer0 didn't bother. I guess highlighting line starts matching \s*#\w+ as keywords is simple enough though
 
hello!
 
12:06 PM
hello!
 
@PyGamer0 pushed
 
is it possible to find all the positive integers solutions to $\frac{1}{x}+\frac{2}{y}-\frac{3}{z}=1$ in code?
or is math software not that clever yet?
 
@dzaima ..and pushed a fix for the horribly broken display of lines without macros
 
12:34 PM
could someone cleverer than me explain why all the mice can't just be unrelated ibb.co/Yh8tx88 ?
in other words, how does this puzzle make sense?
I worked it out :)
 
1:27 PM
@PyGamer0 Oh hey I love that video
 
@dzaima thx
 
1:46 PM
solution to this in my unnamed sql-like language concept: SUM OF EVERY T OF INPUT;WHERE T IN"aeiouAEIOU";;MOD 2
 
2:31 PM
still a 3-way tie for room ownership lol
 
lol
 
new github pfp just dropped btw
 
vyxal's evil twin
 
the un-AIified version:
I yeeted it into wumbo dream and used what it produced
just like how my SE pfp is an AI-touch-up of a normal picture lol
 
3:04 PM
Just finished translating a whole song's lyrics to katlani (see katlani room for details), it's a surprisingly usable language
 
is it a classical song
 
3:25 PM
o desmos is blue now
 
Noticed that yesterday
It's gonna take a while to get used to it
 
@RadvylfPrograms How much do you use desmos‽
 
ugh that's dumb
 
@pxeger a lot
 
3:27 PM
hang on why does it change it to the meme..
 
green was much better
 
^
 
@PyGamer0 chat easter egg
 
@pxeger Maybe once every week or two
But I'm used to seeing green :p
 
@pxeger TIL
i just found another
 
 
1 hour later…
4:31 PM
here, have a markdown programming language prototype:
# main
## loop
_c_: 0
print _c_
_c_: _c_ + 1

_c_ <= 10?
: [loop]()
---
[loop]()

---
 
is there a way to know the exact date i joined a se site?
> Joined 1 year ago
 
@PyGamer0 Hover
 
@RadvylfPrograms where?
 
The "Joined 1 year ago"
 
also i can hover, on android
 
4:37 PM
If it doesn't work, you'll need the API
 
@Ginger aaron miller was working on that if you want to collab with him
 
5:19 PM
i feel like I, despite having looked it up multiple times, still have never actually understood what scroll lock does on a windows keyboard
 
me who never even thought to look up that key: looks it up
o wait i just realized theres a new what if xkcd
 
5:52 PM
0
Q: Find the nth Fibonacci number, where n is the mth Fibonacci number and m <= 20

SomeoneIntroduction If fib(x) calculates the xth Fibonacci number, write a program that calculates fib(fib(m)) for any positive integer value of m less than or equal to 20. Any means of calculation is acceptable. Challenge Write a program or function, in as few bytes of code as possible, that for any gi...

 
6:04 PM
Possible answer to this in Microscript: 9{v$" "a9sl-{sd1}CfaxCxald1}
 
6:34 PM
TIL that 9 - 9 = 18
 
From what source
 
oh
 
It's only funny with context y'know :p
 
the person who wrote the interpreter made a typo that makes - do the same thing as +
there's your context
 
6:36 PM
pull request submitted
 
7:05 PM
> typo
looks more like a feature to me
 
does anyone know of a question like this but with only the top half? (so a triangle instead of a diamond)
 
not that i know of
 
I got reviewer for Suggested Edits! :D
 
Ɑ:
 
nice!!
 
7:17 PM
Next goal: Steward in First Answers, which should only take approx. two more years :p
 
gg
 
id be on my way to getting my first gold badge (Fanatic) if i hadnt broken my streak on the 13th
 
I just bookmarked my profile page and made a habit of clicking it every few hours
 
i keep CGCC as an open tab in my browser all the time, so if i didnt visit it its usually because i didnt open my computer at all that day
although i dont think that explains the 13th, it does explain the other day i broke my streak (march 26) when i was on an airplane flight across the country and didnt have wifi
 
7:33 PM
not every action counts as a visit, actually
i don't know what exactly qualifies but usually visiting and clicking around a bit will qualify
 
catstruct programs consist of two parts:

- The structure of the program as a binary tree
- A list of operators

The binary tree represents dyads, monads, and nilads. There's two types of leaf nodes, one for nilads and one for inputs, which don't have an associated entry in the list of operators. This allows more complex implicit input and reduces overhead for functions.
There, revealed how it works :p
 
I'm sure there's a way to use gpg to prove that a given ciphertext decrypts to a given plaintext without revealing the private key, but I can't remember that right now
 
8:39 PM
@RadvylfPrograms That's pretty clever :P
 
Thanks! It just barely manages to fit n operators in n bytes, up to 6, then costs slightly more
 
Might not be so powerful then
 
Well, for ones below 6 bytes, you get considerably more flexibility with I/O
E.g., with tacit or stack based, you only get two of these three in two bytes: sqrt(x+y), sqrt(x)+y, x+sqrt(y). catstruct does all of those in two bytes.
 
9:32 PM
I like how Firefox adds a little notification to a pinned tab when the title changes
 
9:45 PM
I feel like my 1# best programming skill is just being able to google up documentation for a random language, read some of it, and be able to absorb enough of it to figure out the problem involving that lang im trying to solve
2
 
:O
 
oh SICK
todays firefox keybind I just discovered: ctrl-shift-S to take a screenshot of the page youre viewing
 
@user About time
 
does SE have some sort of rep-based limit on how many times per day you can vote on questions/answers? It's telling me I've used all my votes for today, but the badge tracker for the Vox Populi "use the maximum 40 votes in a day" badge says 33/40
 
9:58 PM
Sounds like caching issues
 
@des54321 Yeah, basically, you get 30 votes that can be used for anything, but 10 more that can only be used on questions
 
Oh true
 
@cairdcoinheringaahing ahhhh, that makes sense
when i try to upvote a question, its not that
 
The way it works is that it starts by taking your question votes from the 10 "Q-votes" first, then, once they're all used up, it eats into the 30 "QA-votes". However, if you use up 25 votes without using up your 10 Q-votes first, you can no longer use up the remaining Q-votes, and you only have however many QA-votes that you can cast in the day
58
A: Please don't require answer votes to be cast before question votes

wafflesCompleted New behavior: Everyone gets a total of 30 votes. You may get up to 10 extra question votes. Warnings remain simple... (5 votes remaining, 4 votes remaining...) Question votes may be cast at any time during the day. However, once you reach the N votes remaining warnings, stuff is s...

211
A: What are the limits on how I can cast, change, and retract votes?

jjnguyLimits on casting votes The SE network defines a "day" by the UTC/GMT clock. New days start at 00:00:00 UTC/GMT. (The current UTC time is always available to logged-in users.) Post votes (votes on questions and answers; upvotes and downvotes count the same) The exact number of votes available d...

 
@cairdcoinheringaahing ahhh, i guess that makes sense
 
10:03 PM
@des54321 No it doesn't :P
 
true, youre right
 
But we're stuck with it so ¯\_(ツ)_/¯
 
@RadvylfPrograms When golfing in Vyxal, I try to avoid explicitly referencing inputs or swapping values, and I often succeed. I think it'll about tie / be slightly worse on longer programs, but it's an interesting idea and could be quite powerful if the tree could be partially implicit.
 
On longer programs it's even more powerful though
Because you don't need anything to delimit functions, and you can take input in more creative ways
 
How do you fit the tree + two ops in two bytes?
 
10:12 PM
There are 64 fewer operators
 
Interesting :P
 
CMP: What is the mode (i.e. most common) question score of the questions you've posted?
Mine is 13 questions with a score of 19 (8.3% of all my questions)
 
I have 7x 15 but also 5x 24
 
The posts that are 1 vote under a badge are so annoying :P
 
ikr
I feel like future golflangs are mostly gonna be compiled syntax sugar
For example, in what might be Halfwit 2, 32 is gonna actually mean the bit sequence 00 100 100 111
 
10:33 PM
Or incredibly complicated self-compiling code pages :p
 
Also, I've realised something cursed - you can have ASCII strings in a half-byte language
 
10:45 PM
@RadvylfPrograms I kinda want to help implement this but I doubt you'd let me :P
 
I can put all of my plans in a gist and let you contribute whatever you want
 
Sure ¯\_(ツ)_/¯
 
Your point about keeping it secret not being useful is a good one, so I'll turn 180" and accept contriubutions from anyone who wants
 
180 arcseconds?
 
Yeah. Not going all in just yet :p
(That or I failed to hit my altgr key)
Those are my planning documents, my planning strategy is roughly equivelent to pulling my brain out of my eye socket and smearing it on a sheet of paper, so if anything's unclear or disorganized ping me and I'll give some context
 
10:53 PM
Wow. If this works, you might have started the fourth generation of golfing languages.
 
pxeger had an interesting idea too, different enough that they're totally distinct concepts, but I'd lump it in as the same sort of "fourth generation" idea
 
I kinda want to know what that is as well but you probably shouldn't tell me without their permission
 
I don't even really remember the specifics lol
 
You have that whole gpg-encoded chat
 
I deleted the key (this morning, actually)
Forgot I could use it to go back and re-read the message lol
 
10:58 PM
@RadvylfPrograms What's the numeric structure in the "Op count to number of structs:" sequence?
 
Think of a binary tree, where there are two types of leaf nodes. You count all nodes which are not the second type of leaf node.
So 1 op could be 2(0')(0'), 1(0'), or 0
Where 0' is the non-counted type of leaf
(0' is an implicit input, and 0 is a nilad)
 
I have an idea for how to simplify the string stuff
 
The operator list could contain a string delimiter
 
As in, the structure?
Oh wait no I see what you mean
 
11:03 PM
No, I mean the operator list after the structure
 
And that could just contain a sequence of bits which you can decode however you want, up until the next string delimiter
 
I considered that, but
The most important part of catstruct's encoding is that it removes all useless programs
If you have a 18 bit program, you know it contains exactly three operators
And you can infer how much is the structure from there
 
Ohhh I see what you mean
They'd be nilads but the structure might reference them as monads or dyads
 
Like, you waste a lot of possibilities in normal langs by allowing things like 0 1 2 when only the last nilad gets run
@emanresuA More that for maximum compactness, you need the size of a single operator the be constant
 
11:06 PM
I guess, yeah
 
If the structure can look like sssxxxx(xyz)xxx, or sssssxxxxxxxxxx, and they're the same lengths, you need to waste data encoding where the struct starts and ends
 
> () => { var known, known_non, known_count, known_bits, structs, non_i_structs_2, count_structs; };
... what does this accomplish?
 
Makes my editor recognize them as variables for syntax highlighting
For some reason it keeps global variables the default black, which throws me off
 
Lol
 
I usually wrap stuff in a (() => {...})() to fix that, but it makes debugging harder
 
11:49 PM
@RadvylfPrograms Dyadic GCD and LCM of two lists? You sure that's not a copy-paste error?
 
Set union and intersection
But without es
 
How about list union and list similarities then
*similarity
Also, type overloads or vectorisation?
 
Vectorizing is an overload
Vectorizing where reasonable, and overloads otherwise
But array operators are far more useful than vectorized number operators in almost every case
Esp. when limited to 64 of each adicity
 
@RadvylfPrograms fair enough. I was just wondering how many items are going to be reduced into a single thing
 
Catstruct's a bit like Risky where you only get a certain number of each adicity, so 64 dyads, 64 monads, and 64 nilads
 
11:56 PM
I'm more looking at the function list to see where I could give feedback, because non-full bytes is so not my domain
Methinks I'm too smooth brain for fractional bytes lol
 
I did do a dumb thing recently and delete a bunch of monads thinking it was a big brain play, and then realize they were necessary still
I was thinking the dynamics with the identity function only cost a single op, so I deleted the monads like "filter truthy" that could be done like that, but then realized it's actually two ops (dynamic + function literal)
So we'll have to go through all the dynamics and see for which ones a monadic form would be useful
 
Y'know, for someone called "Radvylf", you sure have a lot of projects that sound feline related :p
 
Yeah, I'm not really a dog person, no clue how I ended up with "wolf" as the animal in my code name lol
 
00:00 - 05:0005:00 - 00:00

« first day (4129 days earlier)      last day (706 days later) »