« first day (4367 days earlier)      last day (771 days later) » 
00:00 - 22:0022:00 - 00:00

00:00
Did you meet yourself? :P
Don't we always meet ourselves? Maybe not for the first time, but we definitely meet ourselves fairly regularly
But also, yes, I stared into the face of God earlier, and all I saw was affine subsets and quotient spaces staring back at me, and I had an epiphany:
I suck at linear algebra
00:19
Anyone know what the javascript bigint maximum is?
Whatever your memory can hold
... I shouldn't have tried to test that
01:11
LDQ: should constructors be called new, constructor, or WhateverTheNameOfTheClassIs
or init
o
i just had a great idea
i was trying to figure out how to reconcile methods with ufcs
so in rol there will be no methods
everything is a function + ufcs makes for pesudo-methody syntax
so functions are resolved as specific as possible
so if i make a function that returns the same object, but as a type higher up in the heirarchy, the resolver will resolve the "super" function instead
example:
class A {}

class B : A {}

fun doStuff(self: A) {
    println("a")
}

fun doStuff(self: B) {
    self.super()  // the type of self.super() is A
        .doStuff() // since doStuff() is being called on A im effectively calling the "super method"
    println("b")
}

var a = new A()
a.doStuff() // prints "a"
var b = new B()
b.doStuff() // prints "a\nb"
01:45
new B::constructor()
who is this Colonel Headers guy and why does linux need him to install my drivers
@lyxal I'm so proud :p
@emanresuA glorious
@Seggan you might want to check out nim
It kinda does what you’re thinking of
Also lets you choose between static or dynamic dispatch
The dynamic dispatch might not be as efficient or whatever as the way Java does it because it’s not a method associated with the object, but it’s very cool. It can sorta be overloaded for any of the arguments, not just the first one
@emanresuA the new and constructor together seem redundant
Unless you were joking
@Seggan new or init imo. Definitely not the class’s name, that’s a bit annoying in java. constructor is a bit long
@Seggan Rather than just self.super(), could you also allow treating it as any one of its supertypes? So if A extends F and there were a doStuff for F, then you could call that on b
Or just do what Nim does ig
Static dispatch
02:00
@user how would you specify to recurse instead of calling super?
Just self.doStuff() right?
yes, but not with your suggestion
@user How dare you accuse me of being Jo King. I'm totally not a sock.
@Seggan wdym
@user ehhh i dont really like it
methods are not really separate functions then
@user how would you recusrse? how would you call super?
02:04
This specific ufcs is very similar to nim’s though
in mine, for example, itd be self.doStuff(), and self.super().doStuff()
@Seggan recurse by calling self.doStuff(), super by calling self.super.doStuff() or self.super[A].doStuff()
Yeah same
I don’t see how my suggestion changes anything important
Require taking the this object in method, like python, but require it be called this
Anyway it’s not that important
I know Scala has that feature but I’ve never used it
I’ve only seen it used like twice
@emanresuA btw nim can overload based on any of the arguments, not just the first one. That can be useful if you’re going to separate methods from classes anyway
@emanresuA no
02:09
How about either this.self or self.this, but not both
why not just name it yourself
im trying to keep functions as functiony as possibly
methods do not exist, not even temporarily in the compiler
__self__::_getThis_(new ThisGetter::constructor())::get_tHis(__self__)
AAAAAAAAAAAAAAAAAA
are you messing with me
Nov 4, 2022 at 17:18, by mousetail
You have to understand when you ask me "What is the best X" I have a contractual obligation to suggest the worst possible option
02:16
mmm
LDQ: Thoughts on how this class syntax looks?
It's a translation of the example Seggan provided into a syntax style I'm experimenting with
does gets my approval
btw single inheritance only and whitespace is insignificant
exactly
Gosh dang
02:29
@lyxal not a huge fan of is. Maybe extends or a symbol like <?
Also, I think the does can be dropped
If it can’t, i like it. Shorter than where too
@Seggan This() or Self() (whichever you use) could be an option
Rust makes Self a shorthand to the name of the class
So there's precedent
@lyxal mimics implies it’s a proxy pr a mock object imo
@user so what word should be used instead?
Also if you're making a classic OOP language, please for the love of your mom's grave, do not have a new keyword. Zero ambiguity in just using ClassName(...) as the constructor, instead of new ClassName()
@lyxal honestly, idk. I love implements but it’s long
I’d just use the same thing for both the parent class and any interfaces
02:35
new ...() has massively awkward precedence, especially if you allow new Thing without parens, and it's just a hugely outdated thing carried over from when it was necessary to state that you're dynamically allocating memory (and nowadays it's not like most constructors will actually do that anyway if the compiler's worth half a mom's grave)
On second thought is isn’t that bad
It's also short
@RydwolfPrograms why the obsession with mom’s graves?
And you can add an isn't keyword, separating certain classes from the rest, until tired of being oppressed, they rise against the bourgeoisie
Nonono
Oh wait it’s a joke
Didn’t read past isn’t
02:37
@user No I am serious
@RydwolfPrograms no, you're Rydwolf
Class reductionism: the forbidden eighth principle of OOP
@lyxal instead of foo =bar which looks really confusing to me, how about foo -> bar?
If you really want to flip assignments
I really like has and the end markers
Itd be nice if you were allowed to do end Classname for long classes
Is this a stack based language?
I feel like most modern languages are missing an assignment assignment operator: ==. a == b should become a = (a = b), and a === b should become a = (a = (a = b)).
Wait is this vyxal?
02:40
@user yes
@emanresuA Or a = (a == b)
@lyxal I’m so dumb lol
Okay the =foo stuff makes sense now
@lyxal I better not sit down for a job interview in twenty years and be asked to write Vyxal FizzBuzz on a whiteboard :p
@RydwolfPrograms possible function call?
@RydwolfPrograms that’s the top secret ==== operator
02:42
@Seggan Functions with uppercase names?
true
@user I thought that checked if the left hand side equaled the == function
Oct 23, 2022 at 16:18, by Razetime
what on earth does ==== do in scala?
what do you think of my polymorphism thing?
02:42
We never found out what it did
@user so symbolically, it'll just be |s, but literate mode has a chance to describe what's happening in each branch
hence why i'm giving examples in literate
@Seggan it’s very cool and I think nim’s way is even cooler and itd be really cool if rol borrowed from that
nims is impure in my opinion
i dont wanna mix weird semantics
(btw i was talking to @RydwolfPrograms)
wait since when did you change your name
Wdym my name has always been redwolf
02:48
Are you going to change your website yet again?
Maybe
I'm undecided on my github
Breaking every link posted twice might be pushing my luck
@RydwolfPrograms but youre rydwolf now
Yeah redwolf
Same as walways
Are you trying to gaslight multiple people at once?
02:50
gaslight? what do y'all mean? the username has been the same as it's always been
03:01
Actually, it's called "gaslamping"
Yeah, you're probably just imagining things
It's always been "gaslamping"
03:25
Fun thing I did: Using ssh-agent, I set up a thing that'll prompt me for my SSH key password the first time I use it, then won't require it again until I log out
Did it by 1. making ssh_agent persist across different terminals, and 2. aliasing ssh to a shell script that runs it if I haven't provided it my key password yet
(I also have the alias check if I'm in school wifi and automatically proxy the SSH connection if I am)
03:42
For my peace of mind, I wrote a userscript to disable chat flags. I can't pass judgement on stuff like this, handle angry math people, or speak Spanish.
04:05
Some golfing questions have bounty for e.g. solving in faster way to push solved range. What if I don't know many languages and obvious optimal solutions are all submitted? Still post an exactly same code and start solving bounty?
hey so y'all know that github stats thing some of us have on our profiles? Well the link it uses is a little broken right now
meaning it won't display properly
but there's a fix: s/https://github-readme-stats.vercel.app/api?/https://github-readme-stats-git-masterrstaa-rickstaa.vercel.app/api?
@emanresuA 90% of the time they're just "a mod should freeze this discussion but nothing worth a 30 minute ban has been said yet", so probably a good call
I ignore them 90% of the time
The chat flag system... needs work
and the earth orbits the sun :p
Eh, I don't think it could be much better
It just doesn't do much or need to do much
04:17
The chat flag system... needs work
 
2 hours later…
06:38
I just realized today is a Friday the 13th
07:04
@UndoneStudios Indeed. My daughter's birthday.
Congrats
Thanks. She's turning 0.
Oh that's a very special birthday
hope it goes well
@Adám So all this while she's -1?
No, she's 0 now. She was -1 right before.
07:18
Basically, she's born today?
Yes, 3.5h ago.
congrats
Thanks, all. A new potential code golfer. She's certainly short.
17
adams_family ←adams_family , ⎕NEW daughter ⍝ gg man, hope she does well at apl :p
I don't care if that type errors, it is what it is :p
07:30
That should work fine, but you can golf it to adams_family,←⎕NEW daughter
So, are we going to have to golf you baby supplies like we did for Dennis that one time? :p
 
1 hour later…
08:31
posted on January 13, 2023 by yjj‭

We all know and love the quick sort function, no? However, the usual partition functions (such as dutch national flag, five-way) are limited to a number of partitioning divisions. Your t...

08:44
0
A: Sandbox for Proposed Challenges

Kevin CruijssenToggle some bits and get an actual square Tags: code-golfbinary-matrixnumbergrid Inspired by the title of the Toggle some bits and get a square challenge. In that challenge you output how many bits should be toggled, in order for the base-10 representation of the binary to become a square number....

@Adám congrats
thx
@lyxal tell me more :P
3
A: Polyglot Quiz (Cops' thread)

emanresu A??? and ???, 54 bytes String: 8356830650 Works in A and B (hex): 00000000: 300b 3366 b87e 0b00 247e e239 2a83 2a3b 0.3f.~..$~.9*.*; 00000010: 0fd6 30 ..0 Works in A (hex): 00000000: a4ac b3bb 762b 3a74 d6 ....v+:t. Works in B (hex): 00000000: ...

I don't remember what this was, hopefully i have the files somewhere
09:00
lol
09:44
0
A: Sandbox for Proposed Challenges

pxegerTranspose binary numbers code-golf array binary The input numbers [34, 7, 109] can be represented in binary as 0100010 0000111 1101101 (one number on each line; and padding with zeroes on the left so that all the rows are the same length) Now transpose this array: 001 101 000 001 011 110 011 Th...

10:09
The Low Quality Posts queue is truly useless
codegolf.stackexchange.com/review/low-quality-posts/66963 should be deleted, but none of the options when you choose to delete are really correct
and it doesn't even let you flag it from in the queue, I had to click and open it in another tab to flag it as not an answer
It's a commentary on another post right?
looks to be
yeah
but the remarks in the first sentence are not "critiquing or requesting clarification from the author"
but it should still be converted to a comment
"Thank you for an interesting challenge! Little later I'd like post here full answer on Mathematica, may be not for real challenge, just for survey."
It's not a comment
it's an half answer
> So the question arose: should tangent circles be considered an overlap?
That seems like a request for clarification
10:13
That's not a clarification. That looks like monologuing
"the question"
yeah
The question is: Should the output include the point (6,-6) and the rest of the post is noise
lesobrod is a user who's interested in doing things for academic research purposes, and this reads like one such research thing
@mousetail could just be a commentary on their observations on what other answers do
Possible, but to me (lacking context on the question) it seems like a request for clarification. The code demonstrates a edge case. Then they ask how the edge case should be handled
If it was a clarification, why have a h1 header with the language name?
10:22
it's that user's thoughts so far towards an answer
plus there could be a little bit of a language barrier here. What lesobrod might have intended as a general observation answer might come across as a clarification request. I've noticed that english may not be their first language (which is okay, just an observation from prior interactions)
@pxeger exactly
Or what you view as a general observation may be a clarification request. We know 100% sure there is a clarification request since it was said explicitly. There may also be a attempt at an answer
I'm more saying from my experience with this particular user, it's most likely observations.
But the code doesn't seem do do anything except point out the edge case, it's clearly related to the clarification request
If it was a clarification request, I think it'd be left in the comments. This user isn't unfamiliar with the concept of comments.
honestly, it feels like there's a paragraph or two missing at the end
feels like there should be a "but here's what I concluded from my experiments with mathematica" kind of sentence
10:25
If they knew comments they would have posted as a comment, or they wanted a bit more space to ask their question
it really doesn't matter
just flag it as not an answer (or VTD if you have 25k rep)
there is a distinct lack of delete button here
Anyways, on another topic: **LDQ** So my language is based on polish notation. That means it has a "end". I'm wondering how to treat code that comes after the end. I see 3 options:
1. Discard it, good for polyglotting I guess but otherwise a waste
2. Treat it as a separate program, with implicit output it would simply print both results in a row. Could be helpful if a challenge asks for 2 or more unrelated things
3. Pipe them. Automatically create a variable for the result of the first program that the second can use. Saves bytes on variable declarations
oh you can only delete answers with a score of < 0
@mousetail pipe!
10:32
Oh and option 4: Treat it like a string literal, to allow a convenient way to embed a single string without any escaping
oh yeah pipe seems interesting
presumably this is a golfing language not a practical one
Yes
BTW there is already a builtin diad that does the piping thing at the cost of 1 byte
Seems like people mostly prefer piping so I'll probably do that
 
1 hour later…
11:44
Follow up question: If a program is shorter than it needs to be, I intend to insert implicit input in the first argument spot of the incomplete operator. However, if there are multiple piped programs and the last is incomplete, do I insert implicit input there or implicit reference to the output of the previous?
so you want to have the last pipe implicitly use input and last pipe value?
or just one of the two?
I can only add implicit things of any kind to the last chain, or it could increase the number of chains. So I can't do implicit input "left-first" as I'd like to. The question is what implicit thing to add if there are holes in the last chain
first chain gets input, every chain thereafter gets previous chain's value
because realistically, if you're using more than one chain, you're doing it on purpose.
because if just discarding these chains was a viable option, it's clear that they weren't originally intended to be primary features
Yea it's a golfing language, I'm assuming everything was done intentionally
of course, I was just giving a bit of justification to my idea
11:57
Ok yea, for every chain but the last input needs to be explicit. So in the case there is one chain I'll implicitly insert inputs. Otherwise I'll insert variable references
sgtm
 
2 hours later…
13:38
I wish more languages had Python-like context managers
they're so helpful!
In which language are you missing them?
@Ginger scala. It has something similar to those but actually cooler
@lyxal wat
They're called implicits
And they can vary from automatic type conversions to just straight up filling in parameters
wow
13:41
And keeping track of something you want to pass between everything
0
Q: By using BFS solve the following question in any programming language

Sahil UpadhyayWe have an NxM grid, grid have one element named Bob. Bob can travel diagonally blocks only. The grid has some blocked blocks on which Bob can not travel. Write a function that returns on how many possible positions Bob can move. Solve this problem using BFS and submit the executable code in any ...

kachow
@NewPosts that is not a question that is enjoyable here
That's a cool feature but not really very much like a context manager
13:44
^
Wdym? I use it to manage context objects all the time! :p
JS has a with statement but it's the absolute worst
13:57
0
Q: A generated proof for g^(-1)kg ∈ K

RobbinspireProblem. Given two subgroups H, K of G so that for all g ∈ G, k ∈ K: g^(-1)kg ∈ K. I want to prove h_1 k_1 k_2^(-1) h_2^(-1) ∈ { hk | h ∈ H, k ∈ K } (no matter if we replace the instead kh). My wish is to do the same thing (a generated proof) to help with the problem for $$g^{-1}kg\in K\Rightarro...

14:17
0
Q: Implement a bag without replacement

bigyihsuanIntro The Tetris Guidelines specify what RNG is needed for the piece selection to be called a Tetris game, called the Random Generator. Yes, that's the actual name ("Random Generator"). In essence, it acts like a bag without replacement: You can draw pieces out of the bag, but you cannot draw the...

lotta new questions today!
Not really, 3 is normal, a lot of questions in 1 hour though
that's what I meant lol
14:40
"
lotta new questions tohour!
huh?
Not today but tohour
Updated UI for KotH controller:
Are you using a CSS library?
14:48
Ok looks quite slick
wow
Got rid of the ugly asymmetry above the button
(the gap above it is slightly bigger)
What language is the KOTH going to be in?
JS, so it can be run online
No RTO KotH tools yet :p
Going to run it automatically?
14:53
Maybe, wasn't planning on it, but I could I guess
15:04
wha--rto.run's DNS records indicate I'm hosting it from my home IP address, but both servers there have been down for a month...
and it's been working during that time
Huh, apparently it's running from rust_wolf, my older server. Guess I have ghosts.
spoopy
so ive got a problem
don't we all
i realized that the scheme i described yesterday for rol is statically dispatched
so ig im adding full blown methods now
@mousetail piping is very similar to the way fig handles multiple lines
@lyxal Ackchually, that's not what implicits are generally used for
15:17
@Adám congrats
I think the only reason Python has a special syntax for context managers is because it doesn't have multiline lambdas. In Scala, which does have those, you'd use something like Using
@Ginger kotlin go brr (the with function)
Ackchually, that's also a different (and much cooler) feature. Kotlin, like Scala and other languages with multiline lambdas, can do context managers without with or other special syntax
are you talking about lambda receivers?
No
Just normal lambdas are enough
15:20
example?
ofc i forget that one
In Java parlance, I think what Ginger was talking about is just try-with-resources
ooooh
Which doesn't require anything special in languages that aren't Python (even Java doesn't need a special construct for auto-closing, even though it does)
15:22
yes, kotlin lambdas are the best.
Gotta agree
Lambda receivers are really nice
^
i love how you dont need parens around lambdas so it looks like cool new syntax
I hope contracts get good someday
tbh i dont see their value
@Seggan And if the last argument's a function, you can just do {}
15:24
yeahs thats what i meant
@user unless youll get smth like contract { param > 0 } then id see their point
Ah I thought you meant parens around the parameters
@Seggan Well also nulls
thats handled by the type system
I think there's a limit to how much the current type system can do
Also, one cool thing is ensuring how many times a lambda will be called
i dont really see the point of that
I think you might then be able to use lambdas for initializing final stuff
Actually, maybe not
15:27
@user ah i see what u mean
returns() implies (param != null)
Yeah you can augment flow typing
Not just param != null but also param is List<String> or something
true
If contracts got really good, this question would have a nicer answer
o just read up on that, smart casting with contracts is real nice
My answer actually used a bug in contracts to get the desired behavior lmao
Hmm, it's been two years, it might be a little closer to doable now
15:32
looks interesting
i still prefer prop = value and runtime exceptions tho
Yeah, you just can't put contracts into getters and setters :(
hmm seems it works with the IR compiler
(i think its K2?)
seems the issue is on the back burner tho
contracts on getters/setts would be nice
As long as they also allow contracts on the getters and setters inside delegated properties
But that might be considered too complex
oooh
@Seggan So the Kotlin 1.3 release notes have this example:
fun synchronize(lock: Any?, block: () -> Unit) {
    // It tells the compiler:
    // "This function will invoke 'block' here and now, and exactly one time"
    contract { callsInPlace(block, EXACTLY_ONCE) }
}

fun foo() {
    val x: Int
    synchronize(lock) {
        x = 42 // Compiler knows that lambda passed to 'synchronize' is called
               // exactly once, so no reassignment is reported
    }
    println(x) // Compiler knows that lambda will be definitely called, performing
               // initialization, so 'x' is considered to be initialized here
15:40
hmm interesting
 
3 hours later…
18:34
Okay, UI/UX question for my KotH
There will be a way to include multiple copies of the same bot
1. Should these all be in their own rows, as if they were entirely individual?
2. or should these be grouped together, and the list can be expanded out to show the individuals?
And then, what should the buttons look like to add/remove bots? Right now I have #1 with a ×2 button (duplicates the bot) and a - button (deletes it)
18:59
I have discovered the power of Python generator expressions
They are very OP indeed.
Hmm, interesting readability issue
What would y'all do if you had a list of indices you needed to iterate through, including their index in the list?
enumerate I guess?
Yeah but for the variable names
i and index...which index is which? :p
ah lol
I'd do ind, item then.
Although, that's even more confusing.
19:18
@RydwolfPrograms index and indexIndex :p
@RydwolfPrograms Leave a comment explaining what each of those indices is
Alternatively, try a completely different approach so I don't have to deal with indices
Might be an X/Y problem. What are you trying to do?
@user Merge some iterators into a single iterator containing a tuple with every possible combination of their outputs
Ooh
Like a cartesian product?
Yeah
But with possibly infinite iterators
19:34
I looked at how Vyxal does it but it looks like we never bothered handling infinite lists, Vyxal just uses itertools.product :|
lol
The way I'm currently doing it is recursive cantor pairing of the indices
That heavily biases earlier items tho
That's okay, though, right?
Later on we'll be able to use a weight representing how far into the list the answer is expected to be to construct the optimal recursive structure to reach a solution fastest
Oh, is this for Complement?
19:37
@user In theory, but in practice you don't want to be checking ninety thousand values of x to get to values of y and z that're in the low hundreds
@user Yeah
19:51
My challenge is still resisting the first C answer!
which one?
5 bytes of Jelly equals too hard in C :)
As does 52 bytes in python
@Simd There just aren't as many C golfers here as there are Python and Jelly golfers. Nothing wrong with not getting C answers
19:58
im thinking of reduction by subtraction of the char codes and reverse sorting
(not saying ima do it)
@user this is sad. Well its not sad that there aren't as many but it's sad there aren't a lot of both
@Seggan do it! :)
doing school rn
ive got appointments in the evening too
@Seggan which subject?
american history
Are you a student or teacher?
Or both :)
20:09
student
@Simd its been like that since copilot
20:36
@Seggan really??
21:20
ffs I spent half an hour trying to figure out why my code was broken only to realize I forgor 💀 an underscore in a method name
21:33
Sounds like a failure on the language's behalf
you misunderstand: I made both of the methods in question
I was using downloadUrlToPath when I should've used _downloadUrlToPath
more accurately, the bug involved downloadUrlToPath calling itself instead of _downloadUrlToPath
but now I've got an exciting new problem:
Downloading packages...
Downloaded typing_extensions-4.4.0-py3-none-any.whl
Downloaded ujson-5.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Downloaded virtualenv-20.17.1-py3-none-any.whl

Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
Downloaded yapf-0.32.0-py2.py3-none-any.whl
see the issue here?
it's not supposed to download yapf 37 times
00:00 - 22:0022:00 - 00:00

« first day (4367 days earlier)      last day (771 days later) »