« first day (3828 days earlier)      last day (1016 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
I think I may have accidentally flagged the answer when I went to try and edit it.
 
I don't see any flags, does anyone else?
 
Ok, good, I wasn't sure.
 
Nothing bad should happen if you did, just a declined flag. It's hard to flag something by accident though.
 
@RedwolfPrograms The flag, star and reply buttons on the right end of the message are annoyingly close together tbh
 
the being required cuz of weird UB is kinda annoying
anyway, that's really clever. spoiler
 
6:06 PM
:D
Quicks and STDIN can be pretty cool in Jelly tbh
For example: CMC: Output the first n characters from STDIN, and CMC: Output the nth character on STDIN
 
@cairdcoinheringaahing For the first one; Vyxal, 1 byte: Try it Online!
@cairdcoinheringaahing For the second one; Vyxal, 2 bytes: Try it Online!
 
@cairdcoinheringaahing Both can be done in 2 bytes in Jelly, reading n from ARGV :P
 
wait i thought the first would take 4 lol, read collecting-ntimes dequeue
the latter is obvious, ƈ¡
 
@hyper-neutrino Does Jelly not have a “slice” command?
 
Yes, but reading the entirety of STDIN takes a min of 5 bytes
 
6:21 PM
Ah
 
oh wait, ƈ€ lol
 
CMC (Jelly): implement without (you can assume only the monadic definition, and that the left argument is a list)
 
In my fork: , assuming the link is monadic
 
6:26 PM
In the (monospace, sans-serif) font I use is wider than a normal character and for some reason has serifs. It's quite cursed.
 
i have ;Ç}$ƒ“”
oh wait i guess that's not really valid
it'd have to be ṭ@Ç}$ƒ“” i think
 
@hyper-neutrino )
 
:P
@hyper-neutrino ḢÇ;ßƲ¹¹?
 
yeah that looks right
my sol can be inserted into a chain tho :p
 
6:31 PM
But it needs a quick to ensure the parsing is correct :P
ṭ@Ç}$ƒ“”$ I think :P
 
CMC (Vyxal): implement without
 
ḢÇ;@ƊL¡ also works
ṪÇ;ƊL¡ for -1 byte
@AaronMiller What does do?
 
@cairdcoinheringaahing From the docs: € a.split_on(b) # split a on delimiter b
@AaronMiller You can assume that it is only acting on strings
 
@AaronMiller Vyxal with the jelly_interpreter flag, 2 bytes: œṣ :P
 
6:45 PM
@cairdcoinheringaahing I’d allow it, but you’ll have to be disqualified since clearly you hacked into our future plans group chat. /s
 
Is it hacking if I'm actually lyxal in a puppy costume? :P
 
Fair enough
@cairdcoinheringaahing Btw, you can golf that down by like 3 bytes with the right flags: Try it Online!
 
no auto-run? lmao
 
> code=lyxal
I know about that Easter Egg :P
 
sadge
But do you know about the other rickroll in the online interpreter?
 
6:51 PM
Probably not :P
 
VTC for excluding other types of scientist
 
7:17 PM
@AaronMiller ?
 
heh heh
 
8:08 PM
Can you ping people with pending suggested edits in comments?
Hmm, I dislike what's happened here :/
The answer should be posted as a separate, CW answer, not edited into an existing answer
 
unfortunately rejected editors cannot be notified in comment replies so hopefully they see that by chance
 
Do the "this edit causes harm" reasons ping them?
 
Why did you edit this into your own old answer instead of posting it as a new answer? — Sparr May 5 '19 at 18:54
 
No, you don't get notifications for rejected edits
Yeah, it's happened twice that someone has tried to edit a winning answer into that answer
The first time, it got accepted with a note about how it isn't their answer. I'm very tempted to CW-flag, if it weren't for the fact that their original answer is still there
 
unfortunately unprotecting that question would probably invite all the wrong answers that didn't even bother to read the spec to return
 
8:14 PM
@hyper-neutrino Which is why I re-protected it after I unprotected all the questions that were inappropriately protected
That's one of two questions on the site that should be protected :P
If the editor does have an actual answer tho, I'll unprotect it so they can post it, then reprotect it
 
wait there's a 1:15 working:deleted question? damn
 
@cairdcoinheringaahing ...I just tested it and their answer doesn't even work for level 3 ಠ_ಠ
It literally just goes forward 3 times, then rotates in place 13 times
 
@cairdcoinheringaahing Probably got dizzy :P
 
8:39 PM
i made a test program for the google doodle thingy: (link is too long so you may have to expand the message)
https://tio.run/##rVVLT9tAED57f8Vkc1m3ThQnt4gc0hIQUiRQgri4VrWJN62LWVtrG2gRvz2dsQOxTQwq9DLancc33zzWTn5nP2M92m7ns6vZfAkT8Jj1wCyLp5k0GR@DGDgwsB1SrWJpAlR5Hu9zB3inFL7PrEfn38Mc8HiXzt02xQeAO03gzpuMhw4MXwBXw54Quy9THDIV4tWKX6n9f5Bt60drZ/rvinon2e4BgGr7@nXR@YipJReRZT5jp7j3Lpuj/BKhGLIFHQ2KEWOB2sC5@CTtMbOMynKjQUiv5yJwFKYZnsd4sW3GVlG8vk4xSt3KSIQ6yTNBekIwuRaBzKQDoU4zk6@zMNYpYYYbCFNSSr1WomotE5CPtYkNpPkKrRhfgyCrtUcvnWxmqYiAK44wwSLJW6s7TJYpJJrlSaTEPXyG4B4ox71DJ0zxJ0wKRG83Ray2vAah4VStRcQHcDSBJzzP9eEIIq
and can confirm that the suggested edit quite clearly does not work :p
 
> "FPAAISLS"[passed::2]
You've taken golfing too far :P
 
lmao
 
Off-by-one error :P
 
8:40 PM
the funny thing is that most of it isn't even golfed and then at the end i just put that in :P
 
1 message moved to Cursed language features, because I'll be damned if I ever move 69 messages at once :P
 
quickly, move them back into TNB so you can move them back out to get the right number :P
 
*Makes Lyxal RO* :P
 
@user Remember what happened with the RO powers testing room?
We do not need a repeat of that :p
 
There is precedence for not giving lyxal RO powers :P
 
8:46 PM
I mean, it hasn't happened with Vyxal yet :P
 
> yet
being the operative word :P
 
@user Too late, I've done it now :P
 
oh yeah what happened to the RO powers testing room
was that the one I nuked or was that a different room
 
Probably got nuked or frozen
 
It was that one
Lyxal renamed it "frick" and un-RO'd us all
 
8:51 PM
Clearly we should have a "frick RO election" on meta to settle it :P
 
What would that involve?
 
Same thing as the TNB RO election, but only lyxal is allowed to stand :P
Vote by mod flags :P
 
lol, I thought RO candidates would rickroll each other to win :P
 
0
A: Sandbox for Proposed Challenges

userUnfold a list code-golf functional-programming Haskell's and Scala's standard libraries have an unfold function that builds a list from an initial state s and a function f. This is done with the following steps (explained in an imperative way to be simpler): Apply f to s. If the result is empt...

 
@SandboxPosts I have no idea what this is describing, it really needs a readable example
 
9:03 PM
Is shifting by 16 bits faster than shifting by 10 bits?
I don't really know what the CPU does
 
If it is, it's by a negligible amount
 
should be one instruction either way
 
@cairdcoinheringaahing Would a Python example help?
 
@user You should provide a non-language specific, worked through example
 
Hmm, okay
 
9:06 PM
e.g. f is a function that takes (something??) as input and produces (something??) as output, s = 5, the result is 10 because of xyz
 
Working on pseudocode-y explanation :)
 
9:25 PM
...also not entirely sure what you mean by "it's impossible to write test cases for black-box functions" considering we've done that fine in the past
 
Just realized my Scala example is wrong lol
 
I wish break and continue worked like return, so you could do something like continue x = 0;. It'd mean getting rid of the label functionality for those (which isn't a big loss IMO), but it makes it easier to write one-liners in loops and increases readability imo
Plus it's golfy :p
 
9:42 PM
That's reminded me that I wish yield return existed in Python, where it acts like a return statement when encountered (so code after isn't run), but it still acts as a generator
 
you can do yield _; return but that does not feel as good as a yield return statement would
because 95% of the time you're using return it's returning a value but as far as i can tell a return in a generator doesn't pass the value you give it along
...i need to look this up
 
yield return sounds like it would be incredibly cursed (AaronMiller, you seeing this?)
 
Are yields in Python like in JS, where it's an expression so you can do return yield?
 
@RedwolfPrograms No, you can't
 
okay so apparently if you give return in a generator a return value, it's... passed to the constructor of the StopIteration exception
:/
 
9:49 PM
I love how yields are different in every language: you've got Python's (and JS's?) generator-making yields, Scala's for-comprehension yield, Java's new return-from-switch-and-stuff yield, Ruby's yield that I don't even understand, and probably more
 
This is a section of code from the Mixology interpreter
 
The word yield is really ugly synesthesia-wise, it's like this weird green-white-yellow thing
 
Replacing final and the final == old check with a yield return would be nice
 
@RedwolfPrograms ...oh no
so uh
in python, return yield x is a syntax error
but yields are expressions
 
9:51 PM
Are they?
 
you have to do return (yield x)
WHY
 
>:|
So close
Wait I wonder if it does that in JS
Nope, works fine
 
oh yeah yields are expressions for passing stuff back into generators with send()
good old generator coroutines
 
Plus yield from being a thing :P
 
9:53 PM
@cairdcoinheringaahing Is that like JS's yield *other_generator();?
 
504
Q: In practice, what are the main uses for the new "yield from" syntax in Python 3.3?

Paulo ScardineI'm having a hard time wrapping my brain around PEP 380. What are the situations where "yield from" is useful? What is the classic use case? Why is it compared to micro-threads? [ update ] Now I understand the cause of my difficulties. I've used generators, but never really used coroutines ...

 
i'd guess so except doesn't js use ... for what python uses * for
so if js yield * is python yield from then why the hell does it have a *
 
* is used to denote generator functions
 
The fact that w = (yield) is valid syntax is just weird tbh
 
wait what
does that yield None?
i... guess that sort of makes sense
 
9:55 PM
It works in JS too, where it actually sort of makes sense
 
but if you're yielding to get a value rather than emit a value
calling it yield just feels wrong
 
I combined them:
function *gen() {
    return yield;
}
 
i guess you're still yielding to the caller
 
@RedwolfPrograms This is very much not at all stupid
 
...i guess this might be why generators have a throw method come to think of it
 
10:01 PM
I've been thinking about a Python version of this, but it seems far too strict on syntax to get much more than 3 in a row :?
 
yeah i feel like thjere's really not very far you can go with consecutive distinct reserved keywords
 
10:13 PM
@cairdcoinheringaahing Allowing only : and whitespace between them, and counting unique keywords (but allowing repeats), I get 25 :D
Doesn't use as async await class def del for from global nonlocal. Try it online!
 
... Python can get cursed :P
I only use it because it's easier to make complicated programs than in Jelly
 
That's a rather low bar :P
 
If I could write an Add++ interpreter in Jelly, I would
 
JS's void is probably one of the most useless keywords in any (practical) programming language
 
10:24 PM
What does it do?
 
It takes an expression, runs it, and results in undefined
 
lol
 
Opens up the void
 
Even Nim's discard makes sense
 
You could precisely recreate it with var void = () => {};
 
10:26 PM
@RedwolfPrograms Kind of like brainflak's <...>, right?
 
Except that 0 is slightly more useful than undefined :P
 
5 hours ago, by user
lol, I guess I no longer believe in 0
Objection, 0 is imaginary, so undefined is more useful :P
 
@user 0 isn't imaginary, but 0i is :P
 
@cairdcoinheringaahing From the README for flipbit: “Check the wiki for all commands”
ಠ_ಠ
There is no wiki.
 
10:39 PM
@AaronMiller I couldn't make it that easy to use Flipbit :P
 
Dang it. More source code diving, I guess. See you in a week! o/
 
[, <, > and ] are brainfuck's commands. ^ flips the cell (the tape is all bits), and ., , and ? are I/O
. takes all cells up to the take head, converts from binary and outputs as a char
? reads in a character and sets the next 8 bits of the tape to the binary of the input char
, reads in a single bit
(the input is slightly more complicated in reality, just don't mix , and ? :P)
 
So, with ?, inputting, e.g. “a” will set the next 8 bits to 01100001?
 
So it ignores leading 0s?
 
10:48 PM
Either that or it's an off-by-one issue with indexing
Oh right, cause it converts to binary, not 8-bit binary
Feb 18 at 22:44, by caird coinheringaahing
Me? Sensible language design?
 
Truth-machine: Try it online!
 
I like this language
 
I've written exactly one program in Flipbit IIRC, and that was the Hello, World! :P
@cairdcoinheringaahing Nope, 3 programs :P
 
Um, that last one isn’t a flipbit program…
 
11:00 PM
No, 2 of them aren't
That's why there's 5 search results, and I said 3 programs :P
 
o.O I could have sworn there was only three results a second ago. Or I just didn’t scroll down all the way. That’s possible.
 
11:25 PM
@cairdcoinheringaahing ...
That's a mental picture I really didn't need
 
You in a puppy costume?
 
Yes, because I'm not a furry
Commit frick
 
@cairdcoinheringaahing ...how does with True: not error
 
I suppose True (or rather, bool) has a __enter__ dunder method :/
 
i tried with True: in a repl and it errored, claiming no __enter__
>>> with True: print(':|')
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: __enter__
...also kinda weird the error text isn't AttributeError: 'bool' object has no attribute '__enter__'
it's just AttributeError: __enter__
 
because of course the former is what you get if you just try True.__enter__
so somehow the rest of the body of the function in your
oh
 
wait, is it because it returns?
no, it's a generator
 
@lyxal And there's more treble than bass lol
 
11:43 PM
@cairdcoinheringaahing The first revision of this o.O
 
except... it still returns a generator object
successfully
so it still works lmoa
 
@user Yeah, I hit enter too early :P
 
Laughing My...Octopus Antenna?
 
Laughing My Off Ass :P
 
it's fine to do anything that isn't a straight up syntax error because it doesn't run until you try to iterate through the generator
 
11:44 PM
@UnrelatedString "works"
 
I kinda want to make a userscript+PythonAnywhere server that lets you reply to messages with emojis instead of using messages or stars and does other stuff
 
generators are very weird with "works"
 
😄
 
11:47 PM
🥺👉👈
 
🥺
👉👈
is for me?
 
🧑‍💻 Me when hacking nasa
 
👁 NSA when watching you hack NASA just like they wanted you to
 
reactions are great because you can't react to a reaction
 
👽 Me when watching all y'all
@hyper-neutrino Reactionception time
 
11:49 PM
so you can thumbsup someone's message to acknowledge and reply to it and they can't respond back thus allowing two people to finish a conversation without one person really needing to send the "last message"
because they sent the last real message, but you performed the last action
 
Oh yeah, that's always annoying
 
@user 😳😳 I'm sorry nsa 😱😔😭😭😭 pls don't arrest me 🥺🥺🥺🥺
 
The only way to fix that would be to have too people to send a message at the same time like MAD
 
idea: a chat client that constantly scrolls and when someone posts a message it just appears - if people send messages at the same time they just appear next to / on top of each other, and if no messages are sent the old ones just gradually scroll off the screen
 
11:51 PM
@lyxal 😈😈😈😈 Mwahaha I 👽 am evil 👹👹👹👹 You shall BURN 🔥🔥🔥🔥
@hyper-neutrino Sounds good
Also a way to trace the replies to a message
Imma start a github repo, anyone wanna join?
 
so yeah i guess due to generator shenanigans if with True: works so does yield from True since it is syntactically legal
 
i've wanted to totally remake a chat client for se chat for some time lol, either as a userscript that just totally overwrites the entire window or as a completely independent app / webapp
 
@user oh no 😰😰😰 no pls spare me 😧😱🥺🥺🥺😞 burning isn't fun 🔥😩😕😒😡
 
@UnrelatedString Seriously? :/
 
@UnrelatedString How does from work there?
 
11:53 PM
It's a yield from statement
 
yield from x is similar to for k in x: yield k right?
 
Similar to, but not the same
 
@lyxal 😑😕😠😡 I need you to stop ✋ with the emojis 😀
 
i think the distinction mostly comes up when you're passing stuff into generator objects versus just treating them as iterables
 
@hyper-neutrino An independent webapp would probably be better
 
11:56 PM
this answer was helpful
and also TIL about coroutines using (yield)
 
so that's 27 then
 
00:00 - 18:0018:00 - 00:00

« first day (3828 days earlier)      last day (1016 days later) »