lainchan / λ

books for learning python specifically for scripting?

Hong, Guil Dong · 2022-07-17 01:48
I don't have much of an interest in developing actual software, however I'd like to have better python knowledge for the purpose of scripting things on my navi. are there any books focused on this use case? I considered picrel but it seems a bit too focused at absolute beginners
William Holtzer · 2022-07-17 07:20
Back in my day, i had to reverse engineer the chipset by dissasembling .EXE files with the DOS DEBUG tool because physical Intel-x86 manuals were hard to come by, and there was no internet. I hated BASIC, too slow for what I wanted to do (animations), but DOS came with QBasic and so I examined the few .BAS programs there, like NIBBLES.BAS and GORILLAS.BAS... I figured out how to build a hex editor in BASIC and then used it to modify existing EXE files and create my own programs. I didn't know all the opcodes... Sometimes I would guess at a bit pattern, I'd modify the EXE file with the hex values of a suspected OP code, then run DEBUG.EXE, and if the bytes disassembled into something that looked like what I wanted, then I wrote it down in my makeshift machinecode manual. Sometimes I didn't know what the instruction would actually do, so I built a test program in machine code that would print the register states and any memory differences found after the new instruction was invoked. By this time I had a hex editor written in machine code, so I'd fire it up, load the template program, enter the hex codes for the machine instruction I wanted to check out -- Then mom would come into my room and take the keyboard away from me and tell me to go play outside. Parents would take the power cables and peripherals right in the middle of me learning to code... Even when I was working on a grade keeping software that I sold to teachers via Compuserve. >"Mom! I can't go outside now, I'm working!" >This isn't a business place, this is a bedroom! You're just pretending to work on a computer! You're playing Games! >"No mom, I made this game! I'm gonna sell it with the other software I'm making! Most work can be done from a computer when the Information Superhighway is finally built!" > GO OUTSIDE, NOW! So, maybe try something like that? People complain that computer knowledge isn't accessible or tailored enough for their tastes. Come the F on... I've had to overcome people actually trying to stop me from learning. No one could keep me from programming my computer. I had spare power cables and input devices at my friend's houses. I eventually moved my rig to their garage and paid my neighbor a small fee to allow me to use my PC in their garage away from my parents who were actively trying to stop me from coding.... They were unsuccessful. Are you fuarrrking serious, mate? You want better knowledge? Just use that Internet people like me built for you. I'm not your personal search engine, and I'm a little put off by your whining about the book you actually have. It sounds like you're beneath beginner level, and haven't learned how to learn yet, so RTFM, and STFU. Try having someone rip your keyboard out of your hands while they shout at you to go outside. That's how I became "over qualified" at operating a PC, and made my first programs. Now I'm fluent in all the popular and older unpopular languages... I suggest you just download a free hex editor and start reverse engineering some executables. Start there since you're not an absolute beginner, it should be a cake walk to write some binaries in ELF format w/o a compiler. Machine code is a scripting language to me... the real hardware level coding is microcode, and you have to flash the chip firmware to get your programs to run.
Hong, Guil Dong · 2022-07-18 10:30
>>31911 You can't pull any of that soykaf anymore anyways. Mainstream hardware not only is infinitely more overengineered, is all locked down to death with "security" practiques for anything interesting. The only option is supplying kids with embeddedish devices or something.
Tomohisa "Tom" Kanezaki · 2022-07-18 14:30
>>31911 Maybe you should start some kind of non-profit or something that encourages parents to reward their kids with allowing them to spend more time with their passions if and only if they finish all their homework and get straight A's in the subjects that matter for college admission (maths, physics, chemistry, English) and SATs, instead of making arbitrary strict daily time limits or decree "you go outside and play with friends now!" >Are you fuarrrking serious, mate? You want better knowledge? Just use that Internet people like me built for you. I'm not your personal search engine, and I'm a little put off by your whining about the book you actually have. It sounds like you're beneath beginner level, and haven't learned how to learn yet, so RTFM, and STFU. To be fair the modern search engine tends to return SEO'd bot-scalped/Indian crap for these kinds of questions. Maybe he doesn't know you have to type something like "site:reddit.com" or "site:stackoverflow.com" in Google to find human-typed responses.
↑ · 2022-07-18 14:34
>actual software >scripting things on my navi You're in luck, these are one and the same. Why don't you just skim through the book you posted? The content is free on the website, so you can decide whether it's worth your time. I'd also consider shell scripts if your only goal is automation. Python can be overkill for that use-case and perhaps something simple like a chron job would serve you better. >>31911 >totally ignoring the topic >rambling personal stories >unwarranted self importance Cokehead hands typed this post.
Koichiro · 2022-07-18 14:35
>>31911 chill dude i just wanted a book. I'm not unaware of reading documentation and stackoverflow. I just thought a book for this sort of thing might be nice.
Lain Iwakura · 2022-07-18 21:15
>>31911 That sounds really cool, honestly. But kids do need to move their bodies a bit. And so do adults. Go take a walk!