« first day (3821 days earlier)      last day (1005 days later) » 

12:05 PM
@N3buchadnezzar lol
 
12:40 PM
Hmmm, I made a mistake. I wanted to install the nerd fonts, so I did..
Currently it has downloaded 2 gigabytes and is still going
How big are these fonts?
 
they're an aggregation of a bajillion fonts
so the answer is: big
 
Going to try out the new nvim with telescope and a few other plugins
Maybe finally updating my edit will make me a better golfer (we all now that it wont, but a man can dream)
 
"my edit"?
 
*editor
 
ah
 
12:58 PM
@N3buchadnezzar wait did you just git clone
just get a single font
 
Honestly, some people just don't know how to not use git :P
2
 
lol
 
if you are using git clone do git clone --depth 1
CMQ: Does the nerdfont patcher work for you?
Wait when did the solar storm happen?
 
I can't see info about a solar storm from any reputable sources
 
or solr flair (whatever is it called)
 
1:05 PM
solar flare
I have just written a decorator factory factory
Python has become Java
why did I let this happen
 
@N3buchadnezzar If the graphic on their homepage with the icon counts is accurate then their collection is very out of date. I'm part of the Material Design Icons team and our next release will bring us up over 6k icons.
 
1:24 PM
no
 
@PyGamer0 lyxal managed to get it added in PEP 420
 
Actually it is going to be the only feature in Python 6.9
 
1:39 PM
@N3buchadnezzar when will taht get released?
@cairdcoinheringaahing do you mean this pep
 
2:26 PM
If you're going to do it, do it properly!
 
2:38 PM
@Shaggy When I held pub quizes I played a lot of mashups including that one. Fun times
 
On a fierce mashup buzz today, I am.
 
That one's a work in progress after I somehow managed to butcher my old one.
 
@pxeger Noice, link?
 
@Shaggy Prodigy Vs Enya is a masterpiece
 
2:58 PM
Absolutely it is; all the best mashups are ones that should not work at all.
Whole Lotta Sex Machine & We Will Rock You, Bossa Nova! are my current favourites.
 
I think I prefer Whole Lotta Sabbath but the Bossa Nova mix is stellar
 
Other than Sad But Superstitious & Metallica Goes to Punjab, I've gone off Wax Audio a bit lately, for some reason - dunno why. But, yeah, that Bossa Nova is great after a few beers.
<whispers> I think YT might be listening to me here; I have that playlist on random but it's playing them in the order I'm mentioning them here. I'm scared! </whispers>
 
@Shaggy I think 7 to 10 are the ones which have been played the most frequent in my playlist
 
Ha! I'm too old for all of them!
 
I hate when I have done extensive research into a topic and then asks a question like. "Hi I have problem X and have tried Y and Z, neither working because of Å. Any suggestions?"
 
3:07 PM
I'll give 'em a listen after work tonight, though.
 
And then someone has the audacity to ask "Have you tried Y and Z?"
 
@user unfortunately no
 
4:07 PM
0
A: Sandbox for Proposed Challenges

Djin TonicBlinking Lighthouses – Founder's Day Edition To celebrate the island's Founder's Day, colored filters (fuchsia, chartreuse, and aquamarine*) have been installed in every lighthouse. All lighthouses begin operation with their fuchsia filters and they are all on the same color cycle: FCA, FCA ... ...

 
4:36 PM
@N3buchadnezzar @Shaggy Well crap, now I have to listen to a bunch of mashups. Darn it :P
 
^ Seems a bit disruptive, is this even allowed?
 
Not too sure of a better solution. Test questions and answers happen every now and then; I've pointed OP at meta's designated formatting sandbox (though if they are testing a question, it won't help).
Previously it was just less noticeable because it would be deleted quickly enough, but that can't really happen with a bot that posts within 3 seconds.
 
@hyper-neutrino Formatting sandbox doesn't tell what something see outside of a question
 
Okay. I wasn't sure exactly what you were testing hence my comment that I don't know if it serves the purpose that you intended.
IMO test posting (to meta - people shouldn't be test posting to main) is totally fine, but feel free to disagree.
 
you could put it in the formatting sandbox and then look for it in search results
obviously this is a very specific solution
 
5:32 PM
@hyper-neutrino Also that test doesn't work fine for latex
 
5:44 PM
Since it's already halfway through the month, I've only given out one bounty, and the original poster of this LotM is gone, here's a friendly reminder that ARM is July's Language of the Month, for anyone interested in checking it out and giving it a try.
 
6:00 PM
Just wanna mention that I posted another cop in the "change a character" CnR, if anyone's interested in trying to crack it.
 
While we're doing news and stuff:
PEP 657 is now final, so Python 3.11 will have column-based bytecode offsets, meaning all error messages can be pinned down to their exact locations in the code
For example:
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    x['a']['b']['c']['d'] = 1
    ^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
 
What rule did Bignum Bakeoff use to avoid strlen(" ")?
 
Max program length 512 bytes?
 
ignoring whitespace, and in some programs(like Loader's) whitespaces can't be omitted
 
oh, hmm
 
6:16 PM
0
Q: Challenge: Solve the Sudoku puzzle

Alan BagelChallenge: Generate a random Sudoku puzzle and try to solve it. If it is impossible to solve, generate another Sudoku puzzle and keep solving and generating Sudoku puzzles until it generates one finds one that can be solved. Output the solved Sudoku puzzle. Rules: Write the language the solver i...

 
Three welcome comments, each with different feedback lol
 
well, they are all very similar :p all of them say to use popcon, that it is unclear, and that it should be sandboxed :p
oh wait, yours doesn't include the template sandbox thing, nvm. also i've started linking the ask help/faq page since we have that :p
 
yes, but I was first!! You should eleven the other two because I'm such a ninja!
 
I skipped the sandbox part when I noticed there were already two other comments :p
I wouldn't have had room anyway
 
6:21 PM
i should eleven redwolf's for interrupting my two-part comment /s
 
@RedwolfPrograms I used the character limit exactly lol
 
@AaronMiller watch out for shaggy's phone
 
I sometimes wonder what it's like to be a new user who posts a question and receives like four full length essays on what they did wrong within two minutes :p
 
it is probably better than getting 7 random downvotes and a closure with like one template comment :p (not in reference to any sites in particular)
 
Yeah...sure... glances over at SO
 
6:26 PM
like i said, no sites in particular :p any and all references or correlations to real stack exchange sites is purely coincidental
 
Okay chat markdown is way worse than I thought
 
un_der_scores are weird, asterisks work...*shrug* ..._lol_
... or not?
 
I think they just split it on \b or something
I wish they'd switch chat MD to commonmark (or whatever they use on main)
 
i wish markdown were actually standardized and everything followed one rule set that actually makes sense
tried parsing discord's code block syntax, decided to give up cuz the way backticks group is actually super weird
 
I think it was standardized but people made changes to add stuff, or implemented it lazily (cough cough chat cough), and so on
 
6:31 PM
fair enough
CMQ: is - for literals and _ for subtraction better or vice versa? i.e. a _ b and a + -2 or a - b and a + _2
 
Other way around is better IMO
Or make ¯ subtraction, _ for literals, and - do what it does in regexes (e.g., a-c would expand to abc :p)
 
wtf
jelly does it the first way, J does it the second way lol. I think the latter is better too, probably
i've decided to not have non-printableascii/newlines, but thank you for that extremely cursed suggestion
 
Ash just used _ for negation, so putting it in front of a literal did the same thing you'd expect but actually parsed as a monad
 
what is ash's paradigm / structure? don't remember if you've mentioned and i've just forgotten
 
Prefix
But it got a bit cursed when you used things like τ
 
6:35 PM
do i want to know what that does?
 
It makes sense on its own (takes two operators and applies both to the same argument), but it parsed super weirdly
 
oh so it's a cleave operator
 
You could pass a function as one of the operators, so τ_{+_1} would work
You could also pass τ with two more operators as one of the operators
So τ_τ__ would work
 
that... makes sense so far
 
And it'd be fine if I planned for all of that originally, but the code got super weird and there were all sorts of weird edge cases
 
6:37 PM
classic :p F
 
Oh, it also could take dynamics, in which case you'd also have to specify a function, but then sometimes the second (non-dynamic) operator would also take the function as an argument and really strange stuff would occur
 
yeah this sounds rather confusing :p
 
I'm glad I stopped working on Ash, I'd probably still be trying to figure that stuff out :p
I totally forgot there were both dynamics and things like vectorize (α) which were sort of like dynamics but took operators instead of functions (usually), but sometimes you could have both, so you could end up with αḲ{_}, which was vectorize map with negate. Very confusing.
 
._.
seems legit
 
It's called Ash because at some point I'm probably going to gather up everything related to it and burn it :p
 
6:43 PM
and from what you've mentioned it also sounds like it was the result of everything being on fire :p
 
Who would've thought putting the entire language in a 4100 line javascript file would've led to unreadable garbage
 
Who would've thought writing the entire language in JavaScript would've led to unreadable garbage?
 
This is the only comment
In the entire 4100 line program
 
You frighten me
 
is there a specific reason to do var parse = (tokens) => { } instead of function parse(tokens) { }? just wondering if there's some specific js thing
 
6:48 PM
@hyper-neutrino - for subtraction and _, ¯, or ~ for literals
@hyper-neutrino Optimal garbageness
 
7:07 PM
I'm back. I just woke up; I think something hit me and knocked me out right after I posted that new cop. Anyone know anything about that?
 
7:18 PM
> educated manual semi-brute-force
 
@AaronMiller as in, I changed all the things that looked very easily changeable based on my 0 knowledge of R, just trying all the digits
 
@pxeger I did pretty much the exact same thing for this crack
 
@hyper-neutrino There's three differences (hoisting, this, and new), but none of them matter here. I just like the aesthetics.
 
oh lol
 
Plus it makes it immediately syntax error on IE, which is always a good thing.
2
 
Is that something like JS's template functions?
 
7213
Q: var functionName = function() {} vs function functionName() {}

Richard GarsideI've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent. The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not. The two way...

 
The function vs. arrow function is also a major difference
 
it is "{1}" f"{1}" which is a normal string literal followed by a format string literal (stuff between {} gets eval'd)
and if you stick two strings next to each other they just get concatenated
 
ngl, it seems as though "relevant SO" (a la "relevant xkcd" to life) is definitely a thing for any programming related question :P
 
7:37 PM
I know a lot of languages to the adjacent-string-concat thing, never got why though
Anyone know?
 
Legacy from C?
 
probably so you could write it across multiple lines? idk just a random guess
 
Oh, that makes sense I guess
There's two ways you'd do that in JS and both are horrible
 
and it isn't the same as just implicit + because print("a" "b" * 3) works and outputs ababab
 
44
A: How does concatenation of two string literals work?

paxdiabloIt's defined by the ISO C standard, adjacent string literals are combined into a single one. The language is a little dry (it is a standard after all) but section 6.4.5 String literals of C11 states: In translation phase 6, the multibyte character sequences specified by any sequence of adjacent ...

You could probably ask on Retrocomputing where it started
 
7:40 PM
to span multiple lines in python you have to put a \ at the end of the line anyway tho
 
In JS you'd have two options:
"x\
y"

// or

"x" +
"y"
 
@hyper-neutrino not always
only if you do x = 'abc' \n 'def'
 
'zork' is a new one to me, usually you see baz or qux or quux :p
 
huh interesting
 
7:43 PM
> In C, where the concept and term originate, string literal concatenation was introduced for two reasons:[17]

To allow long strings to span multiple lines with proper indentation in contrast to line continuation, which destroys the indentation scheme; and
To allow the construction of string literals by macros
Dear anyone who constructs string literals using macros: why, and who hurt you?
 
That actually sounds kinda useful ngl
 
I maintain that macros are very cursed (at least, how C uses them). That makes them even worse
 
The cursedness of C macros is part of the experience :p
 
LISP and Scala macros are pretty nice afaict, but C macros are just weirdly done
The fact that they're more like string replacement than anything is just crazy
 
I don;t think I've ever seen a C macro that I've thought was the best way to do it
 
7:46 PM
I've never used Rust macros, but I hear they're good
 
Hygienic too
 
They wear a mask and carry hand santiser?
 
lol
Hygienic macros are macros whose expansion is guaranteed not to cause the accidental capture of identifiers. They are a feature of programming languages such as Scheme, Dylan, Rust, Nim, and Julia. The general problem of accidental capture was well known within the Lisp community prior to the introduction of hygienic macros. Macro writers would use language features that would generate unique identifiers (e.g., gensym) or use obfuscated identifiers in order to avoid the problem. Hygienic macros are a programmatic solution to the capture problem that is integrated into the macro expander itself...
@user Why did I capitalize lisp
 
I case y'all've missed it, 2 new status tags added to bugs/FRs
 
I do questionable things sometimes
 
7:48 PM
I guess senpai noticed us :P
 
I'm an especially big fan of Vim macros
 
@cairdcoinheringaahing :celebration-thingamajig:
@AaronMiller Those kinds of macros are entirely different, aren't they?
 
I think they're akin to functions
 
Macros in Vim, Excel, IJ, etc. are just recorded keystrokes, right?
^^
 
You "save" code to be run later
 
7:49 PM
yes. it was a joke
 
Oh lol
 
@user Imagine not using macros in word to write essays :P
 
I forgot to add a /s or a :p
 
@cairdcoinheringaahing Imagine using Word
This post made by butterfly gang
 
Imagine writing essays
This post made by not in college gang
 
7:50 PM
Imagine not writing things in /// on TIO
 
@AaronMiller ಠ_ಠ
 
@AaronMiller I am both graduated and not graduated :P
 
I'm applying to colleges right now and I have never been in more pain
I graduated from middle school *puts on sunglasses*
 
@AaronMiller I saw that sneaky edit: are you in grad school or something, or did you fail to graduate? lol
 
@user You don't enjoy writing a few thousand words begging schools to accept you?
 
7:51 PM
@cairdcoinheringaahing relevant
 
@cairdcoinheringaahing Imagine not writing things Intercal so that the Output contains what you need
 
@pxeger I graduated from high school and then got a job because I thought college would be a waste of time
plus im lazy
 
@AaronMiller I did that too, but still applied and got into college :P
 
@cairdcoinheringaahing I would be fine writing one single 500 word essay for every college, but when you ask me to write a 650 word essay, an 800 word essay on what I would do if I didn't go to college, another 800 word essay about what the world will be like in 100 years, and 5 short answer questions about random crap that has literally no relevance whatsoever, I will...grumble and do them because life sucks
 
But I absolutely hate looking for jobs, so I might just spend the next 20 years slowly working towards a bachelor's degree :P
 
7:53 PM
@AaronMiller Smort
 
@user Imagine doing any of that lol (made by still has a few years before having to do that exact thing gang)
 
@user Is that for one uni?
 
Bit of an exaggeration - only one (honors college) asked for the two extra 800 word essays, and the 5 short answer questions are from another university
 
I think I had a total of 33 essays of 100+ word essays to write for all the places I applied to
 
:o less than a week until AP score release date
 
7:55 PM
@cairdcoinheringaahing Oh wow
@RedwolfPrograms I dread it...
 
Then, after getting rejected from basically all of them, I applied to 5 places in the UK where my personal statement was "Look at my grades, I'm very good at maths" :P
 
I took two AP tests this year, if I get two 5s I'll give away +500 in bounties :p
 
College Board even increased the costs this year iirc :(
 
What a surprise :/
 
Still a lot less than a college class
 
7:56 PM
@cairdcoinheringaahing I went to a tech school for 11th and 12th grade and then was like, "yeah, I'm done", but all my teachers really wanted me to go to college cause im smort, but I was like, "nah, thats wack"
 
@AaronMiller I seriously considered ski bumming around Europe instead of uni, then covid happened and I figured I'd rather spend 4 more years in a regulated environment :P
 
@cairdcoinheringaahing I'd get into all my backup and target schools easily if I could just flash my report card instead of doing the whole "holistic review" thing
Honestly, I feel essays should only be a major factor for people hoping to be English majors or going to liberal arts colleges
 
@user lol same
 
@user I sort of just did that :P
 
Did you get in?
 
8:00 PM
Yes :P
 
Nice!
 
@AaronMiller except instead of target school it was target company to work for
 
@user I applied a year after I left school so I actually had my grades. Here, we have to write a "Personal Statement" to sort of just generally indicate our interests academically. I essentially just wrote "I'm good at maths, and I enjoy it. Proof: my top grades in maths consistently for the past 7 years", and got in :P
 
Do you have fixed prompts (in the UK)?
 
not really, but you really just need to talk about yourself
 
8:03 PM
@cairdcoinheringaahing That article cites a SO answer lol
 
if you write about something irrelevant it won't get you in to a good uni I suspect lol
 
Caird: Im good at maths
Also Caird: gets in
Also Also Caird: gg ez
 
Here, we take our college entrance exams at the end of our final year, and get the results in August. We apply in January of the final year, so we get "conditional offers" dependent on achieving the grades. I applied in Jan this year (got my results in August 20), so could literally just point to them :P
@AaronMiller 2+2=5
 
caird's tips on getting into college:
1) Apply to lots of universities
2) Get rejected
3) Be good at math
4) ???
5) Profit
 
yeah, my acceptance came with a condition that was basically just like "don't drop below 75 avg and you're good to go"
and then since covid canceled half of school it became impossible for our marks to go any lower than the midterm mark lmao
 
8:06 PM
1) Aim high, apply to top Ivy League schools
2) Utterly fail and get rejected from all of them
3) what the fuck do I do now?
4) Bum around a ski resort for a month
5) Fuck it, apply for maths programs in the UK
6) Profit
2
 
Did y'all have to continue paying during COVID?
 
lol my uni tuition has not gotten any lower since COVID
well, i think - i started uni during covid lol
 
lol
 
(True story, I got accepted by CU Boulder and waitlisted then rejected by NYU. Everything else was a outright rejections)
 
HN's tips for staying in college:
1) Get into college
2) Don't let grades drop
3) Start global pandemic
4) Be lazy without consequence
5) ???
6) Profit
 
8:07 PM
Let's hope it goes away completely by next year
> Start global pandemic
 
That's a mod power IIRC
 
@hyper-neutrino What did you do?
@cairdcoinheringaahing 11'ing/golfing the world's population? :P
 
@AaronMiller no like while I was in high school, covid started and so all of our classes got shifted to online suddenly and so to avoid trolling people, the final mark was just max(real mark, midterm mark)
 
@hyper-neutrino Huh, we just got sent home in March and were told "Fuck if we know, we'll tell you a random grade in August"
 
8:10 PM
We were told on Wednesday that Thursday would be the last day. At a school we'd been at for 7 years, we got one day notification :/
 
we were told that our march break would be extended from 1 week to 3 weeks
and then that got pushed to another month
 
Our high school was amazing - we just got a Pass/Fail grade for the semester, but it's impossible to get below a 50% in this district if you turn in an assignment (you could literally turn in a drawing of a T-rex eating burritos and get 50%), so basically everyone was alright
 
and then another few more
and then the entire school year got cancelled
@user what the fuck lol
 
@user That's oddly specific...did you turn in a drawing of a T-rex eating burritos and get 50%?
 
8:11 PM
that was fast
 
Totally not a true story
@cairdcoinheringaahing Wait, how did you have that on hand? Were you in my history class in 7th grade?
 
@cairdcoinheringaahing Yes, I'm going to get a good grade in The Nineteenth Byte, something that is both doable and normal to want
 
@cairdcoinheringaahing We got sent home and did almost nothing, but my lab teacher had me and a few other smort peeple take raspberry pi kits home and said that we would do some projects with them, but then we didn't and my teacher was like, "yeah, don't bother returning them", so I got a free raspberry pi
 
My inbox is empty of read messages for the first time in counts on fingers ever
 
8:12 PM
lol
 
@user I don't think so :P
@RedwolfPrograms I hate this
 
@user No, Caird was outside your history class. watching.
 
I got down to maybe 40 emails then just hit the archive all button because I don't really care :p
 
@AaronMiller My lab teacher baked us all raspberry pies, but he had to leave because he was sick, so we all got free covid
 
watching. waiting. learning.
about the Alamo and Jiminy Cricket :P
 
8:14 PM
@user same thing, right?
 
@AaronMiller Either caird can see through closed doors or he was floating outside the windows
 
I don't know why I'd need an email from my 7th grade teacher about an upcoming homework assignment due two years ago, but I don't want to delete it just in case
 
lol same
 
@user Pretty sure I can float
 
i have 1076 unread emails in my inbox right now
 
8:15 PM
unread?!
 
@cairdcoinheringaahing But can you double? :P
 
Across my 4 email adresses, I have 40 emails in my inboxes. 0 unread
 
Ive gotten pretty good at BigInting, myself
 
@user Yes. I'm also quite good at charring and arraying :P
 
I'm rather short
 
8:16 PM
I'm not long tho
 
I do believe that I am quiet adept at stringing together words
 
i get a lot of emails i don't really need to read and i don't have a category system set up so all of my emails go into my main inbox
there are a lot of random linkedin things like "omg 3 people looked at your profile" like yeah they probably misclicked or are webcrawlers
 
@hyper-neutrino But you have to at least read them
 
Across my 40 email adresses, I have 0 emails in my inboxes. 4 unread
 
Or 11 them from the main page
 
8:17 PM
@user Correction: I'm a bit short
 
@hyper-neutrino Unsubscribe from those
 
@cairdcoinheringaahing usually the subject is enough to determine they are useless
@cairdcoinheringaahing too lazy, easier to just see the subject and skip
 
Ooh, someone CC'd a bunch of people to my bug report
 
I'm all for laziness, but not at the expense of neatness :P
 
8:18 PM
@RedwolfPrograms And commented using lots of funny words I don't know
> Could this be related to an error in tier-up to SparkPlug/TurboFan as it only occurs after a few executions?
 
@RedwolfPrograms That's called "a different language" :P
 
I'm all for laziness, but not - you know what? Never mind, I'm just all for laziness
 
I'm all for laziness, but
 
I'm lazi
 
I'm more of a fan of procrastination tbh, I'll tell you all about it later
 
8:19 PM
I'm
 
dad
8
 
@user LMAO GET REKT
 
> pin this item | cancel stars
Tempted to do either tbh :P
 
8:20 PM
Please pin
 
Two good options :p
Let's do both
Just leave it pinned :p
 
Example #51 why we don't need a pinning policy :P
 
@cairdcoinheringaahing Only 51? We're not trying hard enough
 
8:22 PM
imagine that as a conversation:
notice us senpai
dad
*dinosaur eating burrito*
3
@cairdcoinheringaahing I can only imagine this as a dad saying "notice us senpai" and his kids reacting :P
 
I imagine it as the senpai being the dinousar eating burritos
 
> Family Text Thread:
>
> Dad: notice us senpai
> Kid: dad
> Dad: *image of dinosaur eating burrito*
:P
 
I imagine it as the senpai being the dinousar-eating burritos
@RedwolfPrograms FTFY ^
 
That's...interesting word ordering
 
punctuation is important
 
8:27 PM
It's time to eat Mr. President
 
@RedwolfPrograms The President eats shoots and leaves
 
This is random.
 
So is this: 0.3211040049822653
 
I love my parents, Lady Gaga and Humpty Dumpty
@RedwolfPrograms Pseudo random?
 
8:33 PM
@user No, I put 52 cats in boxes with sources of radioactivity and used the living ones as the bits in the floating point number
 
I had a dream about 3 ballerinas, Stalin, Mao and Hitler
I had a dream about 3 ballerinas: Stalin, Mao and Hitler
 
@RedwolfPrograms Damn, you're lightyears ahead of Schrodinger
 
I had a dream that TNB glitched and started double-posting everything.
 
@cairdcoinheringaahing Me too
 
@RedwolfPrograms CMC: Generate 52 random bits, then convert that from binary to a decimal float
 
8:36 PM
CMC: Generate a random 64 bit float
Wait is that a ninja
 
A legendary CMC ninja
 
I guess technically mine would involve randomizing all 64 bits, rather than just the mantissa?
That's actually a fun challenge in JS
 
ngn
@cairdcoinheringaahing "decimal" float?
 
@RedwolfPrograms Math.random
 
Nope, that's in the range of 0 to 1
 
8:37 PM
So?
 
3
A: Polyagony layout (mode 3/3,6)

xashJ, 76 69 bytes -7 bytes thanks to Jonah's approach! (' *.'{~]+(<]*$$+/\@,))1(<:2&(0&,.,a,._2{.])a=:#:@4 10)@>.+/\@i.I.%&3 Try it online! +/\@i. triangular numbers 0 1 3 6 … I.%&3 search for the index where n%3 would sit inbetween. This is the (halved) height of the triangle. 1>. corner case f...

 
You never said it had to be uniformly distributed or anything :P
 
Haha funny
 
My challenge is to generate one with fully random bits
 
Ah
 
8:39 PM
_=>new Float64Array(new Uint32Array([t=_=>Math.random()*2**32,t()]).buffer)[0]
 
@ngn decimal as in base 10
@Ausername I want a mod diamond solely to nuke "haha 69 funny" messages and posts :P
 
ngn
@cairdcoinheringaahing ?1
@RedwolfPrograms 1?0
 
Clarification to above CMC: Generate a 64 bit float where all of the bits are random
 
i'm not sure this works but double f(){long x=0;for(int k=0;k<64;k++)x+=rand()&1<<k;return*((double*)&x);}
 
Is that C?
 
8:42 PM
Casting in languages like C is so cursed
 
c--
 
C==C--
 
create a long and fill it with random bits (the size of rand() is implementation dependent so i just fill bit-by-bit) and then dereference the long, cast the pointer to a double pointer, and reference those bits as a double instead of a long
 
8:44 PM
fun fact: this sort of type-casting is what fast inverse square root uses, because turning the bits of an float into an integer roughly takes the logarithm of it
 
That algorithm is so cursed and amazing at the same time
 
it's genius but i relate strongly with the // what the fuck? comment
 
Fixed point is still better :p
 
@RedwolfPrograms Can we output as a list of bits?
 
No
Making it into a float is the fun part!
 
8:56 PM
Well, Vyxal doesn't really have floats specifically, just Numbers, but here's 7 bytes: Try it Online!
 
i don't think that's valid, I think you're supposed to use IEEE754
not that that was particularly well specified if the case :p
 
@RedwolfPrograms Clarification to the claraification: Use IEEE 754 like HN said (for non IEEE 754 languages, you'll need to do it yourself, NaN/0 behavior can be considered undefined in that case) :p
 
Oh. It generates 64 random numbers, each either 0 or 1, then converts them from binary to decimal, so I figured that was pretty much what was asked for.
 

« first day (3821 days earlier)      last day (1005 days later) »