« first day (3998 days earlier)      last day (837 days later) » 

12:13 AM
SELinux is so annoying
Someone didn't get the memo that security at the cost of convenience comes at the cost of security...I'm like 10s away from disabling it permanently lol
Yaaay!
Finally got it working
I'm like 90% sure SELinux is a social experiment to see if people would rather have an unsecured system or jump off a building
 
What's so bad about it?
 
Trying to do literally anything is very difficult, the documentation sucks, and the logging is very useless
It's like it's not written for humans to use
And googling for information on it isn't easy either
Since it gets drowned out by tutorials on how to do trivial stuff with it
Anyway, now I can start actually improving RTO's code now that I've got a running copy again
And oh boy is there a lot to improve :p
Starting with the fact that it will either respond or response to your actions, depending on what you do
 
@RedwolfPrograms ohhh now i dont know anymore <(*_*)>
 
->X<- explodes
 
12:26 AM
@user Wdym by this?
 
Like instead of a specific builtin to find lists, we could make a builtin to filter sublists by a predicate
So you would filter by "is list", then map each to its first element (because you'd have singleton lists of lists)
 
like .filter(your function here)?
 
Do you want to discuss in the Vyxal room?
 
Sure
 
@thejonymyster I guess it would look like that in JS or something
 
12:28 AM
i am always just grasping for understanding in this big scary world ^_^
 
@emanresuA Rejecting an edit and then making the same edit seems like an acknowledgement that the edit should be made, so why not approve it?
 
<!-->
 
sorry lol i thought thats the only way to get a short edit in
 
It basically is
@emanresuA Yeah but it still changed 27 to 28, so by opting to reject and edit instead of improving the edit, you're just preventing thejonymyster from getting the rep/stats
 
20 hours ago, by emanresu A
@thejonymyster For trivial edits like that, just comment
 
12:31 AM
But if the edit's already been suggested, there's no reason not to approve it
And SE policy supports minor edits IIRC
 
@RedwolfPrograms Sorry, forgot that happened.
 
Nw, just for future reference
 
tbh i dont get why rep is tied to that it seems a little silly
 
I love how my laptop is muted, but I have chat open on my other laptop and it's not muted, so whenever someone pings me I hear it from the other room instead :p
 
12:58 AM
@RedwolfPrograms you sure that isn't just someone getting milk out the fridge?
 
Unless there's a portal between your houses, no
 
Sandbox posts last active a week ago: (untitled)
 
Ah yes, (untitled)
The best name for a challenge
 
Wait, does OSP not recognize <h3>s?
@cairdcoinheringaahing ^
 
 
1 hour later…
2:07 AM
@RedwolfPrograms It does not, only h1 and h2
I'll update it to recognise more header tags later
 
@cairdcoinheringaahing why?
 
just teach it to recognise only plain text
 
how about a program that tells you if the input appears in the src code
 
@RedwolfPrograms ສະບາຍດີ
 
2:22 AM
@thejonymyster as a quine variant, it can probably be golfed a bit from a standard quine but idk
or maybe harder depending on the lang lol
 
`I$c`I$c in Vyxal
 
@thejonymyster That sounds really cool
Could easily be a dupe though
 
@emanresuA what's the accept/reject
 
Wdym?
 
wait, what does that program do?
 
2:25 AM
Does that include `?
 
`I`I is the standard quine, $c checks whether input's in that
 
JS: i=>"i=>.ncludes()\\\"".includes(i)
 
i must have copied it wrong because it was doing some nonsense when i tried it
 
@RedwolfPrograms Is it meant to do multichar strings
 
Yes
Wait
Frick
 
2:28 AM
Then includes fails
@RedwolfPrograms You have become Lyxal
 
Hmm, without cheating this'll be hard
 
Does eval count as cheating?
 
user opinion
there will probably be a "without eval" answer anyway
ill check if its a dupe first
and sandbox it if not]
 
I think stringifying functions was rather recently agreed upon as cheating here
Idk about eval though
 
2:33 AM
im seeing a lot of ones based on individual characters
rather than an entire input string
 
0
Q: Remove consistently dependent smaller integers

thejonymysterConsider this nested array [[1,2,4],[1,2,3],[2,3]] In each subarray in which 1 appears, a 2 appears. You might say that 1's presence is dependent on 2's presence. The converse is not true, as 2 appears in a subarray without 1. Additionally, 3 is dependent on 2, and 4 is dependent on 1 and 2. Task...

 
@Fmbalbuena I'm bored
@thejonymyster Almost certain this has been do e
 
2:49 AM
probably
but like i really dont know how to search for it lol
theres so many ways it could be phrased
i guess ill check the quine tag
 
21
Q: Is it a substring of itself?

caird coinheringaahingGiven a string, return whether the string is a substring of the program's source code. Standard quine rules apply, meaning you cannot read your own source code. The length of the input is guaranteed to be less than or equal to the length of the program. You may return any two distinct values, no...

Huh, I posted it
 
oh wow, no wonder youre sure lol ^_^ thank u
 
@cairdcoinheringaahing no, you're caird.
 
right yea i was never gonna find that specific wording
in fact that title isnt even accurate
 
@lyxal Yes, it's because I caird that I want to update OSP :P
@thejonymyster How so?
 
2:51 AM
replace "it" with "the input"
is the input a substring of the input's self
 
Who said both "it" refer to the same thing? :P
 
@cairdcoinheringaahing Your username was StanStrum?
 
is that when you play a Dream fan like a guitar?
 
@emanresuA ...no
 
@emanresuA no, theres someone named stanstrum in the thread lol
 
Oops
 
CMQ: A program whose source code contains every substring of itself
4
 
Huh, could've sworn Stan Strum had more rep than that
 
maybe bounties
@RedwolfPrograms so any program :)
 
From what I remember, they had >10k, I think we'd notice that much rep given out in bounties
 
2:55 AM
@RedwolfPrograms every language: empty program
@cairdcoinheringaahing must be a different user then
 
@cairdcoinheringaahing I google image search'd their pfp and it gave me "religion" lol
 
@lyxal What is this for?
 
you could make a religion out of this dot png
 
@emanresuA rep graph of stan strum
 
Wish I could search for users by profile pic, cause the Stan Strum I remember had a dog wearing a ushanka with a USSR flag in the background as the pfp
 
2:58 AM
Question about hash tables: If you have enough data, like hundreds of billions of items, wouldn't a hash table essentially be O(n / M), where M is the number of possible outputs of the hash function? And since M is a constant, it's basically O(n)?
 
Stanley O. Strum, La Jolla, San Diego, CA, United States
1
 
@RedwolfPrograms depends on the hash function I'd say.
And also depends on how you handle collisions
 
@RedwolfPrograms The capacity of your hash table also matters
 
Like if you use things like linked lists to act as buckets for duplicate collection, then wouldn't the complexity become the complexity of the linked list?
 
Ok, I genuinely have no idea if the person I'm thinking of even existed, cause I know they golfed in Pyth, but I can't find any trace of a multi-thousand rep user who holds in Pyth who I do t already know as "not Stan Strum"
 
3:02 AM
Did they have their account deleted, maybe?
 
Because if your hash function is crap or your hashtable is tiny, all your items will be stuffed in one or two buckets (assuming you’re using buckets to avoid collisions), making it close to linear
 
2 mins ago, by lyxal
@RedwolfPrograms depends on the hash function I'd say.
 
@lyxal Not really
 
3:04 AM
@RedwolfPrograms it depends a lot
every time you get a collision you increase the complexity of each lookup
 
If you’re not using buckets and are instead doing that thing where you hash it again or whatever and put an object with a collision at a different index, you’ll run out eventually
 
@RedwolfPrograms If your hash items are approaching your hash range, you're probably either running out of memory or using a bad hash function
 
@RedwolfPrograms Any hash function you'd use in practice is going to have a pretty even distribution
 
@RedwolfPrograms Perl had a hash function that looked at the length of function names. That would mess things up a LOT
 
Imagine not using an injection hash function
 
3:05 AM
@user For the use case I need, all the data would be 8 byte unique IDs
And there could be anywhere from hundreds to hundreds of billions
 
@RedwolfPrograms If you’re using your stdlib and you implemented your custom hashes correctly, sure, but if you don’t, you’re probably in trouble
 
> implemented your custom hashes
Wait what
 
@RedwolfPrograms I’m just saying you can’t make a homegrown hash function and expect it to work
 
Why would you do that
Aren't there well known and commonly used hash functions for this sort of thing?
 
Ye
 
3:07 AM
Depends on what you're storing
 
So why would y'all be presuming that one of those aren't being used?
 
I mean like Objects.hash(field1, field2) in java
 
It's even reversible!
 
@RedwolfPrograms well what do you expect is being used?
 
Where you don’t want the default if it considers other fields
 
3:09 AM
Basically rule 1 of the infosec.SE site is "don't make your own hash/encryption function"
 
Because sometimes you want the hash function and equality thing to ignore some fields and only look at others
 
@cairdcoinheringaahing That's for crypto stuff, though. But yeah, still no reason to do so
 
But the body of your hash function should just be welltestedhash(foo, bar, …)
 
I don't see why this matters?
I feel like we're talking past each other
 
@RedwolfPrograms not necessarily - you might be able to write a more optimised hash function based on the characteristics of the data structure you're using
 
3:10 AM
@RedwolfPrograms Just trust in someone else’s implementation without worrying about it too much :p
 
@RedwolfPrograms If M >> n, yes
That's "much larger than", not bitshift
 
@RedwolfPrograms I wanted to clarify that by “custom hash function “ i didn’t mean “make your own new function” because that would contradict what I said before
@cairdcoinheringaahing which is usually true
 
Problem is, I don't know how many of these IDs there will be. It could be anywhere from hundreds to hundreds of billions.
 
That fits in an int, right?
 
3:12 AM
I think the point is that the complexity of the hash table depends on the complexity of the hash function
 
@user An int holds up to 4 billion or so
 
Oh
 
But that would mean allocating 4 billion items, even for a few hundred IDs
 
Oh boy you need a database and some sql :p
 
uh
who said M is constant
 
3:13 AM
Wait it can change?
 
@RedwolfPrograms Modulo the ids by a smaller number and use buckets
 
or rather
M isn't really the number of outputs of your hash function
 
@hyper-neutrino why wouldn’t it be?
 
it's your hash output modulo the bucket count which can be dynamic depending on your implementation
 
@lyxal I thought user was suggesting having 4 billion buckets (one for every int value)
 
3:14 AM
@hyper-neutrino it’s the domain, right? Or is it the codonain?
 
co
well yeah if you want your hash table to not be either really inefficient in space or really inefficient in time
 
@RedwolfPrograms Then use an M much larger than the largest possible n
 
you need to be able to alter the number of possibilities
 
Oh yeah it resizes
 
@cairdcoinheringaahing Which means a ridiculous amount of space usage in 90% of scenarios
 
3:15 AM
yeah
and each resize is O(n)
 
Frick
 
but overall, it amortizes to O(1) for everything in the average case
 
I feel like a BST would just be simpler lol
 
@RedwolfPrograms Who cares about that, is the code short? That's all that matters :P
 
3:15 AM
@RedwolfPrograms bst is log right? V big
 
log(100000000000) is like 20 :p
 
How about a list of buckets containing bsts?
 
I will gladly accept an algorithm with complexity O(TREE(n)) if it saves bytes
 
@RedwolfPrograms oh true
 
bst is log for everything
sure, log is very small, but it's still a constant factor of like 20
also bsts require strong ordering
 
3:17 AM
But you can get close to linear with hashtables still i think
 
which i suppose is fine if you just order by hash
 
@hyper-neutrino yeah insertion is a problem
 
@user use heaps then
 
I wonder if there's any algorithm who's complexity involves g_n(x) (the iterated function used in the definition of Graham's number) for some n, x
 
how does using a heap help
 
3:17 AM
@RedwolfPrograms is there no way to find out how many ids there’ll be?
 
they're also log and don't even serve the required functionality
 
@user The number will change a whole bunch over time
 
@hyper-neutrino no storing order though
 
@cairdcoinheringaahing for i in range(g_n(x)): print(i)
 
@lyxal heaps are binary trees still
 
3:18 AM
@hyper-neutrino Hmm yes clever
 
@lyxal heaps also don't support arbitrary membership
 
How about a non-trivial example? :P
 
@RedwolfPrograms oh too bad
You seriously need a database
 
Well for what I'm talking about, all I need to store are a bunch of 8-byte unique IDs
So ordering isn't an issue
 
@cairdcoinheringaahing for i in range(g_n(x) + 1): print(i + 1)
 
3:19 AM
And just let sql handle it
 
@hyper-neutrino This is still trivial :P
 
@RedwolfPrograms exactly how many are you going to have to deal with and how much of an issue is efficiency
also what language; can't you just use a built-in set type or smth
 
You don’t even need sql
 
@cairdcoinheringaahing what if i made it +2
 
@hyper-neutrino Now we're talking
If you're really crazy, make it +3
 
3:20 AM
@RedwolfPrograms so why not just use a standard list? Finding an ID is just a linear search then
 
@hyper-neutrino Probably, this is likely just theoretical
 
@cairdcoinheringaahing oh no, higher math
 
@lyxal Linear with billions of items? That's the definition of performance right there :p
 
@RedwolfPrograms what's the context?
 
@lyxal it aint linear
Aset is just a hashtable in disguise
Well it depends on impl
 
3:21 AM
@lyxal Needing to be able to really quickly determine if an ID for something is unique, and then add the ID to the list of IDs
 
How are you planning to implement this currently? Which language are you using?
 
@user Anyone who uses numbers larger than pi is mad
 
How did my NAA flag on this get declined...
 
Also applies to numbers less than -1
 
@cairdcoinheringaahing totally irrational to do that
 
3:23 AM
@user Idk, it's entirely theoretical at this point. C, JS, brainfuck, it's up to you.
 
Brainfuck pls
:p
 
@RedwolfPrograms Flagged aswell, hopefully someone else picks it up
 
If you value your sanity tho don’t use C
Use Excel or MS access :p
 
I'm perfectly fine with giving my future self really difficult tasks, I hate that guy :p
 
@hyper-neutrino Why was my "no longer needed" flag on this declined? The explanation was added, then I raised the flag
 
3:25 AM
@RedwolfPrograms careful, you don’t want future you coming back to beat up present you
 
@user no no use befunge and store the ids in the program
Befunge98 obviously
 
@lyxal No use malbolge and...what
 
@lyxal befunge93 restricts the size of the code board meaning it can't store all the ids lol
Plus if you ever need to quickly burn all the ids, you just stop running the program lol
 
TBH just don't bother determining if the ID is unique
just use a large enough space that it's nearly impossible to have overlap and just assume you're fine xd
alternatively just depend on the timestamp
 
@hyper-neutrino I would just do that, although for the use case I'm thinking of the IDs are user supplied so a malicious user could intentionally supply a dupe
 
3:32 AM
oh
 
But I'll probably just go for a hash table I guess, from google it seems like the main advantages of a BST would be if I also needed to search within ranges, which I shouldn't
(Of course this is theoretical, for the project I'd use it in, I wouldn't actually write any code for a long time)
 
bsts are mainly used if you need to search for the index of something
hence why it is called a binary search tree :P
 
For the RTO prototype, I'm going to have JS and Python. In addition to Ruby, Haskell, and Java, are there any other languages I should add?
 
@hyper-neutrino exactly. Just let everyone use the same ID :p
 
(I'll be adding Jelly and Husk too, on top of Python and Haskell)
 
3:36 AM
@lyxal ಠ_ಠ
 
Like make it so that 69696969 is the only id
 
That dilutes the intrinsic humor of 69 though
 
VYXAL
 
Something like 169420 is considerably funnier, don't you find?
@emanresuA That would be on top of Python, not its own base language
But good idea
I'll add that to Jelly and Husk
 
Oh ok
C/C++?
 
3:38 AM
Good idea
I'm wondering if I should run C/C++ on Alpine, or a full Debian install
 
@RedwolfPrograms that 1 at the front ruins it
@RedwolfPrograms elixir so you can add 05ab1e
And obviously, Scala
Can't forget Scala
 
Alpine uses a different libc, so I'm worried it would break some extremely niche answers that rely on ultra weird behaviors of glibc
 
Also APL
 
@lyxal Elixir will take more than five minutes to install, so not worth adding to the beta
Wait actually, there's an elixir:alpine image
So I'll add it
 
@RedwolfPrograms Scala :)
 
3:41 AM
1 min ago, by lyxal
And obviously, Scala
1 min ago, by lyxal
Can't forget Scala
 
Sorry, no scala in the beta.
 
@user I ninja'd you twice.
 
It's in the 35 though
 
Okay but has anyone suggested Dcala 3 yet?
 
Ooh ooh add nibbles in the beta - it's made in Haskell and would be a good representation of the non-sbcs non-utf category
 
3:42 AM
:p
Maybe Prolog (if you add prolog you cam add brachylog)
 
This is a beta, I'm only adding the bare minimum for testing purposes
 
Ah
 
@lyxal Y'know, I also have a non-SBCS non-UTF language that's written in one of the base languages being added to the beta :p
 
ok so for context, i am making a discord bot, and the commands are all individual functions that are loaded into the command registry via a decorator
errors that are thrown out of the command functions are all caught by the message handler and relayed back to the user
how stupid or bad of an idea would it be to have a "success" error type and throw that and have the handler format and return the response to the user?
 
Sounds like it could be a good way to reuse code/save time
Sort of like how you could use STDERR in a lower level program as a form of output instead of STDOUT if it made things more convenient (like what timeout does)
 
4:01 AM
hm, i see. is throwing and catching errors inefficient?
 
If you mean as in speed, I wouldn't think so, and for a discord bot it doesn't seem like the milliseconds-at-worst difference would matter
 
@hyper-neutrino Ye i think because you rewind the stack
Or sth
*stacktrace
It depends how often you throw en i guess
 
well the frequency would be every time someone calls a command
so yeah ig the efficiency shouldn't matter much if it's just like a couple milliseconds at most
i'm more so wondering if it's bad code style or smth tho lol
 
I wouldn't call it bad, just maybe unconventional
What I'd be more likely to do is just put the formatting in a function and call it in one of two places, once in the catch block and once if it succeeds
 
hm, that'd make sense too
currently i have a function that sets the embed's color to the server's default color and for success-type messages like mod actions i just manually make it green
a lot of code reuse that i've been too lazy to properly address but i was mostly rushing it to meet a deadline, and now i can go back and fix something up
 
4:45 AM
@hyper-neutrino is there no better way to do it? Is this what other bots do too?
 
@user well i could just reply to the user and then return
which is what i currently do
but there's a good amount of code repetition, which i should fix either way, whether like this or with the alternative redwolf suggested
i don't actually know how other bots work; i haven't looked at other bots' code before
i only have experience from writing my own bots and looking at the documentation/reference, lol
 
Ah ok
 
 
2 hours later…
6:36 AM
@pxeger How do you do timeout in zsh?
(Doing this in Vyxal #forthememes)
 
you mean how do you run a command with a timeout?
just timeout 60 command args ...
but timeout is a separate binary so command has to be simple. You might need timeout 60 zsh -c 'command args ...'
 
macOS?
brew install coreutils
 
Thanks
 
and then use gtimeout
 
6:44 AM
Now I just have to figure out how to run Vyxal 2.4.1
 
7:06 AM
Now see imma gon have to stop you there. You probably got the 2.4.1 release thinking that's what the old site runs
But it ain't
The old site runs something between 2.4.1 and 2.5
 
Question: How to get better at 05AB1E? (Means you can write reasonably long program in reasonable time that is not a week)
--
I think I saw someone... @lyxal
@lyxal
 
I'm here
And the answer is practice
Practice using stack manipulation stuff
 
IK
 
Learn the built-ins list
 
I'm just going to say
(|111+")(|""+*"*+)+";1111++"( |"+"*+"++;)()1+( )()+"""++;()"""+"";^"();()"+*"+;\;()++"""++;;""1+"+"+"+";1111++""""+++"1+;;()"+"*+;;()"+"**+"";;
(nvm)
@lyxal but how
memorize it?
 
7:16 AM
Get familiar with some of the terms
You don't have to memorise it word for word
You just have to have a vague idea of what exists so you can search for what you want when you want
 
Oh
@lyxal Like I start getting into perfectionist stuff
e. g. implement exp by sqring
Store n and m and base and mod and ans in the stack
then this happens: ŠŠ....À...
--
Since I give up 1+ and use other languages, ` ^!!LAXYL KCAB EMOC(@)`
 
8:02 AM
It’s basically Vyxal with worse docs
@lyxal I just need 2.4.1 ‘cos W clears the stack, doubling the speed of my program
 
8:15 AM
Some of you may be interested in this set of Jelly puzzles by Lynn: foldr.moe/jelly-puzzles
 
oh i totally forgot about that
 
I made a Vyxal version of those
 
8:43 AM
TIL Safari has a URL parsing bug for # in dataurls
 
9:15 AM
@pxeger Wow, I just solved 44...
 
Nice! Did you see my answer to the recursive prime thing or figure it ou yourself?
> as a workaround we can crash the browser once we detect the attack
 
@emanresuA ?
I'm talking about the Jelly ones
 
Oh.
Welp I’ve given away that one I guess
 
> The puzzles are very roughly sorted by difficulty.
This is quite rough, although I guess it depends on who's solving them
 
I saw :p
 
9:27 AM
because #45 took me about 1 minute, and I spent at least 10 minutes on #44
 
9:53 AM
@cairdcoinheringaahing It's really not certain to me that this type of "explanation" which just explains each of the constituent parts is enough to make the OP understand the answer. If they said something along the lines of "Thanks that helped!" I'd clear things up.
 
I don't think anything there needs much more explaining. Maybe "the digits are invariant under sorting", but I think that's not too hard to work out either
 
 
3 hours later…
12:48 PM
0
Q: Can I shorten this Python code?

chnmasta05I am trying to write a solution to the following problem using as few characters as possible (to meme my friend and introduce him to golfing). Can any improvements be done to my code? So the problem requires us to write a function called navigate in Python 3.6 (language of the judge, sorry, no wa...

 
@NewPosts by at least 3, probably
 
1:23 PM
(python): is there a shorter way of converting a complex number in [1,1j,-1,-1j] back to its exponent of 1j? I've got [1,1j,-1,-1j].index(d)
 
1:37 PM
@NewPosts (what is this, someone who read the help center??)
I also wish I'd edited the title and tags before I answered, to make some progress on Reviser...
 
1:57 PM
Refiner*
 

« first day (3998 days earlier)      last day (837 days later) »