Advent of Code 2023 | General Tips

  Рет қаралды 10,483

HyperNeutrino

HyperNeutrino

Күн бұрын

Пікірлер: 14
@JimYoungman
@JimYoungman Жыл бұрын
Seems great, I changed it to use TS instead of JS just for my sanity but this a great way to get it all started
@felix.delrubio
@felix.delrubio Жыл бұрын
Such a great contest for all skill levels. Love the tips!!!
@RoboDragonJediKnight
@RoboDragonJediKnight Жыл бұрын
Good tips. I particularly like the utility scripts. Being able to automate these kind of repetitive actions, is invaluable for a tight feedback loop and being competitive for these time-based leaderboards. As a supplement to your current approach, you might consider using a "file watcher" like wach or nodemon or entr. That way you can facilitate rapid feedback on the command line, seeing changes to the output of your solution without switching to a terminal and typing `jaoc` or `aoc`. Instead, a save (Ctrl+S) could achieve the same result without the context switch. As an additional optimization you could research a way to copy the standard output to a clipboard if you want to quickly be able to paste the answer to the web browser with the problem open. You could also do this in your custom file watcher command that runs on file change. If you want to optimize away the copying and pasting the answer solutions to submit answers, the form submissions might be automatable using a similar approach to how you implement your `aoc-load` function. The http form I see submits an HTTP Post to a structured url, passing in the text answer and the level in the HTTP body. I'm sure you could use your session cookie as well for authentication.
@hyper-neutrino
@hyper-neutrino Жыл бұрын
These are all really neat ideas, thank you for the suggestions! I was actually playing around with the idea of making an AoC IDE, and although I definitely won't have the time to get it done before this year's AoC ends, maybe you'll see it around on my channel sometime in the coming year 👀 I'll definitely keep these ideas in mind!
@MrCreeper20k
@MrCreeper20k Жыл бұрын
wow looking at the leaderboard I see you're #1 for a good few. Thats crazyyyyy
@astrocoastalprocessor
@astrocoastalprocessor Жыл бұрын
❤🎉 So inspiring! Thanks for the advice!
@lilmorphius
@lilmorphius 11 ай бұрын
pleeeeease can you do previous years walkthroughs too?! Your video solutions are so helpful!
@alexanderchori8154
@alexanderchori8154 11 ай бұрын
It’s also may be useful to use Python’s assert keyword that lets you write more explicit assertion. And it works the same as the way with raising RuntimeError you shown. Example: `assert f > 0` to check if is is positive at some point or in your case it would be `else: assert False`
@glitchinLife
@glitchinLife Жыл бұрын
Thanks for the tips and good luck
@mathcat4
@mathcat4 Жыл бұрын
Podium this year!
@Efebur
@Efebur Жыл бұрын
Hello can I ask what is open(0).read(), is it the same as input() and if it is, why use it over input?
@hyper-neutrino
@hyper-neutrino Жыл бұрын
open(0) opens standard input, which you can iterate through to get each line (you'll often see me do for line in open(0)). open(0).read() reads all of standard input at once, which when piping in from a file (as I always do), reads the whole file. input() works fine but iterating through open(0) stops when you're out of input and open(0).read() is useful if you want the whole file at once.
@Efebur
@Efebur Жыл бұрын
@@hyper-neutrino so I tried to read about it a bit and I’ve come up with these use cases. Are these correct? - If I want the next line of input: input() - If input is multiple lines and I want all of them as one big string: open(0).read() - If input is multiple lines and I want all of them split into an array: lines = [*open(0)] - If input is multiple lines and I want to iterate over them: for line in open(0) However I think the lines with open() include the character which input() doesn’t include as far as I know. Is this correct? Are there more use cases I should know about? Thank you very much.
Advent of Code 2023 Day 1: Trebuchet?!
6:38
HyperNeutrino
Рет қаралды 7 М.
Keynote: Advent of Code, Behind the Scenes - Eric Wastl
46:01
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 699 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 66 МЛН
Advent of Code 2024 | Day 17 "Chronospatial Computer"
47:21
HyperNeutrino
Рет қаралды 3,5 М.
Advent of Code 2024 | Day 16 "Reindeer Maze"
31:55
HyperNeutrino
Рет қаралды 2,8 М.
Advent of Code 2023 Day 5: If You Give A Seed A Fertilizer
17:02
HyperNeutrino
Рет қаралды 13 М.
🎄 Advent of code 2024 in F# - day 02
26:50
Jo Van Eyck
Рет қаралды 528
Advent of Code 2023, visualizations (all days)
6:46
Guillaume Brunerie
Рет қаралды 4,9 М.
How to set up Rust for Advent of Code
14:18
chris biscardi
Рет қаралды 39 М.
Solving the Dotfiles Problem (And Learning Bash)
8:22
Bartek Spitza
Рет қаралды 93 М.
Advent of Neovim: Why Neovim?
10:21
TJ DeVries
Рет қаралды 46 М.
Advent of Code | General Guide | Tips and Tricks
1:24:19
HyperNeutrino
Рет қаралды 6 М.
Okay but WTF is a MONAD?????? #SoME2
18:18
TheSTEMGamer
Рет қаралды 68 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН