I just wanted to say how much I enjoy watching your videos. It is the perfect balance between top quality educational content and really funny/entertaining jokes mixed in. You truly are a one of a kind engineer. Keep up the fantastic work and I hope things are not too bad for you in Russia. Tsoding rocks 👍
in python3 with f strings you can do foo = "a" print(f"{foo=}) which will print foo = "a" basically if you put an equal sign at the end of the block it will evaluate the expression and return its value and the expression itself as string great video as always bro
wrong, print(f"{foo=}) will print foo="a" if you want the spaces for example print(f"{foo= }) would print foo= "a". Point being, it doesn't automatically add a space before and after the = like your example :)
Some reasons why the binaries contain the class names: - debugging output, e.g. exception stacktraces - reflection - methods that print the class name, including default toString implementations and getClass().getName()
@@DeathSugar You can strip class names via an obfuscator. This effectively renames all your classes to 'A', 'B', 'C'... 'AA', 'AB' and so on. Great if you want to avoid reverse engineering, not so great if you want to understand a stack trace or any errors/debug output
Being an old guy, I know why there are and ... It's from the teletype machine days. is a carriage return where the print head is physically returned to the start of the line. is a line feed where physically scrolled the paper up one line. No collusion involved. ;)
35:00 - Lol welcome to the spec. It literally says in that page they regret some of these decisions. But yeah, its not a horribly complicated spec, just got some quirks. 43:30 - Arrays of 'constants' of each type would actually be kinda cool.
18:30 I think the "intention" of Windows (or DOS) having both line feed and carriage return together is a simpler printer driver, and laziness. Early matrix printers had different commands for line feed (moving the paper) and carriage return (returning the print head to the home position, this is where the name comes from). With having both commands directly in the text document, a printer driver can simply send the file byte by byte to the printer and it does the right thing. Unix and Mac preferred a single command inside text files, since in a text document there is not really a concept of carriage return or line feed, just new line. For parsing binary data from bytes, I recommend struct.unpack. It is a standard package, which allows for easier reading (and writing) of entire structures and can handle endianness as well.
i feel like it's less laziness, and more... DOS probably cared more about compatibility with existing standards, whereas unix and max (also unix) *probably* just figured, you're probably not printing your text files, let alone your code, so why not keep it simple
By the way, try to disable "Turbo" (also called p-state). You can do that with `echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo`. This will disable your CPU from running on extra sShpPpiIieeed and will no longer give you a heatstroke while you using your computer.
Год назад+2
I love that there is the development process captured in this! Building custom JVM is cool, but I like to see you adding new features and suddenly saying "this can go to a separate function". It is such a great learning material! I wish something like this was done 15 years ago when I started to code :)
Such a shame we had to give up Turing completenss to get Unicode in python 3... Btw, Java 18 or 19 finally got "script" files, where you can just start writing code without a public static void main and it just works™
@@Rene-tu3fc I actually dont have a problem with that, we need some way of accessing functions like that anyway, I see utility classes as some kind of namespace.
Just "reading" that title alone made me want to comment: You really are the Sado-Masochistic Dominatrix of Programming. G-sus Krajst: This is the epitome of perversion, lol - and i thought generating 6502-assembly from inside a BASIC V2 program and poking it live to replace the running kernel by triggering a soft-reset would be nasty - this is a whole nother level of dark-arts. Razpackt!
We built a transpiler that can target multiple languages instead (we made backends for lua and php but built it to be extensible). The subset of the stdlib that we implemented is very small as it stands but also built to be extended using Java classes with native methods and annotations that provide the code for the different languages. The produced code also doesn't look great because it replicates the behavior instruction by instruction but it actually works quite good.
My man, every time i watch your videos i feel stupid, but at the same time i always learn something new :) Let's hope all that shit ends soon, i wish us all peace.
There is a lot more incompatible change in Python 2 vs 3 but the print is the most noticable syntactically. The way strings work completely changed, splitting the str type of Python 2 that was basically just a list of bytes into 3 different type: str (unicode string), bytes (immutable list of bytes), bytearray (mutable list of bytes), breaking a lot of programms messing around with binary files. And a lot more stuffs even less noticeable than that.
Exactly, the differences are far bigger than print() -- most libraries wouldn't take nearly so long to port to Python 3 if that was the only change, especially since most use proper logging instead of prints which were unchanged. The division operator '/' always returning a floating point number in Python 3 instead of also doing integer division like in Python 2 (which is now '//') is a particularly nasty one I remember for example.
@Elsevar Asadov I mean, to realize that this was a joke you need to watch that bit until the end. You can't expect such a huge attention span from an average RUclips commenter especially after introduction of RUclips Shorts.
@@TsodingDaily I had this 2.5 hour video in my recommendations, never seen this channel before, and first impressions matter. I got the impression you didn't know what you were talking about (and I've heard plenty of beginners complain about this very thing during early Python 3 days), and if that were a sign of what's to come for the rest of the video, I'm not sitting through 2.5 hours of this, especially if I have many more creators to choose from. I'm sorry my judgement was incorrect, but I'm sure I wasn't the only one to come to this conclusion. Maybe something to consider for future videos. Or don't, I won't stop you.
I admittedly haven't watched through the whole video, but since you are using python 3 I recommend using format strings in prints, you can do a lot of the stuff you did effortlessly e.g. print(f"{foo = }") results in "foo = "
@@BalintCsala yes i laughed when he tried `json.dump` without `indent` parameter, saw that it didn't print like he thought and immediately threw that code away xD so close yet so far
2:08:58 could use the ,= operator (which is just weird tuple syntax)
Год назад
2:03:50 Yes! This is me programming in PHP 15 years ago. "Why does the function return allways null? Ah, because I haven't included `return result` at the end..."
19:35 Once a bunch of files i was reading in were getting cut of at random points, ends up the binary info contained EOF markers coincidentally, and reading it in non-binary mode would just make it quit reading the file when it ran into them.
I liked the video but dislike the fact that you are not getting the money, if there is anything i can do let me know, i will be happy to support. I am from india and Russia is a good friend of India
Mi vidas komentojn en la angla, mi vidas komentojn en la rusa, sed kie estas la komentoj en la plej bona lingvo? Ŝajnas ke mi mem devas zorgi pri tio! Ankaŭ, algoritma engaĝiĝo.
The most important thing we can do to combat AI code generator agents is write massive piles of the sh*ttiest code on the planet, like bash scripts that generate bash scripts
@@objectobject5889 but 10x slower in execution and the next Python version wont be able to run it without major changes. Got it, like usual Python code...got it 😁
"Money is not the most important thing in your life, what's important is knowing how to parse JVM" -Tsoding
Take that Larry Elison
13:10
That's some wisdom for you folks! XD
13:15
Actually very true, create a language, target the JVM and you're good to go
I like how he reflexively keeps typing semicolons at the end of lines and correcting it
I always do that in matlab too, mostly because sometimes you're meant to and sometimes not 🤷
He could leave them in, it would still work.
We had Jython in the past (java running python programs) now Pava (?) Python running Java. Letsgoo
java running python running java running python running java when?
@@reinhold1616 milk inside a bag of milk inside a bag of milk
@@ndrechtseiterREAL
@@ndrechtseiterholy shit milk game
milk mentioned@@ratofthecity6351
I just wanted to say how much I enjoy watching your videos. It is the perfect balance between top quality educational content and really funny/entertaining jokes mixed in. You truly are a one of a kind engineer. Keep up the fantastic work and I hope things are not too bad for you in Russia. Tsoding rocks 👍
Yeah this is a really underrated channel for a cs nerd like me
He hadn't uploaded since the Russian mobilization started. I had started to worry for him. Glad to see he is alright.
in python3 with f strings you can do
foo = "a"
print(f"{foo=})
which will print foo = "a"
basically if you put an equal sign at the end of the block it will evaluate the expression and return its value and the expression itself as string
great video as always bro
wrong, print(f"{foo=}) will print foo="a" if you want the spaces for example print(f"{foo= }) would print foo= "a". Point being, it doesn't automatically add a space before and after the = like your example :)
Glad to see you back. I hope you are safe from everything.
Ooh man my favorite channel makes a video about my favorite language java best day ever
Glad to see you back keep up the content, I love watching it in the background at work!
You are a wizard, love watching you work
good to see you’re back🎉
Some reasons why the binaries contain the class names:
- debugging output, e.g. exception stacktraces
- reflection
- methods that print the class name, including default toString implementations and getClass().getName()
is there a way to strip them? or the only way to do it is via JIT/AOT?
@@DeathSugar You can strip class names via an obfuscator. This effectively renames all your classes to 'A', 'B', 'C'... 'AA', 'AB' and so on. Great if you want to avoid reverse engineering, not so great if you want to understand a stack trace or any errors/debug output
@@laurensweyn is it built-in thing in java? Can this data be moved in some dsym file, like CXX does?
@@DeathSugar Dont remember if is actually build in the compilator but theres a lot of tooling dedicated to obfuscation and code reduction
@@DeathSugar proguard is a popular one
Being an old guy, I know why there are
and
... It's from the teletype machine days.
is a carriage return where the print head is physically returned to the start of the line.
is a line feed where physically scrolled the paper up one line. No collusion involved. ;)
Right, but once nobody used teletypes, why did each of them choose different line ending.
35:00 - Lol welcome to the spec. It literally says in that page they regret some of these decisions. But yeah, its not a horribly complicated spec, just got some quirks.
43:30 - Arrays of 'constants' of each type would actually be kinda cool.
Really entertaining video, looking forward to the rest of this!
This was interesting to watch and I learned a lot. Thank you! :)
You're clever and a quick thinker.
im so happy i can listen to u again
2:52 He checked the date to say what year it is
😂
That's because your mind is light years ahead
18:30 I think the "intention" of Windows (or DOS) having both line feed and carriage return together is a simpler printer driver, and laziness. Early matrix printers had different commands for line feed (moving the paper) and carriage return (returning the print head to the home position, this is where the name comes from). With having both commands directly in the text document, a printer driver can simply send the file byte by byte to the printer and it does the right thing. Unix and Mac preferred a single command inside text files, since in a text document there is not really a concept of carriage return or line feed, just new line.
For parsing binary data from bytes, I recommend struct.unpack. It is a standard package, which allows for easier reading (and writing) of entire structures and can handle endianness as well.
i feel like it's less laziness, and more... DOS probably cared more about compatibility with existing standards, whereas unix and max (also unix) *probably* just figured, you're probably not printing your text files, let alone your code, so why not keep it simple
I was waiting for your video
dude, great to see you're safe! was worried when you went quiet after the draft was announced!
ure the best programming related youtube content creator. keep up the good work
By the way, try to disable "Turbo" (also called p-state). You can do that with `echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo`. This will disable your CPU from running on extra sShpPpiIieeed and will no longer give you a heatstroke while you using your computer.
I love that there is the development process captured in this!
Building custom JVM is cool, but I like to see you adding new features and suddenly saying "this can go to a separate function".
It is such a great learning material! I wish something like this was done 15 years ago when I started to code :)
Such a shame we had to give up Turing completenss to get Unicode in python 3...
Btw, Java 18 or 19 finally got "script" files, where you can just start writing code without a public static void main and it just works™
maybe by java 23443 we'll have static function files, where we don't need to encapsulate public static functions within classes
jshell ?
@@Rene-tu3fc I actually dont have a problem with that, we need some way of accessing functions like that anyway, I see utility classes as some kind of namespace.
JavaScript in real life
Just "reading" that title alone made me want to comment: You really are the Sado-Masochistic Dominatrix of Programming. G-sus Krajst: This is the epitome of perversion, lol - and i thought generating 6502-assembly from inside a BASIC V2 program and poking it live to replace the running kernel by triggering a soft-reset would be nasty - this is a whole nother level of dark-arts. Razpackt!
def pprint(obj): print(json.dumps(obj, indent=4, sort_keys=False))
obj is not JSON serializable
Well this definitely got me down a deep rabbit hole
We built a transpiler that can target multiple languages instead (we made backends for lua and php but built it to be extensible). The subset of the stdlib that we implemented is very small as it stands but also built to be extended using Java classes with native methods and annotations that provide the code for the different languages. The produced code also doesn't look great because it replicates the behavior instruction by instruction but it actually works quite good.
Super cool, can't wait for more! Maybe an interpreter?
Hi (or privet, as a Russian I hear russian accent in your speech :D)! Thanks for the video :)
1:23:11 the best part of the entire live
Someone is overly funny and sarcastic than usual in this stream 🤣
Nice vid Tsoding. Learned lot.
My man, every time i watch your videos i feel stupid, but at the same time i always learn something new :) Let's hope all that shit ends soon, i wish us all peace.
You're a lunatic, man. Never change :)
There is a lot more incompatible change in Python 2 vs 3 but the print is the most noticable syntactically. The way strings work completely changed, splitting the str type of Python 2 that was basically just a list of bytes into 3 different type: str (unicode string), bytes (immutable list of bytes), bytearray (mutable list of bytes), breaking a lot of programms messing around with binary files. And a lot more stuffs even less noticeable than that.
Exactly, the differences are far bigger than print() -- most libraries wouldn't take nearly so long to port to Python 3 if that was the only change, especially since most use proper logging instead of prints which were unchanged.
The division operator '/' always returning a floating point number in Python 3 instead of also doing integer division like in Python 2 (which is now '//') is a particularly nasty one I remember for example.
Let's not forget import pathing changed slightly from 2 to 3 also
@Elsevar Asadov I mean, to realize that this was a joke you need to watch that bit until the end. You can't expect such a huge attention span from an average RUclips commenter especially after introduction of RUclips Shorts.
@@TsodingDaily I had this 2.5 hour video in my recommendations, never seen this channel before, and first impressions matter. I got the impression you didn't know what you were talking about (and I've heard plenty of beginners complain about this very thing during early Python 3 days), and if that were a sign of what's to come for the rest of the video, I'm not sitting through 2.5 hours of this, especially if I have many more creators to choose from.
I'm sorry my judgement was incorrect, but I'm sure I wasn't the only one to come to this conclusion. Maybe something to consider for future videos. Or don't, I won't stop you.
@@laurensweyn you only have to watch 4m 15s to hear him say he's joking. But go ahead and explain how valuable your opinions are
That was fun to watch
The real OOP were the friends we made along the way
Again GREAT VIDEO 👏👏👏👏
I admittedly haven't watched through the whole video, but since you are using python 3 I recommend using format strings in prints, you can do a lot of the stuff you did effortlessly
e.g.
print(f"{foo = }") results in "foo = "
but without pretty-printing, although he could've used `pprint.pformat`.
@@zohnannor I was mostly talking about stuff around 20 minutes
Also, for pretty printing as others mentioned json _is_ better
@@BalintCsala yes i laughed when he tried `json.dump` without `indent` parameter, saw that it didn't print like he thought and immediately threw that code away xD so close yet so far
Knowledge of reflection and injection would be helpful for a project like this 😉
1:47:28 When you said "holy fucken shit"... I felt it in my bones.
I really like your spying videos
Jython, perfect name dude ❤
can you write assembly on an os level ? It's fun and easy if you stay 16bit because you still have the bios.
I know it's too late to sugest a name, but if Jython is Python on JVM, JVM in Python needs to be Pava or PVM
6:00 for the thing about open source as a means to exploit young enthusiastic programmers
1:38:10 Descriptor is the ()V (void) return signature with no args
2:08:58
could use the ,= operator (which is just weird tuple syntax)
2:03:50 Yes! This is me programming in PHP 15 years ago.
"Why does the function return allways null? Ah, because I haven't included `return result` at the end..."
Tsoding adding all those parantheses might be his unconcious telling him to learn LISP
3:26 that is correct
Hehe... Пива... Ehehehhehhehhh...
Since you did this, why not also write a program in Python that can decompile Java bytecode?
what font are you using?
ioevska
I think this is the third time you've changed the thumbnail now 😂
imagine running this through jython
19:35
Once a bunch of files i was reading in were getting cut of at random points, ends up the binary info contained EOF markers coincidentally, and reading it in non-binary mode would just make it quit reading the file when it ran into them.
I guess tsoding was so afraid of enabling JVM developers that he decided to use python for this task.
python struct module is also a good option
1:23:10 As a CS graduate, I confirm.
гагага пива
1:04:00 it's hard to convince my peers to do this versus blop chunks of code and debug little by little
i love the jokes here n there
bruh, like really as im watchin the vid, it do be extra funny and interesting to watch
Oh the inexplicably fantastic horror. I cannot look at it but i cannot look away from it
Javas interpretation of UTF-8 is going to be a pain. Because if you start using emojis in the java strings there are going to be problems.
пива))
Make porth compile to jvm
How on the Earth Java compiles simple write to stdout so long?
Hmm
Feels like Porth all over again
You say it’s just for hello world but I bet this will end up being a lot more 😂😂
oracle jdk😄
:D
I liked the video but dislike the fact that you are not getting the money, if there is anything i can do let me know, i will be happy to support. I am from india and Russia is a good friend of India
print without () had security issues
Next step, writing a Java library to parse CPython byte code.
"It's doable"
My insides feel weird reading the title.
I want to code something simple today he says 😂
Has nobody commented on "P0rn folder size at 14:45" - Too smol PepeHands :D
Mi vidas komentojn en la angla, mi vidas komentojn en la rusa, sed kie estas la komentoj en la plej bona lingvo?
Ŝajnas ke mi mem devas zorgi pri tio! Ankaŭ, algoritma engaĝiĝo.
Did you move apartment?
Maybe he got back to parents house, Kemerovo, or Novokuznetsk.
are we not going to talk about 2:52?
Edit: Ok, I should've just kept watching...
So you were in Russia that time?😀
The most important thing we can do to combat AI code generator agents is write massive piles of the sh*ttiest code on the planet, like bash scripts that generate bash scripts
23:45 I came, but only because I like pain or something
open source and hackathons are one and the same :D
21:10 it's because return is a keyword and print is a function but was a keyword in py2
sorry, but how doesnt you back hurt when you stay sit for quite a time?
14:07 is really hot 🔥 😂😂😂!!
in Russia 😂
Yeah, the whole point of Java is that you don't need to know how Java works internally.
Java Bytecode in Python. Wow. How's the performance? 🤣
3x faster. In the development time domain ;)
@@objectobject5889 but 10x slower in execution and the next Python version wont be able to run it without major changes. Got it, like usual Python code...got it 😁
It would be rly cool if you could help free pascal with jvm backend
I think Free Pascal can already target the JVM.
@@superscatboy it does but is not upstream last time I checked and it is based on really old Jasmin library
@@replikvltyoutube3727 Fair enough, I just remember hearing that it was a thing it could do.
1:41:00 incoming call
Maybe yer laptop needs to be cleaned from dust ?
Un-staticize your interpreted language 😈
first!
может тебе создать русский канал? и заливать туда озвучки, на русском, или сюда добавить субтитры?
Whyyyyy? Just whyyy
8:50
en.wikipedia.org/wiki/Java_class_file#:~:text=the%20sourcefile%2C%20etc.)-,Magic%20Number,-%5Bedit%5D