{"componentChunkName":"component---src-templates-blog-post-js","path":"/CS/compile_transpile_paradigm/","result":{"data":{"site":{"siteMetadata":{"title":"Progress Not Perfection","author":"Sunmin","siteUrl":"https://sunmin.netlify.com","comment":{"disqusShortName":"","utterances":"Sunmin0520/blog"}}},"markdownRemark":{"id":"997083a3-cbcf-5b85-9476-bdb5c67b4a0e","excerpt":"compile, build, transpile compile 주어진 언어를 다른 언어로 변환. 즉 복잡한 고수준 프로그래밍 언어로 작성된 프로그램을 단순한 저수준 프로그래밍 언어(기계어)로 번역.  컴파일된 컴퓨터 프로그램: 일련의 CPU 명령어 모음집 빌드 과정 중의 일부 스크립트 언어: 프로그래밍 언어 중에  컴파일하지 않고 실행할 수 있는 언어 JS, Python, Ruby 등 코드를 CPU…","html":"<p>\n<h1 id=\"compile-build-transpile\" style=\"position:relative;\"><a href=\"#compile-build-transpile\" aria-label=\"compile build transpile permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>compile, build, transpile</h1>\n<h2 id=\"compile\" style=\"position:relative;\"><a href=\"#compile\" aria-label=\"compile permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>compile</h2>\n<ul>\n<li>주어진 언어를 다른 언어로 변환. 즉 복잡한 고수준 프로그래밍 언어로 작성된 프로그램을 단순한 저수준 프로그래밍 언어(기계어)로 번역. </li>\n<li>컴파일된 컴퓨터 프로그램: 일련의 CPU 명령어 모음집</li>\n<li>빌드 과정 중의 일부</li>\n<li>\n<p>스크립트 언어: 프로그래밍 언어 중에  <strong>컴파일하지 않고 실행할 수 있는 언어</strong></p>\n<ul>\n<li>JS, Python, Ruby 등</li>\n<li>코드를 CPU가 직접 실행하는 것이 아닌 인터프리터 통해 실행 </li>\n<li>장점: 컴파일에 걸리는 시간 절약 / 단점: 컴파일된 코드에 비해 느리게 실행</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"build\" style=\"position:relative;\"><a href=\"#build\" aria-label=\"build permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>build</h2>\n<ul>\n<li>코드를 빌드해서 실행파일을 만듦(from editable source material to a shippable software product)</li>\n<li>여러 과정(pre-processing, compiling, linking, converting data files, running automated tests, packaging 등)을 통틀어 이르는 general term</li>\n</ul>\n<h2 id=\"transpile\" style=\"position:relative;\"><a href=\"#transpile\" aria-label=\"transpile permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>transpile</h2>\n<ul>\n<li>트랜스파일러: 유사한 수준의 언어 사이에서 번역하는 일부 컴파일러. 즉 <strong>수준의 차이가 아닌 기능구현이 가능하도록 바꿔줌</strong></li>\n<li>소스코드 파일을 비슷한 수준의 추상화 가진 다른 소스코드 파일로 convert해줌. </li>\n<li>결과물은 일반적으로 사람이 이해할 수 있다. 그리고 이 결과물은 컴파일러나 인터프리터를 거쳐야 한다.</li>\n<li>예) Babel: ES6+ 코드를 ES5로 변환. 즉 모든 환경에서 JS가 실행될 수 있게 하기에 컴파일러라고도 할 수 있음</li>\n</ul>\n<img src=\"https://user-images.githubusercontent.com/60782131/111329057-28199d00-86b2-11eb-8d1a-0f6238c722a4.png\">\n<h1 id=\"프로그램-패러다임\" style=\"position:relative;\"><a href=\"#%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%ED%8C%A8%EB%9F%AC%EB%8B%A4%EC%9E%84\" aria-label=\"프로그램 패러다임 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>프로그램 패러다임</h1>\n<ul>\n<li>\n<p>프로그래밍 패러다임: 명령형, 선언형, 논리형</p>\n<ul>\n<li>\n<p>명령형: 각 단계마다 특정한 명령 사용해 컴퓨터가 수행할 작업을 명확하게 지시</p>\n<ul>\n<li>기계코드 프로그래밍: CPU 명령어를 알아보기 쉬운 기호코드로 만들고, 이것을 이진수로 변환하는 과정 거침. 이 과정에서 어셈블리 언어 탄생</li>\n<li>구조적 프로그래밍</li>\n<li>절차적프로그래밍: 반복 사용되는 코드를 procedure로 묶어 재사용성 증가</li>\n</ul>\n</li>\n<li>\n<p>선언형: 원하는 결과를 선언하는 방식으로 프로그램 작성. 즉 how가 아닌 원하는 결과를 선언</p>\n<ul>\n<li>함수형 프로그래밍: 절차적 프로그래밍에서 함수 === procedure인 반면, 함수형 프로그래밍에서는 함수는 단순한 프로시저 이상</li>\n</ul>\n</li>\n<li>논리형: 논리명제가 있고, 컴퓨터가 논리변수와 질의를 해석/ 자연어 처리나 인공지능에서 유용</li>\n</ul>\n</li>\n</ul>\n<br />\n<br />\n<p><strong>출처</strong> </p>\n<ul>\n<li>블라드스톤 페헤이라 필루, 컴퓨터 과학 로드맵(인사이트, 2018)</li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Compile\">MDN</a></li>\n<li><a href=\"https://so-tired.tistory.com/98\">이미지 출처</a></li>\n<li><a href=\"https://softwareengineering.stackexchange.com/questions/140321/what-is-the-difference-between-building-and-compiling\">stack overflow</a></li>\n</ul>\n</p> ","frontmatter":{"title":"[CS] compile, transpile, program paradigm","date":"March 17, 2021"}}},"pageContext":{"slug":"/CS/compile_transpile_paradigm/","previous":{"fields":{"slug":"/Retrospective/2021/Mar_1st/"},"frontmatter":{"title":"[회고] 3월 첫째 주 회고(3/1 ~ 3/7)","category":"retrospective","draft":false}},"next":{"fields":{"slug":"/nodejs/book1_01/"},"frontmatter":{"title":"[Node.js] [Node.js 교과서] 1. 노드 시작하기","category":"nodejs","draft":false}}}},"staticQueryHashes":["3128451518","521680639"]}