« first day (4875 days earlier)      last day (264 days later) » 

02:33
I hate it when my location suddenly shifts and my entire surrounding is teleported to another country
because now I have to work on moving everything back down under
do you know how hard it is to have to invert gravity for every object?
@noodleman the link is to i.sstatic.net/kEmagS5.png but the embedded image is i.sstatic.net/kEmagS5b.png, whereas it doesn't seem like any other images in chat have a different "thumbnail" form or anything like that...except if you append b to the file name before the extension, it seems like it does try to thumbnailify it
and specifically into a square, possibly with drastic cropping
...
including that image
i think the url naturally generated a b at the end, and then for some reason the link is to "the embedded image except without a b at the end if if has one" instead of the normal url being stored separately/the thumbnail url being derived
ahahahaha
try clicking through these now
03:06
wow
 
1 hour later…
04:32
@UnrelatedString Ah, a clbuttic mistake
Anyway, I came here to say: I just learned that stuff like (1,,2) is valid syntax in Haskell and does exactly what you'd expect, and I am very tickled by that.
Oh, wow, it even works if you put a space in the middle!
wasn't it behind a syntax extension?
yes, it is TupleSections, which apparently has been (somewhat recently) enabled globally
05:00
Ah, interesting
05:29
CMQ: I've heard that having what you're currently saying be played back to you with a very slight delay is supposed to make it harder or even impossible to talk. I tried writing a snippet of code which would implement this, and tried it with headphones on and a decent microphone, but was only slowed down a little bit when talking. Do y'all actually experience as much disorientation as people say is typical? Code to try it yourself (run in an https page that you trust giving mic access):
navigator.mediaDevices.getUserMedia({audio: true}).then((stream) => {
    const audioCtx = new AudioContext();
    const source = audioCtx.createMediaStreamSource(stream);
    const delay = audioCtx.createDelay(2.0);

    delay.delayTime.setValueAtTime(0.2, audioCtx.currentTime);

    source.connect(delay);
    delay.connect(audioCtx.destination);
})
@DLosc That was in fact not what I expected, that is quite cool :p
hmm, I think it does slow me down slightly but it definitely does not completely inhibit my ability to read text or construct thoughts and speak them
if anything the effect of being self-conscious of my own voice played through recording is stronger than the actual delay effect :P though I will need to try this when it's not 1:30 AM and I am comfortable speaking loudly enough to actually have the playback also be loud (I did turn the volume up and spoke as close to the mic as possible though so it shouldn't matter that much I think?)
Yeah I saw a video of someone demonstrating it on unsuspecting people reading a paragraph from a book and they were all completely shut down. I suspect the surprise of suddenly hearing their own voice echoed back while already in a slightly awkward and artificial scenario likely played as much of a role as the actual effect of the delayed audio
probably yeah
it did confuse me for a second but I recovered from it pretty quickly but expecting it probably made a big difference
I've heard speculation about the possibility of using the effect as a way for police to shut down speakers at protesters, maybe that would be decently effective since it's already a higher stress and likely off-the-cuff moment
I imagine it'd be easily countered by either training or earplugs :P
05:36
(Also I'm very impressed with how short that JS code came out, I had no idea audio stuff was so streamlined in modern JS)
@hyper-neutrino Yeah, I read some anecdotal comments on the video that people who had worked in call centers quickly gained immunity to this :p
(and operators of radio on certain models of military tank, apparently)
I see :P
ooh I wonder if I can get feedback to happen by putting my headphones up against the microphone
update: nope lol
@RydwolfPrograms It seems to unfortunately be impossible to get media controls that way so I had to switch my audio projects back to a mess of <audio> elements :(
Ah, yeah, didn't think about that
I tried various tricks with having a silent audio element playing at the sate time but using the web audio API to play the "real" sound but couldn't get it to work. It should though. It's impossible to debug though because all those APIs do nothing instead of giving any kind of error when they don't work
05:51
@DLosc there's a b missing before the .png
06:33
Nintendo prosecuted Gary Bowser in the past
how funny, considering that the main enemy in super mario (a Nintendo game) is bowser
07:03
Whoa, I wrote a little short horror story on reddit on an alt and I came back and it was popular enough five of those reddit narration YT channels had asked for permission to post it as videos
07:15
They actually ask for permission?
07:36
Some do, no guarentee they won't make the video anyway if you don't reploy though
08:21
@lyxal More than I expected
I did just now find it on YT already as part of a compilation
 
2 hours later…
10:46
I want to generate N random loops (consisting of bezier segments). Each loop should intersect each other loop exactly twice at a close to angle of at least ~45. It should look as random and chaotic as possible. There is a minimum distance D between any two intersections.

Any idea how I could create an algorithm for this?
There is also a rectangle all this should fit inside
I'm pretty sure this is the golfiest real-world use-case website I've ever made. (About to bloat it with a library though 😢.)
Is it supposed to just be a black screen?
11:06
@mousetail Right when you were looking, yes, but it should be partially white now.
Believe it or not, but this web app (does it qualify for such a title‽) can become a very valuable tool for certain professionals. In fact, if I had the time and energy to do so, I'm fairly confident that I could sell it to a large group of practitioners.
I'm sure you could, but the marketing talk about be doing most of the work, not the app itself
Can you golf the pitch itself and still sell it? That's the real challenge
@Adám probably -1 byte: div{background:#000} -> #d{background:#000}
unless a space before it is required?
Ah, nicely spotted.
@mousetail Might be able to do word-of-mouth marketing.
11:14
I feel that should be a standard loophole but it isn't listed yet so go ahead
Believe it or not (again!), it has the potential to significantly improve the mental health of many people.
As like an ADHD thing to help people not lose track of time as much?
@RubenVerg I could of course also remove the line breaks.
and the closing </title>
and other closing tags probably
Do you really need charset and lang?
You shouldn't need <head> and <body> either
11:17
@mousetail No, it is an inconspicuous fraction-of-the-hour indicator for therapists to keep track of the current session. Looking at a clock or watch is considered bad form and can make the patient nervous. But having this on a phone/tablet/picture frame in a closet behind the patient will give the therapist enough of a clue (even jsut with peripheral vision) while not attracting any attention to itself.
Ah cool
And about golfing the tags, I wasn't actually after golfing it. I just found it amusing how little code was needed. However, now I need to use the verbose Screen Wake Lock API to keep the device from sleeping.
I should probably add doctype…
<title>Time</title><script>setInterval(_=>d.style.height=new Date().getMinutes()/.59+"vh",1e3)</script><body><div id=d><style>body{margin:0}#d{background:#000}
@Adám what if my session starts at 2:30?
Anyway this is it with tirival golfs. Putting the <style> at the end allows removing the </style>
11:20
also funny how you say this while I'm on my way to therapy
@mousetail #d instead of div per RubenVerg
@RubenVerg Then the screen will be exactly 50/50 black and white.
by the way, my therapist (I think) solves this issue by taking her notes on a tablet which always shows her the time without me knowing
Clever. But many therapists prefer paper.
If I was a therapist I'd put a huge sundial in the middle of my office
Noone will be able to tell if you are looking at it if it's big enough you can't really not look at it
That might not work so well during night or cloudy weather.
11:23
Then the sessions will last a bit longer
@Adám what about when it ticks back over to 0? I imagine a black screen suddenly turning white isn't very inconspicuous
knowing the approximate time without the exact minutes is actually quite useful for me in many situations
if you add url params to configure the colors I might use this
@lyxal In practice, I've found it not very distracting, but I guess I could add a .5s transition.
@RubenVerg I'll try, but bear in mind that I don't know JS.
maybe you could make it so that the colors alternate, and after the screens fills with black it grows back white and vice versa
^
I was in the process of typing basically that
11:32
Ah, but then, without knowing the rotation of the device, you can't tell if it is :15 or :45.
Curve the line a bit maybe, a bit higher in the center
Oof, bloat.
You can do it pretty easily with a radial gradient
alternate style suggestion: a thin horizontal bar that is placed at the position of the current time
@Adám have a dot or a circle in the bottom right that's a different colour to indicate this way up
11:35
I think it would be easier for me to estimate the current time with that format
It would be more recognizable as a clock if it had a line
@RubenVerg Ah, that's a great idea, and won't be as jarring when wrapping around.
@mousetail Just a white line on all-black page nothing else?
@Adám it has the same 15/45 problem though
Oh, right :-(
but I don't think it's much of an issue, it's easy to know the rotation of the device
11:38
IDK, to me it would seem more like a dial that indicates something while the rectangle just looks like it's just glitched and not working at the moment
it's not like it's gonna suddenly flip
Though I guess it would still look mostly like an art piece
wow, now that I think about it I've never seen any of my therapists look at the time. didn't know it was that important not to do so
last therapist had a clock in the room but it was positioned behind her, she couldn't see it
Did they have a sneaky mirror in front of her?
and the current one has a small clock that she could potentially look to but it would be a very awkward movement that I'd definitely notice
@mousetail (: that would've been a great idea but sadly no mirrors
is the watching at the time stresses the patient thing true?
11:43
Yeah, for sure. A couple of psychologist have told me so.
My mother has a small clock placed in a window sill such that the patient can't see it. Looking at the clock just seems like casually looking out the window.
back to golfing… Do I really need the div? Can I not style the body within the html?
You could, but the script would need to refer to document.body so that's a significant byte cost to remove <div> which is just 5 bytes
Side story, I was looking for clocks that tell the time discreetly and found a website that had the same background photo as my phone's background. "how'd they manage to read what photo I have as my background" I panicked, wondering if they had access to any other information...turns out the background on the site is set to the daily bing image
Which just also happens to be what I have as my wallpaper (it updates daily)
@Adám Using % instead of vh should save a byte
can't you id the body?
True you could
11:51
@mousetail Nice.
For me on Firefox if I make body black it also makes <html> black unfortunately
two ideas that don't really fit the intended use case, but would be personally useful: 1. double tap to show the time 2. an optional seconds bar on the right hand of the screen
arrgh, I hate this red/blue function thing in JS. What's wrong with w=await navigator.wakeLock.request()?
@RubenVerg I think showing the time is beyond scope, but tap/click to toggle hour/minute mode might be useful.
@mousetail Yeah, that's what I observed too. i could probably force-style the html, but it won't save anything.
I'm wondering if there is some other way than background color to make HTML black, we saved a good number of bytes removing the div so we do have some options
@Adám nothing, unless you're not in an async context?
11:55
I'm straight in the <script>
maybe your browser is old enough to not support top level await
FF 126
@Adám Does it give some sort of error?
Yeah await is only valid in async functions, async generators and modules
Ah you need <script type="module">
11:57
oh, I'm so used to using modules I didn't even consider that it wasn't one
thx (grr)
type="module" is the new "use strict", to opt in to new behavior
they should just make <script version="es2024"> to enable new features
@mousetail Oof, and then it forces me to declare w. why, JS, why‽
In the future you'll need <script type="module" module="es2025">"use strict""use stricter";withNewFeaturesEnabled(()=>{//code });
11:59
hmm, I guess that's not compatible with imports wanting older versions though
@Adám I agree with this one, not using const to declare functions is bad practice
I never use const/let/var. i don't even know what the difference is.
var is function scoped, let and cost are block scoped
But there's no function here.
Scoping is weired at top level for var
@Adám that's... a bad idea
all your variables are global
12:01
yeah, excellent, then I can always get at them.
@mousetail So I should use let w=?
@UnrelatedString lol
@mousetail That doesn't work. I suspect because the body has no height.
still trying to notice the bar moving :P
i think its bigger than when i opened it but i cant tell
It takes an hour from top to bottom.
oh yeah makes sense
12:12
it is (literally) like noticing the minute arm move on an analog clock.
its a lot easier on a clock because minute marks :P
(and i have seen minute hands move)
12:38
@RubenVerg OK, you can now add ?t=m&f=700&b=00f for counting a minute using dark red on blue.
@Adám great. could you also add a timer mode where it counts down to a specified time since page load?
that would be really useful
@Adám It works for me, I did test it
@RubenVerg I can't really see how that'd work. What's shown on the screen wouldn't indicate how much time is left, and what happens when time's up?
@mousetail Not for me in FF.
I'm also on FF
@Adám i set it to count up to 3 pm and if I load it now (at 2:52) it makes a eight minutes timer
once it's done it can stay fully colored
12:55
It would massively complicate the code. I'd have to compute which intervals to check the time at, and have special handling for reaching the end.
What I can do is allow you to set an offset.
good enough for my usecase
by the way, does it increase in distinct minute steps or continuously in seconds/milliseconds?
The minute counter counts milliseconds updating every 100 ms, the hour counter counts seconds updating every second, and the day counter counts minutes updating every 10 seconds.
if the steps are minute enough then it will look continuous anyway
0
A: Sandbox for Proposed Challenges

None1Looping counter The [looping counter](Looping counter) is a challenge that prints infinite number of lines. The first line has one *, the next line has one more * than this line, an example output is: * ** *** **** ***** ****** ******* ... (goes forever) This is code-golf, so code in the fewest ...

13:34
Huh, why am I getting Uncaught SyntaxError: identifier starts immediately after numeric literal on H=_=>d.style.height=P(new Date())+"vh";H();setInterval(H(),i)?
Interesting, not a numeric literal to be found
Here's the entire code:
var i,H,P,s=new URLSearchParams(location.search),w=await navigator.wakeLock.request()
document.addEventListener("visibilitychange",async _=>document.visibilityState=="visible"?w=await navigator.wakeLock.request():0)
switch(s.get`t`){
 case "d":P=t=>(t.getHours()  *  60+t.getMinutes()     )/ 14.39;i=1e4;break
 case "m":P=t=>(t.getSeconds()*1000+t.getMilliseconds())/599.99;i=1e1;break
 default :P=t=>(t.getMinutes()*  60+t.getSeconds()     )/ 35.99;i=1e2;break
}
H=_=>d.style.height=P(new Date())+"vh";H();setInterval(H(),i)
I just get d is not defined when I try this; is that supposed to be an element or document
Yeah, that's in <body id=b style=margin:0><div id=d></div></body>
13:40
Adam's firefox is just borked
@hyper-neutrino i even tried putting the <script> after the <body> to make sure it is defined already.
What is P()?
Dynamically defined inside the switch
Ah I see
@Adám wow this is awful I don't know if it's golf brain or whitney style or whatever but it's like you write code to make it intentionally unmaintainable
I'm sorry I just can't
13:49
Huh, I thought that was pretty clear. What's wrong with it?
like, what's wrong with putting a few querySelectors instead of (ab)using the pretty much deprecated ids-become-globals thing
Why is that pretty much deprecated? Super useful for DOM things.
why don't you give variables intelligible names
@Adám ironic: adam does APL which people hate for being terse but cant do javascript :P
@RubenVerg APL
why do you put 50 logical LoCs in the same line
why do you use backtick calling for strings which is stolen from golf techniques
13:53
@RubenVerg I thought the names were good and obvious. i is the interval. H computes the height, P gives the percentage, s is the seach params, t is the time, b the body` and d the div.
@RubenVerg to all your questions: APL
@RubenVerg Because it lessens the paren forest by allowing sane prefix calling.
@RubenVerg I use lines to group related statements. The first one does initialisation, the case statements group each case. The H line does everything related to setting the height, and the last line does all styling.
I'm ngl I only just learned this was a thing and I've been using JS in the browser for over a decade
13:55
@Adám consider: interval is the interval, height computes the height, percentage gives the percentage, searchParams is the search params, time is the times , body is the body, div is the div
@Adám it's literally one layer of parens it's not a forest
I don't expect any non-js-golfer to know what that even does
it's abuse of notation
@RubenVerg That's just wasteful, lessens the situational awareness, and increases risk of hitting a reserved word.
what's "situational awareness"?
I can see more at a time on the screen.
I have heard many reasons for short variable names but "increasing risk of hitting reserved words" is a new one
Not putting spaces anywhere is a cardinal sin in and of itself
13:57
Yup, I don't remember the list of reserved JS words, but I know there are no reserved 1-letter words.
@Fatalize Oh, what do the spaces do?
@Adám Make it more readable
Not to me.
just upper-camel-case all of your variable names
I use uppercase for functions and lowercase for variables.
@Adám That’s because you’re used to Hebrew and APL
13:58
@Adám this I can agree with
@Adám to me spaces just make it nicer to read
Hebrew has spaces. And APL too. But JS barely ever needs spaces. afaik, only for things like new thing
again: you're not golfing, just because you don't need spaces doesn't mean you shouldn't use them
I think the main point is that you should write code that’s readable to anyone and not just you, and most seem to agree that your style is very obscure
(for the record that was meant as a joke; uppercase should be used for classes; I think convention also disagrees with uppercasing functions but whatever works for you)
13:59
is being a Jew a prerequisite for mastering APL
For example, you write setInterval(H(),i), I would always write setInterval(H(), i)
(with more explicit names)
also 1e1?
@Fatalize That makes it look like , is closer related to H() than i which it isn't!
eh, I guess it's for consistency, not that bad
Imagine having this discussion in a code golf server
8
14:00
I mean in this case I feel like Adám should be free to write code to be readable for just himself :P like to me it is way more readable to use longer variable names and spaces but that is because that's what I'm used to, I know the reserved word list well, and I don't have the context to the code so short variable names wouldn't work for me unless I wrote the code
@Adám setInterval(H() , i) :P
@RubenVerg Yup, note that I use *1000
@hyper-neutrino Sure, but that just looks like three things rather than one.
I do appreciate actually using URLSearchParams. I've seen way to manny shitty regex based solutions over time
@RubenVerg that just makes my brain crash trying to figure it out
@mousetail Yeah, they are a bunch of code golf heretics!
@Adám fair enough, honestly would agree. I'm used to setInterval(H(), i) which is in part also because that's how English works but you do you :P
14:02
@mousetail oh, I've never seen them, luckily I've only encountered the proper usage
@hyper-neutrino fyi, JS≠English.
7
@hyper-neutrino of course
@Adám , is not related to anything, it's syntax
@Adám JS is in english :P
might as well not be there in a hypothetical language and it would work the same
@Adám I mean, yes :P but I'm just explaining that that is part of why I prefer it that way and am used to it
14:04
@RubenVerg So is ( and ).
@Adám Hebrew is written right to left. Uuiua is writtern right to left. So why should one choose APL which is written left to right like all the boring languages?
@hyper-neutrino I guess "," never appears in English without a space to its right. In many languages, one and a half is written 1,5 so maybe to those, it doesn't look so strange.
@mousetail uhh APL is also RTL
Maybe I should learn APL
@Adám that is probably a good point. I forgot that a lot of languages use , as their decimal point TBH
14:06
APL and Uiua are written LtR.
wat
i never write my APL LTR
then again, we do have 1,000,000, so I think it's just because in a context with words I'm used to the space after the comma but if it's numbers I won't be? then again f(1,2,3) looks weird compared to f(1, 2, 3) so I think it's all just context. It only looks normal if it's a single number with the commas used as place value separators
Heh f(1,234,567)
4
@mousetail yeah it's nice
14:07
@mousetail "execute" not "is written"
@Adám const f=(...args)=>args.reduce((a,b)=>a*1000+b)
i used to write all my python code without any spaces back in the day when i used IDLE, the only reason i use spaces now is because switching to pycharm forced me to follow PEP-8 and now i cant write without spaces in any language :P
@Adám see now this is just confusing to me :P (slightly)
@mousetail That's cursed.
14:09
I'm just partially uncursing your curse
@Fatalize meh
Though you would run into issues with octal numbers
Fun fact: 010 == 8 in JS. and it's not even the fault of ==
@Fatalize see also
@Fatalize yeah, whitney style or whatever
@mousetail for once
14:10
it's less cursed in C though I think
Somehow there is something worse than == in JS
@Fatalize Btw, that's been un-Whitney-fied. The original.
@Seggan Meh, that's an old GoL impl. Today, we just write life←{≢⍸⍵}⌺3 3∊¨3+0,¨⊢
@Adám And you see no issue with that style?
I don't have an opinion; don't know C.
Having eyes is sufficient :p
14:14
But this person seems to have gained an appreciation for it.
@hyper-neutrino this. absolutely hate the sound of my own voice in recordings
@UnrelatedString 🤝 (rip)
thought that was a universal experience but apparently not? wonder if it's still like a majority thing
because it sounds so different from when you just hear yourself talking because of all the skull acoustics or whatever
and then you get a mental model of your voice based on that that you use for your internal monologue
14:19
I mean I assume because of that, a majority of people might not be very used to their voice in recordings, but I wouldn't be surprised if that doesn't necessarily make everyone or even a majority of people hate that
I thought it was that you don't actually just hear yourself, your brain mixes the actual hearing with what it's thinking
but when you hear a recording it's just, like, it's all a lie
you can't actually produce the sounds you want to produce
do we have a tag for minimizing computational complexity? i know we have but that's not quite what i'm aiming for (minimizing complexity, but there's no upper bound)
I mean it doesn't really help that I am not a fan of my own voice in general even hearing it myself
@bigyihsuan maybe
@bigyihsuan i thought fastest-algorithm supported that? or even preferred that over real time
14:21
real-time is
ah thanks, works. dunno how i missed that one.
Is var [a,b]=[10,20] valid JS?
0
Q: Can I post comments on [tips] questions to suggestions on tips for golfing if I don't understand the tip myself?

CrSb0001Disclaimer: I am the author of the posts mentioned here.Disclaimer: Sorry if the title doesn't make a whole lot of sense, I will try to clear up any confusion below. So recently I posted the tips question "Tips for golfing in Emmental" because I had recently at that time come across Emmental and ...

@Adám ^
14:30
@Adám with var I'm not sure, but with let or const (which you should be using anyways) yeah
Wait, I should be using let instead of var?
well, you really should be using const unless you really need mutability
but yeah var is generally discouraged
ok
6275
Q: What is the difference between "let" and "var"?

TM.ECMAScript 6 introduced the let statement. I've heard that it's described as a local variable, but I'm still not quite sure how it behaves differently than the var keyword. What are the differences? When should let be used instead of var?

it's been years since I've used var lol
even for quick scripts or writing in the repl I use let
14:33
I'm almost done with a major refactoring, eliminating that pesky structured code in favour of an array-based approach.
adam out of curiosity: what langs do you use most besides apl?
@Adám I'm slightly scared
@Seggan Only JS and if you count them HTML/CSS. I used to do some BASIC and I think it was Pascal, but it has been decades.
(oh and of course I don't want to sound like I judge you and go "your code is bad", it's just far from what I'm used to)
3 hours ago, by Adám
@RubenVerg I'll try, but bear in mind that I don't know JS.
so... you dont do anything besides apl?
14:35
not thoroughly, no.
interesting
14:47
@RubenVerg Not bad at all:
   const
    s=new URLSearchParams(location.search),
    [t,i]=[[3600e3,1e2],[86400e3,1e4],[60e3,1e2]][1+"dm".indexOf(s.get`t`)],
    H=_=>{let t=new Date;d.style.height=(((t.getHours()*60+t.getMinutes())*60+t.getSeconds())*1000+t.getMilliseconds())%t/t*1e6+"vh"}
   let w=await navigator.wakeLock.request()
   document.addEventListener("visibilitychange",async _=>document.visibilityState=="visible"?w=await navigator.wakeLock.request():0)
   H();setInterval(H(),i)
   b.style.background="#"+(s.get`b`??"fff");d.style.background="#"+(s.get`f`??"000")
The page now loads correctly, but somehow the H is not being called every i ms :-(
Oh, stupid me.
Now what‽
   const
    s=new URLSearchParams(location.search),
    [m,i]=[[3600e3,1e2],[86400e3,1e4],[60e3,1e2]][1+"dm".indexOf(s.get`t`)],
    H=_=>{let t=new Date;d.style.height=(((t.getHours()*60+t.getMinutes())*60+t.getSeconds())*1000+t.getMilliseconds())%m/(m-1)*100+"vh"}
   let w=await navigator.wakeLock.request()
   document.addEventListener("visibilitychange",async _=>document.visibilityState=="visible"?w=await navigator.wakeLock.request():0)
   H();setInterval(H(),i)
   b.style.background="#"+(s.get`b`??"fff");d.style.background="#"+(s.get`f`??"000")
yeah this is better than the switch case
But why is setInterval failing to do its job? If I call H() manually, the screen updates.
by the way, why do you manually set an interval instead of using something like requestAnimationFrame?
@Adám remove the parens
Oh. Yay, now it works.
@RubenVerg Because I never head of that :-)
it's my go to for making js backed animated stuff
14:57
Ah, that's nice!
you basically add a line requestAnimationFrame(H) inside the definition of H, as the last line, and then call H once
Why call H once?
to trigger the first frame
otherwise how can JS know that you want to request the following frames?
technically you should do requestAnimationFrame(H) outside as well, but for simple code like this it shouldn't matter and a simple call is fine
@RubenVerg TCO?
caught it!
15:01
@Adám it's not recursive because it schedules the call for the next frame, so no tco possible
15:25
@Adám No TCO is necessary, it will run separately and not inherit the stack frame from the previous iteration
0
Q: Output the inventory sequence

12431234123412341234123Goal Write a program that outputs this list: 0, 1, 1, 0, 2, 2, 2, 0, 3, 2, 4, 1, 1, 0, 4, 4, 4, 1, 4, 0, 5, 5, 4, 1, 6, 2, 1, 0, 6, 7, 5, 1, 6, 3, 3, 1, 0, 7, 9, 5, 3, 6, 4, 4, 2, 0, 8, 9, 6, 4, 9, 4, 5, 2, 1, 3, 0, 9, 10, 7, 5, 10, 6, 6, 3, 1, 4, 2, 0, 10, 11, 8, 6, 11, 6, 9, 3, 2, 5, 3, 2, 0, 1...

15:48
0
Q: How to come up with math logic for a particular math pattern problem in competitive programming contest?

Roshan VijeyCodeforces Problem - 1973A Chess For Three Three friends gathered to play a few games of chess together. In every game, two of them play against each other. The winner gets 2 points while the loser gets 0, and in case of a draw, both players get 1 point each. Note that the same pair of players c...

16:03
0
A: Sandbox for Proposed Challenges

bigyihsuanFind the most isolated point Tags: code-golf fastest-algorithm Given a two sets of points \$P,T = \{(x,y)\ |\ x,y \in \mathbb{Z} \}\$, find the point \$p \in P\$ such that it is the "most isolated" from all points in \$T\$. The "most isolated" point is defined as the point that maximizes the dist...

 
1 hour later…
17:12
@RubenVerg @mousetail Isn't that hugely wasteful when I only need an update every 1÷10 s? The screen refresh is never less than 1÷60 s away..
18:11
I guess it's kinda wasteful
 
2 hours later…
19:44
@Adám Browsers enforce nested timeouts to be at least 4ms, but I don't think there's any similar limitation on intervals
20:03
Anyways, I need help laying out some Trilangle code, because it's a bit of a beast and I frankly have no idea where to begin. (It's an entire Qdeql interpreter.)
Even after removing comments it's still nearly 300 lines
 
1 hour later…
21:35
@Adám did you mean H();setInterval(H,i);
oh, I see someone finally spotted that

« first day (4875 days earlier)      last day (264 days later) »