« first day (3800 days earlier)      last day (337 days later) » 

11:00 AM
Mainly because it's difficult to do anything server-based without them :(
 
@Ausername SQL
we've been over this
 
True
Wait what about Keg?
 
@Ausername I already have an accept for every challenge I've won, and I have one accept
 
@Ausername In which context?
 
@felipa better up to about 50k, then it starts going down
 
11:11 AM
:)
I will be happy at 1k forever
just need to find some more bounties to give
 
I'm still 71 away from 1000 :(
 
@ATaco In general.
@StackMeter I have ~150 Vyxal answers, about a third of which won.
 
I mean, Malbolge is terrible by design.
 
True
 
But the best worst languages are languages that aren't trying to be bad.
 
11:14 AM
@Ausername me having not won a challenge:
 
Y'all ever try and learn a different programming language as a way of procrastinating in regards to implementing your own?
 
A bit
 
@Ausername I fully agree with this
@math I shall give you a very rare opportunity to make a bad joke. Who's Joe?
 
@lyxal joe needs to upvote more answers
 
@lyxal Joe Bloggs, aka a generic person, aka yo mum.
 
11:21 AM
@Ausername well done
Excellent job
 
Bows
 
edited a closed question
anyone wanna check and see if it is good
 
Link?
 
@Ausername this
 
Wait how did you edit it?
 
11:30 AM
nvm the edit was rejected
 
If you put what you want to edit in a gist I can do it for you
Hey!
"Toady"?
Well you're stuck with that for a month...
 
You can always edit your profile
 
Once a month
 
@AviFS If we did do that, I'd prefer to link to the actual FAQ post, not an old and slightly off topic/unnecessary meta post
@Ausername That's username. Profile can be changed whenever you want
 
11:39 AM
I change mine weekly
 
Hmmmm....
 
Fresh content every Saturday morning aest
Both main and chat
 
@AviFS I agree with HN in that we shouldn't put too much in the modal, it's already very long. That said, I don't see a problem with changing it to "We host coding challenges, such as code golf or fastest code competitions, and related questions, such as code golfing tips"
(I chose fastest code as I think it is the second highest used challenge type after golf, ignoring , as is generally easier to understand than "Cops and Robbers" or "King of the Hill". Open to suggestions tho)
 
@lyxal I still have ding ding ding ding ding ding ding ding-ding-ding. ding ding ding ding ding ding ding ding-ding-ding-ding-ding-ding 𝘢𝘮𝘰𝘨𝘶𝘴 from the Lyxal army shenanigans.
Btw what happened to okie?
 
22 hours ago, by okie
i would come back, but recently I am busy at school and stuffs
 
11:44 AM
Also you will live forever in my heart physics.se profile
@cairdcoinheringaahing :(
 
"stuffs"
 
Hopefully they come back in school holidays or something
 
@cairdcoinheringaahing should we have a list of all existing objective criterion tags linked?
 
code-golf, code-challenge, king-of-the-hill, code-bowling, popularity-contest, atomic-code-golf, metagolf
did I miss anything?
 
@Ausername that is severely outdated
 
11:47 AM
Who cares
I'm never gonna use it
 
@RecursiveCo.
 
@RecursiveCo. A lot
2
A: What are the winning criteria I can use for my challenge?

caird coinheringaahing answer-chaining: Each answer influences how newer answers work. Often ends when there are no new answer in a specific time and the last one wins. See What answer-chaining scoring criteria promote collaboration? for more. ast-golf: The answer with the fewest nodes on its abstract syntax tree w...

 
@lyxal I've been meaning to update the welcome page, I'll add that in at the very least
 
tips don't have scoring criteria, do they?
 
11:48 AM
No
But they also aren't challenges
 
That's it, I'm changing my stackoverflow username to caird coinheringaahing, my pfp to caird's dog, and profile description to caird's.
 
Identity theft isn't a joke, Jim!
:P
 
My name is not Jim. But at least I know whose name is Jim...
 
@RecursiveCo. you're forgetting that you first need consent from patch to use his image on the internet
 
Wait so then A username is also plagiarizing
 
11:50 AM
Otherwise he might sue for identity fraud
 
@RecursiveCo. No, that's just a generic amogus
 
@RecursiveCo. I'm fine with it
 
Which Lyxal drew on
 
but I can still use the username, right? Nobody owns the rights to "caird coinheringaahing"
although I'm no legal expert
 
@RecursiveCo. if you get sued by patch for identity fraud, you can be assured that you won't be let off until you've payed the last bone :p
@Ausername I drew it by hand on a pixel art app
 
11:53 AM
@StackMeter I'm not voting to reopen until it's got test cases, a winning criterion, and we've figured out if wherever it was probably stolen from is okay with that, but I went and solved it in Brachylog and I actually had to use ` for once
 
Oh
Nice
 
> 125 questions
caird coinheringaahing loves asking questions!
and you reached a "nice round number"
 
Ooh I have 365 answers!
 
for a moment I thought you had 365 questions
 
I have 3
 
11:54 AM
I still don't know what the hell a soft cut is but it seems to be just what I need to get around bugging :P
 
CMQ: how many people have you reached?
I have reached 31k people
 
so -194001?
 
you know maybe I should just look up soft cut in prolog documentation
 
that's the bitwise NOT of 194k
 
11:55 AM
~88k
 
come to think of it
 
@lyxal How
 
He has always been more of an answerer
 
No you has 22
 
I have 7 questions
 
11:57 AM
18 (but 1 do be bad lol)_
 
which one is the bad one? As far as I know all your challenges are great
especially the piston one
 
so now I understand *->/2 but I'm even more confused on `
time to look at the transpiled code
 
@RecursiveCo. Not yet, but I'm making moves to own the copyright on all the letters in "caird coinheringaahing" :P
 
@RecursiveCo. ~2k
 
11:59 AM
@PyGamer0 Honestly I'm baffled as to how you have double my profile views though.
 
doesn't work on my machine
to begin with
 
@RecursiveCo. ~756k
@RecursiveCo. But I've got 707 answers which isn't a round number :/
 
For the record, Jon Skeet has 334m people reached.
 
That seems low tbh
 
it seems like there's a lot of times i run some brachylog on my machine that behaves fine on tio but endlessly cycles choicepoints when i run it locally
i'm not even on my forked repo
 
12:01 PM
People reached is a complete estimate, I'd expect Jon Skeet to have 750m+
 
which is the entire population of the US times 2.5
 
Logic.
 
@Ausername lol
 
@Ausername I never specified what I have 3 of
 
@RecursiveCo. Or just under half of India or China
 
12:06 PM
I just squashed a cockroach with a jar of peanut butter
That has to be some sort of irony
Being killed by the one thing you desire
 
so ` is implemented as *-> 1=1, and the soft cut behavior is actually entirely unrelated to why it fixes the bug, it just happens to break direct unification which is somehow what the problem is
like you can just use A and that also fixes it
???
and is literally just implemented as constraintM([_,_|_]).
how can anything go wrong with that
i guess something just breaks inside if it has that constraint on its output
 
@lyxal Roaches often desire more than just peanut butter :P
Besides, we all know that the proper way to kill something with peanut butter is to drown it in the PB
2
 
?- var([_,_|_]).
false.
there we have it
⊇Ṁ shits itself because it tries infinitely many lengths for because it goes to a branch of the code that assumes it has a single length already
 
@lyxal Eyes? Feet? Hands? IOUs for a new fridge from hyper?
 
12:28 PM
the latter ;p
 
@lyxal Pretty sure mods can only hand out 2 free fridges per year of service. It's in the mod agreement and everything :P
 
so then who else's fridge has HN destroyed?
please come forward whoever you are so we can protest this needless destruction of fridges
 
CMC Given 5 integers, compute the median without using a builtin
 
Well, something's up with my microwave...
 
12:42 PM
@felipa Vyxal, s2i
 
are those using a builtin sorting function?
 
are the numbers guaranteed to be in order
 
lag again :(
 
@RecursiveCo. no!
@cairdcoinheringaahing :(
 
12:42 PM
Sort, get middle element
 
@felipa same here
 
@cairdcoinheringaahing I didn't mean that!
@lyxal :(
 
JavaScript, 24 bytes: n=>n.sort((a,b)=>a-b)[2]
 
@felipa that's what median is
middle element
 
@lyxal yes but I meant without a builtin median or sort function
 
12:43 PM
middle element, or average of two middle elements if list has even length
 
mine has length 5
 
oh no sort builtins either? then, well, I'll keep working
 
@RecursiveCo. cool :)
 
Are the numbers guaranteed to be different?
 
12:44 PM
@RecursiveCo. no
@cairdcoinheringaahing how does it work?
 
@felipa Vyxal, ⇧İ2i
 
@lyxal how does it work?
 
@felipa Sort the indices, index into the input, get middle element :P
 
once again, same here
 
@cairdcoinheringaahing how are you sorting them?
 
12:45 PM
Builtin:
 
nooooo !
:)
 
here
 
no builtin sorts allowed!
 
@felipa Extended Dyalog APL: 3⊃⍒⊇⊢ Try it online!
 
@Adám how does it work?
 
12:46 PM
Picks 3rd element from the argument permuted by the permutation that would put it into descending order.
 
@Adám how do work out the permutation that would put it into descending order?
 
@felipa That's
 
@Adám that's a sorting function I guess
 
83 bytes in JavaScript without sorting built-ins. n=>(g=n=>[b=Math.min(...n),...1 in n?g(n.filter((e,i)=>i!=n.indexOf(b))):[]])(n)[2]
 
@felipa It doesn't sort, though.
 
12:48 PM
true
 
@felipa How many "steps" away from sorting does the prohibition reach?
 
are all numbers guaranteed to be truthy, though? If so 1 in n can become n[1]
by the way, try it online
 
ngn
@Adám i think grading is a kind of sorting
 
I don't.
 
@felipa Can we use is_sorted builtins?
 
12:49 PM
I think I should start again!
 
Is my solution valid?
 
I want code to find the median of 5 integers using only comparison operations
@RecursiveCo. I think so but can you tell me what it does ?
 
@felipa That's impossible.
 
@Adám as in a sorting network
 
Vyxal, 12 bytes: 2(D:gḟiw$F)g
 
12:50 PM
@Ausername how does it work?
 
@felipa Not sure what that is.
 
Removes the minimum twice, then takes the minimum
of what's left
 
In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such networks are typically designed to perform sorting on fixed numbers of values, in which case they are called sorting networks. Sorting networks differ from general comparison sorts in that they are not capable of handling arbitrarily large inputs, and in that their sequence of comparisons is set in advance, regardless of the outcome of previous comparisons...
@Ausername cool
 
@felipa It first sorts based on the minimum integer in the list, then does a recursive call to g with the filtered array (all but the minimum) if there is more than 1 element in n. Otherwise return the singleton list. Then takes third element of that sorted list.
 
@RecursiveCo. cool
 
12:52 PM
@Ausername 2(:go)g is shorter
 
@felipa Seems to use max or min
 
@Adám the sorting network?
 
Yeah.
 
apparently you need 6 comparisons for my problem
26
Q: Exact number of comparisons to compute the median

JeffεVolume III of Knuth's The Art of Computer Programming (chapter 5, verse 3.2) includes the following table listing the exact minimum number of comparisons required to select the $t$th smallest element from an unsorted set of size $n$, for all $1\le t \le n\le 10$. This table, along with the well-...

 
12:54 PM
max/min can of course be implemented as comparison with selection, but then you have to allow selection.
 
@Adám Not really. If you do n[0]<n[1]&&n[0]<n[2]... for each element you'll find the minimum pretty quickly. Then if n[i] is the minimum, then for each element n[0]>n[i]&&n[0]<n[1]...&&n[0]<n[i-1]&&n[0]<n[i+1]..., and eventually you'll find the second lowest, etc.
 
@RecursiveCo. You're using selection too.
 
if instead you take 5 arguments you can replace n[0] with say a
although that's still "selecting" arguments
 
Exactly.
 
oh what a coincidence. I'm doing a machine learning course but still in the intro about pandas to get a grip on how to perform certain simple data analysis tasks and I'm on a part about sorting.
and we're talking about sorting
or were
 
12:56 PM
:)
now I want to know how to find the median of 5 numbers in 6 comparisons
which is apparently possible
aha! The answer is here cs.hut.fi/~cessu/selection/V_5_3
 
CMC: same thing but with 6 numbers
 
so I guess I was asking for that in your favourite language
@RecursiveCo. if you want the 3rd smallest number out of 6 I think it is cs.hut.fi/~cessu/selection/V_6_3
ah sorry.. that is the 3rd largest number
 
wait, is that your website?
 
@RecursiveCo. sadly no
 
and note that the median of 6 numbers is the average of the 3rd and 4th numbers
when sorted
 
1:00 PM
@felipa Dyalog APL, 19 bytes: ⌊/(⊢(/⍨)⍳∘≢≠⊢⍳⌊/)⍣2 Try it online!
 
@Adám oooh. what is that doing?
 
@RecursiveCo. Jelly, 9 bytes
 
i can't read this code. Can anyone explain it to me?
 
1:02 PM
yours, i think
 
@felipa ⌊/ finds the smallest value, ⊢⍳ index of that in the argument, ⍳∘≢ all the indices, builds an all-true mask with a false at that position, ⊢(/⍨) uses that mask to filter the argument, ()⍣2 repeats that twice, ⌊/ finds the smallest value.
 
ah ok thanks
 
no one wants to go down the route of using cs.hut.fi/~cessu/selection/V_5_3 :(
 
First time I've seen printable ASCII used in jelly (apart from hyper's rickroll)
 
1:03 PM
@lyxal o works for lists? You learn something new every day.
 
ḟṀḟṂƲ⁺SH
    Ʋ     Last four links together
ḟ         Filter; remove
 Ṁ        the maximum
  ḟ       Filter; remove
   Ṃ      the minimum
     ⁺    Do that again
      S   Sum
       H  Halve
I think this is how it works?
 
why do you need the sum and halve part?
for 5 numbers I mean
 
@RecursiveCo. 2÷⍨1⊥(⊢(/⍨)∘~⍳∘≢∊⊢⍳⌈/,⌊/)⍣2 Try it online!
 
caird's code was for 6 numbers
 
@RecursiveCo. ok
 
@cairdcoinheringaahing is that a meme?
on cgcc
 
like crossed out 44 is still regular 44 (found by mindless browsing)
let's revive that, shall we?
 
Let's not
The memes page is deleted for a reason, there's no real need to revive dead memes from 2016
 
1:14 PM
Awww....
 
@Adám how do I join an array by newlines in APL?
 
@cairdcoinheringaahing !95 even for a necromancdr badge? :0
 
@lyxal what type array is it
 
@Razetime numbers and character arrays
more specifically: 1 2 Fizz 4 Buzz ...
 
use
or if you want a completely string result use ↑⍕¨
 
1:35 PM
@lyxal For next time you have that kind of question, it might be faster to ask APLcart than me.
 
CMC: Given a list and a separator, join the list with the separator. You may not use a builtin function that does exactly this (e.g. Python's .join or Jelly's j)
 
ngn
@cairdcoinheringaahing ngn/k, 6 bytes: 1_,/,'
(the built-in for join is sep/list)
 
@cairdcoinheringaahing What assumptions can we make about the list?
 
If it makes it easier, the list and separator can be (reasonably) restricted to specific types/values of your choice
 
Say a list of strings or a list of numbers?
 
1:45 PM
List of numbers is fine
 
funny idea: Js toString, regex replace comma with the correct char
 
@cairdcoinheringaahing What assumptions may we make about the separator?
E.g. is the separator a single number?
 
@Adám Again, you can choose to restrict it to a specific type or values, so long as that restriction is reasonable
 
JS, 28: c=>a=>(a+'').replace(/,/g,c)
only integer arrays
 
@ngn Fails if separator has multiple chars.
 
1:48 PM
So if you want to restrict the input to only be integers, that's fine
 
ngn
@Razetime a.toString() could be (a+'')
 
@cairdcoinheringaahing can I restrict it to spaces only? ;P
 
No, that'd be unreasonable :P
 
ngn
@Adám ^^^^
 
@ngn oh nice(I do not golf js)
 
1:49 PM
(Zsh, 5 bytes: <<<$@)
 
@cairdcoinheringaahing 1↓∘∊,¨ on single number as separator for list of numbers.
@ngn Right, so yours is like mine.
 
CMC: Calculate the sin of the input.
 
@cairdcoinheringaahing 4 bytes (jelly) - spoiler
 
@PyGamer0 1∘○ in APL
 
ngn
@Adám no, yours is like mine :P
 
1:50 PM
The input committed no sin!
jk I know what it means
 
@PyGamer0 Jelly, 2 bytes
 
@ngn I like that your K is consistent for / on strings vs numbers.
 
@hyper-neutrino Nice :P I also had this for 5 bytes :P
 
Math.sin
(js)
 
@PyGamer0 Mathematica, 666: ComputeSinsOfSoulInCurrentPastAndPrevious
 
1:51 PM
lag again? :( anyone have any idea how to solve this?
 
@cairdcoinheringaahing that was my initial idea
 
ngn
@Adám the / in ,/ is reduction
 
but a) i realized i'd need the absolute argument reference and that's not very tacit gamer of you and b) append-each is shorter :p
 
@Razetime That would be 41 bytes.
;)
 
CMC: Calculate the sinh f the input.
 
1:52 PM
i was trying to use APL but i got confused
 
Math.sinh
(js)
 
@RecursiveCo. i was using the HELL969 encoding, should've mentioned
2
 
@ngn Oh, right. OK, I take that back. I don't like it then.
 
@hyper-neutrino Yeah, I was trying to figure out if there existed a non- way :/
 
Rust: |x|x.sinh()
 
1:53 PM
@PyGamer0 5∘○ in APL. Handles complex numbers too.
 
@PyGamer0 Do we have to handle complex input?
 
@cairdcoinheringaahing yeah i typically don't like using ^3 and ^4 because then you can't use test suites on them
 
@JohnDvorak since when was rust this short
 
It's a lambda syntax
 
@cairdcoinheringaahing yes
 
1:54 PM
i barely ever even think to use ³/ because i just don't like them
 
huh, i thought all types had to be mentioned
interesting
rust has a very minimal lambda syntax
 
The types in a lambda are optional
 
rust was LoTM earlier @PyGamer0
 
Why dont people use Rust for code golfing?
 
@PyGamer0 .unwrap()
 
1:55 PM
@PyGamer0 Orst, 2 bytes Џ
 
@cairdcoinheringaahing 1 char, undefined bytes (it's complicated) what war crimes has orst committed
 
It's better in a context that returns a Try, but you still end up with a lot of ?s
 
It has a mixed byte code page :P
 
ah, nice
 
1:57 PM
That character is FF 77 (I think), so it's 2 bytes
 
CMC: Change a github pages url to the link of a github repo; for example https://username.github.io/reponame becomes https://github.com/username/reponame
 

« first day (3800 days earlier)      last day (337 days later) »