Please don’t. If you need something like json but with comments, then use YAML or TOML. Those formats are designed to be human-readable by default, json is better suited for interchanging information between different pieces of software. And if you really need comments inside JSON, then find a parser that supports //
or /* */
syntax.
I’m sorry which LLM is this?
It’s perplexity.ai. I like it because it doesn’t require an account and because it can search the internet. It’s like microsoft’s bing but slightly less cringe.
How’d you get that out of it?
The screenshot is fake. I used Inspect Element.
For a while I had a low-power server for my personal things that stayed on all the time, and a more powerful computer that hosted a minecraft server. As the player count dwindled, I decided to make the minecraft server automatically shut down at midnight, and wake up at 8 in the morning using rtcwake
. And eventually I disabled the rtcwake thing entirely, and made the smaller server run a webui that could wake up the minecraft server using wake-on-lan. So if anyone wanted to play, they would first have to remotely turn on the server through a web page. This was all password-protected ofcourse.
Also, no, I don’t use a UPS. I’ve never seen anyone use a UPS in the country where I live, and I don’t think I’ve experienced a power outtage in like 4 years. Whether or not you need a UPS seems to be largely dependent on where you live.
Jokes aside, LLMs are actually pretty nice, since they lower the barrier to entry for programming. A guy I know has been doing all of his data processing with obscure Excel hacks his entire life. But recently he had to parse a file with like a million or so lines, which would take forever in excel, so now he’s hacking together a python script using ChatGPT and meta ai. And in the process, he’s actually picking up a bit of python knowledge himself. He now knows what lists are, how loops and if statements work, and he even understands “intermediate” features like list comprehension and regex. They said llms would replace programmers, but in reality they’re making more of us lol
Gradual typing isn’t reinventing the wheel, it’s a new paradigm. Statically typed code is easier to write and harder to debug. Dynamically typed code is harder to debug, but easier to write. With gradual typing, the idea is that you can first write dynamic code (easier to write), and then – wait for it – GRADUALLY turn it into static code by adding type hints (easier to debug). It separates the typing away from the writing, meaning that the programmer doesn’t have to multitask as much. If you know what you’re doing, mypy really does let you eat your cake and keep it too.
u/vox@sopuli.xyz suggested Typst as an alternative to TeX. I gave it a try, and I’m loving it so far. It even has built-in support for the rotated text thing https://typst.app/docs/reference/model/table . I’ve only used it for notes/homework so far, but I’m looking forward to seeing how it fares for more serious typesetting tasks.
tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source
Just do all of these in parallel to maximise the change of installing the correct version
So there are many different commands that compile LaTeX, right? pdflatex
, pdftex
, latexmk
, etc. But they all do that thing where they ask for your input as soon as they encounter an error, right? Well, if you just pipe an empty echo
command to them, it notices that stdin
has reached end-of-file, and gives up trying to ask the user for input, and just exits on first error. So instead of pdflatex mydocument.tex
, you can do echo | pdflatex mydocument.tex
and it won’t ask you for input if it sees an error, it’ll just exit. There’s probably a “proper” way to achieve the same behaviour, but I can’t be arsed to read the docs.
Speaking of stupid TeX hacks, at one point I had a script called latex_compile_and_install_packages_until_it_works.sh
. It’s essentially a loop that repeatedly tries to compile a document, searches the output of the compiler for anything that looks like a missing package error, and pipes it to sudo tlmgr install
. The “fuck it” of package management, arbitrary code execution exploit included!
(Sorry for the screenshot, I lost the original script in text form, probably for the better)
I mean good point, but if I’m just using bash as a shell and not writing a script, I’m probably first previewing the contents of a file with cat
anyway, and recalling the last command and appending a | grep <pattern>
to it is less keystrokes than re-writing the last command into grep <pattern> <file>
. Especially if you’re playing around with the pattern and trying to get it right, it’s nice to have the pattern at the end of the line.
I was mainly thinking about how so many Rust projects advertise very loudly that they’re written in Rust. Like, they would have -rs
in the name, or “in Rust” as part of their one-line description. You rarely see this kind of enthusiasms for the the language in other languages. Not a bad thing by the way! And also there’s the “rewrite it in rust” meme, where people seem to take perfectly functional projects and port them to Rust (again, not a bad thing! Strength in diversity!)
Accurate. LaTeX is great, it makes you feel like you have superpowers compared to “office suite”-style software. But every once in a while you just run into some bullshit that feels like it’s stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable
where text in the “date” column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotatebox
es, a phantom
, a vspace
, a hspace
and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.
When did I ever tell people not to respond? Where am I being ignorant? I told people to not take the post seriously, because it is a joke post on a community about jokes. By all means, have discussion in the comments, silly or serious. I’ll gladly listen in and maybe learn something. Just don’t try to dissect silly things with serious arguments.
Same reasons you’d censor profanity. To show that I don’t necessarily agree with or support them. Maybe I should start using the vomit emoji instead of asterisks like u/pancakes [joking].
D*scord is technically searchable and fairly archiveable (messages never get deleted due to old age (in my experience at least) or if the original poster deletes their account). And some d*scord servers even have a Q&A mode similar to st*ck *verflow. But yeah, not the right tool for the job, not to mention ABSOLUTELY PROPRIETARY
YAML is good for files that have a very flexible structure or need to define a series of steps. Like github workflows or docker-compose files. For traditional config files with a more or less fixed structure, TOML is better I think