« first day (4695 days earlier)      last day (227 days later) » 

12:43 AM
codegolf.meta.stackexchange.com/a/26059 改: Provide some code that outputs foo and with the reversed source outputs bar. Try to be irreducible, smallest set of reducibility wins. Is 0 score possible?
1:00 AM
Sandbox posts last active a week ago: Deja vu
Nov 3, 2021 at 22:32, by DLosc
@user Wait. I'm SURE I've seen this comment before. Am I in a time loop again??
1:15 AM
just one time loop would be enough for that, unless you mean you've been in a time loop before
also, YouTube comment notifications are working for me again, for the 0 people who were interested
1:33 AM
@Neil Yes, it keeps happening :(
1 hour later…
2:34 AM
@l4m2 my initial thought is "foo"||"rab" in some REPL
i don't know if it's possible without implicit output though
3:09 AM
@noodleman It's 7(forward)7(backward)
ohhh i see
i don't think that's possible but i could be wrong
could somebody help me with my Retina woes? i have 2*$(a+-\|/-)h2*$(b| / \ )| |¶2*$(a+/---\)h, i was wondering if the repeated part of 2*$(a+something)h could be reduced?
(cc @Neil) (sorry I know you're good at this stuff)
1 hour later…
4:29 AM
@noodleman this proposal seems to be closely related, and it was not accepted by the community
4:39 AM
though now it requires that the error can be caught and I guess errors in typescript type functions can't be
but tsc can emit multiple type errors at once I think? one could argue that the erroring function is still reusable in that sense
> the submission is a union type (like a set) and you get truthy/falsey by whether assigning a variable to the union throws an error or not
I'd say that's not a valid I/O, based on the first link
3 hours later…
7:31 AM
Q: Night hike partitioning

PhilipposWe want to go on a night hike with the youth group, but of course not everyone has their torch, even though we told them we planned to split up. What options are there for group formation if n teens have m torches with them, but each group needs at least one torch? Example: Three teens with torch...

1 hour later…
8:38 AM
A: Sandbox for Proposed Challenges

PhilipposAll good regex come in threes We've had challenges about two regex matching each other but not themselves and a complicated relationship of five regex, but don't they say that all good things come in threes? Write a chain of three regex, each one matching the next, but neither itself not the pre...

9:29 AM
hello all!
I was thinking of posing a coding challenge that is really a probability question. That is the challenge is to write code to compute the probs
do you think that is offtopic?
well as long as u include a method on how to solve the probability it should be fine
@AidenChow ah....I didn't realise I would have to include a method
people don't seem to do that normally
Q: Sample a random non-decreasing sequence

user9206Input: Two integers n and k given in any form that is convenient for your code Output A random non-decreasing sequence of k integers, each in the range 1 to n. The sample should be chosen uniformly from all non-decreasing sequences of k integers with integers in the range 1 to n. The output c...

well it would help if u included a method on how to do it so its not as off-putting to ppl not so good at math, but it could very well happen that one person solves it then everyone else ports that answer
9:42 AM
yes the porting thing is common
I don't know how bad it is
for this problem the main brain power is in thinking of a good method
you might enjoy it in fact :)
@noodleman maybe substitute x(.{5}) with 2*$(a+$1)h?
I'll give it a go.. please be kind in any voting/comments!
Q: Compute probability of seeing all the balls

SimdGiven \$x\$ distinguishable balls (say they have different colors), sample with replacement repeatedly until all the balls that have been sampled have been sampled at least twice. Challenge The input is the value \$x\$. The challenge is to compute the probability that you would have seen all the ...

@AidenChow might outputting a floating point number be easier?
@Simd it would be easier and also dealing with numerator denominator stuff is just a hassle for langs that dont have native support for fractions, allowing for floating point is just more inclusive
usually u would require the floating point output to be within some error bound of the true value
ah ok. Could you help with how to specify the error bound?
I guess I don't really want people to write code that performs 10^100 simulations to get a floating point answer
hang on, if you are outputting a numerator and denominator do you need support for fractions?
@Simd no, but it is a huge hassle for langs that dont have support for fractions, u would need to implement the fraction arithmetic manually
I guess you are thinking of adding fractions
hmm.. how about I allow the output to be the sum or product of fractions?
then they don't have to do the arithmetic
I suppose sum is all that is needed
anyone can do products :)
10:09 AM
its up to u
@AidenChow I added that outputting a sum was allowed.
thanks for the comment!
11:02 AM
@AidenChow can you see how to solve it?
@Bubbler correct
gosh skibidi dang
Q: Farewell Yaakov and thanks for the haiku!

CatijaYou may soon notice one fewer diamond around the site. The amazing developer, tech lead, and community advocate Yaakov Ellis - user 51(!) - has taken an opportunity elsewhere and today, December 7th, 2023, is the end of over 10 years working for Stack Overflow. When he shared this with me, I offe...

one less SE staff
@Bubbler you think?
this is an example
@lyxal yeah, mousetail posted it
@mousetail I see I've been ninja'd to which I say you got ninja'd in another room :p
Well I don't follow any other rooms
11:42 AM
@Neil thanks for the idea, i golfed it a bit more by changing the match to \+.{5} and using $&. it comes out a byte longer just by itself, but i think when i combine it with another idea it will save a byte or two
ah, I wasn't sure whether there was any unique way of identifying the string
@lyxal *fewer
@Neil yeah, i should've just shown my whole program
my idea didn't save bytes
5 hours later…
4:37 PM
A: Sandbox for Proposed Challenges

CelarixIs your license plate Tetris-compliant? Write a program that outputs a truthy value if its input contains only letters that name Tetris pieces (I, J, L, O, S, T, Z), and a falsy value if otherwise. Input: A string. You can assume it is either empty, or contains only numbers, letters in a case of ...

4 hours later…
8:51 PM
for some reason github servers are unable to give me specifically the jelly atom documentation
everything else works
2 hours later…
10:39 PM
@UnrelatedString heh? How what when where and why is github being is like this?
I know I just tried it myself
11:06 PM
@noodleman It's neither a Typescript function (which is pretty much a JS function), nor a Typescript Type function (which I believe has the form of type F<x>=... taking the input as an explicit type parameter). It's some third thing
what do you mean "TypeScript function"
function f(x) { ... }
like function f(x: number) { return 2 }
i don't think that's relevant to TS types
actually, it's the same as a TypeScript generic type (as you call type function)
for example, you can have a generic type with a default parameter like type F<X = "world"> = `Hello, ${Capitalize<X>}`;
then you would have const a: F = "Hello, World!"; or const b: F<"jeff"> = "Hello, Jeff!";
The point is that type A in the answer you linked is not like other Typescript Type System answers that existed so far
that's true
i assumed it was used more in [decision-problem] submissions but i was wrong, because it doesn't come in handy most of the time
i have used it as a default for a couple CMCs though
here's what i was thinking of:
Oct 21 at 13:45, by noodle man
AFAIK this is an acceptable default, i'm pretty sure i've seen another TS types answer use it, but if it isn't then it can be a generic type returning either 0 or 1 like my first submission for 132 bytes:

type X<S,A=", "|" ",B="!"|"."|" ">=S extends`Hello${A}${"w"|"W"}orld${B}`|`HELLO${A}WORLD${B}`|`hello${A}world${B}`?1:0
11:16 PM
I think that's worth asking in meta, as the same technique (define type X so that the typechecker will reject values that are not of type X) can be used in some other langs
good point
ok i'll write a quick meta post on it
would it make more sense as a question, or I/O default suggestion?
a separate question first I guess
Yeah I'd recommend its own question too
A fun consequence would be that if Idris had a typesafe sprintf builtin, sprintf would be a valid answer to "validate sprintf format string"
11:31 PM
is that a challenge?
not yet I think
hmm, not really
sprintf is not an answer of that kind
11:45 PM
Actually I don't think the type A can be ported to most of depedently typed langs
ironically Python Types may support it via type statement added in 3.12

« first day (4695 days earlier)      last day (227 days later) »