4 ms·
compiling a simple program takes 30 seconds: https://github.com/red/red/issues/3412 https://github.com/red/red/issues/3412
by svnpenn 5y ago
compiling a simple program takes 30 seconds:
https://github.com/red/red/issues/3412 https://github.com/red/red/issues/3412
- greggirwin 5y agoDid you notice a) that the ticket is closed, and b) it was a bad ticket to begin with? See this comment in there: https://github.com/red/red/issues/3412#issuecomment-395951364 https://github.com/red/red/issues/3412#issuecomment-39595136... Yes, if you rebuild the runtime when you compile, it's slow. If you use dev mode, because you're not changing anything in the runtime, it's fast.
- svnpenn 5y agoDid you notice, that pretty much every single major language today offers static compile? C, Go, Rust, D, Nim. Why does Red think its special to not offer a static compile?
- greggirwin 5y agoSo you're changing your argument now, that's fine. Let's see. Java? Python? Ruby? JS? PHP? Any .NET lang? Go is on the rise, yes. As is Rust. But D? Nim? Do you really consider those major languages? Enough silly arguments though. We think it's special to offer options, because one size does not fit all, but we hope a common syntax can fit most. So you have the option to 1) use an external runtime, which makes all your EXEs tiny (say they run in a common system, even against a custom Red runtime you build); 2) compile to native code and get a single, no dependencies, EXE; 3) "encap" your code with the compiled runtime so you can leverage all dynamic features of Red, some of which can't be compiled; 4) compile the runtime so it can be accessed from other languages and environments. 5) Write in pure Red/System, which is basically like writing in C. Maximum control, no high level features. Tiny EXEs, no runtime, fast compilation. - https://www.red-lang.org/2017/03/062-libred-and-macros.html https://www.red-lang.org/2017/03/062-libred-and-macros.html (please note the Excel+Red Pong demo)
- svnpenn 5y agoargument hasnt changed. Red requires a compile of the entire runtime every single time someone wants a static compile. Even if you change one line of code, that another 30 second wait
- 9214 5y agoHave your read p.1 in the message you are replying to? Red does not support static linking, that's true, but you can link to a dynamic runtime library instead, without slow recompilation times... or use the interpreter, or encap the script, or fallback on Red/System. There are options to compensate for the lack of your preferred workflow.
- svnpenn 5y agoand people who want static compile have to wait 30 seconds to recompile, even if its one line code change
- em-bee 5y agoEDIT: i just read up on this. only the first time the static build is slow. later rebuilds are fast. just like every c/c++ program. the first time it has to build everything, all following times it only needs to rebuild the parts that changed. this has already been explained, and i am only repeating it here for the casual HN reader, so they can follow along. old comment, that makes no sense because getting a fast static build isn't even a problem. left here because that is what was responded to: why do you need a static build after every change? isn't a dynamic one sufficient for testing?
- 9214 5y agoFor the record: Steven Penny (aka @svnpenn here and @89z on Github) is the author of the linked ticket, who is known for his repeated attempts at flamewar and bizzare spam campaigns against programming languages, Red included. https://github.com/red/red/issues/3417#issuecomment-396671976 https://github.com/red/red/issues/3417#issuecomment-39667197...
- greggirwin 5y agoThanks @9214. I must have blocked it from my memory.
- svnpenn 5y agoFunny how you didnt even try to refute the original claim, instead try to attack the person instead.