Canned Dogelog Runtime for Prolog Snippets
3781 단어 VirtualMachineProlog자바스크립트
Module Restrictions
The Dogelog runtime is developed ES6 module style. ES6 modules have some benefit for development of the Dogelog runtime. However, ES6 modules also impose more restrictions on the resulting code.
For example, ES6 modules are fetched via the Cross-Origin Resource Sharing (CORS) 프로토콜, which not only requires a local server for testing, but also imposes by default a Same-Origin-Policy (SOP).
So one might be tempted to do the following:
<script type="module">
Import .. from "http://www.dogelog.ch/lib/index.js";
Etc..
</sctipt>
This will result in a CORS error in a modern browser:
Single File
The transpiler offers the bundler predicates bundle_clear/1
and bundle_add/2
. By means of these predicates, a canned Dogelog runtime can be put together, stripping ES6 module style. The following files need to be collected:
runtime/machine.js
runtime/special.js
runtime/compile.js ---+
runtime/loader.js |
runtime/index.js +---> canned/dogelog.js
|
transpiler/exchange.js ---+
By the canned distribution of the Dogelog runtime, it is possible to include Prolog code snippets in stack overflow answers. Stack overflow provides a wizard to insert a snippet into an answer. An example was put into the wild at this web address:
h tp : / / s t c ゔ rf ぉ w. 코m/아/67990574/502187
A screenshot of running the stackoverflow snippet is seen here:
Polyfill Issues
Unfortunately, the canned Dogelog runtime does not yet solve all old browser compatibility problems. We discuss some remaining problems. Old browsers might not offer features from the newest 11th Edition of the ECMAScript standard (ES11) from 202 the JavaScript bigint primitive numbers type.
The Dogelog runtime switches to bigint for integers outside of the range from -94906266 to 94906266. The Dogelog runtime uses also bigint for floats that are integral and in the range from -94906266 to 6at 6. Therefore, the lack of bigint type affects both Prolog integers and Prolog floats.
For more details see the Dogelog reference manual:
ht tp : // 기대 b. 코 m / j 부 r 세 / 도게 ぉ g도 온 / t 레에 / 마인 / 마누아 l
Conclusion
The Dogelog runtime is marturing. It has new applications like stackoverflow snippets we didn't even think of, when making the first prototype. To give the Dogelog runtime a platform for discussion, there is now this Facebook group:
h tp // w w. 후세보오 k. 코 m / g 왁스 ps / 도게 ぉ g
Reference
이 문제에 관하여(Canned Dogelog Runtime for Prolog Snippets), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/j4n_bur53/items/ad2ed62585e5f6bdb263
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
<script type="module">
Import .. from "http://www.dogelog.ch/lib/index.js";
Etc..
</sctipt>
The transpiler offers the bundler predicates
bundle_clear/1
and bundle_add/2
. By means of these predicates, a canned Dogelog runtime can be put together, stripping ES6 module style. The following files need to be collected:runtime/machine.js
runtime/special.js
runtime/compile.js ---+
runtime/loader.js |
runtime/index.js +---> canned/dogelog.js
|
transpiler/exchange.js ---+
By the canned distribution of the Dogelog runtime, it is possible to include Prolog code snippets in stack overflow answers. Stack overflow provides a wizard to insert a snippet into an answer. An example was put into the wild at this web address:
h tp : / / s t c ゔ rf ぉ w. 코m/아/67990574/502187
A screenshot of running the stackoverflow snippet is seen here:
Polyfill Issues
Unfortunately, the canned Dogelog runtime does not yet solve all old browser compatibility problems. We discuss some remaining problems. Old browsers might not offer features from the newest 11th Edition of the ECMAScript standard (ES11) from 202 the JavaScript bigint primitive numbers type.
The Dogelog runtime switches to bigint for integers outside of the range from -94906266 to 94906266. The Dogelog runtime uses also bigint for floats that are integral and in the range from -94906266 to 6at 6. Therefore, the lack of bigint type affects both Prolog integers and Prolog floats.
For more details see the Dogelog reference manual:
ht tp : // 기대 b. 코 m / j 부 r 세 / 도게 ぉ g도 온 / t 레에 / 마인 / 마누아 l
Conclusion
The Dogelog runtime is marturing. It has new applications like stackoverflow snippets we didn't even think of, when making the first prototype. To give the Dogelog runtime a platform for discussion, there is now this Facebook group:
h tp // w w. 후세보오 k. 코 m / g 왁스 ps / 도게 ぉ g
Reference
이 문제에 관하여(Canned Dogelog Runtime for Prolog Snippets), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/j4n_bur53/items/ad2ed62585e5f6bdb263
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
The Dogelog runtime is marturing. It has new applications like stackoverflow snippets we didn't even think of, when making the first prototype. To give the Dogelog runtime a platform for discussion, there is now this Facebook group:
h tp // w w. 후세보오 k. 코 m / g 왁스 ps / 도게 ぉ g
Reference
이 문제에 관하여(Canned Dogelog Runtime for Prolog Snippets), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/j4n_bur53/items/ad2ed62585e5f6bdb263텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)