« first day (4823 days earlier)      last day (44 days later) » 

12:57 AM
@noodleman And the distance between Pittsburgh and Philadelphia is several times bigger than the distance between Philadelphia and New York, so the commute would be way worse for Pittsburgh
 
oh wow
i mean to be fair when i say "not easy" i don't mean that the commute itself is that hard —it's bad, but reasonable. just doing it every day would be insane
 
1:14 AM
> personal experience
Are you your dad? :p
 
...
yk what i mean
 
@user noodle things I guess. You never really know which noodle has been cut from what
It's too complicated to explain over chat
I recommend looking into noodle dynamics next time you go to the communal limb library
Furthest aisle left, third shelf, second row
I ordered a few copies to investigate stealing noodle limbs
Much more complicated than I thought
 
1:37 AM
@lyxal don't think i'm not on to you
 
2:06 AM
@lyxal there is a communal limb library?!!
 
@zoomlogo yeah. Next time you enter the lobby, take the first exit on the right
 
@lyxal alright
 
Can't miss it
 
2:20 AM
@Seggan I kinda thought so too, but no, the longest serving presidents other than FDR just served two terms.
 
TST's unfreezing tomorrow I guess
I'm not lyxal, but we probably want to at least:
- compare TNB message density of the last three weeks to TNB and TNB+TST message density of the three weeks before (and maybe see if other rooms were affected)
- Do a general poll on how people feel about how it's changed TNB's atmosphere
 
I kinda want to see how often conversations were interrupted during this period (vs before) and how often there were multiple conversations going on at once, but that would be a lot of work. Anyone else feel like doing it? I can give you a +50 bounty
 
I've been planning a meta post asking for discussion of results
Haven't actually written it yet
 
Gosh, I haven't been to the questions page on the main site for so long. I only ever go there when someone posts a link to a post nowadays
 
But been thinking about what it'll ask
 
2:31 AM
:thumbs_up:
(sidebar: I love thumbs ups so much. It's so versatile as an emoji reaction, and it works great in real life too (although I guess versatile -> ambiguous sometimes))
 
Trying to look at individual conversations is tricky and there might be a bit of inherent bias based on what whoever's doing the analysis wants to show
Probably best to go with just plain stats
(oh also maybe starred messages)
 
Good point
 
1694 messages in here from when TST was frozen, until now
Also I definitely didn't almost accidentally move three weeks of conversation to the bakery don't know what you're talking about
1067 in the three-week period before
479 in TST in that time, 479+1067=1546 which is a difference of maybe one extended conversation
Also, 18 starred recently vs 13 + 10 = 23 in the three weeks before, idk if the +10 is comparable
 
Personally I'll be focusing less on stats and more on whether TNB is still enjoyable for the majority without tst
Because the main point of the experiment was to see if TNB is too unruly without the sand trap
or whether it's plausible to have just one room with more moderation if needed
That's how the meta post is worded
(the original one)
And I'll be asking whether having everything back in here was an enjoyable experience
Like did people enjoy having updates about general life stuff, were there times went people felt like a conversation should have been moved but felt they couldn't say so, etc
 
3:02 AM
A machine has a tape and no state, can read a slice of n bits of the tape. What's smallest n to make it Turing complete?
 
3:25 AM
how does the rest of it work
like is the n-bit slice fixed relative to a notional head like in a normal tm, where that single head position controls the only cell it can write to, and can only move one cell left or right at a time?
 
can only move 1 cell(bit) per time
 
i feel like for n=3 that should have a relatively straightforward construction from normal tms where you interleave tape symbols that are reserved for corresponding to states
but i'm too tired to get all the details straight lmao
might need some extra bit in those state symbols to make the bidirectionality work
...oh, if tape cells can only store one bit
that's
pretty wild
oh boy
 
If each cell contain k states then slicewidth=2 should be enough
Preserve state L on left part and R on right part of tape head
 
3:46 AM
ooh, yeah, i guess if you encode state into both parts it does get around that one-sided blindness
 
 
6 hours later…
9:32 AM
Idea: WebSocket-like HTTP server using 103 Early Hints
Why is almost everyone on CGCC in the US?
 
Because that's half the english speaking internet
Lots of australians too for some reason
 
I don’t think there are that many (active) US people in Maths.SE
(Evaluation is based on timezone)
 
This site is small enough the difference might just be because chance
 
Oh
That makes a lot of sense
Pass me the common sense injection, please.
 
9:55 AM
@TheEmptyStringPhotographer Isn't this just long polling with extra steps?
Or is there some advantage I'm missing
 
Reminder: I'm a South Korean.
 
@DannyuNDos Epic
 
10:31 AM
@TheEmptyStringPhotographer is it because people who are active at the same time as you are are more likely to be in a nearby time zone?
 
10:46 AM
@Neil Well na then
(yes)
 
 
1 hour later…
11:56 AM
@DannyuNDos Just make sure not to go north, and you’ll be fine.
@mousetail With long polling I think you can only get one response per request
You could send the 103 code, maybe sneak the message in an attribute and tell it to load the same URL it just sent a request to.
> An invalid keyword and an empty string will be handled as the anonymous keyword.
(from crossorigin attribute article)
I could set the crossorigin property to the message
But then there would be issues if the message was exactly equal to use-credentials.
 
12:55 PM
survey question suggestions very much welcome
After that, I'm thinking next steps is, if it's determined that the freeze experiment was "successful" (e.g. received well, had good impacts on TNB), looking into freezing TST permanently.
and then investigating ways to prevent noise concerns that don't involve making a dedicated off-topic chat room :p
 
1:51 PM
the responses to the survey have to be posted as answers under the meta post?
 
yes, that's the intention
 
 
1 hour later…
2:53 PM
SearchOrCMC Given some 2D points, check if it's all Pareto frontier, aka. no point has two axis both above or equal another same point
 
3:12 PM
1 10 range { take dup 3 % "" "Fizz" switchpush dup 5 % "" "Buzz" switchpush + dup length nonzero cdrop keeplast } map
cooking rn
 
3:35 PM
Rename this room to The First Ever Byte
What if I used an alt account to star my messages?
 
@Ginger wait what are you taking from
or is take not, like, first N items of list
 
:3c
you'll see
 
is it taking from the input? or itself?
 
take from the parent stack
 
oh so take pushes N items? does it push them as a list, or direct
 
3:49 PM
@Ginger is the parent stack readonly or read-write?
 
what's a switchpush? t-flip-flop?
 
@noodleman if, i think
a b c -- a ? c : b
 
- all stacks are read-write
- functions have their own stack
- take pops one item from the parent stack and pushes it to this stack
- take at the top level reads an item as input
- switchpush pops three items, and pushes the second if the first is truthy else the third
I have written (in Kotlin) a parser for this language
soon to be an interpreter
why? for fun :p
 
@Ginger also i feel like in this language [N, "Fizz", "Buzz", "FizzBuzz"][N%3+2*(N%5)] is probably shorter
 
perhaps
no lists though :p
 
3:53 PM
ah that would be an issue
 
why? didn't want to implement them
 
#goals
 
no way to bind functions to names either; the only datatypes are strings, double-precision floats, and functions
 
can you do recursion?
 
yes
 
3:55 PM
do you have to dup the function from inside itself with a take or smth
 
self pushes the current function to the stack (and errors if used at the top level)
{ self call } call recurses forever
 
nested functions allowed?
 
yes
the parser can handle arbitrarily nested functions
 
so its sorta like if golfscript was unfinished :p
and didn't use symbols for function names
 
yes :b
 
3:57 PM
btw you don't have to do real parsing to add functions
wait no
typo
to add lists*
 
yeah, it wouldn't be too hard
but I want to see how much I can do without them
 
just define a function [ that stores the current stack depth somewhere and ] that pushes everything from that up to the top
 
this is not intended to be a golfing language; in fact I originally conceived it as a calculator
hence the name: PCL, Primitive Calculator Language
 
@Ginger well idk if that's worth it since you already have strings (can you add a string to a number to convert it to ascii or smth?)
 
@Ginger well, what's a programming language if not a fancy calculator?
 
3:59 PM
good point
 
true
 
@noodleman yeah you're right
strings-as-lists :p
"strings" are really just lists of bytes anyway
(or, well, lists of chars because JVM)
 
i think the best way to do strings, lists, and numbers is to have separate "char" and "number" datatypes and just do lists of those
 
strings-as-lists-of-characters is definitely the easiest way to have strings
 
I could do that
but then again I could not
 
4:00 PM
@RubenVerg it also just works better
 
I already have this cool parser which can read string literals though...
 
@noodleman well, sometimes you want strings to act as scalars
 
char + num = add ascii, char - num = subtract ascii, char - char = ascii difference
@RubenVerg you can always add a box datatype or something
 
so the three datatypes are actually double-precision floats, arrays of 16-bit integers, and functions d:
 
apl traditionally represents strings as vectors (and matrices) of characters and it's a somewhat common "extra feature" dialects add to have a scalar string datatype
@noodleman yeah, the flat APL way
 
4:02 PM
yes
 
@Ginger do you plan string functions to be unicode-aware?
 
@Ginger can you stringify functions, or add them together or something for composition?
call on a string could be eval.. evil imp emoji
 
@RubenVerg they will probably just map directly to Kotlin's string utilities
@noodleman there will be metaprogramming like this, but idk the details yet
 
golfscript does all this super well
 
@Ginger ah, so "🦕" length is 2?
 
4:04 PM
honestly golfscript is a really good language if you ignore a couple bugs and weird behaviours
 
ki-shell 0.5.2/1.7.0
type :h for help
[0] "🦕".length
res0: Int = 2
[1]
yes
 
sad ): just because the JVM does something wrong doesn't mean you have to do it wrong too
 
akshually ☝ Kotlin technically does that of its own volition, since it's multiplatform
 
does java predate utf32?
 
the glorious JVM architects thought "nobody will ever need anything outside the BMP"
 
4:06 PM
if it was before other planes existed i guess the choice makes sense, but if it's after it's just weird
 
@Ginger JS inherits that behavior from java, does kotlin also run on some other platform
 
the methods in Character make unicode not a very very big pain (just a mildly big pain)
 
@RubenVerg probably, java's really ol
 
@noodleman native
and Android, and iOS, and WASM
 
utf32 is 2001, java is 1995
@Ginger is that separate from the JVM?
 
4:09 PM
ki-shell 0.5.2/1.7.0
type :h for help
[0] "🦕".codePoints().count()
res0: Long = 1
[1]
I could do this ig
@noodleman yes, it's native q:
 
@Ginger ah, something where kotlin is better than scala! afaik in scala you have to do a loop with codePointAt/Character.charCount
@Ginger you should, i think
it's weird for a 2024 language to do utf16
 
@RubenVerg to be fair I did have to take ten minutes to figure out exactly how to do that
since you can't easily convert Java streams to Kotlin lists
 
oh, codePoints is a java thing?
 
unclear, let me check
it returns an IntStream
 
ah yeah it looks like it's a java 9 thing
 
4:13 PM
oh wait kotlin.text has codePointCount
 
cool, didn't know that, will probably make my code much cleaner in the future (though i'm not sure how you convert a java stream to a scala iterable)
 
the only praclang i know really well is typescript, should i write a compiler in that or should i learn golang or something?
 
k o t l i n
join us
 
is kotlin fast enough?
 
it's pretty fast
 
4:15 PM
faster than typescript probably
 
the only reason i wouldn't want to use TS is because it's so slow
i don't need it to be super fast, which is why i was thinking go
 
there's no real speed difference between JVM!Kotlin and Java
 
kotlin would be nice because you can run it in the browser without wasm shenanigans
 
obviously i have to recommend scala here – i personally found it really easy to learn and it's very versatile
 
@noodleman that too
 
4:16 PM
plus, it runs in the browser too!
(like kotlin, of course)
 
is kotlin FP or OOP?
 
yes
 
ik scala is mostly FP but has a bit of both right?
 
Kotlin, IMO, does OOP pretty well
data class and object my beloved
 
@noodleman scala is "better at FP than Java and better at OOP than Java" (i think this quote is from a scala book)
you can do only oop or only fp and it's good for either purpose
or you can mix them if you want
@Ginger i hate that scala calls records "case classes"
 
4:17 PM
i only use OOP in TS if i'm writing something where context has to get passed around everywhere
 
it's because you use them in match/case but eh it's a bad name
@noodleman join the state monad side
 
@RubenVerg Kotlin can automatically generate TS typedefs; Scala cannot (at least not easily)
which would have been a super nice feature for Vyxal
 
i don't know FP that well but i do want to learn it better...
the closest to FP i know is uiua
which is really close but doesn't have first class functions
 
@Ginger scalably typed?
oh sorry you mean the opposite
 
@Ginger tbf this is an experimental feature, but it's there
Kotlin's single biggest downside for me is effectively being IntelliJ or nothing
the vscode LSP is... bad
 
4:20 PM
how's scala in vscode?
 
it works well enough to use, but there's no javadocs (among other things) and it likes to explode if you make lots of changes really fast
 
good
 
@noodleman really good
Scala has an official vscode plugin
which has only rarely misbehaved for me
 
honestly that's probably enough for me to just use it because i don't feel like changing my setup that much and dealing with intellij
 
@Ginger yeah, i wanted to learn kotlin but my laptop isn't powerful enough to run idea and going through the tutorials without a good editor was annoying
 
4:21 PM
that is my single least favorite thing about Kotlin
JetBrains' stubborn refusal to make a vscode plugin
 
(my pc is more powerful but i can't bring it around, of course, and i like to develop while outside)
@Ginger conflict of interest, of course
 
yup
 
@Ginger it's not just stubbornness, mostly just a profit goal
 
I have ranted at length before about how heavily JetBrains promotes IntelliJ in the Kotlin docs
 
i was considering using Uiua for the compiler but i decided against it just because i don't feel like dealing with stack shenanigans the whole way through
 
4:23 PM
i don't know uiua but is it viable for large projects?
 
not everyone has the patience to deal with the Kotlin community language server, unfortunately
 
@RubenVerg probably, but i don't think any really big ones exist at the moment
somebody made a JSON parser but that's the biggest one i know of lol
i was working on making a CLI library but i haven't finished it yet
 
you reminded me of how the scala plugin for idea has features locked behind Ultimate
i get that it's made by intellij so they still want to push Ultimate but on a plugin??
(i also don't understand why they don't ship it with base idea, but i guess it's just to push kotlin more)
or is kotlin also a plugin?
 
Kotlin is a plugin too iirc
 
@RubenVerg maybe partly also to reduce memory usage and startup time?
 
4:31 PM
I think it's actually open-source, but doesn't work outside of IntelliJ
> The Kotlin AST has a built-in repair API, which seems to be how IntelliJ works, but as far as I can tell this API does not work if the surrounding IntelliJ machinery is not present.
 
4:46 PM
completely unrelatedly: i think a major power of stack-based programming that i think golfing languages have largely missed is that functions can have multiple outputs
 
agreed
 
of course they all use it to an extent (e.g. flip, over) but i haven't seen it used fully
i only realized this after using uiua and wanting to add multi-output functions to my language and realizing i basically couldn't without adding a stack
 
5:18 PM
I'm so confused
I just woke up but I never fell asleep
I'm fully clothed, my laptop is flattened face down on the floor, and my bio notebook was on top of me like a blanket
 
relateable
 
5:56 PM
@noodleman Scala has a language server, Metals, that can be used in VS Code or any other editor/IDE that supports the LSP (e.g. Vim, Helix)
@Ginger How did they even set it up that way?
Does it check which classes exist at runtime?
Because that can be faked pretty easily
@Ginger fwiw, there's this plugin, but it's for SBT :(
It should be a compiler plugin instead
 
@noodleman divmod?
 
@RubenVerg Yeah, the fact that there's an actual top type and everything's treated as an object instead of there being primitives is great. Also, companions > static
Wish I hadn't missed that discussion :(
 
0
Q: Output a 1-2-3 sequence

TbwFor the purposes of this challenge, a 1-2-3 sequence is an infinite sequence of increasing positive integers such that for any positive integer \$n\$, exactly one of \$n, 2n,\$ and \$3n\$ appears in the sequence. There exist multiple such sequences, so any one will suffice. Your challenge is to ...

 
I really need to make some irl friends who are into the same things as I am so I can monologue at them and they can monologue at me about how amazing Scala is and how awful Python is and whatnot
 
@Neil usually returns a tuple iirc
 
6:07 PM
I think part of why Vyxal prefers single outputs is that if an element is given a specific arity, we assume it has 1 return value. If you want to say that an element has any number of outputs, you need to not give it an arity, but that also means it could have any number of inputs, which makes it a bit more annoying
I do think Factor takes advantage of this though. A lot of the function signatures (stack effects?) I saw in the docs when I was trying it had multiple outputs
Oh your point was literally that golflangs have missed out on it, sorry
 
6:30 PM
tbf having multiple outputs makes it harder to deal with them if you don’t have a few combinators
vyxal has the one where you call two functions on the same values
does it have the version where you have one function you call on different values?
@user (forgot to reply to your original message)
uiua calls those modifiers i mentioned “fork” and “both”
 
@NewPosts this is interesting
 
6:51 PM
I can't prove it, but a simple filter method seems to work
(start with a list of all integers, for each integer remove its double and triple from the list)
wait duh that's obvious
my brain isn't braining right now
 
7:06 PM
@mathscat oookay, I'm pretty sure I did this, so the trivial algorithm will (probably) work
wonder if there's a shorter alg
 
7:37 PM
@mathscat my thought was to do the even numbers with the powers of two removed, but i can’t tell if that’s valid
 
@noodleman doesn't work, 10 and 20 are both in the list
 
d’oh
and 6 and 12
maybe A133653?
no
 
huh why did the two answers get removed?
 
they were wrong
@mathscat you lied to us
 
:(
 
7:47 PM
this produces the Hati numbers (oeis.org/A036668) but that contains both 4 and 6
 
ah I realize the mistake in my wanky thought of process ... I completely ignored the not more than one restriction for numbers not in the list
 
Tbw
I will say that there is at least one 1-2-3 sequence on the OEIS.
 
ok a greedy algorithm doesn't work at all because it doesn't take any of 6,12,18
 
ooooh one sec
@mathscat how about this, but also remove the 4x an 9x?
yes it's a 10pm idea but it might work
 
att
8:06 PM
one way to get a set of terms is to start with 2*(product of primes>3) and keep all integers obtainable from *12, *2/9
 
@mathscat that'd be oeis.org/A339746 ?
 
att
wait nvm
 
my idea:
For a number n in the list, remove 2n and 3n. At least the double of 3n and the triple of 2n appears in the list, 6n. Remove 4n and 9n from the list.
pretty simple, I think it works
Initially I just thought 4n and 9n would get removed by the process, but uh for most cases they won't.
 
I think that fails because none of 706,1412,2118 occurs
it seems to work for the oeis but your algorithm doesn't match it
 
@pxeger huh explain pls
 
Tbw
8:17 PM
@mathscat I'm pretty sure this gives 2118.
 
nvm my code wasn't running high enough
it did seem weird that it would fail for 706 specifically lol
 
@mathscat yeah that looks like it gives the list I was working on, which is if n is in the list, then so is 6n, 8n and 27n, plus all numbers coprime to 6 are in the list
 
att
oh that generates the sequence i was thinking about
 
Tbw
@mathscat Yeah, this isn't a full proof that n -> 6n but it still works
 
just curious, what am I missing?
 
Tbw
8:23 PM
n -> not 2n, 3n, so either we have 4n and 9n, or just 6n, but if we have 4n and 9n, then we don't have 12n or 18n, which is a contradiction.
There's also a very nice visual proof of this
if you make a grid
 
att
draw a multiplication table with powers of 2/3
 
Tbw
yep
 
@mathscat unless you're planning on posting a Python answer, can I update mine with your fix?
 
@Neil nice, your answer seems to match up with how the sequence is defined
 
Tbw
@att then every L shaped tile has exactly 1 in the sequence
 
8:26 PM
@pxeger sure lol I'm just happy I could figure out a challenge on my own
 
att
yep
 
 
1 hour later…
9:50 PM
@NewPosts I'm curious now: Do 1-2-3-5-7-11... sequences exist, i.e. for all k in N exactly one of {pk: p prime} is in the sequence?
Also such a sequence, if it existed, would have a density of 0 in N?
 
10:25 PM
@noodleman well the problem with this is that the representation of such functions costs bytes
And when you're golfing, every byte matters
Single output functions cover 99.9% of use cases and are the most convenient
So it makes sense to have them as the default
Meaning you'd need extra bytes to indicate a function should return multiple things
And if you need multiple return values in golf there's a pretty good chance there's a better way of doing things
 
 
1 hour later…
11:41 PM
@lyxal why? admittedly i’m not quite up to speed with all the vyxal syntax but why can’t that be inferred?
also i’m mainly referring to built-in functions, why would those require having extra bytes?
well actually re. inference idk if that’s possible in vyxal because it’s not a particularly safe language right?
 
@noodleman well how do you specify a function returns multiple things?
 
in uiua you don’t have to it’s just inferred
e.g. it knows that fork + * takes two arguments and returns two
 
Because fork is defined as returning two
@noodleman well built-in functions typically only need to return one thing
@noodleman also, the number of things returned doesn't seem to be inferred
It's assumed to be 1 if not specified
 
well fork adds the signatures of the used functions but yeah
 
Only the number of things taken is inferred
 
11:49 PM
both are
 
> The second number is optional. If it is not given, it is assumed to be 1.
 
fork’s functions don’t have to have one output each
that’s just a syntax element
the |x instead of |x.1 is sugar
 
@noodleman Is that not what you mean by multiple return?
 
you only need the explicit signature for recursive functions
 
I don't think I get what you mean by multiple outputs then
 
11:59 PM
@lyxal i mean that a function can leave more than one value on the stack
 

« first day (4823 days earlier)      last day (44 days later) »