« first day (4019 days earlier)      last day (824 days later) » 

12:03 AM
@DLosc California -> Oregon -> Washington -> Idaho -> Nevada -> California. Concatenating the names together gives 37 bytes :P
That could be an interesting question actually: what group of 5 states have the longest total name, under the constraint that you must be able to travel from one state to another in the group, and form a cycle where you return the original start?
4
 
12:25 AM
Why this was downvoted?
 
Well, you should probably explain why. It's a very absolute answer, when the correct number to add really could vary considerably. It's also not particularly helpful, as it's a super specific and rather obvious point.
 
But for some reason, new users will do wrong everytime.
 
@cairdcoinheringaahing I'll offer at least an upvote on a post of your choosing if someone can solve this, and a +50 bounty on an answer of your choosing if you can prove your solution is the best
 
Huh. Do you have examples? That is a mistake I made when designing Ash.
@cairdcoinheringaahing Give me 10m
 
12:30 AM
@cairdcoinheringaahing I have 51 - North Carolina -> South Carolina -> Georgia -> Tenessee -> Virginia
 
@cairdcoinheringaahing I've found three different answers that all come in at 52 characters
 
Very nice :P
 
@emanresuA That's 52, isn't it?
 
@taRadvylfsriksushilani I said
 
Ah, because you've misspelled Tennessee
 
Oh.
 
That'd do it :P
 
53 - West Virginia -> Virginia -> North Carolina -> Tennessee -> Kentucky
 
I might post this on Puzzling, tbh
Maybe switch up the number of states involved for novelty
 
12:32 AM
@emanresuA ... That's also 52
 
Oops
 
it seems like it shouldn't be too hard to find the longest loop(s) with some kind of pathfinding algorithm
 
@UnrelatedString Might be a traveling salesman problem in disguise, though
 
I mean, this is definitely a graph-theory based question :P
 
12:35 AM
It's got weights on the nodes rather than the edges, and we're trying to maximize the total rather than minimize it
 
Each node has a weight equal to the state name length, adjacent states are vertices. Find the highest weighted loop of 5 nodes
@DLosc If you take an edge's weight as the sum of the the nodes' weights
 
@cairdcoinheringaahing Oh, good point
 
yeah that should work since it's loops
you'll double-count every node uniformly
 
it'd be the same as doing the loop twice with node weights, yeah
 
The third 52-character solution I found was Massachusetts -> New Hampshire -> Vermont -> New York -> Connecticut
 
12:37 AM
This might be helpful
 
Poor Alaska and Hawaii
 
sad
granted their names are pretty short anyways
 
Hm--does the answer change if we include Canadian provinces too?
(I mean, it wouldn't be the longest loop in 5 states anymore, but whatever)
 
Generalising the problem is very interesting :P n states, allowing more countries, changing location :P
 
I was trying to write a program to solve it but I ran out of memory lol
And I have to go now too :/
 
12:39 AM
Using UK constituencies would be interesting, as we have 600+ and some have stupid long names
 
if this doesn't already have a name, how about travelling knapsack problem :p
 
"Cumbernauld, Kilsyth and Kirkintilloch East" is 38 chars alone
 
LOL
 
12:40 AM
lmao
 
If that borders any constituencies with 15 or more letters, then a solution for n=2 ties n=5 for the states :P
 
Nothing involving the dakotas is long enough
 
Pennsylvania -> New Jersey -> Delaware -> Maryland -> West Virginia is honorable mention at 51 characters, and coincidentally nearly matches the itinerary for a trip I made once
 
I'm beginning to think 52 is optimal
But I know nothing about pathfinding
 
@emanresuA Yeah, Dakotas/Minnesota was my original thought too, but len("Carolina") > len("Dakota")
However, if you include Canada...
Montana -> British Colombia -> Northwest Territory -> Saskatchewan -> North Dakota is a whopping 66 characters
 
12:45 AM
But sticking to the original problem:
- Nothing to the left of new york can do any better than 52
- Anything including both carolinas must include georgia, tenessee and virginia/alabama
- You have to use delaware and maryland if you want pennsylvania and west virginia
 
I wonder if the answer changes if you allow "doubling back" e.g. "New York -> New Jersey -> Connecticut -> Massachusetts -> Vermont -> New York" is allowed, doubling back through NY to get from NJ to Connecticut
 
- Nothing on the west half is >10.2 characters
@cairdcoinheringaahing Possibly
 
@cairdcoinheringaahing Fun fact, this is a journey I did when I was looking at colleges in the US :P
*kinda, we technically went via New Hamshire, but you don't have to for the purposes if this question
 
@emanresuA You don't have to use Delaware, you can also do Kentucky-Virginia-Maryland (it's a bit shorter, tho)
 
@cairdcoinheringaahing 62 - Connecticut -> Massachusetts -> New Hampshire -> Massachusetts -> Rhode Island
 
12:51 AM
@emanresuA You wouldn't count the second Mass there
So doubling back is allowed, but still needs 5 distinct states
 
Replace the first Mass. with New York, probably wait, does that even work?
 
Oh. Replacing it with new york is still longer
ninjad
 
I think allowing doubling back would mean that shorter states with lots of borders would become much more powerful, as you can effectively star-fish
@DLosc Yes, NH -> Mass -> New York -> Mass -> RI
 
Don't forget you need on average >10.6 chars per state
 
Connecticut -> Rhode Island -> Massachusetts -> New Hampshire -> (MA ->) New York
 
12:54 AM
NH is longer than pennsylvania
 
NC -> SC -> NC -> TN -> MS -> TN -> VA -> WV -> VA -> NC gives 68 characters
Wait, that's 6
 
You can essentially cut off half the country
 
So anything west of the Mississippi is useless? :P
 
Think of it in terms of average letter count
 
12:59 AM
Nothing west of missisipi has more than ten letters except the dakotas, which are useless
 
@emanresuA Lol! Somehow I'd never seen that one before.
 
Black Hat is clearly one of those coastal elites who think America's Heartland is "flyover country" :P
 
I've loved the Heartland whenever I've been, because it's stunningly beautiful (and other reasons). But, a) man it's empty, and b) there's basically no cities, and I thrive in cities :P
 
@cairdcoinheringaahing a) You're not wrong, but b) I live in a city :P
 
1:06 AM
@DLosc I know this is rich coming from someone who'se country only has 2, but I only really consider somewhere a "city" if it has >1m people :P
 
I live in a country with 5m people so ¯\_(ツ)_/¯
 
Kansas City has a few thousand people more than Bristol, and Bristol's always felt like a small place to me :P
 
Well, it also depends on how you count "Kansas City." Kansas City proper only has 500,000, but there are a lot of other smaller cities and towns right next to it that are basically part of the same urban area. If you count all those, it's more like 2 million.
But yeah, I'm sure KC would feel a lot different from New York.
 
Salt Lake's greater population is around 2.6 million, and whenever I'm there, yeah, it feels very different from NYC
Before Covid hit, I was actually planning a 49 state roadtrip :P
 
1:28 AM
@emanresuA Do you have 5 cities? :P
> coastal elites
 
@user Come to think of it, that also describes Randall Munroe... Hmm...
 
Hey, stop stereotyping us!
I wanted to come up with some Heartland-related insult but I have no idea what stereotypes are associated with it :(
 
@user I kid, I kid. I don't have anything against east- or west-coasters. :)
@user Cows and cornfields are the usual fare
 
Good, good, so you won't mind when we split America in half, right? :P
 
Hey, if that did happen, the surviving midwesterners could be called middle-coasters!
 
1:34 AM
But you'd have to distinguish between west-middle-coasters, who'd be in the east, and east-middle-coasters, who'd be in the west :P
 
@user I came up with a response for that, but rather than posting it I decided that now's probably a good time to quit with the stereotype jokes X^D
 
So if you live on the eastern most part of a country on its water side, and you prank someone by redirecting them to Never Gonna Give You up, does that make you an east-rick-roller-coaster?
And then if so, can I find you at an amusement park? :p
 
BRB, founding an amusement park called Eastrick
 
@user Yes
Simply swap the west and east halves
 
2:16 AM
Challenge idea: Bugle but it's simplified Vyxal and you can add challenges as well so it doesn't get overoptimised
 
2:38 AM
0
A: List of bounties with no deadline

emanresu A500 rep for answering Morse the New Year in Fugue Because it's fitting.

 
^ And because Fugue's so hard to program in
 
3:14 AM
2
A: Reversed Multiple Pair

DialFrostPython 2, 33 bytes lambda a,b:`a*b`==`(a-1)*b`[::-1] Using the logic that $$ ab = \operatorname{rev}( (a-1)b ) $$ Try it online! Other solutions: Python 2, 33 bytes lambda a,b:`a*b`[::-1]==`(a-1)*b` Using the logic that $$ \operatorname{rev}(ab) = (a-1)b $$ Try it online! Python 2, 34 bytes lam...

i always like these challenges
:)
*had to copy @ovs 's equations tho
i didnt know how to form equations in stackexchange
thx ovs!
 
att
you can also use \$ \$ instead of $$ $$
 
does it change the equation in any way or issit js another wa
way*
 
\$ \$ will be inline
 
oooooh
but i think it nicer on its own :)
hi superbyte
 
3:40 AM
I just wrote a pretty cool esolang
Here's the program to double an inputted number:
s+n[s-]s[n-?+[n-s-]s[o;]]n[-o++]
As you can see it's not going to be an easy esolang to use lol
 
clearly lol
so n and s and o are contextual variables?
 
Yeah
Well, not sure about the "contextual" part, too tired to remember what that word means in this context lol
 
like they're limited by [] scope or something
dunno i'll just see your github
 
@Razetime doesn't look like it - s and n are used outside structures
 
Nope, it's something a lot more interesting. They're global, and there's one variable that has "focus". So n+ puts n in focus, and +s it. So you can do something like n++++, and n stays in focus the whole time so you don't have to keep saying which variable you're referring to
 
3:46 AM
That sounds like add++ with extra steps
 
Oh, does add++ do that?
 
Pretty much
You can set the active variable and everything happens to it
Everything in vanilla mode that is
 
The name of the esolang is In Floop
 
Isn't that what you do with pigs?
 
It also has an infinite array of memory, and you can focus a pointer to an index in it
 
4:15 AM
Introducing In Floop!
It's an idea I'd been thinking about for a while. The only control flow is if blocks, but the program is run in an infinite loop, making control flow possible.
You'd have to use a complicated set of state variables to do any non-trivial stuff like the equivalent of nested loops, but I believe it's possible to do so for any arrangement of normal control flow structures
 
4:35 AM
@taRadvylfsriksushilani it does but not quite the same i think
 
@taRadvylfsriksushilani you're horrible
 
I think this might be my best esolang yet (which isn't saying much)
It's actually going to be nontrivial to figure out if it's TC, I think
 
better than dotcomma? impossible
@taRadvylfsriksushilani looks tc if the variables are unbounded
 
Keep a variable as the tape pointer and it should be transpilable to picofuck
Yep pretty much
Hmm hard to write in though
I'm trying to golf your doubling program
 
floop the red wolf
 
4:50 AM
The logging has some hidden options you can make use of
 
guys
wats the shortest way to find the abs diff between uppercase chars and lowercase chars in a string
helps more if its in python thx
 
You can't not a variable because they're unbound
 
my current code is
s=input()
print(abs(sum(i.isupper()for i in s)-sum(i.islower()for i in s)))
 
@DialFrost difference between what? between their amounts? their charcodes?
 
their amounts
sry
 
4:52 AM
b+a[b-]b[...] is the best substitute for a not I've figured out so far
 
like count basically
 
@taRadvylfsriksushilani That only works once though
Because you're always incrementing b
 
You can put b- in the block
 
Oh true
 
nvrm got it down to 60 bytes
s=input()
print(abs(sum(i.isupper()-i.islower()for i in s)))
 
4:54 AM
ah clever
 
i didnt realise u can do this
how is this possible tho?
 
bools are 1 and 0
in many a lang
so if its upper, itll do 1 - 0 = 1
if its lower, itll be 0 - 1 = -1
 
oooooh
ic
thx jonymster
 
It's quite slow on TIO
'cos logging
 
and the sum of that is the net and blah blah etc yea
 
4:55 AM
:)
 
its a pretty neat golf, i will try to adopt that sort of logic into my brain
 
lol
 
i wonder if theres any way to make it even shorter
by using the fact that one will always be the opposite of the other
unless youre allowing chars that dont have an uppercase/lowercase
does this work?
print(abs(sum(i.isupper()*2-1 for i in s)))
 
hmmmmm
idts
 
i think WWLD is interesting
 
4:58 AM
CMQ or however u say it:output the first letter that is not in alphabetical order
 
@DialFrost what?
 
hm?
 
a b c f h f
output f
well wait
is abcec output e or output c
 
e
wait no c
sry
 
last question: abccb, b or c
 
5:01 AM
b
:)
 
so given a string of letters, output the first letter which appears after a letter in the string which is alphabetically before it
the phrasing there is rough but idk how to fix it gkfjdsg
 
lol
output the first letter that is not alphabetically in order with the rest of the string
so basically once u find a char the acsii value that is lowre (this is for example) then the previous then output that char
cuz its not in oder
order
 
well ill be damned how th hell does that work sheeeeeeee
 
@thejonymyster finally someone of culture.
 
5:05 AM
@DialFrost BQN
 
@DialFrost it relies on the fact that, for letters, whenever isupper is 1, islower will be 0, and vice versa
 
oh
 
so i just need f(1)=1, f(0)=-1
x*2-1 does the trick
hence i.isupper()*2-1
 
@taRadvylfsriksushilani 19 bytes on your doubling program
 
r- isn't needed before o;, so -2
Oh good idea, relying on ? not affecting n
 
5:11 AM
well i gtg rn bai guys
 
@taRadvylfsriksushilani How do you get it to output?
 
It's an async function, so await in_floop(...) should work
 
Ok, thanks
 
Or, if await won't work, .then(console.log)
 
5:14 AM
TIO's archaic JS disallows top-level await
Thanks!
 
so IIRC <center> is deprecated (and i think removed from html5 altogether) in favor of using flexbox with justify-content center?
are tables also deprecated in favor of flexboxes or are they still fine
 
Tables are still fine but I'd only use them for actual tables, rather than any sort of formatting
 
Tables are for tables.
^^
 
ah, aight. yeah in the past i've used tables to align things and
it was always painful lol
 
Back in like, the 90s people would build their entire sites with nested tables lol
I think there was even a name for it, like Table Hell or something
 
5:20 AM
at least 50% of cs professors still do that
(then again their sites were probably built in the 90s)
 
0
A: Add two numbers

emanresu Ain floop, 17 bytes r+o?+n?-[r-]r[o;] Try it online! in floop is a language created by Redwolf Programs which runs in an infinite loop. It's a true tarpit, and incredibly hard to program in. It also has four variables (n, o, r, s), three of which we use here, and a tape. o?+ Take a...

@taRadvylfsriksushilani And/or images
I'll see if I can get it to multiply
 
Wait wait wait...Python's default arguments stay as references the same object across multiple calls?
 
Or for that matter, do hyperoperations
@taRadvylfsriksushilani ... what
 
@taRadvylfsriksushilani that sounds about right
 
I could imagine using that as a really cursed way to keep track of global state
 
5:24 AM
Vyxal has a single global state variable which gets passed between all the functions
(Because python scoping sucks)
 
Sounds like a good opportunity to add lots of pure functions instead
If that'd be possible
 
I just had an idea for doing multiplication in in floop
 
Like, I'd imagine most of the elements don't require any global state aside from the arguments they take from the stack right
 
@taRadvylfsriksushilani yeah, it's something you have to be careful with when submitting on code golf
f=lambda a=[]:... is probably invalid because function submissions need to be reusable
 
5:36 AM
C++ seems incredibly cursed
Maybe more than JS
 
maybe not more
 
The standard library is so big, too
 
but it's close
 
6:07 AM
PHP > JS> C++
 
 
1 hour later…
7:17 AM
I had a dream that I fixed a bug which had been annoying me for ages, and when I woke up I thought it through and realised the fix actually worked, so I dreamt an actual working fix. Unfortunately a few minutes later when I woke up I realised the bug didn't exist in the first place...
 
7:45 AM
@Razetime so php is more cursed than js which is more cursed than c++?
 
@taRadvylfsriksushilani C++ in general is a way too big language
Every time they think of a feature to add, it takes 3 attempts to get it right, and the previous 2 attempts never get removed and the 3rd never gets implemented by compilers
 
oh, C++ should really refactor itself
 
8:03 AM
I suppose the only real good use of C++ is using it to teach uni students about the basics of data structures
 
8:22 AM
Use Haskell for that
Wait actually don’t
 
Not for first year students
And also, C++ allows for teaching of memory management too
 
8:44 AM
Memory management is a pain
Manually allocating memory is a pain, and dynamically allocating it is worse
I have learnt the ways of functional programming
Sort of
let vectorise = func => inner = (left, right) => { ..
 
@lyxal C++ is still widely used though
and C is better at that
I wonder if the Linux kernel will be 100% Rust in the future.
 
CMQ: what should an overload that sets variables do dyadically?
 
set variable [lhs] to rhs?
So then you can have as many variables as you want?
 
Variables don’t work like that, there are no strings.
 
I mean like integer numbered variables
I actually wasn't thinking of strings
 
8:57 AM
Oh. Ok, that works :)
 
@emanresuA what are you doing there?
 
It’s a JS function vectorise that takes a dyadic function and returns a dyadic function that vectorises the first function over lists
 
oh
 
@hyper-neutrino I'd imagine you'd use grids if anything
 
ah, right. i've never actually used grids before to my memory
 
9:03 AM
It’s 4am hyper, go to sleep
 
@emanresuA ERROR: Unknown label sleep
 
Syntax error: what kind pf language treats go to as a single keyword
 
@emanresuA LOLASMGOBRRR
^ that
^ a theoretical assembly
or maybe its just english
 
Assembly is Wednesday
2
Dammit autocorrect
 
9:51 AM
o/
 
@PyGamer0 •BQN evaluates a BQN string
 
ahah
 
{(𝕨×𝕩)=⟜•BQN⌽•Fmt𝕩×𝕨-1} maybe
might be shorterin tacit
 
done
 
10:05 AM
 
wow it ties with apl
@emanresuA that, i have seen that somewhere
 
@PyGamer0 You were saying?
0
A: Reversed Multiple Pair

AdámAPL (Dyalog Unicode), 9 bytes Anonymous tacit infix function, taking \$a\$ as left argument and \$b\$ as right argument. ×≡∘⌽⍥⍕×-⊢ Try it online! (Uses Extended because TIO hasn't updated to 18.0) × [Does] the product ≡∘ match the…  ⌽⍥ reversed, when both are…   ⍕ stringified × product - minus ...

 
10:21 AM
@PyGamer0 APL has and which are significantly better here.
×=·•BQN·⌽·•Fmt×-⊢ is a tacit version
 
@Razetime ×≡⟜⌽○•Fmt×-⊢ would be a direct translation of mine.
 
ah that is better
 
@Adám how does that work?
 
the fun of combinators
 
@PyGamer0 Read the explanation of my APL answer.
 
10:25 AM
BQN primitives page has some graphs explaining them
 
@Adám oh so you convert both to strings
 
Yes.
 
smart
 
CMQ: given a list of integers, XOR the elements 2 by 2
i saw this in codingame.com
 
What does XOR on an integer mean? Isn't XOR only defined on Booleans?
 
10:29 AM
sry i didnt specify
the list only contains 1 and 0's
 
So pair-wise XOR, returning a list that is 1 element shorter?
 
no
 
@Adám i was about to say that BQN is not very golfy
 
u have to continously do this
till therees 1 element left
so 1 0 1 becomes 0
 
Some test cases might help clarify things
 
10:31 AM
0 0 0 0 1 becomes 1
1 1 1 1 1 becomes 1
1 0 1 0 1 1 becomes 0
 
Isn't that just the even/odd-ness of the count of ones, i.e. the parity?
 
ye lol
so u will see ppl doing this
*x,=map(int,input().split())
r=x[0]
for n in x[1:]:r^=n
print(r)
instead of this
 
I think this is just ≠/ in APL.
 
print(0if sum(map(int,input().split()))%2<1else 1)
python3 btw^
i think im right unless i accidentally flipped the 0 and 1
 
@DialFrost either ƒ꘍ or ∑∷ in Vyxal
The first is reduce by xor, the second is the party of the sum of the list
 
10:35 AM
is XOR‽
 
^ is xor yes
 
@Adám Bitwise xor
 
lxyal how do u understand vxyal tho
 
he kind of made it
and yeah wait why is xor
 
its js like that
 
10:36 AM
like i guess it visually resembles ^
 
Because ^ is bitwise xor in python, and ^ reverses stack
 
but it also suggests and
 
꘍ is a Vai comma!
 
@UnrelatedString there's a bigger symbol for and:
 
wonderful
 
10:38 AM
So Vyxal has ^ as 3 distinct built-ins. Uh...
 
i can steal ꘍ for flax
 
@Adám and they all do different things
 
I don't think Vyxal will ever become popular as a handwritten notation.
 
vyxal is a golflang, not meant for handwritten notation
 
@Adám Well luckily that's not my goal then :p
Besides, as if you'd use stack mechanics as handwritten notation
 
10:42 AM
True. APL is used handwritten, and though it has both and ^ they do the same, except in regex.
 
In golfing languages though, commands doing the same thing aren't that useful
 
^ (hey look i used ^)
CMQ: What grouping builtins are useful for golflangs?
 

« first day (4019 days earlier)      last day (824 days later) »