« first day (3795 days earlier)      last day (1040 days later) » 
00:00 - 15:0015:00 - 00:00

3:00 PM
ikr
 
I think the approach should be ±infinity where logical and NaN definitely never, so I'd go 1 for 0/0
 
@hyper-neutrino Try it online!
 
okay. so i/0=inf as well?
 
@Adám the rare abbreviated Adám message!
 
i can store complex infinity technically
 
3:01 PM
well maybe go for complex infinity then
Python has (inf+0j), which is uh interesting
it also has infj
 
@pxeger How is that different from inf?
 
Vyxal gives 0/0=0
 
@Adám it's stored as a complex instead of a float
 
@Razetime J gives 0 too.
 
@Adám its .imag is still the number 0
 
3:02 PM
@pxeger Oh yes, I always forget that other languages (than APL) don't have the principle that a number is a number.
 
@hyper-neutrino jelly gives (nan+infj)
 
that's uhh also very weird
 
@pxeger Agreed. NaN is evil.
 
I know zero golflangs other than jelly which have imaginary numbers
 
they're surprisingly uncommonly used I've found
 
3:04 PM
But for some tasks, they excel.
 
I don't think Excel has complex numbers
 
they work wonders on some geometry, ascii-art and fractal questions
05AB1E gives 0/0=0
 
tbf Adám you walked right into that one
 
so we have 3 langs which give 0, 1 which gives 0 or 1, 2 which give NaN
 
J gives 0 too.
 
3:06 PM
yup that's in the 3
 
Oops.
You think ⎕IO and ⎕DIV are bad? Look what NARS2000 has!
 
Crystal gives (-NaN + Infinityi)
the -NaN in that is very weird
 
@Adám i don't think they're bad, they're just extra options, which are also very funny
 
@Razetime In Vyxal, ∆P returns complex numbers
 
oh that's pretty sick
 
3:13 PM
complex numbers are really good for coordinate manipulation
i use it a lot in AOC
but tbh golfing languages often have better ways of doing said coordinate related tasks with the coordinates themselves and converting from/to complex numbers isn't even great
wolfram alpha says 1/0, -1/0, inf/0 are all complex infinity
 
@hyper-neutrino The only complex number conversions you can do in Vyxal is converting to Int by returning the real part.
 
conjugate would probably be a decent addition
 
3:38 PM
@Bubbler Oh, nice, I'm looking forward to that
 
3:49 PM
@Adám Having choices is nice, but wow that's a weird way to implement it
 
CMC: O(n) version of [a.index(x) for x in range(len(a))]
(i.e., reverse a bijection [0,n) <=> [0,n))
 
def f(a):
	g=[0]*len(a)
	for i,x in enumerate(a):g[x]=i
	return g
 
yup, that's what I had
to the letter lol actually I didn't call it g
 
Ninja'd nvm
 
invalid I/O ಠ_ಠ
 
3:54 PM
ah, much less Pythonic shorter :p
 
actually g=a[:] works too
 
@hyper-neutrino uh no?
 
@hyper-neutrino Back in my day, we broke the standard loopholes every day. You youngins have too many silly rules these days
 
@pxeger why not
 
crone voice Back in my day, we had to walk uphill both ways just to write a variable declaration
@hyper-neutrino that just copies the list, no?
 
3:57 PM
yes, but every element gets overwritten
 
That's exactly what HN wants
 
oh to initialise the array right
yes ok
 
yeah
lambda a:(lambda g:[[g.__setitem__(x,i)for i,x in enumerate(a)],g][1])(a[:]) works too but it's longer
 
can probably be shorter with :=
 
Disgusting.
(I meant HN's code initially, but walruses are disgusting too)
 
3:59 PM
@hyper-neutrino lambda a:[g:=a[:],[g.__setitem__(x,i)for i,x in enumerate(a)],g][2] is also 67
 
for a truly functional program not abusing setitem
lambda a:(lambda f:f(f))(lambda f:lambda g,x,i=0:i<len(x)and f(f)(g[:x[i]]+[i]+g[x[i]+1:],x,i+1)or g)(a,a[:])
 
For some definition of functional :P
 
although this is no longer linear
at which point you may as well just do [a.index(x)for x in range(len(a))] because it's quadratic i think
due to list slicing
 
@hyper-neutrino this is no longer linear — every functional programmer ever
 
4:03 PM
@pxeger That implies they could have a solution that's as good as O(n^2) :P
 
lol
 
what's a reasonable behavior for a range built-in on strings?
 
@hyper-neutrino Are your strings "atomic" or actually character arrays?
 
A range builtin on characters could give all characters up to that, and a string could be the vectorized version of that
 
range built-in as in (on integers) "produce the list [0,n]" (or similar range)?
 
4:05 PM
they are character sequences but some built-ins behave uniquely when the sequence is finite and every element is a character (i.e. it's a "string")
@pxeger well i'll have [1, z], [0, z], [1, z), and [0, z)
(and similar behavior i consider reasonable for complex numbers too)
 
Why not just use flags to choose which behavior you want for each occurrence of the range function? :P
 
@hyper-neutrino So does it take one or two arguments?
 
@user well i'm going to have flags to alter implicit range behavior but i'm gonna have a builtin for each :p
@Adám just one, although i'll have dyad range builtins too and i'll need to decide what to do with those
but i might get some ideas if i decide how to do monad range on string
 
@hyper-neutrino Try it online!
 
Oh, cool. I think that / something similar makes sense. thanks
i'll probably vectorize that instead of implicitly taking cartesian product
 
4:27 PM
@hyper-neutrino attempt to parse as integer and construct range upto that? And if not integer, construct infinite range? Or empty list?
 
4:47 PM
hello!
 
\o
 
○/
 
interesting, ive been somewhat active on the site since a few months, and i havent sent a single message here
 
@EliteDaMyth That doesn't sound right. This room is very active.
 
well now that i've found it
i guess i'll be more active here
 
4:52 PM
CMC: find the user with the highest reputation on CGCC who has not sent a single message in TNB
 
Ever?
 
Arnauld?
 
Anders I believe
@Adám Arnauld chats here from time to time
 
Oh.
 
4:54 PM
most recently June 9th
 
I don't believe ZaMoC has ever been in chat
 
nimi?
 
The only one I'm uncertain about above Anders is Emigna, but I think they have
@Adám nimi used to be fairly active way back when
 
SE chat search is broken.
 
4:57 PM
emigna talked here in 2019
 
What about Anders?
 
Jun 3 '17 at 22:09, by isaacg
@AndersKaseorg Check out this answer https://codegolf.stackexchange.com/a/124454/20080
 
most recently 2017
 
Everyone above me in rep I know to have talked here, I'm not sure about Joe Z (think he has), edc65, DavidC or alephalpha
Past them, ZaMoC is the only 20k+ user I'm unsure about
 
Mar 31 '16 at 21:57, by edc65
http://codegolf.stackexchange.com/posts/76591/revisions
 
5:00 PM
Jan 1st 2017 by Joe Z
Mar 31 2016 by edc65
how do y'all get the chat profile for a user
 
@hyper-neutrino ninja'd :P
 
DavidC then.
 
@hyper-neutrino Apparently mods have a shortcut
 
do you just either search for them in this room's search bar or search for their user in the user list on chat homepage or smth
@cairdcoinheringaahing yeah the dashboard just gives me a link to the chat profile directly :p
 
Much cheat. Very mod. Wow.
 
5:01 PM
in 2021 Science Fiction & Fantasy Stack Exchange Moderator Election Chat, yesterday, by SQB
Hey, how does one go from a stack user profile to the related chat profile? Is there a path?
 
the SFF election seems relatively tame so far which is good to see :P
at least from what i can tell
 
Aside from b_jonas having no idea who to vote for
And user931
 
553 voters so far according to constituent
ofc I don't know much about the candidates or the site but from what I know, there are several candidates who'd all be good for the spot so it seems like it'd be hard to decide who to put first
 
Yeah, I could reorder my top 4 in any order and be happy
 
5:48 PM
Wow, the SciFi chat theme is terrible
 
agreed
 
6:21 PM
@EsolangingFruit U+FE0E
 
0
Q: Print this text in Scala

userPrint the following text and nothing else: <html> <body> <p>HTML is kinda annoying</p> </body> </html> I'm happy I'm not a web developer. The catch? Your code must fit the template: print(<?>), where ? can be any group of characters. You can paste your completed code (with the print(<>...

 
Did anyone attempt my CMC?
 
What was it?
 
@user implement a linear time solution for the fractional knapsack problem
 
6:37 PM
Your CMC's are often rather difficult :P
Sounds like you could post a proper challenge involving that
 
ngn
@Anush can you give some sample inputs and outputs?
@user this one is easy. the "fractional knapsack problem" is not really a knapsack problem
2
 
@ngn sure. I can't today but will soon
@user this one is no harder than randomised median finding and easier than quicksort :)
I find it odd that there are no implementations online so we should fill the gap!
 
Wot is a cmc?
 
@ngn ¯\_(ツ)_/¯ Anything with the word "problem" in its name seems hard to me :P
@EliteDaMyth Chat Mini Challenge
36
Q: What are our specific abbreviations and terms?

AdámNewcomers to codegolf.SE are often compelled to ask what many of our abbreviations and terms mean. Let us list them here so this information always will be easily available. Return to FAQ index

 
interesting
is there a way to search for these
 
6:47 PM
Ctrl+F :P
 
Wont work for unloaded messages, i guess the search thing on top right is better
 
Oh, I thought you meant you wanted to search for abbreviations, not CMCs
 
ngn
instead of "cmc:" why don't we start writing just "challenge:"? "chat" is clear from context, "m" could mean anything from mini to mega, the only meaningful part is the second "c". it would be easier for newcomers to understand it if it's just "challenge:"
 
Good idea, although it goes against the spirit of code golf :P
 
@user oh no, im not that dumb
 
6:50 PM
@ngn that's not as golfy
 
ngn
"c:" then? :)
 
lol
that'd actually not be a bad idea though - we spend more bytes explaining what a CMC is than we would save typing CMC instead. I guess it's just become part of this room's culture / people do it by habit lol
but yeah, like using challenge:, question:, poll:, etc. makes just as much sense ¯\_(ツ)_/¯
 
For backwards compatibility and easier searching, I propose we use the format "CMC Mini Challenge: Write some short code to make me a milkshake"
 
Chat Mini CMC Macro Challenge: Make a milkshake using code
 
6:55 PM
vote to vtc to close as underspecified
 
@hyper-neutrino I vtc your message as overspecified.
 
@Adám You mean you want to migrate it to Code CR Review? :P
@hyper-neutrino Turn that frown upside down
 
):
or :(
 
smh my head it's :(
 
6:58 PM
depends on your axis of orientation
 
ngn
depends on your PoV of view
 
@hyper-neutrino For ): to be the upside down form of :(, your laptop would have to be tilted 90 degrees counter-clockwise o.O
 
or clockwise
in fact arguably clockwise is more correct if you consider the correct and the upside-down orientation of a face
 
Oh right, I could've just said that instead of typing 8 more letters
@hyper-neutrino You Americans never consider the rest of the world, do you?
Haven't you ever met someone from Australia?
 
> american
 
7:02 PM
CMC Mini Challenge: Given a string consisting of three space-separated words, Replace the first word with the initialism for the three words. E.g. Point of ViewPoV of View and Chat Mini ChallengeCMC Mini Challenge and laughing out loudlol out loud
 
You're from one of the Americas, aren't you?
@Adám You were ninja'd by caird yesterday
 
 
ngn
@Adám 17 in k9
 
@user canada is in NA, yes
 
Geography Quiz: Name a country that spans North America and Europe, but the majority of the land mass is in North America.
 
ngn
7:05 PM
denmark?
 
@Adám Greenland?
 
Yup.
 
Which one?
 
That one.
 
7:06 PM
@user Javascript, 621 bytes
 
Very helpful.
 
greenland is part of denmark
 
regpack for the win
 
greenland is the land mass in NA, denmark is the country, so technically denmark is a more correct answer, but both make sense
 
@EliteDaMyth That's a nice milkshake
Did you make it yourself?
 
7:06 PM
@hyper-neutrino not quite
 
@hyper-neutrino Oh
 
> Greenland is an autonomous territory[11] within the Kingdom of Denmark
 
@user no, i googled ascii art milkshake
 
@hyper-neutrino yes
 
@hyper-neutrino Oh, TIL
 
7:08 PM
They have quite a lot of food from Greenland in Danish shops ( think fish)
 
They probably have more Danish food in Greenlandic shops.
Geography Quiz: Approximate length of land border between France and the Netherlands.
 
Approximately 1 millimeter
 
Nope, that's wrong. Answering the right order of magnitude is fine, but you're way off.
 
ngn
is it something in south america?
 
¯\_(ツ)_/¯ You said approximate :P
Hmm, the Wikipedia page doesn't seem to provide any clues
 
7:13 PM
@user Nope, no clues, just the plain-text answer.
 
TIL both "Dennis the Menace" and "Dennis the Menace" first appeared on March 12, 1951
 
@ngn No.
@Neil Both‽
 
@Adám I'd guess like 100 miles. Probably more but IDK French and Danish colonies
 
@Peilonrayz Danish?
 
Netherlands, the land of the Danes
 
7:14 PM
@Adám yeah, there's a syndicated comic strip in the U.S. with that name, and it's the name of a comic strip which appears in the Beano
 
Oh.
 
sorry, I should say "The Beano"
 
@Peilonrayz Uh, you got that wrong. The Netherlands is the land of the Dutch, and Denmark is the land of the Danes.
 
@Adám Oops D:
 
People also confuse Switzerland and Sweden because the demonyms are Swiss and Swedish.
 
7:17 PM
be glad you made that mistake here and not in TL; the, like, 10 dutch mods online at any time would instantly obliterate you xD
 
I should have remembered Dutch, not like one of my co-mods is Dutch or anything... nope D:
 
I don't think so. I'm sure they're used to the confusion, just like the Danes are.
@Peilonrayz It says on your profile that you live in the United Kingdom. That means you're native American speaker, right?
 
Yeah, we speak American over here ;)
 
Where in the UK, if you don't mind? (I'm in NE London.)
 
I used to be N of London but now I'm S of London.
 
7:33 PM
idea I just had to extend the codepage of a language: you have 512 commands, and can rotate the codepage based on the first byte
 
That's an interesting idea, if you could separate the built-ins into, say, mathematical and text-processing groups.
A lot of general-purpose built-ins might be universally needed, though.
 
that is true
and if you wanted to go further, two bytes could probably specify a ton of different patterns to encode with
 
ngn
@Adám caribbean?
 
@ngn Yes.
 
ngn
Saint Martin (French: Saint-Martin; Dutch: Sint Maarten) is an island in the northeast Caribbean Sea, approximately 300 km (190 mi) east of Puerto Rico. The 87-square-kilometre (34 sq mi) island is divided roughly 60:40 between the French Republic (53 km2, 20 sq mi) and the Kingdom of the Netherlands (34 km2, 13 sq mi), but the two parts are roughly equal in population. The division dates to 1648. The southern Dutch part comprises Sint Maarten and is one of four constituent countries that form the Kingdom of the Netherlands. The northern French part comprises the Collectivity of Saint Martin and...
 
7:41 PM
Correct.
 
7:57 PM
0
Q: Tips for Code Golfing in Desmos

Aiden ChowDesmos is mainly used as an online graphing calculator, but its graphical and mathematical functionalities can also be applied in certain coding challenges. I know not that many people use Desmos on this site, but for the people that do, what are some tips for golfing in Desmos? As usual, please ...

 
finally
 
I feel like there are at least three different conversations going on here at once.
 
Here: I'll draw a line under them all so we can be coherent again:
 
Also,
> halp my CODEZ DON"T WORK!!!! plz send teh codez quik!
 
here ar ur codez
Yoo spik bad English, spik lolcod ensted
 
 
1 hour later…
9:23 PM
why no use lolcode fur gulfing
 
10:09 PM
posted on June 20, 2021 by Quintec

In Google Docs, the word count tool looks like this: Pages would not make sense, but y...

 
how do you exponentiate complex numbers / arbitrary decimals? since i'm using JS and representing numbers with a custom format (since unlike Python it doesn't have built-in imaginary numbers) i can't just throw a ** in
 
De Moivre's theorem would probably be helpful
ಠ_ಠ stupid mobile
 
oh yeah that looks helpful, i'll take a look thanks
 
The best part is that it shows normally in the transcript when viewed on mobile
@cairdcoinheringaahing ^
 
se chat go brr
 
11:21 PM
@lyxal But it doesn't onebox
 
0
Q: Can you give me half? (No digits)

Eliseo D'AnnunzioThe task is to provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, double, etc), not as a string. The catch, the characters 0 through to 9 cannot be used. This is not a golfing challenge, this is a popularit...

 
@NewPosts This is unlikely to be interesting in any language imo
 
@lyxal And it doesn't work either when you enter mobile mode on desktop (Chrome)
 
@NewPosts oof, popcon with nothing to work towards except "creativity"
 
yeah, I strongly feel like this challenge isn't particularly interesting but... ¯\_(ツ)_/¯ not gonna vote on it
 
11:31 PM
Technically speaking, it is well-formed, but agreed, not interesting.
 
@Adám oof, i was going to do the exact same Raku answer, thought i don't think you technically need the say part
 
What do I put in Header/Footer to avoid it?
 
uhh, put the say in the header i guess?
 
Hm, but then again, it isn't CG.
 
i think the trivial answer in python is just to do smth like len(" ")/len(" ") but that's boring
 
11:39 PM
@NewPosts I'm going to win this one in the category for "cutest submission"!
 
Honestly, I can't think of any way to get 0.5 that isn't just dividing one number by its double. Everything else is just needlessly convoluted
The only room for creativity here is getting 1 and 2 (or 2/4, or whatever), and even those aren't especially creative
 
Anyone knows how to make Brachylog solve x÷x=x+x?
 
@NewPosts . also works in yuno, totally not because the literal system is entirely just a carbon-copy of jelly :P
 
@Adám doesn't Brachylog only deal with integers? i don't think i've ever seen an answer using fractions
 
Oh, I didn't know.
 
11:52 PM
sorry, i meant like how the searching part does 0,1,-1,2,-2 from my memory
 
Oh.
 
00:00 - 15:0015:00 - 00:00

« first day (3795 days earlier)      last day (1040 days later) »