« first day (4401 days earlier)      last day (740 days later) » 

00:01
I never expected to find a bug with a language, ever
00:52
@emanresuA Well, in that case, 37 by not assigning to d at all :D
 
1 hour later…
02:08
@DLosc Then 35 by multiplying by 36 initially
 
1 hour later…
03:23
@emanresuA Lol, nice. The stuff Desmos' parser lets you get away with continues to amaze me.
@DLosc QBasic, 34 bytes: SCREEN 9:DRAW"e9d9r9g9d9h5g5u9h9r9
03:38
gorgeous
@l4m2 This is , so I don't think I can allow that (also, the lines don't meet each other at the corners)
04:46
@DLosc PaperScript, 34 bytes: Path.Star([9,9],5,4,9).fillColor=0
05:06
AHK and Paint, 67 bytes
run mspaint
sleep 2000
click 420,116
click D,14,160
click U,463,595
@ATaco LOL, nice! Is the sleep 2000 because it takes a second for Paint to start up?
05:30
0
Q: Weighted directed Acyclic graph

Aitzaz ImtiazGiven a weighted directed acyclic graph with N nodes and M edges, where the weight of each edge represents the time it takes to traverse the edge, find the shortest time it takes to reach each node from a given source node. The catch is that you're not allowed to use Dijkstra's algorithm, Bellman...

guys I have a question, in restricted-complexity, do you need to make a Attempt it online implementation?
@AitzazImtiaz It's recomended just like any other challenge. Why would restricted complexity be related to ATO?
an online interpreter wouldn't really be proof of restricted complexity
I can make a O(1) algorithm that would still take 1000 years
XD i actually have two algorithm tweaks for this and I am posting one
05:53
> The catch is that you're not allowed to use Dijkstra's algorithm
> This solution uses a heap-based implementation of Dijkstra's algorithm
heap-based implementation :D
not the algo itself
"Things straight out of textbooks and the like don't usually count as good questions on this site. Either it or a very similar question has been asked before, like your maximum subarray problem, or the implementation becomes boring as your answer shows."
I think uploading questions from a math textbook is legit here?
i feel like this should be closed for clarity, we usually don't allow disallowing specific approaches because it is hard to define whether an answer uses that approach
e.g. where you literally say you're using Dijkstra, but somehow that isn't Dijkstra?
shall I make a concession instead?
to keep time complexity and use all those algorithms?
Yeah sure, i don't know if that would make it a good question, but at least it would be clear?
" should be closed for clarity" I agree to this unfortunately but let me edit it
I did the edits that keep clarity ig?
06:26
If you want to just show off cool algorithms like this, please write a blog post, not a challenge here
There's nothing to compete when you already have posted your own solution
06:46
@NewPosts @AitzazImtiaz Generally, you want to wait a while to let people answer your challenge before posting your own answer
Especially since this is a fast-algorithm challenge where you seem to already have the fastest algorithm
If it were code golf, there'd be the possibility of further golfing
@AitzazImtiaz Uploading problems from anywhere is fine (as long as you credit your source), but if it's from a textbook, it'll probably have to be edited to be an interesting question here
Agh, I have to suggest edits now
A problem like this will probably have lots of algorithms already. It's unlikely CGCCers will make some huge breakthrough. Maybe if you made a new problem that hasn't been really been studied much, people would have to come up with their own interesting algorithms instead of just copying something from Geeks for Geeks
By the way, don't feel bad about the feedback you're getting, it's hard to write a good challenge. And don't take the downvotes personally, they're just a way for people to rank questions as being interesting/well-done/whatever.
I don't know if you used the Sandbox for this question, but if you didn't, I would highly recommend using it for your next challenge. People can give you feedback on your question and help you make it more interesting so that it's more likely to be a success when you do post it
 
2 hours later…
09:12
In which language is it most difficult/easy to write a quine?
@Bubbler I guess all there is is to show off your favourite language but I agree it's not a fastest algorithm question
09:24
@Simd easy: 2d languages with string mode (see ><> and Gol><> answers)
hard: those where source and execution model have a different layout (Cubix and Hexagony come to mind, though the latter can be worked around somewhat)
And then there's stuff of mine like positionally and tarfish, which are simply cursed
@Simd Thunno has a cheat command (zd) which just pushes the source code to the stack
Hard: Unary (I have no idea how someone actually did that)
09:40
i feel like unary is maybe harder than average but not by that much
like you have to encode the output in a completely different way from how you write the program, but it's a relatively simple way
09:56
@Simd It's hard in languages that need a lot of escaping in strings but lack builtins to perform that escaping
10:07
@Simd Hardest would be Piet, methinks.
1
A: List of bounties with no deadline

emanresu A1000 rep for a quine in Positionally Positionally is one of my more cursed esolangs. It's a pseudo-1L in that it only has whitespace and non-whitespace commands. What commands do is based on their position in the overall grid, requiring clever routing to be able to do pretty much anything. I'm of...

10:57
0
A: Sandbox for Proposed Challenges

AnttiPHow many sorting networks? fastest-codesequence Below on the left is a picture of a sorting network that can sort 4 inputs. On the right you can see it sorting the input 3,2,4,1. A sorting network of size n consists of a set of n horizontal wires where two wires can be connected by a vertical wi...

11:32
unaccepting when you get outgolfed I get, but unupvoting at the same time is rough
well hey, at least you have 10 of the -15 unaccept rep back
0
A: Sandbox for Proposed Challenges

mousetailWhole Number Groups Given a list of fractions, group them so that each group sums to a while number. This should be done in such a way to maximize the number of groups. You may assume a solution exists. Order does not matter, you may output in any order. Test Cases Fractions Groups 1/2, 1...

12:23
0
Q: Rotate an Image

GingerThis challenge is simple: Take a path to an png image file as input and overwrite that file with a copy of itself rotated 90 degrees clockwise. You may assume that the file has dimensions of 128x128 pixels. You may not use image metadata modifications (like Exif) to rotate the image; the pixels t...

@NewBountiesWithNoDeadlines this has the magic words, quine and 2D language, i am obliged to attempt it
12:44
@lyxal oh, unaccept is -15? for some reason I thought it was less
13:04
0
A: Sandbox for Proposed Challenges

AndrovTApproximate a root of an odd degree polynomial code-golf sequence open-ended-function Every odd degree polynomial has at least one real root. However this root does not have to be a rational number so your task is to output a sequence of rational numbers that approximates it. Rules Your input is...

 
1 hour later…
14:10
Has anyone done a quine in piet?
@Seggan It is a well designed language :p
@Simd It would depend on the encoding
Now that we have asciipiet it's probably more possible
14:36
TIL about Python's while else syntax
for else works too
and try else
I know about try else
Still waiting for with else and def else though
cool, it's possible to do async list comprehensions
Normal for loops too
and with
14:42
I am aware :b
Ok seems you know everything already
has python added a way to directly call async functions in synchronous code yet
cuz last time I used python you had to import the event loop from asyncio and invoke the function through that which is really painful compared to JS's "just call the function"
That's impossible and always willl be
... no JS does it quite well
I don't need the result of the function
JS has only one event loop option though
And has one by default
In python you don't need one and if you do you have options
14:44
fair enough
it's just that this was the main reason I stopped using Python
You just need to start your event loop once though
After that it's the same as JS
(You just need to store references to your Tasks somewhere)
is it? I recall that it always warns you about not awaiting coros if you just call an async function in sync context
though I suppose you're supposed to make everything async if you're going to use async but in JS it's a lot easier to mix them if I want to dispatch something in the background but don't care to wait around for it to finish
You have to converts cons to tasks
Tasks run in the background
And if they get garbage collected the task is cancelled
@hyper-neutrino well, you can do asyncio.run(<method>) to run the coroutine to completion and return its result, which sounds like what you want
So there is a bit more administation instead of "fire and forget"
14:49
oh, I see
interesting
15:07
In the praclang I've been idly designing in my head, the compiler infers what's async
Every async function is awaited by default, and if any functions are awaited in a function it becomes async
In order to get the result of a function non-awaited (as a promise/future), you use some sort of special function call, not sure on the syntax yet
You can also do this for a non-async function, which would be a future that returns immediately
@RydwolfPrograms maybe like a Rust-style collect()?
That results in a system where the interface is identical whether a function is async or not, meaning that if you need to make a function async, you don't need to change potentially hundreds of function calls and functions that call that function
@Ginger Wdym?
Like the ::<TYPE> syntax?
So you'd do thing.do_stuff::prom() or something?
@RydwolfPrograms result = <future>.collect(), and collect would be async and auto-awaited
aw darn
The point is that <future> would be auto-awaited
Once you have a future you could just .await() or whatever
But it can't be a method after the function call, since at that point it's already been awaited into a non-future
E.g., let's say I have a function called input
Right now input() just pops a list of inputs, and is synchronous
But then, as has happened to me like ten times, I realize I want to support input from the terminal, and thus input needs to be async
So, I just make it async. Now, input's async, so whenever things call input(), the compiler pretends it's input().await()
If I want to, say, take multiple inputs at once, which would mean I need the Futures as objects, I could do input::fut() or whatever twice, then .await() those later (or use a switch/all sorta thing)
I gotta say, programming in Rust for a little while, I miss event-based
It's a fun paradigm to work with
hello
i have arrived
We're aware :p
yes. yes you are aware of me saying that i have arrived because i have said a greeting indicating that i have arrived.
o.o
Yes, and this is just clutter at this point
LDQ: Future vs. Promise
Yes, so… what are we talking of today?
15:17
Async
@RydwolfPrograms Future
although that's not really ideal either
I want your answer in AP History SAQ format
I don't like Future, but I really don't like Promise
Task sounds good
@Ginger Why do you dislike Promise?
It's a pretty straightforward description of what it is; a promise that some data will be returned, later
it bothers me
15:21
@Ginger What about a task implies it's asynchronous?
A "task" sounds more like something, probably synchronous, in the event loop
E.g., JS's queueMicrotask
(also why do we continue polluting JS's global namespace in 2023 come on people)
I'm not sure I'm a fan of Promise, because it doesn't have to be resolved lol
like even ignoring the fact that it can error (which i guess you can say is part of the promise; some result), a promise could also theoretically just never do anything like new Promise(() => {})
Well that's just JS weirdness
it's a fine name though overall
Trying to make exceptions and async work well together is dumb, once you use Rust-style Results and stuff it's a more sensible name
I guess you could make a Promise that never returns, but you can make a callback that's never called, or a do-while that always does, etc.
yeah that's very fair
also yeah honestly exceptions are kinda annoying; recently I've started returning [result, error] from things fairly often
16:07
\$ Can Latex in chat? \$
not at least in this way
Nope, chat markdown's super limited
Do chat from comment turn into this?
16:34
@l4m2 yes with ChatJax++
@RydwolfPrograms Future or CompletableFuture like java
@RydwolfPrograms whats event based
also forgive me im kinda blind to the discussion i never learned async/await despite trying to understand it
i kinda understand kotlins system
uh...shit. I was doing a demo of how Firecracker made RTO more secure and I was like "look, I can delete /bin, which would destroy my computer normally, and everything's fine". And then I tried rebooting to leave the VM and I deleted reboot (facepalms)
lul
So I guess I'm just gonna sigkill it
Okay I got my shell back with a kill -9 but Firecracker's still running in the background :|
Well I've killed a bunch of things it's prolly all fine
16:54
@RydwolfPrograms who were you demoing to? :p
My CS class for a free 100 :p
I totally forgot today was presentations so I just tried to figure out how FC worked in like five minutes then showed it off
lol
Java-to-Python converter guy is doing as well as I predicted
@RydwolfPrograms I don't recall that :b
He still seems to think the syntax is going to be the hardest part
Excited to see what happens when he gets to their type systems
16:59
@RydwolfPrograms huh
Aug 25, 2021 at 15:12, by Browncat Programs
Oh no...someone in my class is trying to write a program to translate Python to Java, with no knowledge on how either language is parsed/interpreted and no relevant libraries
@RydwolfPrograms its not gonna be that hard
@RydwolfPrograms yikes
He seems to have gotten the parsing worked out, at least
@RydwolfPrograms lmao
Aug 25, 2021 at 15:13, by PyGamer0
@BrowncatPrograms tell him that i said: "good luck :P"
@RydwolfPrograms its actually not gonna be very hard
kotlin on the other hand...
17:20
@RydwolfPrograms I think Python to Java would be harder than Java to Python
Yeah definitely
@ATaco Care to write an AutoHotkey + Paint answer to this challenge?
@DLosc Key stroke is valid input
@l4m2 Okay, true, but I'd still like to see an answer using AHK.
17:39
@RydwolfPrograms wait so which way is it
i got mixed up
Java to Python is what he's been working on recently apparently
mhm thats much easier than Python to Java
Python to Java is nigh impossible with the ludicrous amounts of typecasting and method resolution
18:01
I don't think so
When converting Python to Java, you could more or less treat all Python objects as Maps
When converting Java to Python, you need to read bytecode, do type inference and type checking, resolve imports, etc. before you can do the transpilation
He's not doing anything with bytecode
If you want to be able to import other Java libraries in your Java code, you need to read their bytecode to tell what's inside them
If you want to transpile a statically typed language into something else, you need to be able to do a lot of the stuff that language's compiler does
18:22
CMQ: How many ASCII control characters can you name/write down without looking at a chart?
@RydwolfPrograms null, start of text, end of text, carriage return, linefeed, escape, backspace, delete
That's 8
@emanresuA bro damn yall are better at golfing in desmos than me now
thats actually big brain stuff
I think I can get 26
Might be missing some obvious ones
Oh, I missed rot13(RBG, FV, FB, FLA, RGO, RZ, naq FHO)
18:29
We can see the history
You can always see the history
I rot13'd it so as to not spoil
Oh, alr
@RydwolfPrograms NUL, SOH, BEL, HT (I called it TAB), LF (I called it NL), CR, ESC, BS, VT, ACK, NAK, FF, FS
That's pretty good. Surprised you remembered FS but not the other three, I always remember those as a single block
I remember FF and FS as a pair
@TheThonnu Ah, forgot about DEL
@RydwolfPrograms I have had reason to use NUL, BEL, HT, LF, CR, ESC, and BS, and I've seen VT used in golf.
18:42
@user no not really
pythons a dynamic language
you can skip all that
@RydwolfPrograms form feed, LF, CR, SOX?, NUL, EOT, vertical tab, tab, ACK, BEL, SOH
I'm surprised so many people know SOH and EOT and stuff given that nobody uses them. I guess being close to the start makes them memorable
I remembered SOH because of SOH CAH TOA :P
No idea what it does
I think it was used for like, sending news information?
"In message transmission, delimits the start of a message header," quoth Wikipedia
oh wait theres DC1, DC2, DC3, DC4 as well
18:52
@DLosc Oh well that really clears things up :p
@DLosc In QBasic, there's a BEEP command that does exactly what you think it does. When I started learning Python, I tried to find something similar. A bit of Googling suggested print "\a", which seemed unnecessarily obscure, but okay, whatever. My main gripe is that it doesn't work in IDLE (it prints a box instead).
19:06
@pxeger can Vyxal Inc. use RTO for Vyxal Bot's !!/code command?
yes we have our own service, but it's a janky mess and needs to be rewritten, so we'd like to use RTO while we do that
RTO or ATO?
I'm assuming you mean the latter unless pxeger has been doing some M&A I wasn't aware of :p
ATO, lol
Oh also, Ginger, your new server is ready. I got my UPS in last night.
like ready for me to BEGIN THE [Transfer]?
I'll need to do some setup, like clearing out anything still running on it, but by tonight/mid-tomorrow it should be ready
19:13
cool!
wait, how am I going to move my current Debian install over?
I'm still undecided on whether to just give you the whole server or a VM on it. The former'd be easier, the latter'd be better if you accidentally install skynet on it
Don't worry, I probably won't do that
@Ginger It's a blank canvas, you can just copy the disk byte-for-byte
cool, I'll just teleport over to DigitalOcean's server farm and take the drive my droplet is on q:
I'll give you a tibibit of disk space minimum
(did you know tibibit is a palindrome?)
19:15
(I did not)
19:25
One problem later on will be port forwarding, since it's on the same IP as rto_wolf
I'll probably just have rto_wolf proxy on to you ports 80 and 443
Those're the only two it needs, I've got its SSH on 2209
IPv4 was a mistake
Only took, what, four years? :p
???
"Necessary cookies only" is new
oh lol
@JoKing Welp, there goes 1000 of my rep ;)
19:49
this is interesting and potentially useful for golfing
20:22
@Seggan Java chooses which overload to call at compile time. It doesn't use multimethods like Groovy or Clojure. You can't just directly turn Java into Python, you need to analyze and type check it yourself to be able to resolve methods and stuff
@user ah yes overloading i forgot
@RydwolfPrograms yeah was just gonna report that too
21:01
fun fact: I am in control of 6 CGSE accounts total, including this main one
@Ginger sure, but make sure you impose a reasonable rate limit per user
can do
0
A: Sandbox for Proposed Challenges

GingerMunge my Text code-golf string random Inspired by this example in the Python documentation. Write a program that takes as input a string of arbitrary length and returns a version of that string with every letter, except the first and last, of every word randomly shuffled. "Word" is defined here a...

21:29
CMQ: I need a way to turn a directed cyclic graph into a directed acyclic graph by taking all the cycles and smooshing them into single nodes (for context: I need this to figure out which order to compile modules in for a language I'm working on)
Ooh I've had to do that before
For a Google Foobar thing, and I think something else too
What would you do with multiple overlapping cycles?
e.g. a graph like {A: [B, D], B: [C], C: [A], E: [A]} would turn into {[A, B, C]: [[D]], [E]: [[A, B, C]]}
@RydwolfPrograms Still smoosh them all together, I guess
Let me come up with an example of that
{A: [B], B: [A, C], C: [B, D]} would turn into {[A, B, C]: [[D]]}
Both the [A, B] cycle and the [B, C] would have to be put together because if C needs B and B needs A so C needs A (and the other way around)
@user Whoops, forgot to ask an actual question here. Anyone know any algorithms to do this?
@RydwolfPrograms How did you end up solving it?
@user I guess you can use one of the algorithm for finding strongly connected components. See en.wikipedia.org/wiki/… and en.wikipedia.org/wiki/Strongly_connected_component
21:48
@RydwolfPrograms what
whats Google Foobar
22:00
Google developer program, you can get into it by searching certain things
22:22
Not worth it I don't think they hire from it anymore
The other day, this video about "running 'Hello World!' in 10 FORBIDDEN programming languages" came up in my YouTube feed and I thought of y'all. youtube.com/watch?v=Ysled8GvKuk
The YouTuber has some very pointed feelings about golfing languages - and uses TIO for one of the examples. :D
is that thumbnail... calling piet *easier* than brainfuck
like i guess it's more powerful in terms of the operations you have to work with but actually drawing something to use them is so much less intuitive
I think it's just designed to reference some other classic YouTube memes? But I think piet is the only language he says nice things about.
22:38
Hello, world in bf is pretty trivial - you can do it with just +.- Golfing it is a little harder tho.
And the one in the video isn't even well-golfed
Me when brainfuck is forbidden: 👮🚔 (I used it an now I'm being arrested)
Not sure he's super interested in golfing so much as he is in introducing people to esolangs?
Yeah but... there are both shorter and simpler approaches
> This dude must be the Bob Ross of esolangs!
:D
22:40
> A friend of mine made a lang called "numbscull". Everything is a number, and all numbers are variables. So if you set 2 to 3, then 1+2 becomes 4.
Exists already, it's called forte
Someone already commented that. :P
@emanresuA a lot of the time they just feed it into an awful online text to brainfuck translater
That doesn't look like a text to brainfuck translator's output tho
you'd think even those would do better but they're also probably not made by people who are into the language :P
nah it totally looks like it could be generated naively
Most of those use the "create a buffer at the start of a program and twiddle the cells for output" method - for example, the semi-basic Hello World approach creates the character values 30, 70 and 100 (or similar) at the start using one loop.
Also, is that Piet program an actual HW program? It only has single color blocks, meaning the only constant it can push is 1.
Huh, I guess so
Anyway, about those brainfuck converters this, this and this what I was talking about. (I also got some cursed stuff like this, this and this)
23:10
those cursed ones are beautiful
@JoKing You're the bf guy, any idea what this is doing?
not sure without stepping through it, but i suspect it is building the string in terms of x*constant+y+constant, while minimising the values of x and y
ah, but it is also using the previous value in the formula, interesting
Maybe they're abusing the deltas as they'd be smaller than the values themselves?
Seems to be doing some weird bijective base 7 thing?
Yeah it looks like it's mapping each triplet of base 7 digits to a single ascii char
That approach might actually be better in general
23:29
Wtf how is everything so cheap now
I was looking at a chip thingy with WiFi 5, a 240 MHz processor, 4 MB of flash, like basically a small whole computer and I'm like "well this is gonna be expensive isn't it" and I open Digikey and it's $3
That's like 25× the speed and storage capacity of a $80 TI calculator
With WiFi and Bluetooth and GPIO
@RydwolfPrograms RPI Pico?
Nah, ESP32-S3
If it has "pi" in the name my default assumption is I can't get one until 2025
(for context I'm considering sticking some humidity sensors and speakers on microcontrollers to fuck with the people vaping in the school bathrooms. just a lil' "HUMIDITY DETECTED, ALERTING ASSISTANT PRINCIPALS BEEEEEEP" should do the job)
Ah yes, a Bathroom, famously devoid of humidity
Yeah but not like, air-saturated-with-water-vapor levels that build up when half a dozen people are in there vaping
Which is pretty much their default state
CMC: Given a string, produce the shortest program which returns this string.
23:39
authorities love it when you put recording devices in bathrooms
Recording?
well, sensing the humidity at least
I mean unless your PII is the humidity of the air around you...
You can get in trouble for a box with a Red LED if you arent careful.
Hard to catch someone in a room where you can't have cameras :p
23:49
@ATaco Does it have to be a full program?
LDQ: What's a good name for something that does lst[0:index]?
that is, get every item from index 0 to index index
@user Anything that would constitute a program per standard rules. Functions are fine too.
You must output the function code though, no function(s){return ()=>s}
@lyxal "slice to", "first", "head", "take"
@lyxal "trim", "truncate", "first_n"
"trim" could be confused with trimming a specific item (like whitespace) from the ends of the list

« first day (4401 days earlier)      last day (740 days later) »