« first day (4083 days earlier)      last day (1058 days later) » 
00:00 - 18:0019:00 - 00:00

19:14
@pxeger IMO the third answer's the best one
non-competing is (except for very rare cases) a thing of the past.
For example, this answer of mine uses a builtin that was updated to have infinite list support explicitly because of the challenge.
0
Q: Shuffle an array, a little bit

flawrGiven some input array a = [a1, a2, ..., an] and a positive integer k, shuffle the input array a such that no entry is farther than k from its initial position. Example Given the array [1, 2, 3, 4, 5, 6] and k = 1, this means the entry 3 can be at following positions: [*, 3, *, *, * ,*] [*, *, 3...

19:32
Okay, so. I'm making a language which has 8 data types, and a constant loading operator for each of them (it's a bytecode sorta thing). Null is 0x02, int is 0x03, float is 0x04, etc. 0x00 and 0x01 are reserved for something else. Now, arrays are at 0x07, and the spec says that they consist of a number of constants, formatted the same as they would be for the constant loading operations, prefixed with a byte to indicate their type.
E.g., 0x07 [length 1] 0x01 [data] would be a 1-length array containing an int.
But I'm not sure if the byte, 0x01 in the example above, should be 0-indexed (so 0x00 for null, 0x01 for ints, etc.) or the same as the constant loading opcode (so 0x02 for null, 0x03 for ints, etc.)
Opinions?
The first one would be more sensible, but the second one would be more convenient
I guess a third option would be to move the constant loading operations to 0x00-0x07
And a fourth option would be to keep 0x00 as a no-op, make 0x01 the int loading operation, 0x02 for floats, etc. up to 0x07 for the 8th data type, then make 0x08 the null constant operator and make 0x09 do what 0x01 did
Y'know what, I'll do that. That makes it so that I can remove nulls almost everywhere in the source.
I'm rather lost, but I'm happy to serve as your rubber duck
Here's an idea for a challenge: Given a URL, Generate a multisoft offer:
19:48
So like, you get the string a and a URL to append the answer to?
took me a hot minute to realize that despite being pretty understandable that doesn't quite match any language i can think of
i take it that's a deliberate step to weed out anyone who'd try actually running it without being able to reason about it?
I think it's just a C-style language, right?
it's definitely meant to be broadly c-style
I was just thinking the same thing as you, but aside from uninitialized variables I think it's perfectly compatible with...wait no length
but it's clearly not c because single quotes around strings and + for concatenation
19:50
And Python-style max
I initially was "thinking" it was Python until I actually looked at the syntax
idk but the result is 112358
and it still has to be pretty close to c since the chars are a numeric type that you can mod
but also none of the variables are ever declare
d
Looks like they're coercing numeric chars to strings
o/
19:51
also no semicolons
@UnrelatedString or just a JS-style language that interprets them as numbers
Yeah, I guess it's meant to be a very C-style sort of pseudocode
With some definite JS and maybe Python inspiration thrown in
It's not Go or Rust or anything like that, because of parens around the if/for condition
@RadvylfPrograms That's funny: I would never have thought it was Python, but I initially assumed it was JavaScript ;)
The undeclared variabled and max stood out as Python-y until I noticed the for loop syntax and stuff (which I'm so used to looking at that I just skipped over)
oh yeah wait how does js do max
is there an operator or is it like
in the Math object thing
Math.max
Not a fan of how Python has all sorts of stuff as ordinary functions
20:01
TBH I rather like this syntax. Maybe we should make it into an actual language. /hj
For things like len, array.len() makes way more sense
max is a good one though
For the math ones I'm not as sure yeah
i don't like len either considering it just calls a dunder anyways
@RadvylfPrograms Don't try Julia, then. It puts a gajillion things in the top-level namespace.
20:02
It'd be nice for some stuff if you had all the math stuff in the namespace or whatever, so you could just do sin(...) in math-heavy functions. import Math.* would be so nice in like, JS
Does const sin = Math.sin work?
I guess you could do with (Math) but IIRC with is strongly discouraged and kinda jank
i'm reminded of that one r post on that one cnr about getting infant mortality from el(names(swiss),6)
@DLosc Yeah, but you need like ten of those if you want lots of trig functions and stuff
Sure
20:03
@RadvylfPrograms yeah that seems like a terrible idea
just use Pip, it has operators for all of them
We could make a package installer for pip and call it...err...pip
Until someone comes along and makes a golfing language called pipip
20:05
@RadvylfPrograms Havisham
Or, hm. Pip package installer -> pippi -> Longstocking?
@UnrelatedString and no semicolons at ends of lines
if you defined the functions length, max, and goto_url, it would be perfect JS
@DLosc Gotta shorten it though, dnf style. lsk or lst or something.
@RadvylfPrograms So in this language, the program is formatted as a list of (unnamed) functions. Should the first or last function be the one that's run (the rest are called by it)?
@WheatWizard Could you elaborate your comment on the challenge I posted?
I feel like I completely misunderstand what you're saying
7
A: Things to avoid when writing challenges

Wheat WizardConsider if your challenge really needs random output Challenges that require random output require extra clarifications that challenges with deterministic output do not, and additionally exclude languages with no source of non-determinism. Often times randomness only acts as a cumbersome outpu...

@flawr ninja'd lol
I think this summarises it pretty well
20:13
I think the randomness is a core part of the challenge
Taking away the randomness is just "filter the permutations of an array:
@pxeger I disagree with this point: Generating a all permutations of this kind is quite a different challenge (and one that gets quite impractical soon), and excludes many approaches.
Right!
@RadvylfPrograms I wouldn't say "just", because I think that's not trivial
@pxeger In golfing languages it is though
So you're making it unnecessarily annoying for practical languages compared to golfing ones
the filtering is the interesting part, not the generating permutations
20:15
I mean in certain languages it will be easier than in others, but I think that is true from all languages.
But in praclangs, generating permutations is what you spend the most bytes on
@pxeger Exactly!
but the randomness is not the filtering
You don't need to do the permutation stuff at all though if it's random
@RadvylfPrograms I made the last function be the main function in HBL, for whatever that's worth. I believe Brachylog goes the other direction.
@RadvylfPrograms does the same logic of "So you're making it unnecessarily annoying for practical languages compared to golfing ones" not apply to randomness?
20:17
brachylog does do main first yeah
jelly does main last
I think we've got plenty of "do this deterministic operation to an array" challenges. This challenge is different from those because of the shuffling aspect.
2
Using randomness makes it unnecessarily annoying for languages without randomness
In the languages I'm familiar with the best way to do this is to generate all the perms filter and select randomly. And the randomness makes up like half the byte count.
or without easy access to it, like Haskell
It's just annoying.
20:17
Sure, but the randomness is a core part of the challenge IMO
i feel like permitting both random and deterministically-everything might be the way to go
open up the most interesting options
And these would've been great points to bring up while it was sandboxed for weeks
@UnrelatedString I don't see anything wrong with that
@UnrelatedString That's a cool option
I guess if it is easy or annoying depends on the specific choice of language, but that holds for every challenge, right?
20:19
Well, to a degree.
@UnrelatedString didn't we have one of the stdios that allow tapping an "external" random source?
But there's not a binary "it's easy or it's hard"
^^
or are these no longer in service? (I haven't been active in a while)
The standard IO rules are still used, yeah, although I don't think many people have them memorized
the external randomness source solutions are also quite burdensome.
20:21
In, e.g., Haskell, couldn't you just take an infinite list of random floats as an additional input or something?
It just feels like a fine enough challenge with randomness jammed in there for no real reason. I guess we will see.
right, but luckily you may choose the languages you use (or so I hope:)
@WheatWizard well in this point it seems we have different opinions, I really see a deterministic version of this challenge as quite a different task
I don't think so.
yes I know, thats the thing about different opinions:P
I think they'd be very different, at least in the language I primarily golf in
In JS, permutations is like 100+ bytes
So a non-permutation solution is the more obvious one
20:23
Permutations then filter is not the only deterministic way to generate them.
I guess in a golfing language or one with a better stdlib getting permutations is shorter and so that's already a part of the answers
A branching approach is also just fine.
Which is going to look a lot like the random approach just with generally less boilerplate.
My hobby: Shifting the color schemes of peoples' IDEs a little bit every few days and seeing how long it takes them to notice (not really but someday I wanna do this)
For any given random-based approach which doesn't involve generating permutations, you can replace all instances of "if [some random condition], then do this, otherwise do that" with "do both this and that and output both results" to get an answer which outputs all possibilities
I think allowing either random or all possibilities is the best option, like unrelated said
20:26
Would it be too late to change that?
I don't think so
Since it doesn't invalidate any existing answers
And there's only like two
@WheatWizard @pxeger What's your opinion on adding this option?
I guess I'll go with that then.
I think it would improve it without invalidating existing answers.
Ok great.
@Everyone: Thanks for all the feedback and suggestions
@RadvylfPrograms what languages do you like to use?
@RadvylfPrograms Okay Jim :P
20:40
@flawr JS
D:
Well, "like" in the sense that it could be worse
I'm mostly just stuck with it because that's what I'm used to and I do lots of browser-based stuff
 
1 hour later…
22:08
@SegFaultPlus4 You realise this pings me?
22:18
@RadvylfPrograms Can I convince you to host my r/place clone? (demo at canvas1209.surge.sh, feedback welcome)
Sure
Just the back end presumably? Or all of it?
Can you set up the backend so CORS requests work?
Thanks :)
Which of my domains should it be under?
22:22
Don't mind
I can do radvylfprograms.com, or rto.run
Whichever's easier for you
So it's called canvas?
If so I'll do canvas.rto.run
Okay :)
Woah, you got the frontend working? Thanks! You'll need to change the websocket endpoint from localhost:8010 lol
22:33
Oh, oops I've been doing some kinda janky stuff
You'll need to make a copy of the data-utils.js file, yeet it into the frontend folder and change the path in the HTML file
Y'know, it'd be cool if I had a thing on RTO that let you run backends for sites in its sandbox
I'd have to have some manual moderation to prevent crypto miners and stuff, but that could be a really neat use for the sandboxing stuff I'll already have set up
That could be pretty cool
Although, doesn't the sandboxing block internet access?
Yeah, but Docker lets you do cool stuff with networking so I could work around that
It was probably a bad idea to have both the frontend and backend using data-utils.js but oh well
I think it's working
I didn't check to see what I was hosting first, but whatever it does it looks like it does it :p
22:40
Thanks for doing this :)
Now to see just what people will do
Announcing canvas, a r/place clone for us to mess with: canvas.rto.run
8
Is there any way for it to save its state across reboots? I only need to do one every few weeks/months, but it'd probably be a good idea to make it support that before we do lots of stuff
State's stored in the data array in main.js
So you could just set it up to save/load that
@allxy it isn't very mobile friendly
And I can't see where I'm placing
Oh, DLosc.
@lyxal Sorry about that, it's not really designed for mobile
Smh place works well on mobile
22:46
I'm not making a complicated zoom system for now
@allxy (ツ)/
Not very creative, but yanno
Code golfers these days, always making things not designed for mobile smh
woo the redwolf symbol is complete
Yay pawprint in canvas :D
Oop looks like r/place is finishing
22:51
btw do you plan on this being temporary and freezing it after a few days or will you keep it up
wait i thought r/place had like 5 hours left
People are reporting they can only place white on r/place
I know this from the multiple @everyone pings I'm getting
Find someone who loves you like red amogus loves green amogus
hyper you can go there
22:55
should we make chat.stackexchange.com/rooms/135246/r-place for discussions about this lol
to avoid clutter here
Sure
When the radvylf is sus
pog, now there's a hyper symbol too
00:00 - 18:0019:00 - 00:00

« first day (4083 days earlier)      last day (1058 days later) »