« first day (3968 days earlier)      last day (870 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
@AlanBagel added
 
@hyper-neutrino What the heck. That's incredible.
 
yeah since my molding solution didn't work i just decided to go for some super cursed mod/base magic
unfortunately, it doesn't even beat caird's solution which uses some chaining magic i haven't fully understood yet :D
 
Behold my chaining powers :P
I added an explanation btw :P
@hyper-neutrino Uh oh, does this mean you're able to use ƙ now? This does not bode well for me in our golfing battles :P
 
@pxeger When you said your solution was "improvable," my brain for whatever reason translated the word as "cannot be proved." :P
 
5:04 PM
lol
 
According to Godel, it's possible it could be :P
@hyper-neutrino I feel convinced there's a shorter way to check if n has exactly one bit set, but I can't find it :/
 
@cairdcoinheringaahing x & (x - 1) == 0?
 
Can someone copy the code from this tio link?
 
x=>(g=n=>x+x?[x.splice(0,++n).sort((w,z)=>w-z),...g(n%3)]:x)``
 
yep, that's what I see too ^
 
5:13 PM
x=>(g=n=>x+x?[x.splice(0,++n).sort((w,z)=>w-z),...g(n%3)]:x)
 
Thanks!
 
@pxeger that doesn't work here because i have 0 in my list as well
but that's a nice trick to remember, thanks
 
x+x to determine if an array is empty is a genius trick I just learned from Arnauld
 
that's kinda cursed ngl
 
It definitely is
 
5:14 PM
@RedwolfPrograms if seq: in Python works too
 
Fun fact: +[21] works how you'd expect in JS, and is 21. Any guesses on why it works?
 
@RedwolfPrograms [21] => 21???
 
Nope, 21 to the comma-separated string "21", which is then cast to a number
So +[1, 2] is NaN, because it's the same as +"1,2"
 
js is weird
 
5:22 PM
@DLosc wat
 
nice!
 
I get the feeling Arnauld's working on some sort of 50-something-byte answer lol
 
@cairdcoinheringaahing ah, nice
 
I kinda borrowed your approach of generating [1,2,2,3,3,3,4,...] to use Ṣƙ :P
@cairdcoinheringaahing Jelly, 7 bytes 3Rṁx@RS
 
5:30 PM
@cairdcoinheringaahing i have been outplayed by my own strat :P
 
If it helps, I still don't fully understand ƙ in a general sense, just in this specific one :P
And I only understand it here because of your answer :P
 
lol
I know how it works in the monadic case
 
I thought there was only a monadic case, there's a dyadic case?
 
oh nvm key doesn't work on dyads
basically how key works is
it matches the elements on the left and right 1:1 and then groups by equality on the left side
so [1, 2, 3, 1, 2, 1] ?key [a, b, c, d, e, f] would group it as [a, d, f], [b, e], [c]
and then it applies the monad to each of those groups
 
That seems super specific
It's based on a J builtin, isn't it
 
5:35 PM
lol, wouldn't be surprising
yeah it is quite niche
 
@cairdcoinheringaahing I'm definitely going to finish the blog post over the weekend, instead of revising for my exams, I promise :P
 
that sounds like kind of a bad idea lol
 
5+5=11, 6/3=1, I've got this :P
Tho, I did a practice paper yesterday, and it seems as though my biggest issue is the same as my entire mathematical career: stupid tiny mistakes early on that make the rest of the answer entirely wrong
Fun fact: anagol is exactly 4 years and 2 days older than CGCC
 
@cairdcoinheringaahing SAME. So relatable.
 
6:35 PM
I honestly don't know how anyone uses SEDE to query SO. I'm trying to find posts that use TIO, and it times out no matter what I do to try to restrict the search query :/
 
Why does [..."abcdefghijklmnopqrstuvwxyz"] raise a unexpected string error in js?
 
Old version
 
@RedwolfPrograms I'm testing it in the browser
 
Oh huh
Works for me
What browser?
 
@RedwolfPrograms Oh wait now it works.
 
6:38 PM
lol
 
I copy pasted some two line code from tio.
Hmm why does `s=0
[..."abcdefghijklmnopqrstuvwxyz"].forEach(e=>console.log(e))` raise a unexpected string error in js?
 
It's detecting that as 0[..."abc"]...as in, finding the ..."abc"th item in 0
You can fix that with a semicolon
 
@RedwolfPrograms ok thanks
 
Using JS without semicolons can do some weird stuff sometimes
 
Why does " "*2+"a" result in 0a?
 
6:43 PM
Because " " is 0 when cast to a number
And * casts both its arguments to numbers
It doesn't have a string repetition overload like Python
 
@RedwolfPrograms Oh I forgot to use .repeat(). I'm too used to Python.
Is it possible to do something and increment a variable in a lambda?
 
Does +:= exist? Or something with similar syntax?
(If we're talking about python)
 
@RedwolfPrograms No, but x:=x+1 exists.
I guess I'll use a `function(){}` then. Ended up with ```s=0;
[..."abcdefghijklmnopqrstuvwxyz"].forEach(function(e){console.log(" ".repeat(s)+e);s+=1})```
 
@RedwolfPrograms I may have used way too much Python...
 
6:52 PM
And e=>(console.log(...),s++) is much shorter than a function
 
I believe e=>console.log(" ".repeat(s++)+e) should work, right?
Or am I misremembering how s++ works?
 
Yep
I didn't look at where s was actually used lol
Also, map is much shorter than forEach
You also don't need the newline after s=0 if you're using ;
And actually, s is unnecessary anyway
forEach and map provide the index as a second argument
So (e,s)=>console.log(...) would work and doesn't require the s=0 or s++
@AlanBagel ^
 
[..."abcdefghijklmnopqrstuvwxyz"].map((e,s)=>console.log(" ".repeat(s)+e))
Pretty golfed.
Is there a 'fancy' and shorter way of saying abcdefg...
 
Yes
[...Array(26)].map((_,i)=>console.log(" ".repeat(i)+(i+10).toString(36)))
(i+10).toString(36) is the short way of getting the nth letter of the alphabet
(f=i=>i<26&&console.log(" ".repeat(i)+(i+10).toString(36))+f(i+1))(0) is shorter I think, using recursion
 
7:08 PM
Hmm, It looks like both are longer.
Oh wait, I saved one byte!
What does the (0) do?
 
It's needed to run f
It also initializes i to 0
 
Why zero?
Why not 1?
 
0 corresponds to a
 
@RedwolfPrograms ohhh
 
7:23 PM
for(i=0;++i<26)console.log(" ".repeat(i)+(i+10).toString(36))) might be shorter
 
You're missing a ; in the loop
 
@PyGamer0 Implementing a specific algorithm is generally off topic as you can't tell whether a solution uses that or something else.
@RedwolfPrograms So I am
 
But yeah, the for loop is definitely shorter
I'm not used to golfing full programs lol
 
CMM: is it ok to clarify and then repost old challenges which were closed for being unclear?
 
7:34 PM
@pxeger I think so.
 
@pxeger I'd suggest asking the OP of the question, and use similar guidelines to abandoned Sandbox proposals (wait a week for a response before doing so). Either way, you should definitely credit the original author for the challenge idea
 
@NewPosts I have this, can someone who's good at jelly make this tie caird?
 
Not me.
 
@emanresuA the trailing empty list is invalid
 
1) That doesn't work as it has a trailing []. You need to fix that. 2) That was essentially my first version :P
 
7:42 PM
removing that makes it literally caird's initial solution :p
 
I had the chain separator after the R, but basically, yeah :P
 
0
A: Sandbox for Proposed Challenges

Redwolf ProgramsCan I obtain this Minecraft item? Given a list of items I have access to, determine if I can obtain a certain amount of some other item via crafting, mining, trading, and some other actions. Actions This is a list of all actions which may be performed, and what items they involve Crafting: Log ×...

 
Oh :P
 
8:33 PM
@emanresuA for(i=9;++i<36;)console.log(" ".repeat(i-10)+i.toString(36))
 
@NewPosts Not too bad in HBL, even with no group or unfold functions yet.
 
8:55 PM
Idea: A programming language that uses endings on things to determine what operators apply to, like latin does
 
@Neil Ooh, nice
 
@RedwolfPrograms that's actually an awesome idea
so like nilads have an ending which determines whether they're about to be used monadically, as a left argument, or as a right argument
and functions have an ending which determines the same but for their return values?
@RedwolfPrograms (are you bored in Latin class again?)
 
(yes)
I might as well just post my whole schedule here lol
 
9:28 PM
@RedwolfPrograms I think it's a good idea.
 
9:48 PM
@SandboxPosts Vyxal, 1 byte: 1 explanation: just use /give
 
6
Q: Tips for golfing in Chef

FmbalbuenaWhat general tips do you have for golfing in Chef? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Chef (e.g. "remove unnecessary whitespace" is not an answer). Please post one tip per answer.

Someone answer to get 50 rep
^^^^^^^^^^^^^^^^^^^^
@Fmbalbuena CMFF: This is the 2009988th message in TNB
 
No it isn't
> 1987047
Where'd you get that number?
 
@RedwolfPrograms A conversation can only have up to 400 messages; you have selected 2009995.
@RedwolfPrograms Where'd you get that number?
 
It says on the info page for the room
@Fmbalbuena That probably counts something like feeds or moved messages
 
@RedwolfPrograms Yeah I count feeds and moved messages.
 
9:57 PM
I also downloaded a list of every message in the room not long ago and it was the same as the indicator on the info page
 
@RedwolfPrograms 50 rep bounty?
 
10:40 PM
0
A: Sandbox for Proposed Challenges

emanresu AConverge to a number Your challenge is to, given a number n, count up to each digit of it, giving the effect of converging on it. Basically, count up to the first digit by its place value (\$⌊\log_{10}\left(x\right)⌋\$). Then do the same for each subsequent digit, but with the values of the previ...

 
@Bubbler Chance is (10/16) ^ 11 = .005 = 1 in 2000, so quite rare but reasonably possible
There's probably one in Vyxal somewhere
 
22 hours ago, by lyxal
@Bubbler I see your 11 and raise you a 12
 
11:40 PM
@emanresuA I already did the stats and posted them here lol
Except for some reason the tool I was using got it wrong
Oh it's because I clicked the wrong distribution lol
 
00:00 - 17:0017:00 - 00:00

« first day (3968 days earlier)      last day (870 days later) »