09:27 <+ChillerDragon> I proudly present the first barley playble version of ddnet client connecting to a vanilla 0.7 server https://zillyhuhn.com/OpenTube/videos/users/chiller/ddnet_client_on_07.mp4 09:27 <+ChillerDragon> while keeping full 0.6 compability 09:30 <+bridge> [ddnet] 0.7 sux 09:31 <+ChillerDragon> thanks a lot to @fokkonaut for good pointers and big time moral support :3 12:48 <+bridge> [ddnet] no problem❤️ 12:52 <+ChillerDragon> anyone got a server from hetzner? :) 12:55 <+bridge> [ddnet] who's that? 12:56 <+bridge> [ddnet] A German server Hoster 12:56 <+bridge> [ddnet] Currently trying to collect all their ip ranges so a few samples would help 13:00 <+bridge> [ddnet] https://www.shodan.io/search?query=Hetzner+ 13:03 <+bridge> [ddnet] https://ipinfo.io/AS24940 14:12 <+bridge> [ddnet] nice ChillerDragon! 14:44 <+bridge> [ddnet] Yea got those already but it’s incomplete 14:44 <+bridge> [ddnet] (@Ravie Senpai) 14:44 <+bridge> [ddnet] Ah yea good idea thanks nodelsuft 14:44 <+bridge> [ddnet] (@Swarfey) 14:45 <+bridge> [ddnet] \:) 14:45 <+bridge> [ddnet] (@heinrich5991) 15:20 <+bridge> [ddnet] https://tenor.com/view/its-compact-its-efficient-ryanfluffbruce-full-of-stuff-compact-content-efficient-stuff-gif-20021692 15:28 <+bridge> [ddnet] Thing is, nobody would really care about it, right? 15:28 <+bridge> [ddnet] cuz everybody knows 0.6 is still a better version 15:43 <+bridge> [ddnet] Maybe vanilla gamemodes which are mainly played on 0.7 could be brought back to life! 15:44 <+bridge> [ddnet] the last couple of times I checked, there was one active vanilla server on 0.7 15:45 <+bridge> [ddnet] sadly we'll bloat the code with 0.7 instead of taking the chance to rewrite the network code so it works with multiple backends (0.6, 0.7, maybe something new) 15:45 <+bridge> [ddnet] 15:45 <+bridge> [ddnet] and 0.7 is almost not worth it tbh 15:46 <+bridge> [ddnet] I'm also in favor of doing it in such a way, but I haven't come to it yet 15:47 <+bridge> [ddnet] ah nice if u ever have time would be nice to move it to an own thread too 15:47 <+bridge> [ddnet] what's the reasoning of putting it into a separate thread? 15:47 <+bridge> [ddnet] fixes an issue i am too lazy to fix 😄 15:47 <+bridge> [ddnet] #1996 15:47 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1996 15:47 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1996 15:48 <+bridge> [ddnet] also we can do more expensive checks then 15:48 <+bridge> [ddnet] recvfrom takes long on windows, oh 😦 15:48 <+bridge> [ddnet] generally kernel calls 15:50 <+bridge> [ddnet] asynchronous network makes it harder to debug, but if it's an actual performance problem, it's probably worth it 15:50 <+bridge> [ddnet] yeah i see 15:51 <+bridge> [ddnet] well if we do an abstraction like game messages that the network backend generates based on the protocol packets it shouldnt be too hard to implement it optionally i guess 15:51 <+bridge> [ddnet] yea 15:52 <+bridge> [ddnet] any python coders in here that wanna help me? 15:52 <+bridge> [ddnet] what's your problem? then we can decide 15:53 <+bridge> [ddnet] I'm trying to learn it and i want someone that i can ask some questions along the way 15:54 <+bridge> [ddnet] I can try to, but I'll be gone soon 15:55 <+bridge> [ddnet] it will be like a "hey, i have a question to floating point numbers...." and you would answer me when you have the time and will :) 15:55 <+bridge> [ddnet] sure, you can ask me 16:02 <+bridge> [ddnet] aight, i will contact you if i have any questions. 16:03 <+bridge> [ddnet] https://dontasktoask.com 16:04 <+bridge> [ddnet] read what i said. 16:04 <+bridge> [ddnet] i read 16:04 <+bridge> [ddnet] yeah you should just ask ur doubts here 16:04 <+bridge> [ddnet] directly 16:04 <+bridge> [ddnet] when u find them 16:04 <+bridge> [ddnet] ask when you have a question 16:04 <+bridge> [ddnet] you're asking for a tutor here 16:05 <+bridge> [ddnet] yea that's what i did 16:05 <+bridge> [ddnet] 15€/hour 🙂 16:05 <+bridge> [ddnet] i don't wanna flood the channel with random questions 16:05 <+bridge> [ddnet] oh you can 16:05 <+bridge> [ddnet] lol why u care 16:05 <+bridge> [ddnet] i flood it with rust 16:05 <+bridge> [ddnet] i flood it with whatever 16:06 <+bridge> [ddnet] yea but i'm a nice boy 16:06 <+bridge> [ddnet] but its not nice 16:06 <+bridge> [ddnet] read the website 16:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1031207245486231582/unknown.png 16:12 <+bridge> [ddnet] the clearer request is here: https://discord.com/channels/252358080522747904/293493549758939136/1031203181595738244 16:21 <+bridge> [ddnet] Are indexes in python always zero based? So if i want to access the second thing in a list i always have to use the index 1? 16:21 <+bridge> [ddnet] yes 16:21 <+bridge> [ddnet] I think they are in most programming languages. the only ones that I can think of with one-based indices are matlab (yuck!) and lua 16:28 <+bridge> [ddnet] VBA can be zero and one-based, there is a setting to change the lower bound for arrays for each individual module 16:30 <+bridge> [ddnet] and if i wanna do a list i always have to use "ddnet = []" to get it going? 16:30 <+bridge> [ddnet] and if i wanna do a list i always have to use "ddnet = []" to get it going? for example "ddnet" 16:38 <+bridge> [ddnet] if you want an empty list, you need `[]`, yes 16:39 <+bridge> [ddnet] or you can do `[1, 2, 3]` for a nonempty list 16:39 <+bridge> [ddnet] you can convert stuff into lists using `list`, e.g. `list("ddnet")` is `["d", "d", "n", "e", "t"]` 16:39 <+bridge> [ddnet] later, you'll also learn about list comprehensions 16:40 <+bridge> [ddnet] and I'm gone 16:46 <+bridge> [ddnet] hi gone im dad 17:34 <+bridge> [ddnet] thanks heinrich 17:40 <+bridge> [ddnet] I do care a lot about it actually. Since I am used to ddnet client switching to vanilla is not really a option for me. All other pvp players probably would appreciate it to if they didn't have to switch clients and could use the ddnet client for ctf and probably other gametypes like zCatch etc. Currently the ddnet client is encapsulated from the 0.7 community which is super sad. 17:40 <+bridge> [ddnet] (@Cellegen | RiH) 17:41 <+bridge> [ddnet] i didnt play proper ctf since like 4 years 17:41 <+bridge> [ddnet] well, can't wait to see someone besides Oy making a new version which breaks this project 17:42 <+bridge> [ddnet] ? 17:42 <+bridge> [ddnet] you try to merge with a version that has potential to be broken with any new changes from 0.7 17:42 <+bridge> [ddnet] ?? 17:43 <+bridge> [ddnet] ok, no reaction, then I leave it as is 17:43 <+bridge> [ddnet] 0.7 should not have any more breaking changes 17:43 <+bridge> [ddnet] i just dont understand what you mean with merge 17:59 <+ChillerDragon> @Cellegen I seriously am not sure what you mean. They way I understand your messages are "nobody cares about 0.7" and "0.7 will be replaced by 0.8 anyways" is that correct? If so then my response to 0.8 is we do it again. Its not that bad actually if you think about it. 0.7 is the first and only breaking change since i play which is around a decade. Compared to other games or software thats pretty 17:59 <+ChillerDragon> chill. 19:07 <+bridge> [ddnet] ``` 19:07 <+bridge> [ddnet] First = input("First: ") 19:07 <+bridge> [ddnet] Second = input("Second: ") 19:07 <+bridge> [ddnet] Sum = float(First) + float(Second) 19:07 <+bridge> [ddnet] print("Sum: " + str(sum)) 19:07 <+bridge> [ddnet] ``` 19:07 <+bridge> [ddnet] shouldnt give this out a number and not "Sum: " 19:07 <+bridge> [ddnet] shouldnt give this out a number and not "Sum: "? 19:07 <+bridge> [ddnet] Lowercase sum is the name of a builtin function 19:08 <+bridge> [ddnet] You named your variable Sum not sum 19:08 <+bridge> [ddnet] aaaa 19:08 <+bridge> [ddnet] thank you :) 19:18 <+bridge> [ddnet] you don't need to print int like that 19:19 <+bridge> [ddnet] `print("Sum:", Sum)` 19:19 <+bridge> [ddnet] you don't need to print it* like that 19:21 <+bridge> [ddnet] but the second Sum is a float 19:21 <+bridge> [ddnet] yes, but print will format it for you 19:21 <+bridge> [ddnet] you had to convert it to str in your code because you're doing string concatenation 19:23 <+bridge> [ddnet] but python doesnt know how to concatenate a float to a string right? so i have to put the "str" infront of "Sum" 19:23 <+bridge> [ddnet] You can also do `print(f"Sum: {Sum}")` or `print("Sum: {}".format(Sum))` 19:23 <+bridge> [ddnet] the print function will be in charge of that 19:23 <+bridge> [ddnet] The one Rei posted uses magic under the hood. You pass it any kind of argument, it'll run `str` on it itself 19:24 <+bridge> [ddnet] then why tf is this guy in the tutorial telling me i have to do it like that? 19:25 <+bridge> [ddnet] or is just advanced stuff? 19:25 <+bridge> [ddnet] what rei posted 19:25 <+bridge> [ddnet] there's many ways to do 19:25 <+bridge> [ddnet] or is it just advanced stuff? 19:25 <+bridge> [ddnet] yours is probably better, because of less code 19:25 <+bridge> [ddnet] I posted 2 more, there indeed are many ways and it depends on what you want to do 19:25 <+bridge> [ddnet] f-strings are maybe the best ones to use (the one with f"{var}") 19:25 <+bridge> [ddnet] f strings and format will be better if you want to print more than one thing and/or control the format of the printed string 19:26 <+bridge> [ddnet] okok, lets not go that far down the rabbit hole 19:26 <+bridge> [ddnet] https://www.multipath-tcp.org/ 19:26 <+bridge> [ddnet] `print(f"{} + {} = {}".format(First, Second, Sum))` 19:26 <+bridge> [ddnet] e.g. 19:26 <+bridge> [ddnet] @Learath2 heard of this? 19:26 <+bridge> [ddnet] https://news.ycombinator.com/item?id=33220975 19:27 <+bridge> [ddnet] u dont need f then if u use .format 19:27 <+bridge> [ddnet] I only saw it used in a benchmark before, didn't really have any idea what they were doing 19:27 <+bridge> [ddnet] > MultiPath TCP (MPTCP) is an effort towards enabling the simultaneous use of several IP-addresses/interfaces by a modification of TCP that presents a regular TCP interface to applications, while in fact spreading data across several subflows. Benefits of this include better resource utilization, better throughput and smoother reaction to failures. Slides - explaining MultiPath TCP - are available in .pdf and .pptx format. You can also have 19:27 <+bridge> [ddnet] Oh, I was going to do fstrings then I did format, sorry, cooking at the same time 😛 19:27 <+bridge> [ddnet] `print("{} + {} = {}".format(First, Second, Sum))` 19:28 <+bridge> [ddnet] i recommend using lower case variable names 19:28 <+bridge> [ddnet] one advantage of f-string is that you clearly see what variable is being printed out directly 19:28 <+bridge> [ddnet] programmers are lazy by nature 19:28 <+bridge> [ddnet] imagine having to press shift 19:29 <+bridge> [ddnet] https://peps.python.org/pep-0008/ 19:29 <+bridge> [ddnet] your bible 19:29 <+bridge> [ddnet] lowercase variable names look hot, properly capitalized variable names look like you are a math professor that accidentally lost his way and ended up trying to write code 19:29 <+bridge> [ddnet] xd 19:31 <+bridge> [ddnet] i think python is good and bad to learn programming, it hides so much stuff, but also gives that sweet dopamine to keep you going when learning smth hard such as programming 19:31 <+bridge> [ddnet] start with basic on a commodore64 19:32 <+bridge> [ddnet] fortran 19:32 <+bridge> [ddnet] Now that will teach you how to actually code 19:32 <+bridge> [ddnet] will it tho 19:32 <+bridge> [ddnet] i think it may teach more about how computers work 19:33 <+bridge> [ddnet] not like i ever tried learning basic 19:33 <+bridge> [ddnet] on a commodore64 19:33 <+bridge> [ddnet] it teaches you how to use goto XD 19:33 <+bridge> [ddnet] xd 19:33 <+bridge> [ddnet] a good way to learn may be a dumbbed down assembly language 19:33 <+bridge> [ddnet] lc-3? 19:33 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Little_Computer_3 19:34 <+bridge> [ddnet] unis teach this iirc 19:34 <+bridge> [ddnet] i wrote one in rust some time ago 19:34 <+bridge> [ddnet] xd 19:34 <+bridge> [ddnet] mhh i'd say no, better start with c or c++ and then do reverse engeneering, so you understand what happens under the hood 19:35 <+bridge> [ddnet] why reverse engineer 19:35 <+bridge> [ddnet] just write the assembly directly 19:35 <+bridge> [ddnet] yeah but then you dont get a feeling for higher level abstractions 19:35 <+bridge> [ddnet] https://tenor.com/view/think-smart-gif-22411928 19:35 <+bridge> [ddnet] and learning pure asm is pretty hard^^ 19:35 <+bridge> [ddnet] i guess xd 19:36 <+bridge> [ddnet] i dont think u rly need to learn OOP 19:36 <+bridge> [ddnet] early on 19:36 <+bridge> [ddnet] i would learn more about pointers and references 19:36 <+bridge> [ddnet] memory management 19:36 <+bridge> [ddnet] we learned RPC, it's ez af lmao 19:36 <+bridge> [ddnet] but lot of schools focus on OOP right at the start 19:36 <+bridge> [ddnet] mhhhhh i'd say depends a lot on what you want to do 19:37 <+bridge> [ddnet] we started with pascal xD 19:37 <+bridge> [ddnet] then java 19:37 <+bridge> [ddnet] i started by myself but the first lang at a school was python 19:37 <+bridge> [ddnet] then java 19:37 <+bridge> [ddnet] the python was more on high school i had a teacher that was pro linux and wanted to convince the whole school to use linux instead of windows 19:38 <+bridge> [ddnet] true chad 19:38 <+bridge> [ddnet] ahead of its time 19:38 <+bridge> [ddnet] i think this is even very important for java (and ofc other similar languages) 19:39 <+bridge> [ddnet] You understand why binding pointers to annonymous/lambda functions does what it does. Why simple datatypes like ints behave different etc. 19:39 <+bridge> [ddnet] we had linux & windows on our school computers 19:40 <+bridge> [ddnet] same 19:40 <+bridge> [ddnet] ofc it will, trying to solve very low level problems is amazing for your problem solving skills 19:41 <+bridge> [ddnet] @Learath2 but you have to balance things 19:41 <+bridge> [ddnet] if you give something too hard to a newbie 19:41 <+bridge> [ddnet] he will often surrender 19:41 <+bridge> [ddnet] you need to give a sense of completion 19:41 <+bridge> [ddnet] it also depends on what you call problem solving skills 19:41 <+bridge> [ddnet] That is true. I assumed a newbie of infinite will-power 19:41 <+bridge> [ddnet] e.g. if u work in a huge team it would be a problem to solve problems in asm xd 19:42 <+bridge> [ddnet] programming actually requires a lot of will power 19:42 <+bridge> [ddnet] Which is why I suggest C. Some hand holding but you don't get to skip the basics of computer science either 19:42 <+bridge> [ddnet] to sit through problems 19:42 <+bridge> [ddnet] many ppl dont like programming cuz that 19:42 <+bridge> [ddnet] they get stuck 19:42 <+bridge> [ddnet] and they dont know what to do 19:42 <+bridge> [ddnet] thats where a programmer skill shines 19:42 <+bridge> [ddnet] and thats the end 19:42 <+bridge> [ddnet] of my ted talk 19:42 <+bridge> [ddnet] yeah c is a good language between lowest level and high level^^ 19:42 <+bridge> [ddnet] yes its mostly about that 😄 19:43 <+bridge> [ddnet] @Not Keks assembly is a high level language 19:43 <+bridge> [ddnet] if you talk to this guy 19:43 <+bridge> [ddnet] https://www.youtube.com/watch?v=lR0nh-TdpVg 19:43 <+bridge> [ddnet] https://www.youtube.com/watch?v=KrksBdWcZgQ 19:43 <+bridge> [ddnet] :BASED: 19:44 <+bridge> [ddnet] well i reverse engeneered x86 assmelber in the past a bit 19:44 <+bridge> [ddnet] 19:44 <+bridge> [ddnet] reading binary is not really useful 19:44 <+bridge> [ddnet] @Not Keks my technique when stuck is too go to the bathroom 19:44 <+bridge> [ddnet] and if it doesnt work sleep with it 19:44 <+bridge> [ddnet] most of the time works 19:44 <+bridge> [ddnet] xd 19:44 <+bridge> [ddnet] i'd say x86 is a really ez asm to read 19:44 <+bridge> [ddnet] :BASED: 19:44 <+bridge> [ddnet] in a shower you are most creative xD 19:44 <+bridge> [ddnet] xD 19:45 <+bridge> [ddnet] https://www.reddit.com/r/Showerthoughts/ 19:45 <+bridge> [ddnet] > The French are renowned for their cuisine and food culture but no one ever suggests going out for a French. 19:45 <+bridge> [ddnet] lmao 19:56 <+bridge> [ddnet] I am porting fng to ddnet codebase. It's an "old" before summer project that I am revisiting. There's this strange effect tho of being able to get inside the spike (not on the edge but further in). Any ideas why? 19:56 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1031264347101593710/shot_20221016_205444w.png 20:02 <+bridge> [ddnet] Do they kill you if you go in further? 20:05 <+bridge> [ddnet] 40mins of an hour tutorial..my brain is fried chicken 20:06 <+bridge> [ddnet] Is it your first programming language? 20:07 <+bridge> [ddnet] Yeaaaa, i tried getting into programming multiple times, but this time i'm sticking to it :) 20:09 <+bridge> [ddnet] just put doProgram() 20:10 <+bridge> [ddnet] Yes. (sry for the delay I went to get some food) 20:10 <+bridge> [ddnet] I have tip for you. As soon as you understand most of the language. Try to make something 20:11 <+bridge> [ddnet] Did you maybe add the tile wrong in CCharacter? Kill tiles need to be inflated specifically as CCharacter::HandleTiles usually handles tiles by checking if the entity intersects with the center of the tile 20:12 <+bridge> [ddnet] good thing, the tutorial im watching has "exercises" after a big topic.. so i'm doing like a calculator or a weight converter....i couldn't do the weight converter tho but after he explained it and showed the solution it was pretty clear to me 20:12 <+bridge> [ddnet] make a program that takes a number as argument and prints /points Meekrioz N times 20:12 <+bridge> [ddnet] :c_fucku: 20:13 <+bridge> [ddnet] its legit a good training 20:13 <+bridge> [ddnet] Now that you know a little bit. Want a quick classic task to see if you learned? 20:13 <+bridge> [ddnet] :justatest: suuure 20:13 <+bridge> [ddnet] Since you failed the weight converter. Do a celsius to fahrenheit converter 20:13 <+bridge> [ddnet] :bruh: 20:13 <+bridge> [ddnet] ok, i can do that 20:14 <+bridge> [ddnet] meh no fun 20:15 <+bridge> [ddnet] :trollet: 20:17 <+bridge> [ddnet] ```bash 20:17 <+bridge> [ddnet] #!/bin/sh 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] read times 20:17 <+bridge> [ddnet] for i in $(seq $times) 20:17 <+bridge> [ddnet] do 20:17 <+bridge> [ddnet] echo /points Meekrioz 20:17 <+bridge> [ddnet] done 20:17 <+bridge> [ddnet] ``` 20:17 <+bridge> [ddnet] Another classic is printing a staircase, and after that a pyramid for extra credits. But I dont think you saw loops yet 20:17 <+ChillerDragon> Omg im totally binge watching this whole channel since a few days https://www.youtube.com/watch?v=9kaIXkImCAM 20:23 <+bridge> [ddnet] ``` 20:23 <+bridge> [ddnet] temperature = float(input("temperature: ")) 20:23 <+bridge> [ddnet] unit = input("(C)elsius or (F)ahrenheit: ") 20:23 <+bridge> [ddnet] if unit.upper() == "F": 20:23 <+bridge> [ddnet] print("Temperature in Fahrenheit: ",temperature * 1.8 + 32) 20:23 <+bridge> [ddnet] elif unit.upper() == "C": 20:23 <+bridge> [ddnet] print("Temperature in Celsius: ",(temperature - 32) * 0.5) 20:23 <+bridge> [ddnet] ``` 20:24 <+bridge> [ddnet] try giving it 'a' 20:24 <+bridge> [ddnet] uh? 0.5? 20:24 <+bridge> [ddnet] as input 20:24 <+bridge> [ddnet] kek 20:24 <+bridge> [ddnet] times 20:24 <+bridge> [ddnet] times 4/9 20:24 <+bridge> [ddnet] times 5/9 20:25 <+bridge> [ddnet] Oooh, both ways, didn't know you'd learned conditionals. The 0.5 looks wrong, but the idea is right 20:26 <+bridge> [ddnet] ``` 20:26 <+bridge> [ddnet] temperature = float(input("temperature: ")) 20:26 <+bridge> [ddnet] unit = input("(C)elsius or (F)ahrenheit: ") 20:26 <+bridge> [ddnet] if unit.upper() == "F": 20:26 <+bridge> [ddnet] print("Temperature in Fahrenheit: ",temperature * 1.8 + 32) 20:26 <+bridge> [ddnet] elif unit.upper() == "C": 20:26 <+bridge> [ddnet] print("Temperature in Celsius: ",(temperature - 32) * 5/9) 20:26 <+bridge> [ddnet] 20:26 <+bridge> [ddnet] ``` 20:26 <+bridge> [ddnet] now, do $/€ conversion by fetching the current rate on internet 20:26 <+bridge> [ddnet] better now 20:26 <+bridge> [ddnet] code ascii teeworlds client 20:26 <+bridge> [ddnet] i didn't know i can do 5/9 20:26 <+bridge> [ddnet] Eh, close but no dice, I think that 5/9 rounds to int 20:26 <+bridge> [ddnet] it doesn't 20:26 <+bridge> [ddnet] not in pyhton3, it does in python2 20:27 <+bridge> [ddnet] but python2 is dead, so who cares? 20:27 <+bridge> [ddnet] Okay, so it's fine. Sorry, I don't do much python at all, my brain was thinking py2 20:27 <+bridge> [ddnet] 5 // 9 20:27 <+bridge> [ddnet] rounds to int 20:27 <+bridge> [ddnet] yup 20:28 <+bridge> [ddnet] Ryo > Learath 20:28 <+bridge> [ddnet] I avoid python if I can at all 20:28 <+bridge> [ddnet] or more like Python_Ryozuki > Python_Learath2 20:28 <+bridge> [ddnet] i used the weight converter code and wrote it into the temperature converter. i heard programmers are lazy.. :justatest: 20:28 <+bridge> [ddnet] I'd rather code in php 20:28 <+bridge> [ddnet] i'd rather code in LaTeX 😄 20:28 <+bridge> [ddnet] (than php) 20:28 <+bridge> [ddnet] Yes, but I suggest you don't take the lazy route with exercises 20:29 <+bridge> [ddnet] Their point is to go over stuff, if you copy paste you don't go over every line properly 20:29 <+bridge> [ddnet] dont just do the exercises 20:29 <+bridge> [ddnet] do stuff for urself 20:29 <+bridge> [ddnet] and fun 20:30 <+bridge> [ddnet] yea i know...but hey atleast i figured that 20:30 <+bridge> [ddnet] ``` print("Temperature in Celsius: ",(temperature - 32) * 5/9)" 20:30 <+bridge> [ddnet] ``` 20:30 <+bridge> [ddnet] the "temperature - 32" has to be in a () because of the math shit 20:30 <+bridge> [ddnet] Problem is he is just learning. Until he gets a minimum set of knowledge it's hard to do stuff on his own. I atleast wait until I'm done with most of the language before I suggest people try projects on your own 20:30 <+bridge> [ddnet] i dont mean a project 20:30 <+bridge> [ddnet] a self-exercise 20:30 <+bridge> [ddnet] well, operator precedency is normal 20:31 <+bridge> [ddnet] it gets complicated when you involve binary operations 20:31 <+bridge> [ddnet] Eh, I guess if they can come up with an exercise they can do on their own it'd be fine. Problem is most people don't really know how much they know while learning 20:31 <+bridge> [ddnet] If you overreach you'll get stuck, you'll start googling and copying code 20:32 <+bridge> [ddnet] i guess xd 20:32 <+bridge> [ddnet] teaching is hard 20:32 <+bridge> [ddnet] hard to assume a viewpoint of someone new 20:32 <+bridge> [ddnet] teaching is easy 20:32 <+bridge> [ddnet] ur a teacher 20:32 <+bridge> [ddnet] being a good teacher is hardto know 20:32 <+bridge> [ddnet] but i feel like, as long as you know where you can find and how you can find it, you are able to successfully do the task 20:32 <+bridge> [ddnet] being a good teacher is hard to know 20:32 <+bridge> [ddnet] but i feel like, as long as you know where you can find it and how you can find it, you are able to successfully do the task 20:32 <+bridge> [ddnet] but i don't know if i'm good 20:32 <+bridge> [ddnet] thats true for surface level stuff 20:32 <+bridge> [ddnet] This is the mindset needed after you learn the language 20:33 <+bridge> [ddnet] Oh 20:33 <+bridge> [ddnet] im too fast i guess :FacePalm: 20:33 <+bridge> [ddnet] premature guy :troll: l 20:33 <+bridge> [ddnet] premature guy :troll: 20:33 <+bridge> [ddnet] i kinda wanna watch the last 20 mins of the tutorial but my brain is actually cooked 20:34 <+bridge> [ddnet] i'm at "While loops" now 20:34 <+bridge> [ddnet] skip to for, for > while 20:34 <+bridge> [ddnet] Problem is a lot of the small stuff you learn while doing stuff like comparing strings by hand are very useful for bigger algorithms. If you just copy that over or use a library function, you haven't learned a fundamental thing you'll need in the future 20:34 <+bridge> [ddnet] not in the tut :justatest: 20:34 <+bridge> [ddnet] That is if you aim to actually be a good programmer as opposed to just being A programmer 20:34 <+bridge> [ddnet] skip tut then 20:35 <+bridge> [ddnet] to do is to be, so if you do good programming, you're a good programmer 🙂 20:35 <+bridge> [ddnet] even if you copy pasted 20:36 <+bridge> [ddnet] for loops were my first wall when i rly first started learning 20:36 <+bridge> [ddnet] but i get learath, in order to be good, you have to understand the language and not just copy paste or google every time you need to do something. 20:36 <+bridge> [ddnet] i didnt knwo what the fuck for(int i = 0; i < 10; i++) was 20:36 <+bridge> [ddnet] cuz lot of stuff in the same place 20:37 <+bridge> [ddnet] just add newlines 20:37 <+bridge> [ddnet] it's on roadmap.sh so i thought it's good 20:37 <+bridge> [ddnet] ```c 20:37 <+bridge> [ddnet] for( 20:37 <+bridge> [ddnet] int i = 0; 20:37 <+bridge> [ddnet] i < 10; 20:37 <+bridge> [ddnet] i++) 20:37 <+bridge> [ddnet] ``` 20:38 <+bridge> [ddnet] ```c 20:38 <+bridge> [ddnet] int i; 20:38 <+bridge> [ddnet] for(i = 0; i < 10; ++i)``` 20:46 <+bridge> [ddnet] back to the 90's 20:47 <+bridge> [ddnet] I'm a ghost I exist at all times :p 21:01 <+bridge> [ddnet] @Kallemy why are you learning python? 21:09 <+bridge> [ddnet] I think I respectfully disagree here. If you can't write it yourself imo you have no business copy pasting it 21:10 <+bridge> [ddnet] I thinks pointers were the issue for me. I just treated them as put * and & until it worked for a while. There probably is even irc logs of me struggling around with it until fstd gave me a hand 21:10 <+bridge> [ddnet] xd 21:10 <+bridge> [ddnet] yeah poinrters too 21:10 <+bridge> [ddnet] pointers 21:39 <+bridge> [ddnet] Because i want to 21:57 <+bridge> [ddnet] pointers :justatest: 21:57 <+bridge> [ddnet] why can't code just be if else 21:58 <+bridge> [ddnet] when did it turn into *char -> $_&¢=π®× 21:58 <+bridge> [ddnet] well in python no pointers 21:58 <+bridge> [ddnet] everything by ref 21:59 <+bridge> [ddnet] -> is actually a syntactic desugar for (*a).b 21:59 <+bridge> [ddnet] a->b 21:59 <+bridge> [ddnet] iirc 22:00 <+bridge> [ddnet] i think i have a decent fundamental understanding of langs except for pointers idk 22:01 <+bridge> [ddnet] pointers are everything 22:01 <+bridge> [ddnet] fundamental 22:01 <+bridge> [ddnet] i probably just gotta read more 22:01 <+bridge> [ddnet] yeah ik 22:01 <+bridge> [ddnet] but like whyre they used so much 22:01 <+bridge> [ddnet] its actually pretty simple 22:01 <+bridge> [ddnet] just for memory issues or 22:01 <+bridge> [ddnet] just feels abstract at first 22:03 <+bridge> [ddnet] i was playing this online algorithm race thing a long time ago 22:03 <+bridge> [ddnet] one of the qs was using pointers w linked lists to count something 22:03 <+bridge> [ddnet] and i was just like what's the point xd 22:04 <+bridge> [ddnet] https://c-for-dummies.com/caio/pointer-cheatsheet.php 22:04 <+bridge> [ddnet] xd 22:05 <+bridge> [ddnet] I think it's more like `a->b(x, y)` is internally `b(a, x, y)` 22:06 <+bridge> [ddnet] oh true, if b is a function that is 22:06 <+bridge> [ddnet] For example the following code invoked undefined behaviour, but it prints out 42 in the online compiler I tried: ```#include 22:06 <+bridge> [ddnet] 22:06 <+bridge> [ddnet] using namespace std; 22:06 <+bridge> [ddnet] 22:06 <+bridge> [ddnet] struct Foo { 22:06 <+bridge> [ddnet] void bar(int x) { 22:06 <+bridge> [ddnet] cout << x << endl; 22:06 <+bridge> [ddnet] } 22:06 <+bridge> [ddnet] }; 22:06 <+bridge> [ddnet] 22:06 <+bridge> [ddnet] int main() 22:06 <+bridge> [ddnet] { 22:07 <+bridge> [ddnet] Foo *foo = nullptr; 22:07 <+bridge> [ddnet] foo->bar(42); 22:07 <+bridge> [ddnet] return 0; 22:07 <+bridge> [ddnet] } 22:07 <+bridge> [ddnet] ``` 22:09 <+bridge> [ddnet] If `bar` is virtual it just prints nothing 22:23 <+bridge> [ddnet] millions of programmers just lost their job 😄 22:24 <+bridge> [ddnet] actually, copy pasting is not a problem 22:24 <+bridge> [ddnet] but last week, i had a student tell me that what he copy pasted did not work... 22:24 <+bridge> [ddnet] well, obviously, if you don't try to read and understand what you copy, you're asking for problems... 22:26 <+bridge> [ddnet] Well imho, especially for students it's a problem 22:27 <+bridge> [ddnet] because they're lazy yes 22:27 <+bridge> [ddnet] they don't try to understand, kinda ironic for students... 22:29 <+bridge> [ddnet] Which is kinda why I think they shouldn't be allowed to copy paste. I think recently there has developed a new group of uni students. Ones that go to uni just because they feel like they have to. They have no genuine interest in learning, they just try to get through the exams for a diploma 22:30 <+bridge> [ddnet] yup, i see them everyday... 22:30 <+bridge> [ddnet] i think that's the thing learath is referring too 22:31 <+bridge> [ddnet] yeah, i got it now. Imo, not totally the same issue, but tightly coupled 22:32 <+bridge> [ddnet] i was more in the case, something complicated doesn't work and i copy paste a (often) partial solution, while I think referred more to "I copy paste everything" by splitting the problem in small parts 22:35 <+bridge> [ddnet] only learath can enlighten us how he meant it :D 22:47 <+bridge> [ddnet] copy pasting works very well when you start programming because you're not making unique programs 22:48 <+bridge> [ddnet] after some time your problems become specific enough that you already know there is no point googling for anything but a subset of your problem 22:55 <+bridge> [ddnet] Well, projects can get quite complex before it's too much for the internet 22:56 <+bridge> [ddnet] There are probably like 50 Minecraft clones 22:56 <+bridge> [ddnet] There actually is one good "Minecraft clone": mine test 22:57 <+bridge> [ddnet] It's not really a minecraft clone 22:57 <+bridge> [ddnet] It's an engine 22:57 <+bridge> [ddnet] Really worth playing 22:59 <+bridge> [ddnet] Sometimes you think you are doing something very obscure but actually someone has done it already lol 22:59 <+bridge> [ddnet] Some time ago I wanted to calculate the best item to produce in a very obscure android game 23:00 <+bridge> [ddnet] And someone has actually done that like 5 year before me 23:01 <+bridge> [ddnet] It's really hard to do something original 23:02 <+bridge> [ddnet] There are too many humans on earth 23:05 <+bridge> [ddnet] idk generally you get a sense of what has and hasn't been done 23:09 <+bridge> [ddnet] I mean usually I do things because they haven't been done xd 23:13 <+bridge> [ddnet] I usually do things because i exist 23:15 <+bridge> [ddnet] After a certain amount of proficiency, you don't copy and paste the same way. At a certain point you get the ability to skim over code and at the very least gather what the general approach is. Until you get there, I think copy and pasting is a disservice to your education 23:16 <+bridge> [ddnet] Sometimes it's not worth trying to understand a solution 23:18 <+bridge> [ddnet] Using libraries is basically copy pasting xd 23:21 <+bridge> [ddnet] Real legends designed and built thier computers from scratch 23:21 <+bridge> [ddnet] And mined the resources needed for it 23:22 <+bridge> [ddnet] Even to i understand what you mean. Often it's also simply bcs you cannot provide the same quality a lib provides plus testing etc. 23:22 <+bridge> [ddnet] i dont remember the last time i copied code ever 23:22 <+bridge> [ddnet] unless its an example 23:22 <+bridge> [ddnet] from a framework 23:22 <+bridge> [ddnet] to work on top of it 23:23 <+bridge> [ddnet] I literally coy paste my own code most of the time xd 23:23 <+bridge> [ddnet] xd 23:23 <+bridge> [ddnet] Copy 23:23 <+bridge> [ddnet] worth its always, but depends on the value of ur time at that point 23:23 <+bridge> [ddnet] e.g understanding how a computer works at a lower level is worth it 23:23 <+bridge> [ddnet] but if u dont have time maybe its not worth 23:24 <+bridge> [ddnet] and u just do ur js web and get mony 23:24 <+bridge> [ddnet] I'd like to design my own CPU 23:24 <+bridge> [ddnet] But it's hard 23:24 <+bridge> [ddnet] you can 23:24 <+bridge> [ddnet] there is a game 23:24 <+bridge> [ddnet] https://store.steampowered.com/app/1885690/Virtual_Circuit_Board/ 23:24 <+bridge> [ddnet] There are many games 23:24 <+bridge> [ddnet] more fun this way! 23:24 <+bridge> [ddnet] but this one is legit 23:24 <+bridge> [ddnet] Cpus are boring make gpus 23:25 <+bridge> [ddnet] It's a bit expensive lol 23:25 <+bridge> [ddnet] oh well 23:25 <+bridge> [ddnet] it is not for me xd 23:25 <+bridge> [ddnet] https://github.com/hneemann/Digital 23:25 <+bridge> [ddnet] try this 23:25 <+bridge> [ddnet] its more educational oriented than game 23:26 <+bridge> [ddnet] but its good 23:26 <+bridge> [ddnet] I own logic world actually 23:26 <+bridge> [ddnet] Also a great game 23:26 <+bridge> [ddnet] laggy 23:26 <+bridge> [ddnet] unity trash 23:26 <+bridge> [ddnet] the one i sent u, 2d, is way better 23:26 <+bridge> [ddnet] Probably 23:26 <+bridge> [ddnet] its made with perfomance in mind 23:26 <+bridge> [ddnet] and it looks cool xd 23:27 <+bridge> [ddnet] Logic world is also made with performance in mind i think 23:27 <+bridge> [ddnet] i bought it when it came out 23:28 <+bridge> [ddnet] Both games are good 23:28 <+bridge> [ddnet] its limited by unity stuff 23:28 <+bridge> [ddnet] C# is basically Java xd 23:28 <+bridge> [ddnet] Only the client is unity 23:28 <+bridge> [ddnet] It must suck xd 23:29 <+bridge> [ddnet] Which is why I suggest an annoying language like C to start with, so using libraries isn't easy 23:29 <+bridge> [ddnet] But at this point of development LW is a bit laggy 23:29 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1031318107144327198/unknown.png 23:30 <+bridge> [ddnet] I made an 8bit CPU on breadboards almost following Ben Eater's excellent youtube series. I had a different ISA but even building his version would teach a lot 23:30 <+bridge> [ddnet] 32bit computer 23:30 <+bridge> [ddnet] cute 23:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1031318321263542363/unknown.png 23:30 <+bridge> [ddnet] Computers are quite interesting 23:31 <+bridge> [ddnet] 16bit gets a little annoying on breadboard, way too many cables to route and the quality of the shitty breadboards start becoming an issue 23:31 <+bridge> [ddnet] 32 is probably impossibly annoying on breadboard 23:32 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1031318619839279254/unknown.png 23:32 <+bridge> [ddnet] the opcodes 23:32 <+bridge> [ddnet] Maybe i will buy VCB on a sale or something 23:32 <+bridge> [ddnet] Even at 16 bit you have to get a little clever with how you do the control unit 23:34 <+bridge> [ddnet] Designing a cpu probably takes a lot of time 23:37 <+bridge> [ddnet] well i think u follow pre made architectures, unless u are rly smart and make ur own 23:37 <+bridge> [ddnet] i think one of the easiest is https://en.wikipedia.org/wiki/Von_Neumann_architecture 23:37 <+bridge> [ddnet] I also think i am not smart enough *yet* to design a cpu 23:38 <+bridge> [ddnet] "easiest" not meaning its easy tho :p 23:40 <+bridge> [ddnet] So ALU is quite easy to make i think 23:40 <+bridge> [ddnet] Ram too 23:41 <+bridge> [ddnet] Actually executing stuff is the hard part 23:41 <+bridge> [ddnet] How do i even determine what to do 23:42 <+bridge> [ddnet] follow a tutorial i would say 23:42 <+bridge> [ddnet] u first gotta learn the basics 23:42 <+bridge> [ddnet] logic gates 23:42 <+bridge> [ddnet] Tutorials are for noobs 23:43 <+bridge> [ddnet] tutorials answer this question 23:43 <+bridge> [ddnet] I already know how logic gates work 23:43 <+bridge> [ddnet] And most of the basic stuff i guess 23:45 <+bridge> [ddnet] that's why i force my students to reinvent the wheel 🙂 23:46 <+bridge> [ddnet] learn VHDL or Verilog 23:46 <+bridge> [ddnet] Honestly, for them reinventing the wheel is a good thing 23:46 <+bridge> [ddnet] i gotta learn one of those one day 23:46 <+bridge> [ddnet] are they propietary? 23:47 <+bridge> [ddnet] the default CPU implementation is almost always the same 23:48 <+bridge> [ddnet] i don't think so 23:48 <+bridge> [ddnet] VHDL is more european while Verilog is american 23:48 <+bridge> [ddnet] Maybe ill figure it out in the next 40 years if I don't die 23:48 <+bridge> [ddnet] but tools support both anyway 23:48 <+bridge> [ddnet] https://github.com/ghdl/ghdl 23:48 <+bridge> [ddnet] do u recommend this 23:49 <+bridge> [ddnet] there's a free compiler, but i don't recall its name... 23:49 <+bridge> [ddnet] ofc by open source i meant a compiler 23:49 <+bridge> [ddnet] it uses gpl2.0 so its stallman approved 23:49 <+bridge> [ddnet] :BASED: 23:49 <+bridge> [ddnet] never heard of this, i always used proprietary software for this because at the end, you need them for board design 23:50 <+bridge> [ddnet] boo 23:50 <+bridge> [ddnet] and because university provides student licenses 23:50 <+bridge> [ddnet] i refuse to use propietary software for this 23:50 <+bridge> [ddnet] ill try ghdl 23:50 <+bridge> [ddnet] https://en.wikipedia.org/wiki/List_of_HDL_simulators 23:50 <+bridge> [ddnet] i mostly used questasim/modelsim 23:51 <+bridge> [ddnet] i recommend this one: https://en.wikipedia.org/wiki/Verilator 23:51 <+bridge> [ddnet] i recommend this one: 23:51 <+bridge> [ddnet] https://github.com/verilator/verilator 23:51 <+bridge> [ddnet] thats for verilog 23:51 <+bridge> [ddnet] it supports vhdl too 23:52 <+bridge> [ddnet] whats better 23:52 <+bridge> [ddnet] verilog or vhdl 23:52 <+bridge> [ddnet] or not apparently 23:52 <+bridge> [ddnet] xD 23:52 <+bridge> [ddnet] verilog has a syntax close to C 23:52 <+bridge> [ddnet] well, SystemVerilog is really close to C syntax 23:52 <+bridge> [ddnet] ok so vhdl then 23:53 <+bridge> [ddnet] you'll find more resources on VHDL i think, because it is taught in european universities 23:53 <+bridge> [ddnet] you can use GTKWave for wave visualisation 23:53 <+bridge> [ddnet] Simulating a cpu on a cpu sounds so cool 23:53 <+bridge> [ddnet] > By using a code generator (LLVM, GCC or, x86_64/i386 only, a built-in one), it is much faster than any interpreted simulator. It can handle very large designs, such as leon3/grlib. 23:54 <+bridge> [ddnet] And inefficient 23:54 <+bridge> [ddnet] > Can write waveforms to GHW, VCD or FST files. Combined with a GUI-based waveform viewer and a good text editor, GHDL is a very powerful tool for writing, testing and simulating your code. 23:54 <+bridge> [ddnet] welcome to containers 23:54 <+bridge> [ddnet] modern cpus have special capabilities for that tho 23:54 <+bridge> [ddnet] kvm 23:54 <+bridge> [ddnet] you have to to test it 23:55 <+bridge> [ddnet] in computer architecture, we simulate complete system on a cpu 23:55 <+bridge> [ddnet] expect 10^6 slowdown 🙂 23:55 <+bridge> [ddnet] oof 23:55 <+bridge> [ddnet] my longest simulation was 15 days 23:55 <+bridge> [ddnet] and i had to reduce it already 23:55 <+bridge> [ddnet] Use gpu for better performance 23:56 <+bridge> [ddnet] you can't parallelize those 23:56 <+bridge> [ddnet] I wonder what's the limit, how fast computers can get 23:56 <+bridge> [ddnet] does this give some philosophical take on whether its possible that we are in a simulation? 23:56 <+bridge> [ddnet] idk why i thought of that now xD 23:56 <+bridge> [ddnet] what they are currently 23:57 <+bridge> [ddnet] and i phrased that rly badly 23:57 <+bridge> [ddnet] kinda hard to go faster with current tech 23:57 <+bridge> [ddnet] i don't know, i don't bite this thing. imo, it just pushes the problem, not solving it and is also an easy solution similar to "god" 23:57 <+bridge> [ddnet] I mean, transistors won't get much smaller i guess 23:57 <+bridge> [ddnet] yup, kinda reaching the end 23:58 <+bridge> [ddnet] I really like the simulation hypothesis 23:58 <+bridge> [ddnet] It just seems very stupid at first 23:58 <+bridge> [ddnet] But actually you can't be sure this isn't a simulation 23:59 <+bridge> [ddnet] it is imo 23:59 <+bridge> [ddnet] xd 23:59 <+bridge> [ddnet] it is stupid imo 23:59 <+bridge> [ddnet] And even if it is a simulation, does it actually matter 23:59 <+bridge> [ddnet] What is reality anyway? 23:59 <+bridge> [ddnet] :pepeH: