1:16 AM
0

Given array X, decide if there is real number x, s.t. X[i]=floor(x*i). True cases: (1-index) [1,2,3,4,5] [1,2,3,5,6] [0,0,0,1,1] [1,3,5] False cases: [1,3,5,8] [3,5] Duplicate?

2:08 AM
Why en.wikipedia.org/wiki/Six-bit_character_code and en.wikipedia.org/wiki/BCD_(character_encoding) generally don't support newline? Is it not designed for printing file or do they fill spaces?
Seems no, computer and typewriter was two thing
@lyxal I wonder how this interacts with TW2
Does it repeatedly reduce scale?
2:28 AM
@Ginger its literally just deleting the stuff you dont want?
@Ginger step() always returns control to the host program
2:50 AM
@RydwolfPrograms is this nominative determinism
3:06 AM
@Seggan but like I'd rather it not be loaded by default

2 hours later…
5:00 AM
0

Sorting with a deque code-golf decision-problem sorting data-structures You're given an array of positive integers. Your job is to sort them using an initially empty deque (double-ended queue) by the following procedure: Take a number from the front of the array, and push it into one of the two ...

5:53 AM
Me: Time to finally start saving for college!
The universe:
> The ultimate gift for the closest friend. Get your bestie this awesome Kiss the boy and make them die shirt! Get ready for a good time with this Kiss the boy and make them die shirt. It’s the perfect shirt for your next party.
It's amazing
It eats so hard
6:24 AM
8

Given a set of bit vectors \$A\$ and a binary matrix \$M\$, we can define the set \$MA = \{ Mx : x \in A \}\$, where \$M x \$ is the result of the matrix multiplication of \$M \$ by \$x \$ over \$\mathbb{F}_2\$, the field with two elements. Given the set \$A \$ and the set \$M A \$, your tas...

6:35 AM
Guys, it's over
WikiHow thinks I'm toxic
Dang right I'm not
I'm lyxal

2 hours later…
9:00 AM
i'm this close to attempting to solve the Reuleaux Polygon challenge in bash and losing my mind over it
probably not the best idea to do this in a language with no graphics support and that only has integers
9:58 AM
0

Three up to 4242 & sum to 9999 fastest-code (flexibly) Output 3 random numbers such that: They are from 1 to 4242 They add to 9999 Each possibility is equally likely to be outputted Sandbox stuff How do I handle languages who can't do randomness This was a mistake I have no idea how fastest-co...

10:38 AM
Is OEIS down?
10:48 AM
Nope?

2 hours later…
1:15 PM
@Themoonisacheese ppm files?
1:49 PM
i was thinking ascii art
but then i realized most of the time and bytes would be spent on rendering and gave up
2:30 PM
> opens meta post and sees net -4
"they've done something with licensing again haven't they"
hey, it could have been worse
like actually worse :p
"What happens if an asteroid hits one of your data centres and the other centre is flooded by a subsequent tsunami? A third party host was a nice safeguard [...]" lmfao
Jul 7 at 0:06, by lyxal
@Ginger to be determined :p
now you know one of those things that was to be determined
@Ginger kinda sorta
> The CC BY-SA license is unchanged.
it's more that the dumps are being moved to be hosted on SE rather than archive.org
+ you need to click a box saying you won't use it for commercial use
@Seggan wdym?
3:14 PM
@RydwolfPrograms a lot of the questions do feel kinda... polarized
(that being said it gave me a no :P)

2 hours later…
4:49 PM
@Seggan hi yes I have an idea for doing the thing I want to do
I want to implement native functions that have the ability to put the calling coroutine into an "awaiting" state, and can resume it with a result or error at a later time
if another coroutine tries to step an awaiting coroutine it just won't do anything
this way if you have a coroutine scheduler that runs multiple coroutines in parallel it won't be blocked by an awaiting one and can do other things
5:25 PM
@Ginger if you run your metis program using step() it always performs exactly one step
and if step() returns YIELDED that means whatever just executed was a coroutine that yielded
@Ginger just return StepResult.YIELDED
5:45 PM
@Seggan that is. not how I thought it worked :p
I thought that was only returned if the topmost coroutine yielded
nope
step() always executes one and only one bytecode operation
ah
@Seggan so what would the logic look like for doing what I described
something like this
_intrinsics["await"] = object : CallableValue {
override var metatable: Value.Table? by MutableLazy {
Value.Table(mutableMapOf("__str__".metisValue() to oneArgFunction { "await".metisValue() }))
}
override val arity = Arity.ZERO
override fun call(nargs: Int): CallableValue.Executor = object : CallableValue.Executor {
private var awaiting = false // Somehow control this variable externally
override fun step(state: State): StepResult {
i.e. yield until a flag is set
(also the awaiting = false should be awaiting = true)
6:10 PM
I intend to use kotlinx.coroutines in the mod, so I'll attach it to a future or something
ngl it's a bit hard to wrap my head around how metis works internally
the core intent of metis is to be able to stop it at any time (bar badly-written native functions)
6:50 PM
@Seggan is there a mechanism for serializing the state of a program :3c
I like the idea of an OS with coroutines as processes, but the implementation is proving to be tricky to conceptualize
example: in CC keyboard input is handled by the global event system and a shell has to propagate events to its children
this feels janky though
and I want peripherals to have their own methods for polling for events
so how does the child coroutine of a shell read keyboard input in this design, if the shell is supposed to control the peripherals
in CC os.pullEvent() works everywhere because it yields to the parent coroutine and expects to be resumed once an event's happened, and the shell program knows to do that
but if peripherals have their own methods for reading events, one coroutine has to handle peripherals itself and dispatch events... somehow
I think what CC does is the best option :|
wait, can you even resume a yielded coroutine with a value??
7:10 PM
NMSC almost sent my scholarship to the wrong school lol
woops!
everyone always asks wikihow, but never wikihow it's feeling :(
7:25 PM
> Impartial estimates place the groundhog's accuracy between 35% and 41%.
Wait so
The groundhog actually does have better than 50/50 odds of predicting when winter ends
We just have to assume it always lies
7:49 PM
Interesting how 6 people upvoted my comment explaining why I downvoted a challenge, yet I'm the only one who has downvoted... Voting behavior on this site will never cease to baffle me
@Ginger yeah, you need to push it yourself tho
weh
@Ginger that was in the original plans, but i postponed it
that was before i knew of kotlinx.serialization
TL;DR no, its easy to add, and im lazy
:p
I don't really want to have a central pullEvent() function, but that seems to me to be the sanest option
@Ginger ... thats literally 1 extra line of code
7:54 PM
yeah I know
@Ginger lemme check how i implemented it
@noodleperson as one of the 6, I agree with the sentiment but don't think it merits my downvote
I mean vote how you want I guess none of this really matters :p
"threads" == coroutines with custom fluff == "processes"
On answers I almost never downvote unless it's like some zero-byte thirty flag golflang thing solution lol
@RydwolfPrograms I got a 3 on AP world 💀
7:59 PM
@Seggan the problem is event distribution tho
Probably because I started studying the night before tbf
I don't tend to vote on questions much
what I want is for peripherals to have their own methods to pull events
but since I'm planning to make teletypes a peripheral...
oh wait actually hang on
why not an event subscription model instead of event polling?
new idea! the shell program handles input from a teletype peripheral and injects a custom input API into programs it launches
8:01 PM
but also I'm pretty stingy with downvotes
@Seggan I don't like it as much :p
@Ginger yeah I think I can do this
input() and friends will be provided by the shell program to child coroutines
sounds reasonable
I think the shell will just have total control over a tty peripheral and provide mock output APIs to its children that actually write to a framebuffer
like CC does with window
@Ginger why did i read that as a "titty" peripheral at first glance
a friend of mine keeps misspelling "metis" as "metits"
8:05 PM
ok now i have bigger questions
why on earth is my language being used beyond one person this never happens
because I think it's cool and the voices in my head are telling me to do something with it
especially with that junk bytecode vm
yeah uh
I'm sure it'll be fine :3c
it can't possibly make the performance worse!
lets ignore the fact i use exceptions to signal the fact a finally has finished
I try not to think about that
8:07 PM
also if you havent seen: the docs
yea I've seen those
i may or may not do a rewrite of the vm soonish with interest renewed, ill try not to break too much of the api
yipee
also you better use the walris operator or else
I regret not naming it the walvis operator :b
8:19 PM
you just have :P
yippee
8:54 PM
wait
> Metis has a set of operators that may or may not be overloaded.
brb making J-etis
jeetus
no symbols like Ruby though...
ig I can just alias each operator O* to a callable let global O = fn(a[, b]) = [b] O* a
9:38 PM
@noodleperson thats not even legal code

1 hour later…
10:46 PM
@Seggan why not?
(O, O* are placeholder names, code in [...] is only for binary ops)
actually maybe I'll do ~"*" etc. only problem is that's four characters, so maybe I will do aliases instead. Undecided
11:01 PM
@noodleperson is this Metis?
yeah
I mean I haven't actually tried Metis yet just looked at your docs