« first day (3959 days earlier)      last day (877 days later) » 

5:00 PM
If you spent that much effort you should post it
 
@pxeger Ooh, that array syntax (if it's array syntax and not a red herring) looks super familiar, but I can't place it
 
@Mayube ...totally... (fixed)
(also the byte count was wrong I think lol)
 
I'm thinking it's some 2d language and the ^ are like "shunting" the numbers up into the empty array at the top
but that might just be my overactive imagination
 
hmmm
 
This is super cool, set f(x) to any function you want
It shows where the line normal to f(x) at all xs collides with f(x)
If you turn off the purple/black lines you can see more clearly what it is
I'd suggest 2sinx
 
5:11 PM
@RedwolfPrograms Wait, what?
 
It's hard to explain
Try turning off the green graph
You can see it shows a vertical black line anywhere that purple line intersects the blue one
If you were to plot those points on on the y-axis, for all x values where the purple line can be, it would be the green graph
 
Oh, wait, there's a parameter
 
I visualize it as if you took the function, and stretched it out until it was f(x)=x
Like if f(x) were a piece of string, and you reshaped it, but all of the normals had to stay the same in terms of where they intersect
 
0
Q: How to shorten the Python code? Part II

FmbalbuenaCode Python 3, 245 bytes E=print def F(): B,C,A=1,1,1;yield 0 while True:yield B;B,C,A=B+C+A+1,C+A+1,A+1 C=int(input()) D=0 for A in range(C): E(end='*'*(C-(C-A)+1));B=A while 0<B:E(end=' '+chr(42+B)*B);B-=1 E();D+=1 for A in F(): if D==0:E(end=str(A));break D-=1 Try it online! What it d...

 
Okay, so: for a given n, draw the line normal to f at x = n. Then find all the points where that normal line intersects f(x). Then take the set of x values of those intersections, and plot it against n (with n being the x value and the set being y values)?
 
5:17 PM
Yes
 
i dont understand, isnt that always just like, at (x,f(x))
 
Try it with the green graph hidden, it becomes a lot clearer what's going on
 
wait i get it
that is very cool
 
Tangent looks rather interesting with it
 
@Fmbalbuena ascii 41 is ), ascii 42 is * - in your question, you say ASCII 41, do you mean 42?
 
5:41 PM
0
Q: Print till I ask to do so

Ha'PennyQuestion: You have to print(STDOUT) the word "Print" such that each letter of "Print" appear as many time as they had appeared in the text before. Example: | Counter| Output | | -------- | -------------- | | 1 | Print | | 2 | PPRRIINNTT | |3 |PPPRRRIIINNNTTT| This has to be p...

 
0
A: "Hello, World!"

Binary198Woodchuck, 1161 bytes Woodchuck is a derivative of BF which uses binary trees. Here is the hello world program. >>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[^^<>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[^^<>>[>]>^<^[^]^>>[>]>^

 
5:59 PM
CMC: given a base b>2, find the smallest n such that the digits of 2n are an anagram of those of n when both are written in base b
 
woah
 
@NewPosts Along with needing more details, I feel like this is borderline a dupe of this
 
@Neil 10 bytes in jelly: Try it online!
 
6:14 PM
Cleaning up my sandbox posts. Any feedback on this before I post it?
 
I agree with pxeger on "positive" to "non-zero"
I was wondering why I wouldn't be given a negative length string :p
 
@hyper-neutrino how does that work? I don't understand what the ³ is for
 
@RedwolfPrograms Fixed
 
I'm just starting out with a non-trivial Jelly program; how do I chain α -> dyad(nilad, monad(monad(α)))?
(maybe I can join JHT?)
 
6:25 PM
Maybe mmnd?
 
wait no
 
I'm like 99% sure mmnd works, right?
I know it works as a full program
 
yes it does work, I think I just mixed up the arguments to my dyad
 
6:41 PM
@hyper-neutrino nice
 
@Neil Vyxal, 11 bytes: Try it Online! I was able to find a few 11 bytes, but I wasn't able to tie Jelly :(
 
@AaroneousMiller says the answer for 3 is 7 for some reason?
(jelly gives correct answer of 32)
 
@Neil Turns out I happened to select the one 11 byter that was flawed, so here's one that isn't: Try it Online!
 
What should happen if you try to group an array into groups of length 0?
 
return a.map(_ => [])?
 
6:46 PM
@RedwolfPrograms you get an array of n empty groups
yeah what pxeger said
 
@RedwolfPrograms Looks good, although codepages
 
@RedwolfPrograms Infinite loop /s
 
I mean that is a legitimate option
 
0
Q: Randomly capitalise half of a string

MayubeGiven string s of even length as input, randomly capitalise exactly half of the letters. You can assume the input will always be a non-zero, even length You can assume the input will consist of only lowercase letters ([a-z]) There must be an equal probability of each letter being capitalised Exa...

 
Vyxal just returns an empty array, but I feel like there are much more interesting things that could do
 
6:49 PM
aight im giving this a go
 
@RedwolfPrograms you could also simply repeat the array n times. a.map(_ => a)
 
@NewPosts It says that there is an equal chance of each letter being capitalized, which implies that it's possible for every character to be capitalized/not capitalized, but it also says that exactly half of the characters should be capitalized. I'm not sure how to interpret that.
 
@RedwolfPrograms Yeah, it depends on how your language handles "doesn't make sense" errors. There isn't any possible answer that satisfies the same condition as grouping on a positive integer, namely that concatenating the subarrays of the result gives you the original array back. So you either pick some bogus answer that might be convenient, or you say "Nope, that doesn't make sense, can't do it."
 
@NewPosts is this a legitimate solution? Charcoal, 18 bytes: F⪪S²«≔‽²θ⭆ι⎇⁼θλκ↥κ
 
@DLosc (The current version of Pip gives a warning and returns nil, BTW)
 
6:53 PM
@Neil looks like it
 
@AaroneousMiller it makes sense intuitively but i'm also not entirely sure how it would look
@Neil not sure if that would fly or not. same logic applies to splitting the string in half as it does in pairs
but the question doesn't state that all possible permutations must be formable so
 
@AaroneousMiller exactly half of the characters should be "selected" for capitalization, and each character should have an equal chance of being "selected". Basically every possible permutation should have an equal chance
 
@Mayube You should say that last sentence explicitly, then. I don't think the current wording requires every permutation to be possible.
 
@Mayube A & B there do not imply C
splitting the string around the midpoint and randomly capitalizing the either half would both pick half and give each character a 50% chance
 
^
 
6:58 PM
neil's charcoal solution does the same but for pairs of characters - so 'aBBa' is possible but never 'ABba'
 
what would be the best way to word that
 
well which do you want, 50% individual and exactly half always, or equal probability of all 2n choose n possibilities?
 
all permutations that have exactly half of the characters capitalized should have an equal probability of being generated/output
I guess I could just word it like that
 
Ooh, just found a really cool golf
 
yea that would be the best way to do it I think
 
7:05 PM
Instead of taking the number of capital letters and checking if it's the same as half the string length, I add -1 for every capital letter and 1 for every lowercase, and see if it's 0
 
do our default io rules allow for returning generators/arrays of chars in python now?
 
My solution is going to be horrible but it includes Dad
 
@RedwolfPrograms wait why do you need to do either of those anyway
 
I generate all possible ways to capitalize the string and filter those
 
oh lol
 
7:10 PM
can anybody confirm - checking a 50% for each element in the string to be capital and stopping after len/2 uppercases does NOT have an even chance to generate all?
brain kinda mushy right now but i'm pretty sure that shafts the elements near the end of the string
 
@Rɪᴋᴇʀ Turns out my solution is the same idea as yours
 
@Rɪᴋᴇʀ there's no way that'd work
 
@RedwolfPrograms v<"a" -> v<{}
([Object object])
 
Ooh smart
 
just consider 4 chars - the first has a 50/50 to be caps, the second has a 50/50, and then there's a 25% chance we've hit the cap so the third one only has a 37.5% chance to be capitalized
also
 
7:12 PM
exactly okay cool
 
you have a chance to just not get enough caps
 
that's my issue alan - i'm looking at yours and calling hax
oh true easier contradiction hn
 
Oh dear, it seems i've caused quite the commotion over probabilities :P
 
Why does

from random import*
def f(s,n=0):
for c in s:yield[c,c.upper()if n<len(s)//2+1else c][randint(0,1)];n+=1

with the input "Hello" sometimes capitalize only one letter?
 
"Hello" or "hello"?
 
7:14 PM
hello
 
Also you could probably save a lot with charcodes
 
@AlanBagel Are you sometimes uppercasing something twice?
 
(x^32 or whatever)
 
Yes, but sometimes only 1
 
o/ now
 
7:15 PM
well hello is invalid input
 
input will always be even length
 
@hyper-neutrino ah i forgot
 
@emanresuA Me or Alan?
 
also it only capitalizes one because there's no guarantee that you'll roll a 1 exactly 2 (or 3) times I believe
which is why you have to either shuffle a range or gen all perms and pick one i think
am i allowed to take input as an array of ascii codepoints lmfao
 
7:16 PM
@RedwolfPrograms you
 
Bitwise operators don't work on strings
 
charcode lists
 
I'd have to use String.fromCharCode and charCodeAt
 
as in take input as that
 
Taking input as charcodes is too cheaty IMO
 
7:17 PM
(pretty sure there's a consensus somewhere tho)
Actually o/
 
it's either in our allowed IO rules or not but i'ts easier to ask chat before i have to scroll through the very un-ctrl-f-friendly-list on meta
 
I'm sure it's technically allowed, but using it to save bytes feels cheaty
Plus it probably wouldn't save bytes, since I'd have to work with arrays instead of strings in f
 
idk and idc about your answer :p python makes it marginally easier i think
 
7:47 PM
what do you think will happen if a invite the New Posts bot to a room? :)
 
Ask @RedwolfPrograms
 
It won't do anything :p
 
Aight I'm trying it.
oH NO new posts said
WHO DARES DISTURB ME

Run!
What should I do?
 
Come on, you broke it!
The AI was only trained on handling TNB
 
@AlanBagel your python answer to that question does'nt work, you should probably delete or fix it
 
7:55 PM
@Rɪᴋᴇʀ Ok. I'll delete until I fix it.
 
We don't know what NP will do now, without a familiar room it might kill us all
 
The end times are upon us! D:
 
Oh no!
 
How could you do this to us Alan, now NP is going to take over the world and destroy all of humanity
 
I have an idea: A video game where hacking is totally allowed. But there's a twist: There's no centralized game server. Everyone runs their own server, with input from all other players. So you could hack, and give yourself anything you wanted on your server, or even fake items in a way that can convince other vanilla servers, but other people can design hacks that filter out people who are obviously hacking. So there'd be no consistent "reality".
 
8:01 PM
@RedwolfPrograms Cool idea.
 
You could easily win on your server, but who knows if you're winning on others'? And even if you know you are, is that the "correct" one? It makes it so that hacking too badly isn't rewarding.
E.g., if you just wanted to win at any cost, literally nothing stops you making a hack that instantly kills all the other players (but they could just continue playing in their reality, and ignore that they were killed, if they had the right hacks). But what would be the reward? You might as well just print "you win!" to the screen.
So I have a feeling in games where it doesn't instantly become utter chaos, people would hack just enough to have a slight edge over vanilla, and it would create a fairly balanced system.
 
@RedwolfPrograms We need to organize a giant team to make this game called "Rewarding"
 
You could also mod the game super easily. If you want to add a weapon or something, just make a mod that adds it on your server, and send out a packet to the other servers advertising you're using it (so they can sync up with you if they also have the mod).
 
Hmm what will happen if I reply to New posts?
 
Nothing, all it does is ack the message
Which is the same as clicking the green "1"
It will only reply to me, mods, and some ROs here
 
8:06 PM
@RedwolfPrograms Where is the green 1?
 
@AlanBagel Look at your profile pic left of the chatbox
 
@Mayube I see it
@Mayube What do I do now?
 
@AlanBagel Click it :P
 
Then what?
 
the 1 that is, not the pic
nothing
that's it
 
8:08 PM
redwolf means "all it does is clear the ping notification, it won't do anything else"
 
ok
Does the same thing happen if I invite the Sandbox Posts bot?
 
No, I just logged in as NP to mess with you :p
 
lmfao
 
Hi!
 
@NewPosts Go back to your cage
 
8:10 PM
Sheesh okay
 
I've been meaning to send a copy of the credentials to a mod or something in case I get hit by a bus
 
I thought HN had them
 
@RedwolfPrograms How do I log in as NP
 
you don't lol
Redwolf made the bots
at least the new ones. They existed before but were very slow. he made new ones that are speedy
 
The ones before were feeds, not bots, so they couldn't be logged into at all
 
8:13 PM
fakebots
 
@RedwolfPrograms Now I want to create a bot
 
If you do, you'll have to put it in your own room
 
@RedwolfPrograms Sounds like it could be the video game equivalent of 1000 Blank White Cards.
 
TNB requires meta approval to add bots
 
@RedwolfPrograms ok
@RedwolfPrograms does that mean you need meta approval to put bots in your own room or just TNB?
 
8:15 PM
Just TNB. You can do (basically) anything you want in your own room, or the sandbox.
As long as it doesn't involve flags, excessive spam, etc.
 
@RedwolfPrograms so how an I create bots?
 
Actually HN does technically have the credentials, since he has a copy of NP/SP's code
@AlanBagel I can send you my Node.js library if you want
caird has a link to an old Python one
 
@RedwolfPrograms ok
@RedwolfPrograms and what does HN stand for
 
You'll have to wait until I get home if you want to use the JS one
@AlanBagel hyper-neutrino
 
@DLosc This actually looks really fun. I think I'm gunna order a pack of black cards to play this with the wife
 
8:18 PM
> ... and it is suggested that the game be simply sprung upon a group of players, who may or may not have any idea what they are being caught up in.
Like all of the best games ;p
 
@Mayube I've never played it, but I also think it looks really fun. I do enjoy Fluxx, which is basically the same thing but without the make-up-your-own-cards aspect.
 
@RedwolfPrograms Why did you post a link to hyper-neutrino?
 
because you asked what HN stands for
HN either stands for my username or Hacker News depending on context
 
Or both under rare circumstances
 
Or Horribly Nearsighted
 
8:20 PM
in Vyxal, Nov 21 at 8:24, by Unrelated String
took me a hot second to realize you meant hackernews and not hyper-neutrino
in Vyxal, Nov 21 at 12:09, by PyGamer0
Official Abbreviation Guidelines: Use HN for HackerNews and hn for hyper-neutrino.
 
@DLosc Horrifically Normal
 
@pxeger ...and Hn or hN for both
 
Aug 4 at 4:22, by Dude coinheringaahing
@hyper-neutrino hmm hn = hentai weeb confirmed :P
 
@AlanBagel Those stand for Hacker-neutrino and hyperNews, respectively
 
hyperNews lol
 
8:22 PM
@hyper-neutrino Hentai Nerd?
 
Sounds a bit like the what da mods doin room
 
I'm inviting Sandbox Posts to a room
Nope, nothing.
 
8:39 PM
it's not going to do anything. the bot doesn't do anything other than the feed unless redwolf logs in to make it do something
 
@Rɪᴋᴇʀ It's still proof that New Posts > Sandbox posts if talking about enthusiasm.
 
New Posts works the same, it only does anything other than feed if Redwolf logs in
 
@RedwolfPrograms I'm still sad that feeds don't stop a room from freezing :(
 
@Mayube Fine, Alan Bagel > ABC (All Bots Combined) in terms of enthusiasm.
 
Hard disagree :P
 
8:43 PM
@AlanBagel If you make a bot, you could call it Alan Bagel's Chatbot (ABC)
 
@cairdcoinheringaahing I can totally understand why it's like that, but it would be nice if (for example) entering a room could stop it freezing so that rooms that are read a lot, but only read, wouldn't freeze
 
I wouldn't mind it if there was an option for ROs to enable feeds to keep a room alive
Sometimes, I want a room mainly to watch certain actions, not necessarily to always chat in
 
@DLosc Proof that DLosc has an IQ of 7e+190
 
@AlanBagel Vyxal Bot is the most enthusiastic bot of all, it's even sentient sometimes (You can go over to the Vyxal room to check it out if you want)
 
@AaroneousMiller Oh
@AaroneousMiller What
Incoming Vyxal Bot!
 
8:50 PM
If Vyxal Bot's gonna chat in here, it better be being controlled by a human behind the scenes
 
@cairdcoinheringaahing That human is called Vyxal Bot
 
appears with the flamethrower because reasons
 
@ThomasWard appears with an army because reasons
 
@AlanBagel I'm just putting it up there as a warning, we've had trouble with Vyxal Bot in here before :P
 
> (You can go over to the Vyxal room to check it out if you want)
 
8:52 PM
@AaroneousMiller I did. It's pretty cool
dang i hit enter before i was done typing!
 
specifically, people have moved its messages from the Vyxal room into this room before, which a) isn't allowed because it wasn't relevant and bots aren't allowed here, and b) we already specifically warned against at least once lol.
 
@AlanBagel appears with the Orbital Diamond Strike Array control systems
 
DW tho the bot does not react to anything outside of its operating room, which can only be one of Vyxal or Sandbox
 
you can't beat that one by the way ;)
waves to hn
 
waves back hello there
 
8:53 PM
> the flamethrower
 
@ThomasWard Damn, I got to get me one of those :P
 
@ThomasWard I'm tempted to disagree, but I don't wanna get in trouble :P
 
@ThomasWard appears with a card from 1000 Blank White Cards that counters the Orbital Diamond Strike Array
 
appears with the Anti-Orbital-Strike Diamond Shield Generation Matrix
 
@ThomasWard I'd imagine a number of Stack Exchange employees might disagree :P
 
8:54 PM
puts @Mayube in the toxic singularity that is Reddit
 
ok you've gone too far now :p
 
@cairdcoinheringaahing well, they have the "Orbital SE Erasure Tool" :)
 
All we need now is for Yaakov to show up, nuke us all and leave us with a nice haiku :P
 
but ye Reddit is the evil singularity nobody escapes from xD
 
@cairdcoinheringaahing not the worst way to go
 
8:55 PM
@ThomasWard I escaped from Reddit once. I may have been outside the event horizon, though.
 
@DLosc yeah once you pass the event horizon it's over, you never escape
 
@ThomasWard Jokes on you I was already there
 
and it invades your dreams too at that point xD
 
Guess I'm immune, my dreams are already fully booked with Jelly golfs and mathematical proofs :P
 
lol
@cairdcoinheringaahing well unless you're solving fermat's last theorem... :P
 
9:01 PM
@cairdcoinheringaahing I rarely dream golfs, but when I do, as soon as I wake up I realise they don't work :/
 
I explicitly remember dreaming a golf to my Jelly enigma machine, waking up and it worked first time. I wasn't sure if I should be proud, or if I should stop golfing for a bit :P
 
Both. Probably both.
 
9:18 PM
CMQ: does Adnan join chatrooms?
 
He used to
 
@Mayube ?
 
@Fmbalbuena Can you please post a link to his profile?
 
9:34 PM
@Fmbalbuena The sound actually jumpscared me.
 
@AlanBagel sound?
 
@Fmbalbuena The 'ping' sound.
 
@AlanBagel 😂
 
@Fmbalbuena Did you just emoji a sound that managed to soundly jumpscare me in a sound cause in a profile posting in a soundly managed chat?
 
@AlanBagel 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
 
9:43 PM
@Fmbalbuena while user:Fmbalbuena is laughing emojing: post "@Fmbalbuena Did you just emoji a sound that managed to soundly jumpscare me in a sound cause in a profile posting in a soundly managed chat?"
@Fmbalbuena aight
 
Ha
@ThomasWard appears with the Lengendary Orbital Matrix Non-SE Leisure Erasure Magnifier
 
It's super effective!
 
appears with a ton of antimatter
we're all doomed now >:D
 
10:09 PM
@ThomasWard appears with two tons of antimatter
lol
 
Talk about fighting fire with fire...
 
divides by zero successfully, resulting in the End of Everything
:P
 
10:24 PM
@Adám Ooh, that's approaching Redwolf levels of mathematics abuse...
 
Well, if you don't like it, you can change it: tryapl.org/…
 
Ha! How does that work?
 
⎕DIV is the "division method". One setting preserves that 1=x÷x and one makes sure that e.g. the average of an empty list is 0.
 
interesting
 
For some reason 0 / 0 was 0 in Ash
 
10:38 PM
@RedwolfPrograms that seems normal, given 05ab1e and Vyxal do that
 
Yeah, fair enough
 
was about to ask if there's an idiom for changing a quad variable to execute stuff with it then restore the original value but then i realized i can actually try writing something and wow i actually didn't expect them to not be global
so you can just set `⎕DIV` within a dfn to whichever setting makes more sense there and don't have to worry about that messing anything else up
man
i need to learn apl
 
@RedwolfPrograms Plus I guess it's what let that awesome Math.tanh trick work
 
@RedwolfPrograms And it's actually been useful at least once
 
@UnrelatedString Let me know if you need help.
 
10:40 PM
will do 👍
 
@RedwolfPrograms For some reason 0 / 0 was ♾️ in NLRNIS. Just Kidding.
 
CMQ: What should be the name of an operation that takes a list L and a number N and splits L into N pieces of equal length? E.g. [1,2,3,4,5,6], 3 => [[1,2], [3,4], [5,6]]
 
It's called grouped in Scala
I like chunks myself
 
@DLosc Possible names: chunk, cut, partition, split, divvy…
 
split and partition might be a little ambiguous, and divvy somehow doesn't sound programming-y enough
 
10:49 PM
But what to call the operation that splits into pieces or length N?
 
@Adám I'll quickly check what vyxal calls it
 
@AlanBagel Just don't bring any matter lol
 
ẇ (Chunk Wrap)
Wrap a list in chunks of a certain length / apply a function to every second item of a list
 
@lyxal I think it's something to do with chunks
 
In various APLs, both are simply cases of reshaping.
 
10:50 PM
But it's not a single function, right? You have to get the shape right
 
It is a single function for both.
 
Oh cool, which one one?
 
E.g. in dzaima/APL, the first is 3⍬⍴ and the second is ⍬3⍴
 
Oh, I've never seen used with before. Is that a stand-in for "just pretend I put the right number here"?
 
Yeah, exactly. But specific to dzaima/APL.
 
10:52 PM
Any equivalent in Dyalog?
 
Only in my Extended version. I'm lobbying for it, though.
 
I'm rooting for you :P
 
@Adám it went well btw :p
 
@rues Well, I'm using a negative number as the placeholder (Try it online!) because then you can control what happens if the lengths don't match up. ¯1 discards excess elements, ¯2 would error, and ¯3 would recycle the data to fit.
 
That's probably better, although an enum of some sort would be nicer than numbers
 
10:57 PM
What is an enum?
 
An enumeration (like enum Color { RED, BLUE, GREEN; } (yes, I know that's not all the colors but pretend they are)
They just make intent clearer, although APL doesn't have them and there aren't too many options to memorize here so ¯\_(ツ)_/¯
 
CMQ: Why (A+1) is better than -~A in Python 3? What does do? According to @Lynn
 

« first day (3959 days earlier)      last day (877 days later) »