« first day (3798 days earlier)      last day (37 days later) » 

12:00 AM
@DLosc Python has default args, so I don't think you'll need to special-case anything if you default the second arg to infinity (but then I guess you won't use the single-arg variety anyway?)
 
@hyper-neutrino Make it camel case and you've got yourself a proper Java name
 
not enough design patterns
 
inclusiveRangeIfRightArgIsNotInfinityAndRangeToInfinityOtherwise
 
@Bubbler Right, that's my point: I'm always calling it with two args.
 
How about from_to_or_inf
 
12:01 AM
@user ...Factory :P
 
or simply from_to, which reads like "from a to b" and "from a to infinity"
 
class InclusiveRangeIfRightArgIsNotInfinityAndRangeToInfinityOtherwiseBuilder {
  InclusiveRangeIfRightArgIsNotInfinityAndRangeToInfinityOtherwiseBuilderWithLeftArg withLeftArgThatIsNotInfinity(LeftArg arg) {...}
}

class InclusiveRangeIfRightArgIsNotInfinityAndRangeToInfinityOtherwiseBuilderWithLeftArg {
  InclusiveRangeIfRightArgIsNotInfinityAndRangeToInfinityOtherwise withRightArgThatMayOrMayNotBeInfinity(RightArg arg) {...}
}
 
Or go for some metaprogramming and support writing from_(a).to(b)
 
@Bubbler Yeah, the or_inf part would be unneeded IMO. I was hoping for a name that had range in it somewhere, but maybe there isn't a good way to do that.
@Bubbler Ah, now there's an approach! X^D
@user AUGH MY EYES
 
If you really want the word range, you can do range_from_to I guess
 
12:05 AM
@DLosc That's not totally accurate - a real program would have overloading and some BuilderFactories and more :P
Or maybe an infix method foo range_to bar?
 
@user A what now? ^_^
 
@user Scala overdose?
 
I guess if it's Python, it'd have to be foo.range_to(bar)
@Bubbler Impossible, I can never get enough Scala :P
 
Deciding between range_from_to and just incl_range.
 
Not sure if we can patch int to do that, but I think this should do the job:
class From(object):
    def __init__(self, n): self.n = n
    def to(self, m): return my_func(self.n, m)
From(3).to(inf)
From(3).to(5)
 
12:13 AM
I'm like 98% positive that code breaks several Python style guidelines. :D
 
:P
 
0
Q: Is it a checkered tiling?

BubblerBackground A checkered tiling of a rectangular grid is a tiling using some polyominoes, where each region can be colored either black or white so that no two polyominoes sharing an edge has the same color. In graph-theoretic terms, the chromatic number of the adjacency graph is 2. Terminology ada...

 
I do wish Python handled infinity better. I mean, it's there, it's a valid floating point value, it compares properly... but the only way to generate it (AFAIK) is float('inf'). Any attempt to do 1/0, even if it's 1.0/0.0, just raises an error.
 
Aww, you can't add extension methods to ints in Python
 
@user Nope. :(
 
12:19 AM
@DLosc A golfy infinity is 1e999
 
@NewPosts is it sufficient to check if the graph has no odd-length cycles?
or is that not how this works
 
I get why adding stuff to built-in classes is disallowed, but still, it would be really cool if you could.
@Bubbler Huh, TIL
@hyper-neutrino I think so
Though intuitively, it seems like in this particular case, it's sufficient to check for 3-cycles. I don't have a proof yet, but I'm not sure how a greater-than-3 odd cycle could be possible without a 3-cycle also existing.
 
Hint: I have a hint to give out to you guys, but I'll keep it secret until someone finds out :P
 
@DLosc good point
 
CMC: Given a list of integers, count how many repeated elements there are. For example, [1,2,2,3,3,3] -> 3 (one 2, two 3s)
I have 4 bytes in Jelly, but I think 3 is possible (haven't tested the one I have in mind)
 
12:35 AM
@Bubbler TIL Infinity=1e999 :P
 
APL, 5: +/1-≠
 
Nub-sieve, flip, sum?
 
@cairdcoinheringaahing Scala: x=>x.size-x.toSet.size
@cairdcoinheringaahing Same as your Jelly solution?
 
The 4 byte one, yes
 
@cairdcoinheringaahing Yes
Can the integers be negative?
 
12:37 AM
(Well, I have 2 4 byters. One counts zeros, the other is flip and sum)
 
or zero?
 
@cairdcoinheringaahing Why is it 4 and not 3 bytes? I thought since they were all monads, it'd just be a 1-1-1 chain
 
@user Nub sieve is two bytes
@Bubbler why?
 
Oh, that's too bad
 
@cairdcoinheringaahing Pip, 7 bytes: #g-#UQg
 
12:38 AM
@cairdcoinheringaahing Because this
 
Yeah, ŒQCS works for 4
@Bubbler Ooh, that's clever
Because I like general solutions, I'll say that yes the input will be any integer, but brownie points for that
 
@Bubbler What does that do?
 
@cairdcoinheringaahing One day, everyone's going to redeem all the brownie points you gave them, and you're going to have to do a lot of baking :P
 
I have ĠẈ’S
 
@DLosc "Return a Boolean array with 1s at the indices in z" and sum it
 
12:41 AM
@user That's fine, I like baking :P
If we ever have a CGCC user meet up, I'll bring brownies
 
œ-QL also for 4
 
Yeah, so many fours
 
@Bubbler Oh, so that's "count unique elements," not "count repeated elements."
 
Aww, my suspected 3 byter doesn't work: Try it online!
 
@cairdcoinheringaahing I personally like my brownies served raw, not baked >:)
 
12:42 AM
not sure why Lƙ’S doesn't
 
NGL, I refuse to touch ƙ with a 10 foot pole
 
What's so bad about it?
 
@user If you don't kill the fae, they'll steal your soul
@user miles coded it, didn't explain it to anyone then proceeded to use it in crazy ways to save bytes
 
lol
@cairdcoinheringaahing Aye, and replace your young with changelings
Luckily, I have no such weaknesses
 
12:45 AM
There's 2 ways I can figure out what a builtin does in Jelly: see it in action or read the source code. ƙ never makes sense when used in code (I mean that, it's a dyadic monad), and the source code is stupid dense
IIRC Dennis doesn't even know what it does
There's a function in the Jelly source code (split_key I think) that is only used for this builtin, except the name doesn't fit with the quick description, and I have tried to read the source code to understand what it does and failed
Chat, I hate you
 
Uh, so the two byter was wrong anyway
 
def split_key(control, data):
	groups = {}
	order = []
	count = 0
	for key, item in zip(control, data):
		key = repr(key) if type(key) == list else key
		if key not in groups:
			order.append(key)
			groups[key] = []
		groups[key].append(item)
		count += 1
	result = [groups[key] for key in order]
	if count < len(data):
		result.append(data[count:])
	return result
@Bubbler Yeah, DLosc pointed that out :(
	'ƙ': attrdict(
		condition = lambda links: links and links[0].arity,
		quicklink = lambda links, outmost_links, index: [attrdict(
			arity = 2,
			call = lambda x, y: [monadic_link(links[0], g) for g in split_key(iterable(x, make_digits = True), iterable(y, make_digits = True))]
		)]
	),
That's the source code for ƙ, if anyone can decipher that, hats off to you
 
quad diamond is confusing me :c
 
@hyper-neutrino Starting with ({⊂⍵}⌺2 2)something should help you out
 
@hyper-neutrino Ah, your mistake there was using APL :P
 
12:54 AM
(with ]boxing on)
 
Stick to a respectable tacit language like Jelly :P
 
@Bubbler i used that to visualize it but then when i try to use ({∪⍵}⌺2 2) i don't exactly get what it's even doing :p
 
Can't be dealing with a language that doesn't even have an "is prime?" builtin :P
 
@hyper-neutrino there is a 2x2 matrix. on a matrix gives you unique rows, not unique elements, so you need ∪,⍵ for the challenge
 
@Bubbler that then gives four matrices so i'm still confused how it's working
 
12:56 AM
@hyper-neutrino Code?
 
@cairdcoinheringaahing Okay, so split_key takes a list of keys and a list of values. It pairs each key with a value. Then for each key, it finds all the values associated with that key, puts them in a list, and returns a list of those lists.
 
({∪,⍵}⌺2 2)
 
And what's the input?
 
@hyper-neutrino What did you do with this review task? It says "Reviewed" but I don't see any activity by you?
 
upvotes
@Bubbler oh - full code is ({∪,⍵}⌺2 2) 5 5 ⍴ 0 0 0 1 2 0 3 3 2 2 4 5 3 2 6 4 4 7 6 6 4 4 7 7 7
 
@DLosc But then how does ƙ work from that? It looks like it maps the provided monad over each list but tio.run/##y0rNyan8///QzmMz////H22oY6RjrGOiYxoLYYNxLAA
Wait, is it "map monad f over the groups formed by grouping y by x"?
 
wait, k-hook always produces a dyad? o.O
 
Yeah, I think you've got the lists backwards. TIO
 
1:02 AM
i feel like this conversation happens every month or two but we're more shocked each time
 
That makes me even more annoyed tbh
 
wait that's what that is
i thought it ran on the lists of indices ._.
 
Lol
 
1:03 AM
Jelly needs a "group by" quick, but that got implemented as <link>¹ƙ$ instead of having a proper quick
 
in Jelly, Sep 10 '17 at 18:44, by miles
the quick transforms a monad into a dyad that groups the rhs based on the lhs, and applies the monad to each group
yep
 
@cairdcoinheringaahing w...what?
 
In which case, miles sucks at writing docs:
 
@lyxal The groups don't have to be consecutive.
 
1:04 AM
it maps over groups, period
 
> Key. Map a link over the groups formed by identical items.
 
except they're thr groups of the uh
which argument
 
i just copy pasted the thing explaining them
and i already forgot
 
@UnrelatedString It's own values
 
1:05 AM
in this case it's the same because left and right are the same
 
Basically, when provided one list, each element maps to itself as a key. Therefore, it's equivalent to just grouping the equal elements
 
@hyper-neutrino ({⊂∪,⍵}⌺2 2) 5 5 ⍴ 0 0 0 1 2 0 3 3 2 2 4 5 3 2 6 4 4 7 6 6 4 4 7 7 7 for better visualization
 
@UnrelatedString But it doesnt
 
oh yeah that quote is wrong in some way isn't it
 
1:06 AM
@Bubbler oh ._. lol thanks
 
The quick doesn't do anything to the monad. It groups the left based on the right, then maps the monad over them
 
No, that's the same thing the explanation says.
 
doesn't it group the right by the left?
 
1:07 AM
Honestly, if ¹ƙ was just implemented as an atom, that'd make more sense
 
¹ƙ` specifically, or am I misunderstanding
wait yeah i'm misunderstanding
 
It's not like Jelly is particularly short of unassigned dyadic atom characters
 
yeah, from my uh... now top voted answer *sigh*
 
:pensive:
 
1:08 AM
@hyper-neutrino I love that you didn't even know how it worked :P
 
@UnrelatedString So it's similar to x f⌸ y in APL, but with less information (in that the key isn't passed into f)
 
Despite that being documented UB that we've discussed multiple times in JHT before :P
 
@cairdcoinheringaahing yeah, I was writing up a whole explanation for the entire link and how it coincidentally worked out and then I got your message that "it's just cuz u breaks everything lol"
 
looks like the last time we talked about this we determined it's based on a j adverb, so that j adverb was probably lifted from that
 
@UnrelatedString miles full on said he copied the J adverb
 
1:10 AM
lol i'm dumb, I was using ≡ instead of ≢ like i meant to ._.
 
@hyper-neutrino Interestingly, it doesn't work in my fork :P
;€ is one of the most common digraphs in Jelly answers, so I assign that to u (unify), so the chain is broken as the h in hurt, and the y then errors
 
ah :p
@Bubbler got -4 bytes though you could probably do better; thanks for the tips and help :D
 
@cairdcoinheringaahing I'll give you the count of unique elements AND the count of repeated elements, in four bytes: Try it online! ;)
 
@DLosc Sorcery! Burn the witch :P
If ¹ƙ was (e.g.) h, then that'd be 5 bytes (assuming the quick didn't exist), solely because of chaining :/
 
1:28 AM
Anyway, to circle back to something said a while ago: I agree that split_key is not a descriptive name. Maybe group_by_keys would be better.
CMQ: I'm making a regex-based language. Should I number the capture groups starting at 1 (like most regex flavors) or at 0 (taking advantage of an extra number that's unused)? Note that I don't think this language will need the ability to refer to the full match, which is what other regex flavors use capture group 0 for.
 
the primary reason i typically like 1-indexing in golfing languages is so that "not found" is falsy - not sure though if this is a golfing language or not, and also how much sense either would make in a primarily regex lang
 
Yeah, there's no concept of found/not-found; these are basically just backreferences like in the regex (.)\1* that finds runs of repeated characters.
Its golfiness is rather like Retina's: not exactly optimized for golf, but the syntax will probably be fairly terse because regex syntax is fairly terse.
 
1:43 AM
hm.. I still feel like being able to refer to the whole match will be somewhat helpful maybe so my personal recommendation would be to just keep it at 1-indexing and use 0 for the full group. but I don't know much about regex and specifically using it for golfing anyway ¯\_(ツ)_/¯
 
The reason why referring to the whole match isn't likely to be useful is that this is a regex-match generation language (see my CMC from yesterday). You can't refer back to the full match while you're still generating the match. Now, it might become useful if I add some multi-stage functionality in the future... not sure.
I guess I'll leave it at 1, 2, 3. Extra golfiness if there are more than 9 groups isn't worth the surprise of having groups numbered differently from other flavors.
 
Honestly, we could do with a reflex based language that is heavily optimised towards golf
*regex
 
you're having some fun spelling that i see :p
 
I hate mobile
 
@cairdcoinheringaahing I'm working on some ideas there too, although it's not specifically regex based but more like a golfier version of V.
 
1:51 AM
It'd probably involve writing your own regex engine to properly handle a lot of it, so it'd be a lot of work
 
well you could start with things like using a full codepage and overloading some characters that you probably won't need otherwise
like \d could be one byte :p just as a basic example
 
It is true that I don't really understand the arcane powers of .NET regex, so a regex-based language invented by me would likely not be as good as one invented by someone like Martin Ender.
 
Hello everyone
 
o/
 
2:16 AM
CMC: Find the "reverse regex" of (...)(\1|(...))\3 without using (?!...), or prove that it is impossible. A "reverse regex" Y of a regex X is the one that satisfies "a string x matches X iff the reverse of x matches Y". A match here is a full match (^...$ is implied).
 
Isn't that regex equivalent to .*(...)\1, or am I missing something?
Oh... Is the ... supposed to represent something specific?
 
Scrap it, didn't realize it can backtrack
 
I know we have a golf for programs you can only run once, but is it a bad idea to suggest one that can run only twice? Then you have to find a way of determining if it's been ran before, instead of just a program that deletes itself
 
that sounds interesting for me. It's definitely different.
 
2:32 AM
@SlamJammington there are a lot of ways of determining
Which would not often be very interesting
 
Kekw, just heard an ad on the radio for a "better" WiFi modem, and that using the faster internet would lead to "no more blue screens of death".
Like, even without the internet my stuff still gonna crash horribly. Stupid idiots in advertising.
 
lol tf
 
Netgear ad
 
> The United States of America has experienced a moral decline in recent years, straying from its Puritan values as a Christian nation and has become a modern day Sodom and Gomorrah. The nonsense of Gen Zers on Tik Tok, to the terrible finale of GOT, to the election of President Kardashian to the oval office, all share a common link: alcohol.
 
3:01 AM
@lyxal Mmm, sounds like a threat
Use our Intertubes if you don’t want an...accident to happen to your precious blue-screened laptop
@hyper-neutrino WB né’ er disappoints
 
3:17 AM
Oops
 
@NewPosts Indonesian gambling spam
 
hmm I got beaten to it by quite a bit, wasn't looking at my browser
i don't think it's spammy enough that i'll force spam nuke it tho. seems like someone asking an actual question that happens to belong nowhere on SE but since they don't advertise a product i don't think it fits SE's (IMO too limited) definition of "spam"
 
4:12 AM
SE chat rate-limiting is really annoying
when i try to send like three messages within like 6 seconds
it makes me wait like 5 seconds half the time (and this edit made me wait 7 seconds)
 
What is chat rate limiting
 
It is what you get if you hit 1<enter>2<enter>3<enter> quickly
 
@wasif it's actually annoying, and means that the message doesn't send until a cool down period is finished
 
I see
@Bubbler nice explanation
 
chat rate limiting obviously makes sense but it's kind of annoying when i try to send a bunch of copy-pasted messages that i wrote up to send together without getting interrupted (multiline messages hide text which i sometimes don't want)
kinda wish mods got nerfed/no rate limit; i only really send long chains of messages because of moderation tasks. but i guess that might be seen as unfair xd
 
4:37 AM
CMC: Make a 8BIT Computer on a breadboard and send me a picture.
 
@PyGamer0 that's too broad for a CMC
 
what about a 2 bit computer in Minecraft
 
define "computer"
3
 
 
1 hour later…
5:46 AM
the room is quiet!
 
No need to talk when you have nothing to talk about
 
imagine talking and not just lurking here like me
 
'Course, it's just been crazy the last dozen times I've checked in
 
@PyGamer0 i made one but my school's education edition subscription expired
 
When did the renewed activity start?
There was a long while where it was pretty dead
 
5:50 AM
And Vyxal is alive!
 
#democracy
 
More or less last summer. Does anyone have a sense of when it became so popular again?
 
November, then maybe april
 
Was active in November, and then again in April?
As I remember, this summer the room was just in a state of anti-freeze
 
is it not just the start of summer right now
 
5:55 AM
Ouch. How time flies
I meant last summer...
I'm now realizing what a waste of a year this has been...
 
insert 2020 on drugs quote here
and the drugs period is still going I guess
 
@AviFS sometimes silence is good
 
Be at peace...
 
RIP TNB
 
6:18 AM
CMQ: Is log base a of b useful?
in code golfing
 
natural log?
 
i don't actually think i've used log much in golfing
it's one of those things you could get away with using a digraph for
 
overload it onto a dyad
 
6:23 AM
already done
 
implemented it as mL and ml
 
oh
i thought you meant overload its arity somehow lol
 
no silly, I meant by types
 
6:25 AM
@lyxal how often do you find youself using ß in Vyxal
 
@PyGamer0 Enough to justify its existance
 
@PyGamer0 of course
add ln as a seperate builtin too
 
6:50 AM
By the by, how's Dennis? Has anyone heard from him?
 
@AviFS No, so nobody knows.
 
You mean because he hasn't been active in TIO either?
 
I think he has been inactive online.
 
Hello!
 
Hi!
 
6:55 AM
Recently the Mathematica certificate/license broke and someone mentioned it and it got fixed pretty quickly - so I believe Dennis is still well enough to keep TIO functioning as it always has but we haven't heard anything from him directly unfortunately
 
Glad to hear that, but sorry to hear the other. I hope his health is recovering
 
If a+b×i is a "Gaussian integer" when a and b are integers, why isn't a+b×i a "Gaussian number" when a and b are non-integer reals?
 
@wasif done
 
> The ring of Gaussian integers was introduced by Carl Friedrich Gauss
I think it means complex numbers were known before that, or Gauss was not interested in non-integral complex numbers
(quote from Wikipedia on Gaussian integer)
 
I wrote a note in TIO.chat as he was recently on, if others would like to sign!
 
7:08 AM
@Bubbler So there are no other names for imaginary and complex numbers than "imaginary numbers" and "complex numbers"?
 
Just with something like '~ Name', if you'd like to, small gestures can sometimes make a world of a difference!
 
@AviFS I understand your good intentions but to be completely honest I would probably advise against that - Dennis's mention of his health was over a year ago, and the community has already wished him well (to which he's responded) and intermittently people hope Dennis is doing well.
I can't speak for Dennis, but I'd personally rather not have a health condition repeatedly brought up (it's a sensitive topic so I don't know how any other person would take that, of course), and I'd certainly not rather someone draw attention to it that much.
Also, I typically (and would advise others to) reserve pinging Dennis only for major or significant issues that require his attention as soon as he is able to provide it, like one time TIO entirely became unusable, which he fixed quite quickly.
 
Agreed, and I think Dennis would prefer if you didn't message him the second you see he's online. Let him return if and when he wants to, at his own pace.
 
@Adám I think so. Wikipedia says that the name "imaginary number" was introduced by Descartes, so I guess there's no reason to have another name for that. It doesn't say much about "complex numbers" though
 
@AviFS how to sign there
 
7:16 AM
7 mins ago, by AviFS
Just with something like '~ Name', if you'd like to, small gestures can sometimes make a world of a difference!
 
just write ~ then my username?
 
That was my idea, yeah
 
ok
 
(Still writing my response to your guys' statements from before.)
 
Hi!
It's been a while since I checked in here
How're things?
 
7:18 AM
\o
not bad
 
○/
could be worse
 
@RedwolfPrograms o/
 
Did I miss BMG or is it tomorrow (I'll miss it either way)
 
Pretty typical, I don't recall anything exploding here recently.
BMG is in 17 hours
 
@RedwolfPrograms no you didn't miss
 
7:19 AM
I see you changed your pfp
 
@RedwolfPrograms yeah
 
Are the bots running on my instance or HN's?
 
both, but yours aren't posting
 
@hyper-neutrino I see your point, that makes a lot of sense. I suppose we'd all want differently, and such interpersonal things are often vary greatly from one person to another. Personally, occasional notes of appreciation, and being reminded that I'm enthusiastically welcomed really help. Especially as I often find it hard to hold on to, and start to build my own mental barriers about everyone being mad and it being shameful if I showed up, which it sounded like he might also struggle with.
It’s definitely tricky though, and I totally see your point. Such things can definitely backfire and only heighten a sense of guilt, shame & pressure. I guess I really was just doing what I’d like done for me. I’ll certainly keep your guys’ perspectives in mind and refrain from doing so again any time soon, barring any new thoughts on the matter.
 
Both instances repond to status pings, oddly
I'm so stupid
5
I used setTimeout instead of setInterval, so the keepalive stuff for the socket that watches for new posts would only run once
 
7:25 AM
Which meanie starred that! :<
 
@RedwolfPrograms congratulations
 
Okay, should be fine now.
 
@RedwolfPrograms no, you're Redwolf
 
alright, my instance is off now
 
Sorry for all the weird issues with the bots, my current implementation is a complete mess, once I get back I'm going to reimplement it with my library and harden it a lot better so it's more reliable
 
7:30 AM
well, setTimeout would have worked if you include a setTimeout call in the handler itself, but :/
 
It'd still be less reliable though because an error in the function would prevent future iterations
 
You can technically put setTimeout at the first line
 
That's true
I wonder how that's handled for async functions
Just did a tiny bit of testing, that would behave more similarly to setInterval with async functions, whereas putting the setTimeout at the end would guarantee the function finishes before the next one runs
 
Putting at the start also guarantees that the current function finishes before the next one
There's no context switching in JS, so each scheduled job always runs to completion
 
7:46 AM
For async functions that's not really true
For normal ones there's no difference yeah
 
@RedwolfPrograms For async functions, the task is swapped out on await until it is ready to continue, but each "section" between awaits is still guaranteed to run in one go
 
Of course, yeah
 
@RedwolfPrograms how is it living in yesterday?
 
Just four days until I'm home
 
So I take it y'aint enjoying it
 
7:56 AM
The food here is either ridiculously overpriced, an hour away, or you can't get a reservation for a week. Almost every meal has been granola bars.
 
Oof
When covid is over, you should try coming over hear for a holiday
Be cool if you did
 

« first day (3798 days earlier)      last day (37 days later) »