|
BobHoward posted:every time i have to write tcl (which i sometimes do, because it did kinda win in certain niches), i have to google for information about how to do poo poo. all this ever seems to find is mailing list arguments between tcl graybeards which got copied into a wiki article and called "documentation". not really the language's fault but trying to suss the truth out of that pile of noise is an extremely irritating way to try to learn how to write tcl, lol this really surprises me, as tcl docs are to my experience excellent. but it might be connected to the second. BobHoward posted:also tcl somehow manages to be less straightforward than perl. idk, maybe my brain is broke, but i just don't get tcl or see why anyone would want to use it. my go-to plang is python3 because even though it sucks, the magnitude of its suckage is mostly less than perl this does not surprise me though, tcl is really different, and while it is actually really simple there's an intervening "brain damage" moment before it clicks. it's main feature to my mind though is that it is pretty much the ultimate "gradual" shell-like language, a normal person can very easily use the trivial core of running commands, and you can build your way up into real programs in a confident way, everything making sense each step. it is when you *start* with writing a real program it all looks bonkers. as noted i specifically think tcl would have done a lot to make configuration and simple macro dsl's real graspable, while also being *vastly* more legit a programming language than any shell.
|
# ? Feb 23, 2024 16:14 |
|
|
# ? Jun 4, 2024 06:49 |
|
for those who don't know it tcl basically goes "everything is a string" combined with "pretty much everything is a command with commandline flags etc." it is less sugar than bash, basic tcl programs look an awful lot like you've just grabbed your .zhistory except with some unusual programs. i to be clear don't advice anyone to learn or use it, just that it would have been cool had it won out over a lot of crap we're still dragging along.
|
# ? Feb 23, 2024 16:16 |
|
Cybernetic Vermin posted:for those who don't know it tcl basically goes "everything is a string" combined with "pretty much everything is a command with commandline flags etc." it is less sugar than bash, basic tcl programs look like you've just grabbed your .zhistory wow, that sounds awful.
|
# ? Feb 23, 2024 16:17 |
|
FlapYoJacks posted:wow, that sounds awful. not much of a terminal user huh?
|
# ? Feb 23, 2024 16:19 |
|
Cybernetic Vermin posted:not much of a terminal user huh? I’m an embedded Linux engineer lol.
|
# ? Feb 23, 2024 16:19 |
|
FlapYoJacks posted:I’m an embedded Linux engineer lol. i know, and you should know that i know, or the slam might not work it is good. if you want structured general programming sure it won't be it, but there's nothing bash does better than tcl, especially not as an analogue of shell use as programming.
|
# ? Feb 23, 2024 16:22 |
|
Cybernetic Vermin posted:i know, and you should know that i know, or the slam might not work Oh don’t get me wrong, I hate bash as well. We use zsh mostly because it’s gplv2 licensed and not ash, which is way worse most of the time.
|
# ? Feb 23, 2024 16:25 |
|
Bash code:
I am mad! Hahahaha! Completely mad!
|
# ? Feb 23, 2024 16:27 |
|
Antigravitas posted:
Are you my boss?
|
# ? Feb 23, 2024 16:28 |
|
No. -H ldapuri Specify URI(s) referring to the ldap server(s); a list of URI, separated by whitespace or commas is expected; only the protocol/host/port fields are allowed. As an exception, if no host/port is specified, but a DN is, the DN is used to look up the corresponding host(s) using the DNS SRV records, according to RFC 2782. The DN must be a non‐empty sequence of AVAs whose attribute type is "dc" (domain component), and must be escaped according to RFC 2396. And it actually works. Resolves responsible AD DCs via DNS just from the DN, grabs a ticket for the ldap/$DC SPN, and goes on to make the query without ever asking for a user name or password. It's also automatically encrypted and signed via Kerberos. Reaching into Python just to urlencode a string in a shell script feels hysterical to me, but it works, lmao.
|
# ? Feb 23, 2024 16:36 |
|
tcl rules as a host for making small DSLs for embedding in applications
|
# ? Feb 23, 2024 17:33 |
|
my order of escalation is: - shell: max 20 lines, maybe with one or two if statements or functions, maybe one loop. literally "run this sequence of commands" - python: single file, max 200 lines or so, with stdlib only - rust: the rest (if it's a hobby project)
|
# ? Feb 23, 2024 19:18 |
|
i last touched tcl when running an eggdrop bot 15 years ago and even then it seemed pretty awful
|
# ? Feb 23, 2024 19:18 |
|
Progressive JPEG posted:my order of escalation is: tbh same, with the addendum that i think i am wrong to stick with shell that long. if i ever (again) wreck something through software nonsense it'll probably be having written one line too many of shellscript
|
# ? Feb 23, 2024 19:19 |
|
I just stay with Python for anything that can't trivially be done with a shell script. I bail on shell scripts as soon as the task I am trying to accomplish requires more than a trivial amount of logic. Shell is fine as glue for other programs to do the work.
|
# ? Feb 23, 2024 19:26 |
|
Progressive JPEG posted:my order of escalation is: - Shell: Normally max of 100~ lines. A lot of post-build/post-image scripts when building Yocto/Buildroot images may take a few extra lines to make everything pretty and perfect. Vagrant may be several hundred lines and I hate it but it's a client and I can't say no. - Python: Build everything in Python if you can if speed isn't a concern. Even in embedded land. - Rust: The rest.
|
# ? Feb 23, 2024 19:29 |
|
Shaggar posted:they guy who made the good XPSes left Dell and they turned bad pretty much immediately Beeftweeter posted:nope the article specifies that you can't. lol https://arstechnica.com/gadgets/2024/01/the-dell-xps-laptop-as-we-know-and-love-it-is-no-more/ sigh i got a xps 13 from 2022, at least it hasn't got that copilot key wont buy again. god drat it dell
|
# ? Feb 23, 2024 19:43 |
|
every xps 13 has been garbage and i am glad they're dead
|
# ? Feb 23, 2024 19:44 |
|
Progressive JPEG posted:my order of escalation is: As much as I'm not generally a big python fan, using python and click or something ends up being really good for short things that require any sort of command line options, and once you're doing anything like that shell scripts often aren't even any faster to write. I guess python isn't even that bad now except for the package management situation and the type hinting syntax sucking. I know that poetry has some issues but it has caused me to tend to reach for python more often lately (having to choose between installing poo poo globally or manually janitoring venvs was probably the single worst thing in python). mystes fucked around with this message at 20:10 on Feb 23, 2024 |
# ? Feb 23, 2024 20:05 |
|
I've got a few shell scripts that are over 100 lines but they're fairly complicated build scripts that do things like poo poo out bootable ISOs and do transforms on debug information in ELF files so they get a pass
|
# ? Feb 23, 2024 20:35 |
|
Python is good, actually. It's easy to get poo poo done, and that's all I care about at the end of the day.
|
# ? Feb 23, 2024 20:43 |
|
Tankakern posted:sigh yeah but that one probably doesnt have sleep
|
# ? Feb 23, 2024 20:49 |
|
I work in embedded Linux, and I've shipped a ton of shell scripts. Even some complicated ones. When you're targetting an embedded system made with Busybox, shell is nice because it doesn't have any dependencies other than making sure the right Busybox applets are enabled. Python might or might not be on the production system. It's not included by default in a lot of Buildroot/Yocto configs. But a shell-script with minimal dependencies will work every time, and won't introduce large deps that you don't already have. You can go into Guitar Center today and buy a product I designed that has a 350-line shell script that configures its USB-gadget interface.
|
# ? Feb 23, 2024 21:26 |
|
if I'd put Python into the rootfs, it would have doubled the size of firmware releases. That translates into slower firmware updates, more expensive flash memory, and higher bandwidth costs in serving up the file to customers.
|
# ? Feb 23, 2024 21:28 |
|
don't get me wrong, shell scripting is bad and I hate it. But also I kind of love it, and it's still the best way to end up with a result that has the smallest overall footprint.
|
# ? Feb 23, 2024 21:30 |
|
Poopernickel posted:if I'd put Python into the rootfs, it would have doubled the size of firmware releases. That translates into slower firmware updates, more expensive flash memory, and higher bandwidth costs in serving up the file to customers. gb2embeddedinuxthread
|
# ? Feb 23, 2024 21:35 |
|
Truga posted:yeah don't use ls in scripts what the hell generally you're right but i think for something like that it's fine, you know what the contents of the directory are supposed to be already
|
# ? Feb 23, 2024 21:51 |
|
Poopernickel posted:don't get me wrong, shell scripting is bad and I hate it. awk is in posix and a considerable improvement over shell, imo. i like awk and I'm normally a weenie super high level declarative "programmer" though i have no idea if busybox's awk impl is nerfed compared to gawk
|
# ? Feb 23, 2024 21:59 |
|
BobHoward posted:every time i have to write tcl (which i sometimes do, because it did kinda win in certain niches), i have to google for information about how to do poo poo. all this ever seems to find is mailing list arguments between tcl graybeards which got copied into a wiki article and called "documentation". not really the language's fault but trying to suss the truth out of that pile of noise is an extremely irritating way to try to learn how to write tcl, lol fwiw my mandb on darwin is completely littered with tcl documentation. haven't really seen the same on linux (which tends to be littered with perl, incidentally) i don't really know where it came from either, but my guess would be one of the old xquartz packages that probably survived multiple systems Beeftweeter fucked around with this message at 22:08 on Feb 23, 2024 |
# ? Feb 23, 2024 22:04 |
|
god help me I'm contemplating buying a framework laptop to diddle around with modern linux on
|
# ? Feb 23, 2024 23:04 |
|
outhole surfer posted:gb2embeddedinuxthread Embedded Linux is Linux.
|
# ? Feb 23, 2024 23:05 |
|
I’m thinking of buying an old hp probook to put a lightweight Linux on
|
# ? Feb 23, 2024 23:09 |
|
awk sits in this weird spot for me where I know it is really powerful, but its power becomes useful at the exact point where I start to use Python instead.
|
# ? Feb 23, 2024 23:09 |
|
i just threw linux on some old chromebooks i picked up real cheap small, dense screens, good hardware compatibility and all day battery the value proposition isn't what it once was though, they kinda stopped making the higher end ones (which i also run windows on, but still)
|
# ? Feb 23, 2024 23:14 |
|
Beeftweeter posted:i just threw linux on some old chromebooks i picked up real cheap
|
# ? Feb 23, 2024 23:40 |
|
mystes posted:how many old chromebooks do you have? 3 if you count one my wife uses, two if you're taking me personally they're both samsungs. the 11" one is 1920x1200 and the 12" is 4k (and oled, and much better specs) all together they were under $400
|
# ? Feb 24, 2024 00:57 |
|
Beeftweeter posted:i just threw linux on some old chromebooks i picked up real cheap chromebook os is linux
|
# ? Feb 24, 2024 06:35 |
|
that's like saying android is linux
|
# ? Feb 24, 2024 07:06 |
|
android is linux
|
# ? Feb 24, 2024 08:29 |
|
|
# ? Jun 4, 2024 06:49 |
|
anime is good
|
# ? Feb 24, 2024 08:29 |