« first day (4140 days earlier)      last day (708 days later) » 

12:10 PM
you can use Python's cmd module to write an better REPL without relying on rlwrap
 
system inititalize
hello there, I am back
 
m90
@graffe You can change limit to the appropriate value?
 
it is the last day of May
 
Wrong
 
ugh imagine living in the eastern hemisphere
 
12:17 PM
dammit timezones
@lyxal not sure how to respond to that
It feels just a little dystopian to me that SE calls their employees "Valued Associates"
 
I think it's tongue-in-cheek
 
How is it dystopian?
 
seems like the kind of thing that an Evil Corporation would do, idk
 
@Ginger correct
don't let emanresuA's whole "living in basically the furthest timezone" thing get you down
 
12:24 PM
we have associates across the globe!
 
I prefer "gamers" instead of "associates" :p
and "epic" instead of "valued"
 
pretty sure there are TNB members on every continent except Antartica
 
@Ginger asia china here
 
does anyone know of a pygame documentation mirror? I can't access the site because reasons
 
12:29 PM
nice
 
ok
 
35 messages moved to flax
 
@m90 say I want to pick exactly 4 coins. I am not sure there is an appropriate variable to set is there? The optimal should be coins of value 4, 4, 3, 5 I think with total 16
 
@Ginger Antarctic bandwidth is very limited, so golfing Antarctic research code would be a good thing.
8
 
m90
@graffe The program as I gave it already does that? limit = 4 sets the number of coins to take, and the 16 at the end of the output is the answer.
 
12:40 PM
@m90 true so it must be that I can't interpret the output arrays
what do they represent?
the number 4+4+3=11 doesn't appear in them :)
 
m90
@graffe Oh, those are the intermediate steps. The i th element of the n th (1-indexed) array is the best total of i coins from the first n piles.
 
thanks!
 
> Data access to the Amundsen–Scott South Pole Station is provided by access via [...] satellite [...] support[ing] a data return rate of 50 MBit/s
 

 Superior Simple

Superior Simple: A 2D programming language. See github.com/Sup...
 
1:09 PM
2
A: Sandbox for Proposed Challenges

pxegerAlternating permutations code-golf permutations combinatorics number-theory sequence An alternating permutation is a permutation of the first \$ n \$ integers \$ \{ 1 ... n \} \$, such that adjacent pairs of values in the permutation alternate between increasing and decreasing (or vice versa). Eq...

Any thoughts?
Especially, regarding whether or not to include n=1?
 
n=1 doesn't seem like an edge case given that you're already doing duplicate checking
 
hmm, I suppose
 
you should output 1/2 of the total number of alternating permutations. -> you should output alternating permutations that are not reverses of other permutations
or similar
hey wait a minute
it's
Either make the challenge to output permutations or change the title to indicate it's the number of alternating permutations
 
The title describes the topic of the challenge, is that not good enough?
I guess if it's misleading I should change it
I just thought "number of" was a bit of a waste of words
 
It's just that someone like me might go through expecting it to be outputting lists and then say "wait a minute" upon seeing the output
 
1:15 PM
id say prepend "count"
 
yeah, that's a good idea
There's nothing majorly wrong with leaving it as is, but prepending "count" would make it just a tad bit clearer
 
@thejonymyster sry for late answer. Someone working for a supercomputer company that coded a game that won all the time, could hardly be read by his fellow coworkers, and quit when he was asked to make the game loose to make the computer more attractive to clients...
 
in Scala, 44 mins ago, by user
Great news! No longer do you have to have separate folders for your Java and Scala code. The newest release of Scala 3 now supports writing Java within your Scala code, providing much smoother integration than before. Here's an example
 
@m90 wow thank you so much. that exact document.
 
1:32 PM
0
A: Sandbox for Proposed Challenges

thejonymysterPlay a dumb coinflip game Write an interactive program (or function?) which repeatedly takes user input as described below: At the start of the game, the user inputs a positive integer n>1 The program should then "flip a coin" (e.g. print either 1 or 0 at random) Next, the following loop occurs ...

 
> DO NOT SCROLL BEYOND THIS POINT
 
I got lyxal lol
 
@m90 also i rememberd really sideways. You're pretty good for figuring it out as seeing how approximative and wrong i was... Thank you
 
@user I didn't scroll down further
that's why
 
A good crewmate would scroll further
 
1:40 PM
not when the page is light mode at 11:40pm at night
I wanted to close the page ASAP for the sake of my eyes
 
Scastie has a dark mode button
 
13 secs ago, by lyxal
I wanted to close the page ASAP for the sake of my eyes
ASAP doesn't include searching for that button
 
 
25 secs ago, by lyxal
ASAP doesn't include searching for that button
 
i have the best error message for WS (which kind of insults you):
in Wellscripted, 1 min ago, by PyGamer0
SyntaxError 4:11: Expected semi-colon.
       val foo = 1 + baz
                  ~~~~~~^
Well scripted...
 
1:42 PM
Oh nice, your parser is working already?
 
4:11 is line numer:column number
(yes column number is wrong)
(in this case, dont bully me)
@user no
its all theoretical
 
Oh ok
 
@PyGamer0 what do the squiggly wiggly lines represent here?
 
idk
@user still have to figure out how lark works
if i dont i have to make my own
 
good error message though lol
 
1:52 PM
and with my school starting tomorrow i dont think i can complete the parser in a week, it may take 3 months lol
(cause this time the school is properly starting with proper timing from 9:45am to 3:45pm)
 
@PyGamer0 I think trying to write your own parser without using any libraries and especially without looking at any formal language theory is a very interesting problem-solving exercise
Start, for example, by writing an algorithm to match brackets
 
@pxeger that is an easy task to match brackets
uh its going to be hard to:
- learn lark and write the grammar
 
I was suggesting doing it without lark
 
- write a good old imperative parser without libraries
@pxeger doesnt rSNBATWPL use a custom parser
and it is cursed :p
 
@pxeger I agree. Rolling a custom parser for a practical language is something I've been wanting to do for years
 
2:06 PM
ok anyways i shall now go
gotta study physics o/
 
o/
 
@PyGamer0 well start by matching brackets, and then matching brackets while gathering their contents and build it into a tree, and then splitting the contents of brackets into terms of a + binary operation, and then extend that to multiple operators, and then extend that to multiple operators with different precedences, etc., etc.
 
don't forget to lex first
 
2:21 PM
@PyGamer0 good luck!
 
morning peeps
or happy timezone peeps if it's not morning for ya
 
it's morning here, but the kind of morning where you think "well frick I need to go" but you also think "just a few more minutes of SE chat"
 
"just a few more minutes of SE chat" is a dangerous rabbit hole to go down :P
 
yes
especially when it's this kind of morning:
 
That's why I only open SE chat at the office
 
2:27 PM
imagine doing that. smh. made by this is a habit I've accidentally developed over the last year gang
well frick it I'm going
o/
 
goodbye
 
\o
 
Is there a way to find the user with the most questions asked?
I think it's Helka Homba, but I don't know for sure.
 
you need to search no more, it's me
 
@lyxal fwiw, SE chat is so far the only thing that's got me to stay in the office late. Once stayed like 45 mins late cos I was so enthralled in the conversation lol
 
2:29 PM
@lyxal you should learn from @emanresuA, who leaves at about 9-10pm their time every day
 
Ok nice. That confirms my informal top 5 ranking.
 
who's Helka Homba?
 
Calvin's Hobbies.
That used to be their username for a while.
 
I used it because it was shorter to type and now I find myself typing this entire explanation because of it.
 
2:37 PM
I find that to be a fairly common scenario - saving like 5 or fewer characters for a shortcut that takes several lines to then explain :P
 
Interesting I'm #57 in questions, despite being #87 in all-time reputation
We've looked at question:answer ratios before, but have we looked at rep:question and rep:answer ratios?
 
Older stuff got more votes.
So that ratio would be a crude measurement of when you joined.
 
@WheatWizard Are they by any chance itsHobbes on github? Because they're an admin in the programming discord I'm active in, and I swear I've seen them around CGSE before
 
I don't know.
 
@Mayube HelkaHomba is a GitHub user who I'm pretty sure is them
 
2:41 PM
@pxeger ah, must be somebody else then
 
but that account's not been used since 2017
 
3:10 PM
i have studied levers and their mechanical advantages
 
@PyGamer0 that sounds like a line from the Major-General's song
 
lol
 
@pxeger it even has the cadence for it
 
3:38 PM
CMP: What math features would you guys say a golfing language needs?
in Vyxal, 3 mins ago, by user
- Integration of arbitrary expressions? Integration of just polynomials?
- Derivatives of arbitrary expressions? Derivatives of just polynomials?
- Solving arbitrary systems of equations? Solving systems of equations with just polynomials?
- Solving nonlinear systems of differential equations? Solving just systems of linear differential equations?
 
addition...
 
even addition is kinda unnecessary imo. incrementation is really all you need
 
>:|
 
photonumeric recognition
 
^
 
3:42 PM
@pxeger That would succ
 
ess
 
it needs an O(1) prime factorisation function
6
 
That one's easy
Just use boolfuck
@mathcat or
 
just use xor, you can build everything from xor :D
 
@user flyp
 
3:43 PM
intergals / derivatives sounds cool, but does that actually come up in challenges? genuine question
 
Not really
And it really ruins the fun when someone whips out a builtin that does everything
 
and do you really need to solve systems of equations?
 
Integrals and derivatives of polynomials might actually be useful but I think it's still better to make people do it themselves
 
how about cnr and pnr
 
do you mean nCr and nPr?
or Chinese Nemainder Rheorem?
 
3:46 PM
Those are pretty trivial to implement
 
@pxeger lmao yes that
i googled it to be sure and google was like "yeah sure thats how theyre spelled"
 
@pxeger what does the New California Republic have to do with this?
 
@user I asked this mainly to convince lyxal to not put symbolic math into Vyxal
 
didnt read past the header unfortunately
 
@Mayube Calculating half-lives
 
3:48 PM
I am wondering about the voting on this site :)
from -4 to 12 with almost no changes to the question
 
because your question started out underspecified, and then it wasn't?
 
@pxeger I am not sure that aligns correctly.
I mean I did make changes but the -4 happened after almost all of them
 
@user No no no. This is Fallout, not Half Life
 
what made the difference was comments by "important people"
the voters are very suggestible by authority :)
@pxeger congrats on becoming a room boss!
 
@graffe no the voters are suggestible by the question actually being adequately specified
 
3:56 PM
@hyper-neutrino I feel I have started a riot :)
 
I can confirm that the question already had most of the downvotes it ever had before it was properly specified and after you made the necessary edits it basically immediately went to positive and some of the downvotes were removed (although some were later added by other people)
 
@hyper-neutrino the spec didn't really change at all did it?
 
@graffe nah I don't think you have, I'm just telling you that your question was underspecified and you fixed it and as a result you saw your question's score go positive again. I'm just telling you that your complaints about voters being swayed by authority are nonsense
 
@graffe it changed from insufficiently defined, to sufficiently defined
 
what was the main difference?
I mean I change the number 1000 to 200
 
3:57 PM
the main difference was that there were many edge cases and limitations that were not present in the first version that were later on
 
and added examples that don't make any difference
 
such as how to handle n>100
 
so this line "If n>100 then some of the values in the output will necessarily be 0." ?
anyway, I can confirm that given a few days cgcc people can answer any question
 
that's part of it; examples also are always good to have, the fact that different order counts as a different list is also not explicitly stated but the example makes it clear which it previously wasn't
 
I need to think of a new tricky question now!
@hyper-neutrino thanks
 
3:59 PM
i think you should just use the sandbox this time :Pc
 
in any case all I'm saying is that there are definitely issues with votes but in this case the voting reflected the quality of the question
 
@thejonymyster I sort of hate the sandbox although I agree with the idea
 
@thejonymyster I'm using a Pc too!
 
i would suggest one last edit to the 100 sum question btw
 
you made your question good and got upvotes as a result of the changes so I'm not sure why you're complaining about voters being swayed by authority
 
4:00 PM
my problem is that not enough people comment and then you get contradictory comments and it's hard to know what to do with it
 
I think there's no such thing as "I need to think of a question". When you've thought of a challenge, maybe it would be a good question. But if you decide you "need to" think of a question, it probably won't be very good
3
 
if n<201, "should run fast for results below 200" is redundant
 
@thejonymyster go on
 
especially because I don't see who this "authority" is even that commented
 
@graffe srry i slow pace my messages lol
 
4:00 PM
@graffe why? is there anything we can change with the sandbox or how we approach the idea that would make it better in your opinion?
 
@thejonymyster what do you mean? You could try to sample from all arrays with values from from 0 to 100 and then accept only those that sum to 100. This would be insanely slow
 
ok i gotta go back to doing my work job that i get paid to do at my job at the office at work. my job
 
@graffe if nobody comments, and it has a positive score, then it's probably a good question and doesn't need any comments
if nobody comments, and it has a score of 0, it's probably a boring question, and (IMO) not worth posting, but doesn't need any comments to tell you that
 
@graffe my point is that n<200 is 99% of the n's allowed by the question
 
@thejonymyster oh I see :)
 
4:02 PM
yea lol ^_^ ok byeeee
 
@hyper-neutrino it's tricky as I am not sure what is possible given the SE framework. Ideally people who make suggestions on the sandbox could have them upvoted for points
some sort of incentive system is needed in any case
 
ah. unfortunately that's not really a thing we can do since we are, like you said, restricted by the SE framework
 
@graffe if nobody comments, and it has a negative score, then it's probably a bad question for reasons that are too annoying to explain (because you've already explained them lots of times, or you think they should be obvious). At least, that's the reason for when I downvote without commenting
 
it is possible to incentivize the sandbox with bounties but that's really expensive and I'm not actually convinced yet that that would be a good idea
 
I guess each sandbox question could be a real question and comments could be answers
 
4:04 PM
that's an idea we've had in the past but we decided against it
 
ah ok
at least I came up with something that someone else thought was a good idea once :)
 
too much clutter regardless of if we put it on main or meta. that's what codidact does because they have a special Sandbox section for code golf since individual sites can have custom sections with custom reputation rules, unlike SE which only has main and meta with a handful of exceptions
 
understood
 
@graffe and if you get contradictory comments, then you should use your own judgement to determine which of them are right and wrong, and to what extent, soliciting further opinions if necessary
 
@pxeger I also see people downvote excessively boring and/or trivial challenges
 
4:05 PM
@pxeger right
 
4:30 PM
@Nobody Yeah, I get a notification when I'm pinged, just like everyone else. I was asleep.
If someone doesn't respond immediately, that doesn't mean they didn't see it, it means they're busy.
 
busy sleeping? Pfft yeah, a likely excuse
 
Or just not interested in replying. Noone has any obligation to respond to any message
 
4:59 PM
 
I am currently making a fancy makina visualizer
and by "fancy" I mean "using UI software from 1955"
 
5:18 PM
im assuming thats a typo cause i dont think computers had graphical UIs in 1955, did you mean 1995?
 
...yes :|
 
Ginger's UI is just blinking vacuum tubes
 
wait vacuum tubes blink?
 
no, Radvylf is british and was using blinking as an expletive
 
waaait
Conspiracy Theory: Radvylf is british
Argument No. 2: Radvylf uses the imperial system
 
5:28 PM
CMC: Given an array a and a value b, return the last item in a, or b if a is empty
 
prepend b + tail?
 
I have a particularly evil solution in raisin-batwaffle
 
;Ṫ in Jelly accepting arguments in order b, a
 
Zsh, 19 bytes: (<<<$1;cat)|tail -1
accepting a as a list of lines on STDIN, and b as a command-line arugment
 
rSNBATWPL: a~b~(a{id{b}~};b)
Basically, map over a with the function id{b}~Null, which sets b in the scope of b~ to that item
Then return b
 
5:32 PM
Haskell, 17 bytes: []%a=a;r%_=last r
 
@RadvylfPrograms The reason that this works is that, instead of giving the function a (syntax) identifier to use for the argument, you give it a (value) scoped identifier, which it gets confused by
Best part is, I think it's the golfiest way to do this in rSN
 
Vyxal, 6 bytes: t¹L¬⁰*+ (very stupid solution)
 
Python, 27 bytes: lambda a,b:a[-1]if a else b
pretty boring, working on a better one
 
@mathcat Vyxal, 2 bytes: Jt
 
Vyxal, 5 bytes (with reversed input) :[t|$
@pxeger oof
 
5:37 PM
flyp
very clever solution
 
MyLanguageIJustMadeUpForThisChallenge, 0 bytes
 
VTC per standard loophole
 
Vote to close
btw
does your language use a SBCS or a HBCS?
 
It uses a NBCS
3
 
my internet is on drugs
@RadvylfPrograms may we assume that b is a string?
 
5:45 PM
@RadvylfPrograms Scala 2, 24 bytes: _.lastOption getOrElse _
 
@Ginger lambda a,b:(a or[b])[-1] 24 bytes
 
darn
 
@des54321 lambda a,b:([b]+a)[-1]
 
oh good one user
 
Not my idea
@hyper-neutrino hyper suggested it immediately after radvylf's CMC, I'm surprised everyone didn't immediately use it
 
5:54 PM
@RadvylfPrograms Python, 21 bytes: lambda a,b:a[-1:]or b. Only works with strings.
 
@pxeger does that seriously not error on empty string? wack behavior there python
 
slicing never errors (unless the slice elements are invalid, like a step value of 0)
 
also i dont see why that only works with strings? my tests show it working fine with lists too
 
@pxeger Why wouldn't it work on lists of other stuff?
 
6:17 PM
@RadvylfPrograms C# with Linq: (a,b)=>a.LastOrDefault(b)
 
lol i almost sent js: (a,b)=>a[a.push(b)] but then i had to get back to work and mulled it over
Not quite right
 
6:43 PM
@user because it returns a list containing the last element of a, not the last element of a itself
 
just to be boring, here's C# without Linq: (a,b)=>a.Length>0?a[a.Length-1]:b
 
7:02 PM
@hyper-neutrino Oh ok
@Mayube Maybe something like (a,b)=>a.Reverse().Append(b)[0] would work too
 
@user you can't append to an array in C#
also it'd be Array.Reverse(a) without Linq
 
7:22 PM
jre. irnu abe lpripammcbi lg;;n.o
 
@Ginger Please don't summon cthulhu in TNB, we have enough trouble holding onto our sanity as it is
 
good enough
 
8:15 PM
i dunno if we're nice enough to cthulhu he might give us some secret eldritch golfing knowledge
 
@Ginger No
(Well it's a CMC, I can't stop you, but I'm guessing that's a bit of a cheaty I/O format)
 
muahaha I am unhaltable
 
8:41 PM
@Mayube There's an Append method for IEnumerables right?
 
@user no
 
:(
 
@user there's an Add method for ILists
 
Ah ok
Oh it's in Linq so also not allowed
 
what
 
I was about to click "off-topic tnb" then more rooms loaded in and what was under my cursor changed
 

« first day (4140 days earlier)      last day (708 days later) »