Lurker > 1337toothbrush

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, Database 8 ( 02.18.2021-09-28-2021 ), DB9, DB10, DB11, DB12, Clear
Board List
Page List: 1, 2, 3, 4, 5 ... 26
TopicITT: Learning Python
1337toothbrush
12/24/21 6:31:03 PM
#497
Write a program to make your stomach feel better. Hack into the matrix.

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/23/21 10:16:20 PM
#495
Topic almost full.

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/21/21 11:08:44 PM
#492
I haven't touched any programming since I started my vacation from work. Might start up a side project when I'm back at work.

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/14/21 10:48:14 PM
#478
Actually, speaking of running other languages in the browser. Python can actually be run in the browser now as there are multiple efforts to do so through WASM (web assembly).

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/14/21 1:20:13 PM
#476
The biggest benefit of JavaScript is that it runs in the browser. As more languages can run in the browser by compiling to WASM, we'll see how much that holds up.

As for Python, it's generally for quick and dirty scripts, which was mainly the domain of shell-specific scripting languages and Perl. It has also become the premier machine learning language just due to how many in academia learn with Python. There's nothing stopping you from using Python for anything, other than maybe performance limitations which can be worked around. Like even though JavaScript is mainly run in the browser, you can run JavaScript on server side (e.g. Node). But yeah, momentum is usually what dictates the "best" applications for a language and for Python, the momentum behind it being used for machine learning is huge.

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/10/21 10:22:19 PM
#470
More like Endprogrammer.

---
https://imgur.com/a/FU9H8 - http://i.imgur.com/ZkQRDsR.png - http://i.imgur.com/2x2gtgP.jpg
TopicITT: Learning Python
1337toothbrush
12/09/21 1:45:23 PM
#467
SpiritSephiroth posted...
You're gonna pick up Java and learn it alongside Python? I'm thinking maybe a year more with Python then I'll start looking into other languages.
Just a reminder that Java and JavaScript are completely different languages. I hate that they named it JavaScript just to latch onto the hype surrounding Java at the time.

SomeLikeItHoth posted...
I started my Python journey around last February/March. I learned a lot but I was getting to this point where I needed to learn more than just Python. I felt like I wasn't doing enough by focusing on one language, and it was causing me to get really burned out. I still really love Python and I plan on picking it back up early next year, but I feel like if I learn more languages and learn more about computer science, it will overall make me a better Python programmer. There's still a lot I want to do with Python, like new projects I want to make. But I'm giving myself a break for now until I can recover mentally from spending so much time on it.
It's good to get a feel for other languages anyway since another language might be more to your liking and thus make you more productive in your programming. By the way, do you have a preference between JavaScript and Python so far?

---
TopicITT: Learning Python
1337toothbrush
12/03/21 9:06:13 PM
#458
SomeLikeItHoth posted...
I'll take a look at your code when I can.

https://www.epicgames.com/store/en-US/p/while-true-learn

Free game. I don't know anything about it but seems interesting.
Forgot to comment on this. It might be a decent tool to get started on logical concepts in programming, but it's much more preferable to actually write out code. There's somewhat of a gap to jump between a point-and-click interface and actually writing out code.

---
TopicITT: Learning Python
1337toothbrush
12/03/21 9:40:07 AM
#456
SpiritSephiroth posted...
Yeah I can't for the life of me figure that stupid bug out. I tried to put it in its own while loop while seperating part of the code into another while loop or if function and it didn't work. Actually made it worse so I'll leave it. Maybe I'll ask my friend for help once he's free from work.

Till then back to studying.
Are you talking about the part where you choose either left or right?

You can force it like so:
first_crossroad = ""
while first_crossroad != "right" and first_crossroad != "left":
[indent] first_crossroad = input("Right or Left?").lower()

That'll loop the input part until the user inputs a correct value. You can also replace the while condition with:
while first_crossroad not in ["right", "left"]:

Then you don't have to put an "and" between each of the acceptable commands, you can simple add to the list. You can even make it more programmatic by maintaining the list elsewhere, e.g.:
acceptable_commands = ["left", "right", "back", "forward", "batman"]
while first_crossroad not in acceptable_commands:
[...]

---
TopicITT: Learning Python
1337toothbrush
11/25/21 2:41:37 AM
#439
Why would you want to do Python development on a phone or tablet? Do you have keyboard for mobile devices? If it's just small tests, you could use an online Python interpreter like https://ideone.com/l/python-3

---
TopicITT: Learning Python
1337toothbrush
11/22/21 11:33:24 PM
#436
toyota posted...
didnt really need the privileges paramater there and could have been just written as
def __init__(self): ?
Correct.

toyota posted...
Whats the best way to upload my code for the little assignments in the future if I need to ask more questions?
http://codepad.org/

https://ideone.com/l/python-3

Either of those is fine.

---
TopicITT: Learning Python
1337toothbrush
11/22/21 12:37:13 PM
#434
Questionmarktarius posted...
Yeah, this. In most languages I know of, this statement says "assign a value to self.battery equal to whatever the Battery function returns."

Probably should be self.battery = new Battery(), which means "create a Battery object with default attributes and assign it to self.battery"
No, Python doesn't use the keyword "new" to instantiate an object. In fact, I don't think it uses "new" as a keyword at all.

---
TopicITT: Learning Python
1337toothbrush
11/22/21 9:35:58 AM
#432
In the battery example, they're actually using that parameter and (this is key), they give that parameter a default value (battery_size=75) so that's why you don't have to pass in your own value, it'll pass 75 for you.

---
TopicITT: Learning Python
1337toothbrush
11/22/21 9:30:06 AM
#430
I'm separating this out to a different post so as to not add more information than necessary to the other one. I want to add something regarding the behavior of "self" and maybe this will help you understand.
After you write:
self.extra_privileges = Privilege()
You can then print out the privileges with:
self.extra_privileges.show_privileges()

As you can see, show_privileges also takes in self. So what's self in this case? It's self.extra_privileges and you can explicitly show this by calling:
Privilege.show_privileges(self.extra_privileges)

That is equivalent. Also, if you create an Admin object, you can call the same function like so:
admin = Admin("first name", "last name", 69, "username")
admin.extra_privileges.show_privileges()

Or, like shown before: Privilege.show_privileges(admin.extra_privileges)

---
TopicITT: Learning Python
1337toothbrush
11/22/21 9:17:08 AM
#429
The "self" keyword is a way to reference the object itself. This is so that Python knows that you want to reference the object itself (as opposed to a global or function variable). Let me break down what you're doing with the key line: self.extra_privileges = Privilege(self)

Privilege(self) is a call to Privilege's __init__ function, the first parameter of which is self. The __init__ function is special because it indicates how you want objects of that class to be initialized, therefore the self parameter is required so that you can add all the attributes. HOWEVER, this is a parameter that Python automatically passes to that function call. What you're doing here is passing Admin's self, so here's how your function call is really working:

self.extra_privileges = Privilege(Privilege's self, Admin's self)

If you do this: self.extra_privileges = Privilege()
It's really calling: self.extra_privileges = Privilege(Privilege's self)

But you're missing the second parameter (which is privileges)

Since you are assigning privileges to a fixed value, you're not actually using the privileges parameter in __init__ anyway, so you can get rid of that.

---
TopicITT: Learning Python
1337toothbrush
11/19/21 9:58:37 AM
#422
SomeLikeItHoth posted...
What method are you using to learn Rust? I'd be interested in learning in the near future. 1337toothbrush
@SomeLikeItHoth

A mix of "the book": https://doc.rust-lang.org/book/
and
"Rust by Example": https://doc.rust-lang.org/stable/rust-by-example/

Of course a healthy mix of search engine use, too. The effort is mainly driven by me porting a bot written in Go to use Rust instead. Having a defined application with an end goal is extremely useful since it naturally draws out the features I'm looking to use. For example, if I'm working my way through error handling, I look up the section on error handing. From there, sometimes I'll stumble upon other features like pattern matching and enums.

---
TopicITT: Learning Python
1337toothbrush
11/19/21 4:52:06 AM
#420
I haven't posted here in a while but I've been doing some learning of my own. I'm adding Rust to my repertoire and so far I'm loving it. I'm touched the language here and there in the past, but I've been getting more into it recently. It's such an amazingly well-designed language. It's just... *chef's kiss*. Makes it hard going back to C or C++, especially with with the conveniences of Cargo. I always hated setting up C or C++ projects and dependencies are just hell.

---
TopicITT: Learning Python
1337toothbrush
10/16/21 5:28:37 AM
#321
TopicITT: Learning Python
1337toothbrush
10/04/21 10:04:11 PM
#297
Git is decentralized. Are you sure you didn't commit to your local repository without pushing to remote?

---
TopicITT: Learning Python
1337toothbrush
10/03/21 11:46:37 PM
#294
Depends on the languages. Some are more similar to others but some are structured quite differently and encourage different patterns.

---
TopicITT: Learning Python
1337toothbrush
09/14/21 9:35:33 PM
#250
It depends on what motivates you. If seeing things move on the screen motivates you, then check out the graphics. If not, then continue with what you're doing.

---
TopicITT: Learning Python
1337toothbrush
09/14/21 7:36:16 AM
#247
SomeLikeItHoth posted...
I used to make pixel art for fun. Not so much anymore. What kind of graphics do you make?
Well I suck at art, but I like doing procedural graphics and shaders. I'll either make shitty pixel art or use free stuff off opengameart.

---
TopicITT: Learning Python
1337toothbrush
09/13/21 10:17:25 PM
#245
Graphics, for me, is where the magic really happens. Makes it a lot more easy to make a real-time game which is a lot more fun to write and see in action.

---
TopicITT: Learning Python
1337toothbrush
09/13/21 9:15:46 AM
#243
SpiritSephiroth posted...
Wait so you can put graphics within Pycharm?
Pycharm is just the development environment. Using a library that can display graphics is key.

---
TopicITT: Learning Python
1337toothbrush
09/12/21 3:26:26 AM
#239
RchHomieQuanChi posted...
Didn't actually get to work on any coding yesterday. Had a cousin in town and spent basically the entire day hanging out with her. Then had a movie date with my girlfriend.

I did get to set aside some time today, however. Worked with some lists, functions and if statements. I can already feel my brain working on ways to utilize them in my code. Think I'll try doing a cyberpunk/fantasy-esque text adventure game once I learn a little bit more. It's a story I've wanted to do for years and I think I could do a cool game set in that universe using Python
If you want to attach graphics onto it, check out renpy (https://www.renpy.org/) if you didn't know of it already.

---
TopicStock Market General #39
1337toothbrush
09/07/21 12:17:27 AM
#470
Please... not before I can exit out of my position...

---
TopicStock Market General #39
1337toothbrush
09/04/21 5:47:22 PM
#459
That's the common advice, but I feel like they're aggressively pushing everyone to put their money in for the greatest rug-pull of all time. Literally everything is telling you "put money in, keep money in, always buy the dip, the market will always rise, you have nowhere else to put your money because of the low interest rate" that I'm very suspicious of this.

---
TopicStock Market General #39
1337toothbrush
09/03/21 1:05:04 AM
#443
I'm just hoping for CRSR to go above my average cost so I can get off this ride. Not touching stocks for a while after that. Hoping the jobs report this friday doesn't fuck it up for me.

---
TopicITT: Learning Python
1337toothbrush
09/01/21 1:52:33 AM
#211
Kloe_Rinz posted...
How do you automate tests

I only ever really do powershell these days, I did C++ in uni but nothing about actual workflows like git, IDEs etc, just the language itself
You can write unit tests which will make calls to your application's functions and then check the outputs to make sure they are in line with your expectations. These unit tests can then be run by a CI/CD system which can report if any tests have failed.

---
TopicITT: Learning Python
1337toothbrush
09/01/21 12:35:59 AM
#209
Kloe_Rinz posted...
Can someone explain CI/CD and that stuff in English
Simply put, it automates parts of the integration and deployment processes. Integration being when you're working on a team and you're merging code in with other people's code (or merging with your own code), you can have the system automatically kick off build and test processes to make sure it can still build and that you didn't break any functionality covered by the tests. The delivery part is where you can have it take the built application and deploy it to a server or package it and put it up for download.

---
TopicITT: Learning Python
1337toothbrush
08/31/21 11:28:05 PM
#204
Git is the source control. Github is what you're using as the remote repository.

---
TopicITT: Learning Python
1337toothbrush
08/30/21 9:10:38 AM
#195
SomeLikeItHoth posted...
What's your daily schedule like? I don't have a CS degree and I'm just self-teaching. I have no idea what I want to do with programming yet but I live in the Bay Area so I have a lot of options. I was thinking of continuing my teaching, try getting an entry level position somewhere and then go back to school for a new degree at the same time.
Daily schedule at work or in general? My work hours typically span from 7am to 3pm, but that's been moving around a bit with working from home. During those work hours it's not really fixed because it depends on what projects I'm working on and what needs to be done in those projects.

---
TopicITT: Learning Python
1337toothbrush
08/30/21 1:46:18 AM
#193
SomeLikeItHoth posted...
Nah fam. I really like that code. It's very neat. Where did you learn to program? And what other languages do you know?
I started learning the basics of programming while screwing around with RPG Maker 2000 as a kid, but that was a purely point and click interface at the time. Then I picked more up through high school computer science classes and later on in university where I earned my degree in computer science (though for practical programming I learned it mostly through side projects in my spare time). I work as a software engineer, so I keep up to date with stuff.

Languages I know to varying degrees: C, C++, C#, Java, Go, Rust, Python, JavaScript, TypeScript, Turing, Miranda, Racket, Visual Basic, and a laughably small amount of x86 assembly.

Right now I'm highly interested in Zig (https://ziglang.org), however, it's not yet stable and I kinda don't want to learn something that could potentially change drastically while I'm still using it but I do love the design philosophies.

---
TopicITT: Learning Python
1337toothbrush
08/30/21 12:13:13 AM
#191
Alright, I made a quick and awful battle system with poor OOP abstraction: https://pastebin.com/L0EyCgb5

This should at least give an idea of using OOP.

edit: by the way, making this reminded me of how much I dislike Python. Its OOP features just feel awful to work with. I think a large part of that is the dynamic typing but also the syntax is butt-ugly.

---
TopicITT: Learning Python
1337toothbrush
08/28/21 9:20:09 PM
#188
I had forgotten about this topic! Posting here to bring it to the top of my active messages list. I might write an OOP battle system example if you think that'd be useful.

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 6:05:13 PM
#500
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 6:03:01 PM
#496
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 5:47:38 PM
#490
This has been the only 720p stream so far, right?

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 5:36:58 PM
#485
Her head reminds me of Calliope Mori.

edit: I like the hieroglyphics on her cape.

edit 2: Her age is ???? I'm just waiting on a negative age now.

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 5:31:49 PM
#481
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:47:27 PM
#473
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:42:10 PM
#471
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:23:36 PM
#465
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:20:17 PM
#462
Funkydog posted...
We do have GOD as one, so clearly she birthed the council (current batch) and guessing they are all similarly ancient. I guess Cali would be one of the older ones as well, depending on when she started her "death apprenticeship" and then wherever IRyS fits in. Don't recall if Kiara actually listed her age, with her phoenix lore, so another super old one. And everyone else are some variety of puny mortal I think?
Yeah but it's kinda hard to exceed infinity.

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:18:14 PM
#458
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:11:59 PM
#454
I know Ina speaks Korean, but has she ever actually spoken Korean on stream?

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:09:14 PM
#450
Could this be...? The oldest vtuber ever?

---
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:07:01 PM
#448
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 4:01:31 PM
#445
TopicVTuber General 10: Kaiju's Amongus
1337toothbrush
08/22/21 3:31:09 PM
#441
pogo_rabid posted...
hot take- I really can't get into the meek/small voice girls. Give me a strong personality and big voice
Same. I know folks go crazy for this sort of thing, but my tastes lie elsewhere.

---
Board List
Page List: 1, 2, 3, 4, 5 ... 26