Automatically Removing Unused Code

  Рет қаралды 16,270

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер
@TsodingDaily
@TsodingDaily 2 жыл бұрын
Let me clear some things out: 1. I didn't close the source code. It's still on GitLab. It's still under MIT license. You can do whatever you want with it according to the license *including* implementing alternative compilers. Here is how you can access it gitlab.com/tsoding/porth#how-to-access-the-last-open-version I simply won't be pushing any new MIT code until I'm done with the design. Once the design is done. Everything will be open for everyone forever. 2. I'm still streaming the development of all of the major features and explaining how they work internally. Feel free to take all of that info and apply it on top of the available source code. And maintain your competing compilers (just out of spite, please do). 3. As much as I'm annoyed, I literally can't do anything but not push any new MIT code for awhile, shake my fist and say that I'm annoyed. Do you think I have an army of lawyers or something? There is so many possibilities to annoy me even more. Please use your imagination. :)
@Liz3_
@Liz3_ 2 жыл бұрын
Simply ignore the alternate versions. I get the frustration but doubt its worth doing this. Your giving the spec and should give 3 **** about what someone else does. Whats the issue with other implementations, they are all non official and thus not relevant here.
@TsodingDaily
@TsodingDaily 2 жыл бұрын
@@Liz3_ That is literally what I'm doing! Giving you the spec in a form of the code and my streams (really just go read the available code and watch the stream and you pretty much have everything). Not giving any shit about what's anyone doing or saying. And also temporarily not giving any new code under MIT until I'm done with the design. :)
@telnobynoyator_6183
@telnobynoyator_6183 2 жыл бұрын
I'm not sure they are really "competing compilers" it's probably just some dudes who originally wanted to just "code along" with you. Then they wanted to continue working on their own project but they had to wait for your streams / videos to make progress on their on their version because, as you said, there's no full spec. So probably, out of boredom, they decided to skip a step and work on the optimization part, at the risk of having to scrap all the optimization stuff if the language changes. But that's just my guess and I didn't see the "alternative compilers" maybe in their readme they were being a bitch about it and going "HAH my compiler is BETTER" idk... EDIT : I just got to the part where you said you knew the people who did it so I'm probably wrong with my naive point of view.
@SamualN
@SamualN 2 жыл бұрын
@@TsodingDaily going closed source temporarily doesn't seem like ignoring the alternatives
@TsodingDaily
@TsodingDaily 2 жыл бұрын
@@SamualN The code is open, what are you talking about? gitlab.com/tsoding/porth#how-to-access-the-last-open-version Regarding the new code I wrote: I have neither legal nor moral obligations to give it to you. Just like you have neither legal nor moral obligations to give me any of the code you write. (I'm really surprised I have to explain that) Having said that you will still get my code for free, but later when I'm done with the design of the language.
@cleciojung4645
@cleciojung4645 2 жыл бұрын
I love this series, I learned a lot about programming languages and computers. Thanks!
@lens3973
@lens3973 2 жыл бұрын
The amount of self-hate in this video is relatable.
@chaoticregression
@chaoticregression 2 жыл бұрын
Should the language be called Orth now since there is no python in there now?
@irishbruse
@irishbruse 2 жыл бұрын
Porth is like forth but written in Porth still works lol
@landsgevaer
@landsgevaer 2 жыл бұрын
@@irishbruse Like PHP! He will like that comparison.
@DFPercush
@DFPercush 2 жыл бұрын
Make sure that when you build libraries or dlls, you mark all the exports as used and iterate them all.
@cheebadigga4092
@cheebadigga4092 6 ай бұрын
Let me clarify the points being made about pushing large files to a Git repo. It's true that Git is much faster at pulling/fetching/merging/rebasing when you only have small files (e.g., source code) pushed into the repo. But in your case, having the bootstrapped files with around 3.5 MB pushed into the repo won't really affect the Git operation speed. We're in 2024 after all. Pushing and generally dealing with large files via Git becomes a real pain when you have multiple commits where these kinds of files are modified in some way (create/change/delete). Additionally, if those files are binary, Git can't really diff the changes so each commit which affects a large binary file will take some time to process. But this is where Git LFS comes in, especially when you're dealing with source code and large (binary) files in the same repo. When working exclusively with large (binary) files, Git is simply not the right tool for that.
@telnobynoyator_6183
@telnobynoyator_6183 2 жыл бұрын
Idk if the did that later (i'm at 50:56) but I would have placed the check of whether or not the procedure was already checked at the beginning of walk-proc EDIT : The procedure walk-proc would look like this - if prok was already marked as used do nothing / equivalent of early return - mark prok as used - iterating through ops Because rn I don't think the main proc is being marked as used so it could end up being walked twice
@Bobbias
@Bobbias 2 жыл бұрын
On one hand, I understand your view. On the other, why give a shot what other people are doing? Your Porth is spec compliant by virtue of quite literally being the spec currently. Like I said, I understand how you feel, but I also think maybe you overreacted a bit here. Either way, I'm still interested in seeing the language evolve over time.
@irishbruse
@irishbruse 2 жыл бұрын
Yeah a bit of an overreaction I don't see how other people having fun making a copy of the language he is making for fun is competition? Like what competition is there for him its a programming language that people will only use for fun.
@Bobbias
@Bobbias 2 жыл бұрын
@@irishbruse yes, that's how I see it as well. But at the same time I get his thinking too. Although he's been sharing the code, he does have very specific goals and thoughts about what the language should be in the future. And someone who shows up with a complete reimplementation with massive improvements in some areas but none of the final vision does seem like a bit of an attack in one sense.
@irishbruse
@irishbruse 2 жыл бұрын
@@Bobbias Yeah I get that but hes streaming him making it and teaching as he goes if people decide to go and follow along then the easiest thing to do is to remake porth as if they have problems they can go back and see how tsoding implemented it. No one is remaking porth cause they think there better than him its more of an exercise in practise and learning the person that replied at the top said he was doing it to learn LLVM which is great and of course thats going to be better than writing fasm code its what most compilers use now a days anyway but the whole point is that he was learning tsoding should be proud that he got someone interested enough with his project to want to go and use it as a learning tool. I do think he could have dealt with it in a much more professional way.
@Bobbias
@Bobbias 2 жыл бұрын
@@irishbruse I was trying to kinda say the same thing. But I also wanted to make it clear that I do get how he feels, even if that's not how I would personally feel under the same situation. It's like seeing an implementation that makes you think "I guess that works, but it's not how I'd do it".
@r1yuu192
@r1yuu192 2 жыл бұрын
I don't understand why everyone is rambling about the drama in a bad way. It's just like no pushes happening for a while. If the project had been started in private and later released under MIT or if he wouldn't publicly let us follow his adventure nobody would even know about it and it would be no problem. He's not changing the license or anything. also it's his project and he can decide what he wants to do with it. Sometime it just feels annoying and crushing that you worked and poured your soul and time into a project and then see someone "copying" your work and but using better tools and materials even tho you might have allowed it.
@berndeckenfels
@berndeckenfels 7 күн бұрын
Not inlining when creating the bootstrap assembly probably saves more than dce
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 2 жыл бұрын
I think that all the drama is about "corth", but I'm not sure
@jacobswe3344
@jacobswe3344 2 жыл бұрын
Hey man, it’s your project do what you want. I follow you for the experience of learning lower level things I don’t do in my day job, and for the curiosity of stack languages. You make the rules how you see fit
@poly9306
@poly9306 2 жыл бұрын
Bro, it's so obvious that someone was just having fun implementing porth compiler, and you framed it like some sort of competition and like someone is trying to beat you, chill out. EDIT: Yeah, after reading author's comment, it basically confirmed what I wrote/thought.
@TsodingDaily
@TsodingDaily 2 жыл бұрын
As far as I'm aware, the people who caused this situation haven't left any comments on this video. The only comment that claimed that they were making a porth compiler I had no idea about until they actually posted it here. In any case everything that was posted under MIT license stays under MIT license and people who want to have fun with it should feel free to have fun with it. Here is how you can access the code: gitlab.com/tsoding/porth#how-to-access-the-last-open-version Once I'm done with the design everything new will be also published under MIT or even Public Domain. I haven't decided yet.
@poly9306
@poly9306 2 жыл бұрын
@@TsodingDaily Ok, maybe I don't know the full story, so I will not argue if it was competitive or not. Keep up the great work.
@amphitheres
@amphitheres 2 жыл бұрын
The reason complexity is reducible in mathematics is because mathematics uses classical logic, which is a deductive system including the cut elimination rule: a proof that A implies B and a proof B implies C allows one to infer A implies C, which is basically allowing us to delete (cut) the proof B⇒C. In terms of haskell this is like being able to compose functions f :: Int -> String, g :: String -> Bool and compute the result of (g . f) without having to compute f. Obviously you cannot do this with computers, and this introduces computational complexity, runtime of algorithms, etc.
@sarenard
@sarenard 2 жыл бұрын
Let's go, another rediff !
@AshtonSnapp
@AshtonSnapp 2 жыл бұрын
Currently working on my own programming language. Basically Rust with Ruby-style syntax that compiles to bytecode that runs on a custom runtime. Implementing the compiler + runtime as a single Rust program, currently working on the lexer using a crate called Logos. god help me when I decide to finally implement Unicode character escapes
@h3xad3cimaldev61
@h3xad3cimaldev61 2 жыл бұрын
Listen dude, I love your videos and shit but it seems kinda petty closing the source because people are implementing an unfinished language. Like if the people who are making these better compilers are going "haha tsoding bad programmer use this instead" it's understandable but I highly doubt that's the case, tell me if I'm wrong tho. But no hate to you
@DFPercush
@DFPercush 2 жыл бұрын
Idk, I can understand it because you'd have people calling something Porth that isn't Porth.
@TsodingDaily
@TsodingDaily 2 жыл бұрын
I do agree with you. That's why all of the source code that was open stays open under MIT for every to do whatever they want with it. Here is how you can access it: gitlab.com/tsoding/porth#how-to-access-the-last-open-version And after I'm done with the design everything I developed after that will be under MIT as well or maybe even under Public Domain. I haven't decided yet. In any case, have fun coding!
@angelcaru
@angelcaru 9 ай бұрын
rewrite it in Rust
@mbarrio
@mbarrio 2 жыл бұрын
I'm definitively adding Porth in my resume.
@gscacco
@gscacco 2 жыл бұрын
YES ! I will definitely use tabs over spaces when "space" matters ! 😱
@JuanchosMRL
@JuanchosMRL 2 жыл бұрын
14:21 Oh Sozing, you're amazing! Love all of your projects / videos ❤ Huge inspiration, how 'bout dat?
@nothappyz
@nothappyz 2 жыл бұрын
Can anyone link the third party compiler he's referring to? I'm just curious, don't care much about the drama
@abcrtzyn
@abcrtzyn 2 жыл бұрын
It’s not just one compiler. By his implications, I would guess that several people have made their own compilers and have made Tsoding aware of them.
@nothappyz
@nothappyz 2 жыл бұрын
@@abcrtzyn yeah ok idc where's the link
@nark4837
@nark4837 2 жыл бұрын
Why are you distributing the assembly source file for boostrapping and not the raw executable binary, surely the file size would be smaller and it would remove the unnecessary step of having the user execute fasm? This is a genuine question, I can't think why you would have chosen this option, please let me know your thought process! 😃
@batlin
@batlin 2 жыл бұрын
What about Git-LFS for the bootstrap versions? It seems to work OK in repos I've worked on. (Apologies if this is addressed later or in another video)
@cheebadigga4092
@cheebadigga4092 6 ай бұрын
Not worth it for a couple of MB. Only for larger files, especially when those files are modified across the Git history.
@batlin
@batlin 6 ай бұрын
@@cheebadigga4092 perhaps, but I've found this can be a problem with some teams when they repeatedly commit updated versions of the same "couple of MB" files. That can be worked around with BFG, but requires the whole team to play ball to avoid old versions accidentally getting pushed back to the commit log.
@cheebadigga4092
@cheebadigga4092 6 ай бұрын
@@batlin true, but LFS won't help much with that situation either, or does it?
@batlin
@batlin 6 ай бұрын
@@cheebadigga4092 it does help, because you only download the required version of the file in LFS rather than all previous versions in the main repo tree. Even for CSS files (esp. frequently updated "standard" company styles) that can add up!
@alurma
@alurma 2 жыл бұрын
Very enjoying the series, but it seems that I missed one thing. Why is it necessary to add stars to chained ifs?
@landsgevaer
@landsgevaer 2 жыл бұрын
It is to avoid having many "end"s (one for each if). An ifstar shares its end with the previous if, so to say. Not particularly fond of the star notation, but that is bikeshedding, I learned... !-)
@alurma
@alurma 2 жыл бұрын
@@landsgevaer, thanks!
@alexitosworld
@alexitosworld 2 жыл бұрын
When you were describing the drama I immediately thought about Jai 😆
@Muttisuri
@Muttisuri 2 жыл бұрын
I don't know why people are mad about not pushing new code. It's your project if you wanted to drop it with no warning then you can, you are under no obligation to continue the project. And I think that there have been multiple open source projects that don't immediately start open they first develop under closed doors and then release a stable version. So this seems just as normal.
@blvckbytes7329
@blvckbytes7329 2 жыл бұрын
Why are we even talking about advantages or competitions? I thought this is your own project you're doing out of interest, who cares what others do with it? Is this really all about ego, rather than science and research? Ouch, man.
@relegarum
@relegarum 2 жыл бұрын
Risking sounding a little bothersome, but do you plan to create a struct or record keyword? I mean it seems pretty easy to do. I am not saying that you have to do it, just asking if it is in your plans. Great Work! Btw! Learning a lot with you.
@TsodingDaily
@TsodingDaily 2 жыл бұрын
Yes! I do plan to have some form of structs/records. I'm just not sure how to seamlessly integrate them into the whole language so they don't look just slapped on top of it. I'm working on it tho.
@hallowed9435
@hallowed9435 2 жыл бұрын
​@@TsodingDaily maybe just go the haskell record way and generate extractor functions for the fields. would integrate with the language perfectly.
@TravisPickle
@TravisPickle 2 жыл бұрын
I would just git submodule the bootstrap , really best for both worlds. versioning of bootstrap is independant of portha
@bugrakadirhan4990
@bugrakadirhan4990 2 жыл бұрын
He could modify the license in a way that addresses his concerns about his project instead of just pulling it away from the open. Also he's a bit too competitive for a recreational project as he does it for having fun, in my opinion. The last word is his word nonetheless.
@bigmistqke
@bigmistqke 2 жыл бұрын
Competition or fanart? U do w ur project what u want to do, and i get it can be daunting that a creation of urs gets out of ur control, but idk. Mb i m also not getting the full story, as u say that u know the peoples and stuff, so u probably had ur time to explain ur position to them... Anyway it all doesn't matter, just do whatever makes u feel comfortable.
@odynai
@odynai 2 жыл бұрын
i have a simple question what OS is tsoding on
@irishbruse
@irishbruse 2 жыл бұрын
Linux with i3 window manager
@AcunPearce
@AcunPearce 2 жыл бұрын
Hi can you share your setup? Like the editor, terminal, etc. Thanks
@tcroyce8128
@tcroyce8128 2 жыл бұрын
Fair enough. I think OSS folks tend to feel the devs owe them everything and be nice to them. He has stated he wants to complete the lang to his satisfaction and then open it up to everyone else again to mess around with.
@pcrsweetness
@pcrsweetness 2 жыл бұрын
Re drama I understand everything following the initial premise, but I don't understand the premise. Why should the 2 different compilers under 2 different constraints be in competition at all?
@Omeomeom
@Omeomeom 2 жыл бұрын
I get that's it's an unfair competitiion, but shouldn't you just be the bigger person and keep uploading new source code and try to finish the spec at the same time people are trying to compete with you? Isn't that a greater challenge you could have for yourself? The only reason I can see for not uploading code is that you want to credit/respect for creating a realy good compiler for this spec. So it's like you are closing off information to people who just love your contributions and want to read the in order to get a reward. I think you should just demand your credit/respect and keep uploading.
@Omeomeom
@Omeomeom 2 жыл бұрын
Also I think it's very reasonable and I prefer for you to have the opportunity to finish your thoughts, but they aren't "roping you in" to compiler battles, it's more like your ego is not allowing those noises to be processed out.
@TsodingDaily
@TsodingDaily 2 жыл бұрын
All of the information is still open. I still stream all of the new major features and explain how they work internally. You can come to a livestream and literally ask me anything about the internals of the compiler and I will show you and explain you everything. Everyone should feel free to use the information they get from the streams however they what even without crediting me. You can be mad, you can call me an egoist but you are not getting the latest code of the compiler (that I don't owe you in the first place, btw, and never did) until I'm done with it. And after I'm done with it you will get it absolutely for free without me demanding any credits for it.
@Liz3_
@Liz3_ 2 жыл бұрын
its your decision to self host the compiler, i would not say its a unfair advantage per se as it was your deliberate choice to self host so early on. Seeing that the development will be hidden isnt good as it has this salty side feeling. Further you dont have to care about other implementations, your one is the one that matters isnt it
@ZeroPlayerGame
@ZeroPlayerGame 2 жыл бұрын
if something makes you feel bad, don't do it. it's his code and his decision, get over it.
@h3xad3cimaldev61
@h3xad3cimaldev61 2 жыл бұрын
Fr, it was hurting me seeing him complain about people implementing his language better because they're using a good language and he's self hosting
@Liz3_
@Liz3_ 2 жыл бұрын
@@ZeroPlayerGame im fine with the decision i dont loose anything but this felt like a antipattern to choose the selfhosting approach and then using it as a argument regarding a "unfair advantage", where is it unfair? tsoding can use c or continue the python impl, its not really appropriate to COMPLAIN about it, thats all. The other things si just that ofc its regrettable to loose hte further progress on a cool project which was OS
@ZeroPlayerGame
@ZeroPlayerGame 2 жыл бұрын
@@Liz3_ self-hosting isn't an approach per se as a tool to get real experience in the language and iterate upon its design. It's easy to implement a compiler given a spec, but iterating on the spec is harder, and it's demoralizing if people miss the point and start going about how their compiler for an alpha version of the language is better than yours.
@Liz3_
@Liz3_ 2 жыл бұрын
@@ZeroPlayerGame thats unrelated, i was commenting on it being a argument. spec iterations are unrelated of implementation choices. and not part of my comment
@spidunno
@spidunno 2 жыл бұрын
how bout that how bout that
@pranav666
@pranav666 2 жыл бұрын
Looks like I got recipe of disaster
@kadensharpin2156
@kadensharpin2156 2 жыл бұрын
Back to GitHub?
@TsodingDaily
@TsodingDaily 2 жыл бұрын
Yeah, I changed my opinion on their buttons.
@holasoymahesh6862
@holasoymahesh6862 2 жыл бұрын
i dont understand anything
@dmsalomon
@dmsalomon 2 жыл бұрын
I 100% support this. Nobody should be bullied into making their code open source. It's your code, and you have full rights to do whatever you want. If people don't like it, they can move and bother someone else. I'm just having a good time being along for the ride and learning new things, and I'm grateful for that privilege. It doesn't even make sense for it to be OSS at this point, since it's not meant for public consumption at the moment. That's like being upset that somebody code is not Open Source because they haven't decided to publish it at all and instead throw the hard drive into the ocean.
@stomah9832
@stomah9832 2 жыл бұрын
can’t you just not generate code for unused procedures
@TsodingDaily
@TsodingDaily 2 жыл бұрын
It's kinda hard to know what's used and what is unused unless you actually generate Intermediate Representation and traverse the call graph.
@mhamdmarch8709
@mhamdmarch8709 2 жыл бұрын
New video🤩🤩🤩
@SeshachalamMalisetti
@SeshachalamMalisetti 2 жыл бұрын
I like the likes count, 420. I like this but not clicking the like
@johanrg70
@johanrg70 2 жыл бұрын
Self hosting a compiler seems to be the first thing everyone is asking about when someone makes a new compiler, and an easy trap to end up in. I would most likely wait a couple of years before even considering something like that, if even then. It's in my opinion a much better idea to have a second project that is using the language and is non-trivial instead of limiting yourself like this.
@alurma
@alurma 2 жыл бұрын
He's doing it for fun
@johanrg70
@johanrg70 2 жыл бұрын
@@alurma Didn't sound like he had fun "writing the compiler in a shitty language" but whatever floats his boat.
@h3xad3cimaldev61
@h3xad3cimaldev61 2 жыл бұрын
@@johanrg70 true
@mechaelbrun-kestler3868
@mechaelbrun-kestler3868 2 жыл бұрын
I dont think closing the source is petty because those competing are doing it for personal gain. Otherwise it wouldnt be on github. If people were reimplementing privately in order to take the concepts from the videos and learn from them it would be fine, but when you post it to github you are hoping that you can either sell it or use it to bolster your resume.
@chaoky
@chaoky 2 жыл бұрын
Sell it? Really?
@chaoky
@chaoky 2 жыл бұрын
Is bolstering your resume with stuff you learned a bad thing? Lol
@mechaelbrun-kestler3868
@mechaelbrun-kestler3868 2 жыл бұрын
@@chaoky if you credit where you got it from its why we learn things. If you are using it to compete and harm, its not
@chaoky
@chaoky 2 жыл бұрын
@@mechaelbrun-kestler3868 why would anyone assume that he wants to compete and cause harm
@poly9306
@poly9306 2 жыл бұрын
Have you heard about this thing called open source? The whole point is that you share the code back, so everyone can benefit. I know that MIT does not require the give back part, but it's always a nice thing to do, so please stop creating a narration in which sharing the code is something bad. It's something that should be praised no matter what.
@MCLooyverse
@MCLooyverse 2 жыл бұрын
Here's a (short?) project you might find interesting: Objective: Speed up adding links to your description/reference file you keep for each video. UX: At the window manager level, you hit some hotkey, and if you currently have a URL in your clipboard, dmenu will ask you for description text. I imagine you would have a `CurrentDescription.md` somewhere, which is a link to the description file for the video/stream you're doing, and the script that gets triggered by the hotkey would run something like: DESC_STRING=$(dmenu ...) # do error handling # did user cancel? # does the clipboard contain a URL? printf '- %s: %s ' "$DESC_STRING" "$(xclip -o -selection c)" >> $PREFIX/CurrentDescription.md
When optimization breaks your code
1:04:21
Tsoding Daily
Рет қаралды 14 М.
I turned My Language Into Brainf*ck Compiler
1:25:06
Tsoding Daily
Рет қаралды 20 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Simple Feature That Improves Error Handling
26:49
Tsoding Daily
Рет қаралды 14 М.
Windows Development on Linux
2:15:17
Tsoding Daily
Рет қаралды 53 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 725 М.
The Unreasonable Effectiveness of Buffered IO
1:14:16
Tsoding Daily
Рет қаралды 24 М.
You Should NOT Program on Linux Like This
2:14:57
Tsoding Daily
Рет қаралды 38 М.
Stealing Ideas from Python on How to Handle File Paths
1:04:41
Tsoding Daily
Рет қаралды 13 М.
I built a real HTTP sever in ARM assembly in under 200 lines
22:34
I compiled my Game to WebAssembly
2:07:49
Tsoding Daily
Рет қаралды 27 М.
Kerbal Space Program 2 Was Murdered.
11:26
Bellular News
Рет қаралды 252 М.
New Math Language in Rust (Noq Ep.01)
1:48:44
Tsoding Daily
Рет қаралды 52 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН