Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories β€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2022-10-16 00:00:00Z and 2022-10-17 00:00:00Z
Avatar
[quakenet] ChillerDragon BOT 2022-10-16 07:27:15Z
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
πŸ‘ 4
07:27
while keeping full 0.6 compability
Avatar
0.7 sux
❀️ 4
Avatar
[quakenet] ChillerDragon BOT 2022-10-16 07:31:53Z
thanks a lot to @fokkonaut for good pointers and big time moral support :3
Avatar
While keeping 0.6 fully working and untouched This adds the option to connect via 0.7 This is the first working version there is still work todo There are a few known bugs and missing featues to name a few:
  • Switching versions crashes the client
  • Maps with envelopes crash the client
  • Many snap items are not properly translates like gameinfo for example
  • No support for all the 0.7 features like
+ 0.7 skins + ready + dead players + colored broadcast https://user-i...
Avatar
Avatar
[quakenet] ChillerDragon
thanks a lot to @fokkonaut for good pointers and big time moral support :3
no problem❀️
Avatar
[quakenet] ChillerDragon BOT 2022-10-16 10:52:41Z
anyone got a server from hetzner? :)
Avatar
who's that?
Avatar
chillerdragon BOT 2022-10-16 10:56:15Z
A German server Hoster
10:56
Currently trying to collect all their ip ranges so a few samples would help
Avatar
7,159 results found for search query: Hetzner
Avatar
Avatar
chillerdragon
Currently trying to collect all their ip ranges so a few samples would help
AS24940 autonomous system information: WHOIS details, hosted domains, peers, upstreams, downstreams, and more
Avatar
nice ChillerDragon!
Avatar
chillerdragon BOT 2022-10-16 12:44:15Z
Yea got those already but it’s incomplete (@Ravie Senpai)
12:44
Ah yea good idea thanks nodelsuft (@Swarfey)
12:45
:) (@heinrich5991)
nice ChillerDragon!
Avatar
Avatar
Alexander
@Voxel c++ auto &&GetTrackNamePre = [](int Kills) -> const char * { if(Kills >= 5) return "is on a "; else if(Kills >= 10) return "has a "; else if(Kills >= 15) return "is "; return ""; };
Avatar
Avatar
[quakenet] 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
Thing is, nobody would really care about it, right?
13:28
cuz everybody knows 0.6 is still a better version
Avatar
Maybe vanilla gamemodes which are mainly played on 0.7 could be brought back to life!
Avatar
the last couple of times I checked, there was one active vanilla server on 0.7
Avatar
Jupstar βœͺ 2022-10-16 13:45:21Z
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) and 0.7 is almost not worth it tbh
Avatar
I'm also in favor of doing it in such a way, but I haven't come to it yet
Avatar
Jupstar βœͺ 2022-10-16 13:47:16Z
ah nice if u ever have time would be nice to move it to an own thread too
Avatar
what's the reasoning of putting it into a separate thread?
Avatar
Jupstar βœͺ 2022-10-16 13:47:34Z
fixes an issue i am too lazy to fix πŸ˜„
13:47
#1996
Avatar
Jupstar βœͺ 2022-10-16 13:48:09Z
also we can do more expensive checks then
Avatar
recvfrom takes long on windows, oh 😦
Avatar
Jupstar βœͺ 2022-10-16 13:48:56Z
generally kernel calls
Avatar
asynchronous network makes it harder to debug, but if it's an actual performance problem, it's probably worth it
Avatar
Jupstar βœͺ 2022-10-16 13:50:29Z
yeah i see
13:51
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
Avatar
yea
Avatar
any python coders in here that wanna help me? PeepoShy
Avatar
what's your problem? then we can decide
Avatar
I'm trying to learn it and i want someone that i can ask some questions along the way
Avatar
I can try to, but I'll be gone soon
Avatar
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 :)
Avatar
sure, you can ask me
Avatar
aight, i will contact you if i have any questions.
Avatar
Avatar
Meekrioz
any python coders in here that wanna help me? PeepoShy
Avatar
read what i said.
Avatar
yeah you should just ask ur doubts here
14:04
directly
14:04
when u find them
Avatar
ask when you have a question
14:04
you're asking for a tutor here
Avatar
Avatar
Chairn
you're asking for a tutor here
yea that's what i did
Avatar
15€/hour πŸ™‚
Avatar
i don't wanna flood the channel with random questions
Avatar
oh you can
Avatar
lol why u care
14:05
i flood it with rust
Avatar
i flood it with whatever
Avatar
``` * Module /home/runner/work/ddnet/ddnet/.pylintrc .pylintrc:1:0: R0022: Useless option value for '--disable', 'C0326' was removed from pylint, see https://github.com/PyCQA/pylint/pull/3577. (useless-option-value) .pylintrc:1:0: R0022: Useless option value for '--disable', 'C0330' was removed from pylint, see https://github.com/PyCQA/pylint/pull/3571. (useless-option-value) .pylintrc:1:0: R0022: Useless option value for '--disable', 'R0201' was moved to an optional extension...
Avatar
yea but i'm a nice boy PeepoShy
Avatar
but its not nice
14:06
read the website
14:09
Avatar
Avatar
Ryozuki
Click to see attachment πŸ–ΌοΈ
Avatar
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?
Avatar
yes
14:21
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
Avatar
VBA can be zero and one-based, there is a setting to change the lower bound for arrays for each individual module
Avatar
and if i wanna do a list i always have to use "ddnet = []" to get it going? for example "ddnet" (edited)
Avatar
if you want an empty list, you need [], yes
14:39
or you can do [1, 2, 3] for a nonempty list
14:39
you can convert stuff into lists using list, e.g. list("ddnet") is ["d", "d", "n", "e", "t"]
14:39
later, you'll also learn about list comprehensions
14:40
and I'm gone
Avatar
hi gone im dad
troll 1
Avatar
thanks heinrich
Avatar
chillerdragon BOT 2022-10-16 15:40:42Z
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. (@Cellegen)
Thing is, nobody would really care about it, right? (<@749222324980416602_=5bquakenet=5d=20=43hiller=44ragon>)
15:41
i didnt play proper ctf since like 4 years
Avatar
well, can't wait to see someone besides Oy making a new version which breaks this project
Avatar
chillerdragon BOT 2022-10-16 15:42:02Z
?
Avatar
you try to merge with a version that has potential to be broken with any new changes from 0.7
Avatar
chillerdragon BOT 2022-10-16 15:42:51Z
??
Avatar
ok, no reaction, then I leave it as is
Avatar
chillerdragon BOT 2022-10-16 15:43:18Z
0.7 should not have any more breaking changes
15:43
i just dont understand what you mean with merge
Avatar
Calling conventions like WINAPI, which expands to __stdcall, have no meaning on variable declarations. ``` Severity Code Description Project File Line Suppression State Error C2143 syntax error: missing ')' before '(' engine-shared src\base\system.cpp 4242 Warning C4229 anachronism used: modifiers on data are ignored engine-shared src\base\system.cpp 4242 Error C2059 syntax error: ')' engine-shared src\base\system.cpp 4242 Error C2059 syntax error: ')' engine-shared src\base\syste...
Avatar
[quakenet] ChillerDragon BOT 2022-10-16 15:59:17Z
@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
15:59
chill.
Avatar
First = input("First: ") Second = input("Second: ") Sum = float(First) + float(Second) print("Sum: " + str(sum))
Avatar
25e6eed Fix compilation with VS2022 with exception handling enabled - Robyt3 e05e47b Merge #5951 - bors[bot]
Avatar
Avatar
Meekrioz
First = input("First: ") Second = input("Second: ") Sum = float(First) + float(Second) print("Sum: " + str(sum))
shouldnt give this out a number and not "Sum: <built-in function sum>"? (edited)
Avatar
Lowercase sum is the name of a builtin function
17:08
You named your variable Sum not sum
17:08
thank you :)
Avatar
Avatar
Meekrioz
First = input("First: ") Second = input("Second: ") Sum = float(First) + float(Second) print("Sum: " + str(sum))
you don't need to print it* like that (edited)
17:19
print("Sum:", Sum)
Avatar
but the second Sum is a float
Avatar
yes, but print will format it for you
17:21
you had to convert it to str in your code because you're doing string concatenation
Avatar
but python doesnt know how to concatenate a float to a string right? so i have to put the "str" infront of "Sum"
Avatar
You can also do print(f"Sum: {Sum}") or print("Sum: {}".format(Sum))
Avatar
Avatar
Meekrioz
but python doesnt know how to concatenate a float to a string right? so i have to put the "str" infront of "Sum"
the print function will be in charge of that
Avatar
Avatar
Meekrioz
but python doesnt know how to concatenate a float to a string right? so i have to put the "str" infront of "Sum"
The one Rei posted uses magic under the hood. You pass it any kind of argument, it'll run str on it itself
Avatar
then why tf is this guy in the tutorial telling me i have to do it like that? BLUBBERS
17:25
or is it just advanced stuff? (edited)
17:25
what rei posted
Avatar
there's many ways to do
Avatar
yours is probably better, because of less code
Avatar
I posted 2 more, there indeed are many ways and it depends on what you want to do
Avatar
f-strings are maybe the best ones to use (the one with f"{var}")
Avatar
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
Avatar
okok, lets not go that far down the rabbit hole
Avatar
print("{} + {} = {}".format(First, Second, Sum)) (edited)
17:26
e.g.
Avatar
@Learath2 heard of this?
17:26
Avatar
Avatar
Learath2
print("{} + {} = {}".format(First, Second, Sum)) (edited)
u dont need f then if u use .format
Avatar
I only saw it used in a benchmark before, didn't really have any idea what they were doing
Avatar
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 a look at our Google Techtalk about MPTCP, or the MultiPath TCP tutorial given by Olivier Bonaventure at the IETF87.
Avatar
Avatar
ReiTW
u dont need f then if u use .format
Oh, I was going to do fstrings then I did format, sorry, cooking at the same time πŸ˜›
Avatar
i recommend using lower case variable names
Avatar
one advantage of f-string is that you clearly see what variable is being printed out directly
Avatar
programmers are lazy by nature
17:28
imagine having to press shift
17:29
your bible
Avatar
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
17:31
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
Avatar
Jupstar βœͺ 2022-10-16 17:31:57Z
start with basic on a commodore64
Avatar
fortran
Avatar
Avatar
Jupstar βœͺ
start with basic on a commodore64
Now that will teach you how to actually code
Avatar
will it tho
17:32
i think it may teach more about how computers work
17:33
not like i ever tried learning basic
17:33
on a commodore64
Avatar
Jupstar βœͺ 2022-10-16 17:33:25Z
it teaches you how to use goto XD
17:33
a good way to learn may be a dumbbed down assembly language
17:33
lc-3?
17:33
Little Computer 3, or LC-3, is a type of computer educational programming language, an assembly language, which is a type of low-level programming language. It features a relatively simple instruction set, but can be used to write moderately complex assembly programs, and is a viable target for a C compiler. The language is less complex than x86...
17:34
unis teach this iirc
17:34
i wrote one in rust some time ago
17:34
xd
Avatar
Jupstar βœͺ 2022-10-16 17:34:43Z
mhh i'd say no, better start with c or c++ and then do reverse engeneering, so you understand what happens under the hood
Avatar
why reverse engineer
17:35
just write the assembly directly
Avatar
Jupstar βœͺ 2022-10-16 17:35:22Z
yeah but then you dont get a feeling for higher level abstractions
Avatar
Jupstar βœͺ 2022-10-16 17:35:29Z
and learning pure asm is pretty hard^^
Avatar
i guess xd
17:36
i dont think u rly need to learn OOP
17:36
early on
17:36
i would learn more about pointers and references
17:36
memory management
Avatar
we learned RPC, it's ez af lmao
Avatar
but lot of schools focus on OOP right at the start
Avatar
Jupstar βœͺ 2022-10-16 17:36:33Z
mhhhhh i'd say depends a lot on what you want to do
17:37
we started with pascal xD
17:37
then java
Avatar
i started by myself but the first lang at a school was python
17:37
then java
17:37
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
gigachad 3
17:38
true chad
17:38
ahead of its time
Avatar
Avatar
Ryozuki
i would learn more about pointers and references
Jupstar βœͺ 2022-10-16 17:38:59Z
i think this is even very important for java (and ofc other similar languages) You understand why binding pointers to annonymous/lambda functions does what it does. Why simple datatypes like ints behave different etc.
17:39
we had linux & windows on our school computers
Avatar
Avatar
Jupstar βœͺ
we had linux & windows on our school computers
same
Avatar
Avatar
Ryozuki
will it tho
ofc it will, trying to solve very low level problems is amazing for your problem solving skills
Avatar
@Learath2 but you have to balance things
17:41
if you give something too hard to a newbie
17:41
he will often surrender
17:41
you need to give a sense of completion
Avatar
Jupstar βœͺ 2022-10-16 17:41:37Z
it also depends on what you call problem solving skills
Avatar
That is true. I assumed a newbie of infinite will-power
Avatar
Jupstar βœͺ 2022-10-16 17:41:55Z
e.g. if u work in a huge team it would be a problem to solve problems in asm xd
Avatar
programming actually requires a lot of will power
Avatar
Which is why I suggest C. Some hand holding but you don't get to skip the basics of computer science either
Avatar
to sit through problems
17:42
many ppl dont like programming cuz that
17:42
they get stuck
17:42
and they dont know what to do
17:42
thats where a programmer skill shines
17:42
and thats the end
17:42
of my ted talk
Avatar
Avatar
Learath2
Which is why I suggest C. Some hand holding but you don't get to skip the basics of computer science either
Jupstar βœͺ 2022-10-16 17:42:35Z
yeah c is a good language between lowest level and high level^^
Avatar
Avatar
Ryozuki
programming actually requires a lot of will power
Jupstar βœͺ 2022-10-16 17:42:58Z
yes its mostly about that πŸ˜„
Avatar
@Jupstar βœͺ assembly is a high level language
17:43
if you talk to this guy
17:43
BASED
Avatar
Jupstar βœͺ 2022-10-16 17:44:08Z
well i reverse engeneered x86 assmelber in the past a bit reading binary is not really useful
Avatar
@Jupstar βœͺ my technique when stuck is too go to the bathroom
17:44
and if it doesnt work sleep with it
17:44
most of the time works
17:44
xd
Avatar
Jupstar βœͺ 2022-10-16 17:44:26Z
i'd say x86 is a really ez asm to read
Avatar
Avatar
Ryozuki
@Jupstar βœͺ my technique when stuck is too go to the bathroom
Jupstar βœͺ 2022-10-16 17:44:52Z
in a shower you are most creative xD
17:45
The French are renowned for their cuisine and food culture but no one ever suggests going out for a French.
17:45
lmao
Avatar
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?
Avatar
Do they kill you if you go in further?
Avatar
40mins of an hour tutorial..my brain is fried chicken
Avatar
Avatar
Meekrioz
40mins of an hour tutorial..my brain is fried chicken
Is it your first programming language?
Avatar
Avatar
Learath2
Is it your first programming language?
Yeaaaa, i tried getting into programming multiple times, but this time i'm sticking to it :)
Avatar
just put doProgram()
Avatar
Avatar
Learath2
Do they kill you if you go in further?
Yes. (sry for the delay I went to get some food)
Avatar
Avatar
Meekrioz
Yeaaaa, i tried getting into programming multiple times, but this time i'm sticking to it :)
I have tip for you. As soon as you understand most of the language. Try to make something
Avatar
Avatar
Mr.Gh0s7
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?
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
Avatar
Avatar
Learath2
I have tip for you. As soon as you understand most of the language. Try to make something
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
Avatar
make a program that takes a number as argument and prints /points Meekrioz N times
Avatar
its legit a good training
Avatar
Avatar
Meekrioz
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
Now that you know a little bit. Want a quick classic task to see if you learned?
Avatar
justatest suuure
Avatar
Since you failed the weight converter. Do a celsius to fahrenheit converter
18:13
ok, i can do that
Avatar
meh no fun
18:15
trollet
Avatar
Avatar
Ryozuki
make a program that takes a number as argument and prints /points Meekrioz N times
#!/bin/sh read times for i in $(seq $times) do echo /points Meekrioz done
Avatar
Another classic is printing a staircase, and after that a pyramid for extra credits. But I dont think you saw loops yet
Avatar
[quakenet] ChillerDragon BOT 2022-10-16 18:17:56Z
Omg im totally binge watching this whole channel since a few days https://www.youtube.com/watch?v=9kaIXkImCAM
Avatar
Avatar
Learath2
Since you failed the weight converter. Do a celsius to fahrenheit converter
temperature = float(input("temperature: ")) unit = input("(C)elsius or (F)ahrenheit: ") if unit.upper() == "F": print("Temperature in Fahrenheit: ",temperature * 1.8 + 32) elif unit.upper() == "C": print("Temperature in Celsius: ",(temperature - 32) * 5/9) (edited)
πŸ‘ 1
Avatar
try giving it 'a'
Avatar
uh? 0.5?
Avatar
as input
18:24
kek
Avatar
times 5/9 (edited)
Avatar
Oooh, both ways, didn't know you'd learned conditionals. The 0.5 looks wrong, but the idea is right
Avatar
now, do $/€ conversion by fetching the current rate on internet
justatest 3
Avatar
better now
Avatar
code ascii teeworlds client
Avatar
i didn't know i can do 5/9
Avatar
Eh, close but no dice, I think that 5/9 rounds to int
Avatar
it doesn't
18:26
not in pyhton3, it does in python2
18:27
but python2 is dead, so who cares?
Avatar
Okay, so it's fine. Sorry, I don't do much python at all, my brain was thinking py2
Avatar
5 // 9
18:27
rounds to int
18:28
Ryo > Learath
Avatar
I avoid python if I can at all
Avatar
or more like Python_Ryozuki > Python_Learath2
Avatar
i used the weight converter code and wrote it into the temperature converter. i heard programmers are lazy.. justatest
Avatar
I'd rather code in php
Avatar
i'd rather code in LaTeX πŸ˜„
18:28
(than php)
Avatar
Avatar
Meekrioz
i used the weight converter code and wrote it into the temperature converter. i heard programmers are lazy.. justatest
Yes, but I suggest you don't take the lazy route with exercises
18:29
Their point is to go over stuff, if you copy paste you don't go over every line properly
Avatar
dont just do the exercises
18:29
do stuff for urself
18:29
and fun
Avatar
yea i know...but hey atleast i figured that print("Temperature in Celsius: ",(temperature - 32) * 5/9)" the "temperature - 32" has to be in a () because of the math shit
Avatar
Avatar
Ryozuki
dont just do the exercises
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
Avatar
i dont mean a project
18:30
a self-exercise
Avatar
well, operator precedency is normal
18:31
it gets complicated when you involve binary operations
Avatar
Avatar
Ryozuki
a self-exercise
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
18:31
If you overreach you'll get stuck, you'll start googling and copying code
Avatar
i guess xd
18:32
teaching is hard
18:32
hard to assume a viewpoint of someone new
Avatar
teaching is easy
Avatar
ur a teacher
Avatar
being a good teacher is hard to know (edited)
Avatar
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 (edited)
Avatar
Avatar
Ryozuki
ur a teacher
but i don't know if i'm good
Avatar
Avatar
Meekrioz
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 (edited)
thats true for surface level stuff
Avatar
Avatar
Meekrioz
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 (edited)
This is the mindset needed after you learn the language
18:33
im too fast i guess FacePalm
Avatar
premature guy troll (edited)
Avatar
i kinda wanna watch the last 20 mins of the tutorial but my brain is actually cooked
18:34
i'm at "While loops" now
Avatar
skip to for, for > while
Avatar
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
Avatar
Avatar
Chairn
skip to for, for > while
not in the tut justatest
Avatar
That is if you aim to actually be a good programmer as opposed to just being A programmer
Avatar
skip tut then
18:35
to do is to be, so if you do good programming, you're a good programmer πŸ™‚
18:35
even if you copy pasted
Avatar
for loops were my first wall when i rly first started learning
Avatar
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.
Avatar
i didnt knwo what the fuck for(int i = 0; i < 10; i++) was
18:36
cuz lot of stuff in the same place
Avatar
just add newlines
Avatar
Avatar
Chairn
skip tut then
it's on roadmap.sh so i thought it's good
Avatar
for( int i = 0; i < 10; i++)
Avatar
int i; for(i = 0; i < 10; ++i)
Avatar
Avatar
Mr.Gh0s7
int i; for(i = 0; i < 10; ++i)
back to the 90's
Avatar
I'm a ghost I exist at all times :p
Avatar
@Meekrioz why are you learning python?
Avatar
Avatar
Chairn
to do is to be, so if you do good programming, you're a good programmer πŸ™‚
I think I respectfully disagree here. If you can't write it yourself imo you have no business copy pasting it
Avatar
Avatar
Ryozuki
for loops were my first wall when i rly first started learning
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
19:10
yeah poinrters too
19:10
pointers
Avatar
Because i want to
Avatar
pointers justatest
19:57
why can't code just be if else
19:58
when did it turn into *char -> $_&¢=Ο€®×
Avatar
well in python no pointers
19:58
everything by ref
Avatar
-> is actually a syntactic desugar for (*a).b
19:59
a->b
19:59
iirc
Avatar
i think i have a decent fundamental understanding of langs except for pointers idk
Avatar
pointers are everything
20:01
fundamental
Avatar
i probably just gotta read more
20:01
yeah ik
20:01
but like whyre they used so much
Avatar
its actually pretty simple
Avatar
just for memory issues or
Avatar
just feels abstract at first
Avatar
i was playing this online algorithm race thing a long time ago
20:03
one of the qs was using pointers w linked lists to count something
20:03
and i was just like what's the point xd
20:04
xd
Avatar
Avatar
Ryozuki
-> is actually a syntactic desugar for (*a).b
I think it's more like a->b(x, y) is internally b(a, x, y)
Avatar
oh true, if b is a function that is
Avatar
For example the following code invoked undefined behaviour, but it prints out 42 in the online compiler I tried: #include <iostream> using namespace std; struct Foo { void bar(int x) { cout << x << endl; } }; int main() { Foo *foo = nullptr; foo->bar(42); return 0; }
20:09
If bar is virtual it just prints nothing
Avatar
Avatar
Learath2
I think I respectfully disagree here. If you can't write it yourself imo you have no business copy pasting it
millions of programmers just lost their job πŸ˜„
20:24
actually, copy pasting is not a problem
20:24
but last week, i had a student tell me that what he copy pasted did not work...
20:24
well, obviously, if you don't try to read and understand what you copy, you're asking for problems...
Avatar
Avatar
Chairn
actually, copy pasting is not a problem
Well imho, especially for students it's a problem
Avatar
because they're lazy yes
20:27
they don't try to understand, kinda ironic for students...
Avatar
Avatar
Chairn
they don't try to understand, kinda ironic for students...
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
Avatar
yup, i see them everyday...
Avatar
Avatar
Chairn
well, obviously, if you don't try to read and understand what you copy, you're asking for problems...
i think that's the thing learath is referring too
Avatar
yeah, i got it now. Imo, not totally the same issue, but tightly coupled
20:32
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
Avatar
only learath can enlighten us how he meant it :D
Avatar
copy pasting works very well when you start programming because you're not making unique programs
20:48
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
Avatar
Well, projects can get quite complex before it's too much for the internet
20:56
There are probably like 50 Minecraft clones
20:56
There actually is one good "Minecraft clone": mine test
20:57
It's not really a minecraft clone
20:57
It's an engine
20:57
Really worth playing
20:59
Sometimes you think you are doing something very obscure but actually someone has done it already lol
20:59
Some time ago I wanted to calculate the best item to produce in a very obscure android game
21:00
And someone has actually done that like 5 year before me
21:01
It's really hard to do something original
21:02
There are too many humans on earth
Avatar
idk generally you get a sense of what has and hasn't been done
21:09
I mean usually I do things because they haven't been done xd
Avatar
I usually do things because i exist
Avatar
Avatar
Chairn
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
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
Avatar
Sometimes it's not worth trying to understand a solution
21:18
Using libraries is basically copy pasting xd
21:21
Real legends designed and built thier computers from scratch
21:21
And mined the resources needed for it
Avatar
Avatar
pilonpl
Sometimes it's not worth trying to understand a solution
Jupstar βœͺ 2022-10-16 21:22:35Z
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.
Avatar
i dont remember the last time i copied code ever
21:22
unless its an example
21:22
from a framework
21:22
to work on top of it
Avatar
Jupstar βœͺ 2022-10-16 21:23:17Z
I literally coy paste my own code most of the time xd
Avatar
Jupstar βœͺ 2022-10-16 21:23:24Z
Copy
Avatar
Avatar
pilonpl
Sometimes it's not worth trying to understand a solution
worth its always, but depends on the value of ur time at that point
21:23
e.g understanding how a computer works at a lower level is worth it
21:23
but if u dont have time maybe its not worth
21:24
and u just do ur js web and get mony
Avatar
I'd like to design my own CPU
21:24
But it's hard
Avatar
you can
21:24
there is a game
21:24
Virtual Circuit Board, or VCB, is a sandbox-only drawing-based logic simulator featuring an assembler and a powerful simulation engine. All of it designed to give you the freedom to build and experiment with logic circuits to your heart’s content.Set your own goalsIn VCB you will set your own goals of what and how you want to build, it does not ...
Price
$14.99
Recommendations
105
Avatar
There are many games
Avatar
more fun this way!
Avatar
Avatar
pilonpl
There are many games
but this one is legit
Avatar
Jupstar βœͺ 2022-10-16 21:24:48Z
Cpus are boring make gpus
Avatar
oh well
21:25
it is not for me xd
Avatar
Avatar
pilonpl
It's a bit expensive lol
A digital logic designer and circuit simulator. Contribute to hneemann/Digital development by creating an account on GitHub.
21:25
try this
21:25
its more educational oriented than game
21:26
but its good
Avatar
I own logic world actually
21:26
Also a great game
21:26
unity trash
21:26
the one i sent u, 2d, is way better
Avatar
Probably
Avatar
its made with perfomance in mind
21:26
and it looks cool xd
Avatar
Logic world is also made with performance in mind i think
Avatar
i bought it when it came out
Avatar
Both games are good
Avatar
its limited by unity stuff
Avatar
Jupstar βœͺ 2022-10-16 21:28:18Z
C# is basically Java xd
Avatar
Only the client is unity
Avatar
Jupstar βœͺ 2022-10-16 21:28:28Z
It must suck xd
Avatar
Avatar
pilonpl
Using libraries is basically copy pasting xd
Which is why I suggest an annoying language like C to start with, so using libraries isn't easy
Avatar
But at this point of development LW is a bit laggy
Avatar
Avatar
pilonpl
I'd like to design my own CPU
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
Avatar
32bit computer
21:30
cute
Avatar
Computers are quite interesting
Avatar
16bit gets a little annoying on breadboard, way too many cables to route and the quality of the shitty breadboards start becoming an issue
21:31
32 is probably impossibly annoying on breadboard
21:32
the opcodes
Avatar
Maybe i will buy VCB on a sale or something
Avatar
Even at 16 bit you have to get a little clever with how you do the control unit
Avatar
Designing a cpu probably takes a lot of time
Avatar
well i think u follow pre made architectures, unless u are rly smart and make ur own
21:37
The von Neumann architecture β€” also known as the von Neumann model or Princeton architecture β€” is a computer architecture based on a 1945 description by John von Neumann, and by others, in the First Draft of a Report on the EDVAC. The document describes a design architecture for an electronic digital computer with these components: A processing...
Avatar
I also think i am not smart enough yet to design a cpu
Avatar
"easiest" not meaning its easy tho :p
Avatar
So ALU is quite easy to make i think
21:40
Ram too
21:41
Actually executing stuff is the hard part
21:41
How do i even determine what to do
Avatar
follow a tutorial i would say
21:42
u first gotta learn the basics
Avatar
Tutorials are for noobs
Avatar
logic gates
Avatar
Avatar
pilonpl
How do i even determine what to do
tutorials answer this question
Avatar
I already know how logic gates work
21:43
And most of the basic stuff i guess
Avatar
Avatar
Learath2
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
that's why i force my students to reinvent the wheel πŸ™‚
Avatar
Avatar
pilonpl
I'd like to design my own CPU
learn VHDL or Verilog
Avatar
Avatar
Chairn
that's why i force my students to reinvent the wheel πŸ™‚
Honestly, for them reinventing the wheel is a good thing
Avatar
Avatar
Chairn
learn VHDL or Verilog
i gotta learn one of those one day
21:46
are they propietary?
Avatar
Avatar
Ryozuki
well i think u follow pre made architectures, unless u are rly smart and make ur own
the default CPU implementation is almost always the same
Avatar
Avatar
Ryozuki
are they propietary?
i don't think so
21:48
VHDL is more european while Verilog is american
Avatar
Avatar
Chairn
learn VHDL or Verilog
Maybe ill figure it out in the next 40 years if I don't die
Avatar
but tools support both anyway
Avatar
VHDL 2008/93/87 simulator. Contribute to ghdl/ghdl development by creating an account on GitHub.
21:48
do u recommend this
Avatar
there's a free compiler, but i don't recall its name...
Avatar
ofc by open source i meant a compiler
21:49
it uses gpl2.0 so its stallman approved
21:49
BASED
Avatar
never heard of this, i always used proprietary software for this because at the end, you need them for board design
Avatar
and because university provides student licenses
Avatar
i refuse to use propietary software for this
21:50
ill try ghdl
Avatar
HDL simulators are software packages that simulate expressions written in one of the hardware description languages, such as VHDL, Verilog, SystemVerilog. This page is intended to list current and historical HDL simulators, accelerators, emulators, etc.
21:50
i mostly used questasim/modelsim
21:51
i recommend this one: https://en.wikipedia.org/wiki/Verilator (edited)
21:51
Verilator open-source SystemVerilog simulator and lint system - GitHub - verilator/verilator: Verilator open-source SystemVerilog simulator and lint system
Avatar
thats for verilog
Avatar
it supports vhdl too
Avatar
whats better
21:52
verilog or vhdl
Avatar
or not apparently
Avatar
verilog has a syntax close to C
21:52
well, SystemVerilog is really close to C syntax
Avatar
ok so vhdl then
Avatar
you'll find more resources on VHDL i think, because it is taught in european universities
21:53
you can use GTKWave for wave visualisation
Avatar
Simulating a cpu on a cpu sounds so cool
Avatar
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.
Avatar
And inefficient
Avatar
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.
Avatar
Avatar
pilonpl
And inefficient
welcome to containers
21:54
modern cpus have special capabilities for that tho
21:54
kvm
Avatar
Avatar
pilonpl
Simulating a cpu on a cpu sounds so cool
you have to to test it
21:55
in computer architecture, we simulate complete system on a cpu
21:55
expect 10^6 slowdown πŸ™‚
Avatar
my longest simulation was 15 days
21:55
and i had to reduce it already
Avatar
Use gpu for better performance
Avatar
you can't parallelize those
Avatar
I wonder what's the limit, how fast computers can get
Avatar
Avatar
Chairn
expect 10^6 slowdown πŸ™‚
does this give some philosophical take on whether its possible that we are in a simulation?
21:56
idk why i thought of that now xD
Avatar
Avatar
pilonpl
I wonder what's the limit, how fast computers can get
what they are currently
Avatar
and i phrased that rly badly
Avatar
kinda hard to go faster with current tech
21:57
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"
Avatar
I mean, transistors won't get much smaller i guess
Avatar
yup, kinda reaching the end
Avatar
I really like the simulation hypothesis
21:58
It just seems very stupid at first
21:58
But actually you can't be sure this isn't a simulation
Avatar
it is stupid imo (edited)
Avatar
And even if it is a simulation, does it actually matter
21:59
What is reality anyway?
Avatar
But it's also scary because its possible to just create pain
22:00
And I don't care if my pain isn't real on some higher level, for me it's totally real
Avatar
time to go sleep
22:00
Why
Avatar
just talking about myself xd
22:01
good night
Avatar
Literally the best topic
22:02
Actually i think the universe doesn't need any meaning
22:02
And lack of any meaning is actually the best thing that can happend to us
22:04
It's weird that anything exists
22:04
Like why
22:05
But actually maybe it would be weird for nothing to exist
22:05
Idk
22:06
No matter the reason I don't like that something actually exists
22:06
It's just scary you know
22:08
But my opinion is very unpopular for some reason
22:09
Most people want thier life to be meaningful on some higher level
22:10
And they want god to be true and heaven
Avatar
Avatar
Ryozuki
time to go sleep
already 1 hour late on my schedule πŸ˜„
22:10
gn8
Avatar
I don't even have a schedule
Exported 532 message(s)