4 ms·
So confused what this is...
by chris_wot 1y ago
So confused what this is...
- olivia-banks 1y agoAs far as I can tell, it looks like a wrapper for cc1plus (internal GCC tool) and ld that do a custom #define of some input data, compile, extract some data from the binary, and do... something with it. Makes it look like C++ is an interpreted language.
- pjmlp 1y agoImplementations are orthogonal to languages, there have been C and C++ interpreters since the languages exist, as you can see by looking at BYTE and Dr Dobbs archives looking for compiler developer tools ads.
- 1718627440 1y agoBut some are more suited then others. For example, I believe the C standard to not describe what is supposed to happen when the definition of a function changes.
- pjmlp 1y agoIt doesn't have to, that is an implementation detail or OS specific feature. Two scenarios where the definition of a function in C changes, are dynamic libraries on OSes that allow reloading the same library multiple times, or self-rewriting code. Here you stay within the realms of a compiled language implementation, where what happens, is only expecified by compiler specific features, or OS capabilities handling executables and dynamic libraries.
- 1718627440 1y agoYes, but it suddenly matters if you execute code in an interpreter, where the user can change any symbol/function definition at anytime. What do you do with a a struct definition, that changes? Do all the functions return something different now? Or does the return type of all the functions change to an anon struct and the name now refers to something different. Stuff like that is what the distinction is between a compiled and an interpreted language.
- pjmlp 1y agoThe same way you deal with them as they come from a dynamic library, and the code gets reloaded on the fly, like on game engines that use compiled C and C++ instead of whatever scripting language. Compiled code with dynamic replacement during execution, https://liveplusplus.tech/ https://liveplusplus.tech/ https://learn.microsoft.com/en-us/visualstudio/debugger/hot-reload?view=vs-2022&pivots=programming-language-cpp https://learn.microsoft.com/en-us/visualstudio/debugger/hot-... https://dev.epicgames.com/documentation/en-us/unreal-engine/using-live-coding-to-recompile-unreal-engine-applications-at-runtime https://dev.epicgames.com/documentation/en-us/unreal-engine/... Plain interpreters, https://iel.ucdavis.edu/publication/2006/CUJ_proof.pdf https://iel.ucdavis.edu/publication/2006/CUJ_proof.pdf https://root.cern/ https://root.cern/ Just some examples.
- 1718627440 1y agoThat's really cool, but I think you still run in situation where its impossible to keep the program running, and/or you need to make decisions which are not described by the language standard. > Warning message If you see the following dialog box, Hot Reload is unable to apply the current edits without restarting. You can choose either to rebuild the app and apply changes (restart) or to continue editing. If you rebuild, all application state is lost. If you continue editing, it's possible that additional changes or corrections might cause Hot Reload to work again. [Screenshot of the apply changes dialog box] If you select the Always rebuild when changes can't be applied option in the dialog box, you won't see the dialog box again in the current Visual Studio session, and Visual Studio will automatically rebuild and reload instead of showing the dialog box.
- olivia-banks 1y agoC++ is considered to be a typically compiled language by the majority of people. But you’re right, I should have said that it makes GCC look like a C++ interpreter.
- ajkjk 1y agoYou'll need this https://www.youtube.com/watch?v=cFtymODJEjs https://www.youtube.com/watch?v=cFtymODJEjs
- ptspts 1y agoThis video doesn't explain what the project does and how it does it. Also it's deliberately misleading the viewer, for example it purposefully incorrectly states that C++ is an interpreted language. Also the music is way is too loud and sudden.
- octocop 1y agoThe video is a compliment to the Github repository, the presenter even shows code and brings up the repo in the video. I guess you didn't watch that part and unfortunately you didn't get the joke either.
- ajkjk 1y agoWell the video is almost entirely a joke and almost every sentence in it is ironically false; that's the point.
- deleted 1y ago[deleted]