/lynx/ - Stephen Lynx's board


Mode: Reply

Max file size: limitless

Max files: 5

Remember to follow the rules

Max message length: 4096

fuck you, internet senseless 08/28/2017 (Mon) 00:47:24 [Preview] No. 153
fucking internet
internet internet internet
<StephenLynx> I was curious, does nim actually compiled a binary on its own or it can just transpile to another language?
<StephenLynx> actually compiles*
<Yardanico> StephenLynx, compilation = transpiling
<Yardanico> because you can say that Rust "transpiles" to LLVM
<Yardanico> *LLVM IR
<PMunch> It compiles (not transpiles) to C, which is then turned into a binary by your compiler of choice
<StephenLynx> how does it compiles to C?
<StephenLynx> it generates C source or binary objects? (.o)?
<Yardanico> StephenLynx, no
<PMunch> C source
<StephenLynx> so it transpiles to C.
<Yardanico> StephenLynx, it creates C/C++/Objective C source code
<StephenLynx> and C++
<PMunch> Compiles*
<Yardanico> and Objective C
<Araq> no, it *compiles*, C does not "transpile" to Assembler either.
<StephenLynx> how is it a compilation if the source code has to be compiled?
<PMunch> Compiling is the general term for taking source code written in one language and transforming into another.
<PMunch> Transpiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction.
<StephenLynx> so when you take nim code and get C code is just transpiling, right?
<PMunch> Source: https://www.stevefenton.co.uk/2012/11/compiling-vs-transpiling/
<Yardanico> StephenLynx, no
<Araq> "transpiling" is a verb with no sane semantics
<Araq> and worse, it's super ugly.
<Yardanico> A compiler is computer software that transforms computer code written in one programming language (the source language) into another computer language (the target language).
<Yardanico> source language: Nim, target language: C
<PMunch> Nope, when you compile to C it evaluates macros and templates, does compile time bounds checking etc. etc. etc. Thus the resulting C code is not at the same level of abstraction, it's lower
<Yardanico> how many times will people ask "why nim transpiles to C?"
<PMunch> Look at it this way, transpile is translating a sentence from English to French, compiling is translating a sentence from English to something a child could understand in English.
<StephenLynx> please go on, all this mental gymnastic is quite the spectacle.
<Araq> "transpile" is no word, there is "compile" and "translate" and translate is an umbrella term
<StephenLynx> I find it funny you think its a different level of abstraction when its on the same. you give it human readable code and get human readable code.
<StephenLynx> by your logic, a library is a lower level of abstraction.
<Yardanico> StephenLynx, well, asm is human-readable too :)
<StephenLynx> i could also argue that asm is not portable.
<StephenLynx> C is.
* Araq sets quiet on StephenLynx!*@*


Captcha (required for reports and bans by board staff)

no cookies?