Mastering curl: interactive text guide (antonz.org)
from learnbyexample@programming.dev to linux@lemmy.ml on 05 Sep 2023 12:54
https://programming.dev/post/2596500

#linux

threaded - newest

danielbln@lemmy.world on 05 Sep 2023 14:09 next collapse

I recently watched the 3.5-hour workshop Mastering the curl command line by Daniel Stenberg, the author of curl

I commend the author for watching and subsequently summarizing this into a blog article, but in the age of LLMs like ChatGPT I cannot be arsed anymore to memorize any of the arcane command line arguments of curl, ffmpeg and the like.

BeanCounter@sh.itjust.works on 05 Sep 2023 14:58 next collapse

One of the real turn offs to most of the people about using cli.

With gui you stumble around and make it work. With CLI you at least need a blog post read and at most need 2+hrs tutorial.

Semi-Hemi-Demigod@kbin.social on 05 Sep 2023 15:19 next collapse

See, I need a two hour tutorial to use the GUI because everything's scattered all over the place. If I want to know the options for a CLI tool I just read the man page.

cyclohexane@lemmy.ml on 05 Sep 2023 15:55 next collapse

With CLI, all you need for most use cases is “command --help” or “tldr command” or the beginning of “man command”. Been using curl for ages with just that. This blog post is only if you want something in depth to master it, not a requirement to use it.

A GUI is all about figuring things out and it is often pretty clunky compared to a cli, imo.

TimeSquirrel@kbin.social on 05 Sep 2023 16:03 collapse

Until the time comes where the GUI just doesn't have the specific option for what you want to do, and then usually you can string commands together into scripts to do it. That's where its power lies. Every command/utility on a Unix/Linux system is meant to be a tiny building block to use to accomplish a more complex task.

You can't possibly program an option for every contingency into a static GUI, but you can hand the user a toolbox of command line utilities and then they can accomplish nearly anything.

cyclohexane@lemmy.ml on 05 Sep 2023 15:42 collapse

You don’t have to memorize. Next time, you can just recall the commands by looking at manpages or this blog post again. You will already retain most concepts.

ChatGPT is cool, but it is wrong often enough that makes hard to trust. I don’t want to be running the wrong command and suffering its consequences. I only resort to chatGPT when docs and web search do not give me an answer quickly. Even then, I try to verify chatGPT with docs before going forward.

danielbln@lemmy.world on 05 Sep 2023 16:34 collapse

I mean, we’re talking curl here, I don’t think a lot of suffering of consequences is happening. And man pages are often also not a great resource, throw everything at you, often don’t contain examples. If I’m building an app that integrates curl or libcurl, oh yes I’m reading the doc. If I just need curl to do something quickly, the LLM output is perfectly fine.

cyclohexane@lemmy.ml on 05 Sep 2023 18:16 next collapse

I think you’re right, it is harmless for the most part. But one time I unintentionally overwrote a file using curl. It is definitely my own stupidity here though.

maor@lemmy.org.il on 06 Sep 2023 20:56 collapse

I’d be scared to perform POST/PUT with LLM-generated commands. For immutable calls I agree though

macallik@kbin.social on 05 Sep 2023 18:54 next collapse

Using curl as a substitute for man/help has made it one of my most used commands for me as of late:

curl cheat.sh/AnyLinuxCommand to view tldr/cheat tips

Also great for the weather via curl wttr.in

Hopefully more commands utilize this technique

lud@lemm.ee on 05 Sep 2023 20:03 next collapse

Thanks for the tip! I sometimes use the program tldr for this purpose.

macallik@kbin.social on 06 Sep 2023 20:34 collapse

tldr is also baked into cheat.sh too! (But it's redundant if you already have tldr/bro/etc installed probably)

sebastiancarlos@lemmy.sdf.org on 06 Sep 2023 06:44 collapse

Unfortunately wttr.in produces incorrect weather reports in many cities around the world

macallik@kbin.social on 06 Sep 2023 20:35 collapse

Did not know about this. Care to elaborate?

sebastiancarlos@lemmy.sdf.org on 06 Sep 2023 20:49 collapse
netvor@lemmy.world on 05 Sep 2023 21:44 collapse

Today I learned:

  • curl development cycle has a cooldown after a freeze.

How cool is that?

LeFrog@discuss.tchncs.de on 06 Sep 2023 06:27 collapse

Maybe its because I am tired but I don’t get it, what does this mean?