Comments (4)
Using the ABCT web interface BCT -> ABCT redirect endpoint, the compiled BCT converts to the same ABCT
curl -v "abctag.herokuapp.com/b/111010101010101110101110111011101110101011101111101011101110111011111011101111101110111111101110101011101111111010111010111011111011111111101110111110111111101011101111101110101110111011111111101010101110101110101010101011101011111011101010111010111110101010101110101111101010111011101011111010101010111010111010101010101110111110101010111011101111101111111010111011111011101011101110111110111110111011101111101010101110111011111110111010101110111110111010111011101111101111111110111011111011111110101110101110101010101011101111101110101110111011111011111110101110101110101010101011101111101010111010111011111011101011101110111111101110101011101111111011111110111011111011101011101110111111101011111011101111101011101110111010111010101010101110111110101011111011101111111110101110111011111010101111101110111110111110101011101111101110101110111011111010101111101110101110101010101011101111111011101010111011111010101011101110111110101111111011101011101111111010111010101010101111101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111010101010101110101110101011111110111011101011101110101110111011111010101110101110101111101010101011101110101010101010111010111011111111101110111110111011101011101011111010101010111011101010101010101110101011111111111011101010101010111110110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111010101010101110101110101011111011111011101010101111101010111010101010101111101100000000000000000000000000000000000000000111010101010101110101110111011101110101011101111101011101110111011111011101111101110111111101110101011101111111010111010111011111011111111101110111110111111101011101111101110101110111011111111101010101110101110101010101011101011111011101010111010111110101010101110101111101010111011101011111010101010111010111010101010101110111110101010111011101111101111111010111011111011101011101110111110111110111011101111101010101110111011111110111010101110111110111010111011101111101111111110111011111011111110101110101110101010101011101111101110101110111011111011111110101110101110101010101011101111101010111010111011111011101011101110111111101110101011101111111011111110111011111011101011101110111111101011111011101111101011101110111010111010101010101110111110101011111011101111111110101110111011111010101111101110111110111110101011101111101110101110111011111010101111101110101110101010101011101111111011101010111011111010101011101110111110101111111011101011101111111010111010101010101111101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111010101010101110101110101011111110111011101011101111101010111011111010111110101110101110111110101011101110111010111010111010111011111010101110111110101111101011101011111010111110111011101011111110101110101011111111111011101010101010111110110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111010101010101110101110101011111011111011101010101111101010111010101010101111101100000000000000000000000000000000000000000/1"
result:
> Host: abctag.herokuapp.com
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 303 See Other
< Connection: close
< Server: SimpleHTTP/0.6 Python/3.6.11
< Date: Mon, 25 Jul 2022 05:03:28 GMT
< Location: /2725982173686371546601146872886478949676848343266687991455439775039246418566991564641072288886220641561220670417516878231337933182184221424474093486845123125288670924515227783347655713180738218612886808832567033405941261870209198197499335522520203793089647883525078726559522656322780833408305628209269451473841003952210357194804200927150864610020756488192140187415701229030023952457438960925517992085597157234115289733115229439541089867784618086421793464268100833257701933775660453143156550120230674427663139648925188894161008175666402137753021069691834098297645921724202153242602931770834033441974631172949352571451809476181649397847949984029722320500590490703749618295737914214793876366690181800306882307438513493238780477058778118173082607282107530831688589902108332787303323549563264682736128778696218029374094176060567774168320432597567000188014389411028017637004562908145413670119998291596935662982757593568414959308475684205073026516105003125317845476108577246127248204080999031261611309305491371624651666947921800000150020852464221004167616123654694382655473799426045366673852202654542189718580937791357707916724009533567448290513254034560106021425092655860067769504879958/1/
< Content-Type: application/json;charset=utf-8
< Via: 1.1 vegur
<
* Closing connection 0
{}
So that suggests at least the BCT to ABCT conversion is accurate across two interpreters, and the ABCT interpreter is receiving the correct code to start with.
from ctbasic.
Using diff
to locate where the datastrings diverge:
n=3150; diff <(./ct.py -d <(./CTBASIC.py examples/ANIMTEST001.bas) 1 | head -n${n}) <(../abct/abct-cli $(./CTBASIC.py examples/ANIMTEST001.bas -tABCT) 2 | cut -f3 | tail -n+2 | head -n${n})
(uses a slightly modified version of ct.py
which does not send output to STDOUT in debug mode to make the comparison cleaner)
diff result:
3147,3150c3147,3150
< 1101000101110010010110111101011011100101101001010111100001001000000100110100010011000001001100010100110000010010000001011000010101101110010110100101011011010101100001010111010001011010010101101111010110111001001000000101101001010110111001001000000101100010010110100101011101000101110111010110100101011100110101100101010010000001011000110101111001010110001101011011000101101001010110001101001000000101110100010110000101011001110100101110010000001101
< 101000101110010010110111101011011100101101001010111100001001000000100110100010011000001001100010100110000010010000001011000010101101110010110100101011011010101100001010111010001011010010101101111010110111001001000000101101001010110111001001000000101100010010110100101011101000101110111010110100101011100110101100101010010000001011000110101111001010110001101011011000101101001010110001101001000000101110100010110000101011001110100101110010000001101
< 01000101110010010110111101011011100101101001010111100001001000000100110100010011000001001100010100110000010010000001011000010101101110010110100101011011010101100001010111010001011010010101101111010110111001001000000101101001010110111001001000000101100010010110100101011101000101110111010110100101011100110101100101010010000001011000110101111001010110001101011011000101101001010110001101001000000101110100010110000101011001110100101110010000001101
< 1000101110010010110111101011011100101101001010111100001001000000100110100010011000001001100010100110000010010000001011000010101101110010110100101011011010101100001010111010001011010010101101111010110111001001000000101101001010110111001001000000101100010010110100101011101000101110111010110100101011100110101100101010010000001011000110101111001010110001101011011000101101001010110001101001000000101110100010110000101011001110100101110010000001101
---
> 111010001011100100101101111010110111001011010010101111000010010000001001101000100110000010011000101001100000100100000010110000101011011100101101001010110110101011000010101110100010110100101011011110101101110010010000001011010010101101110010010000001011000100101101001010111010001011101110101101001010111001101011001010100100000010110001101011110010101100011010110110001011010010101100011010010000001011101000101100001010110011101001011100100000011010
> 11010001011100100101101111010110111001011010010101111000010010000001001101000100110000010011000101001100000100100000010110000101011011100101101001010110110101011000010101110100010110100101011011110101101110010010000001011010010101101110010010000001011000100101101001010111010001011101110101101001010111001101011001010100100000010110001101011110010101100011010110110001011010010101100011010010000001011101000101100001010110011101001011100100000011010
> 1010001011100100101101111010110111001011010010101111000010010000001001101000100110000010011000101001100000100100000010110000101011011100101101001010110110101011000010101110100010110100101011011110101101110010010000001011010010101101110010010000001011000100101101001010111010001011101110101101001010111001101011001010100100000010110001101011110010101100011010110110001011010010101100011010010000001011101000101100001010110011101001011100100000011010
> 010001011100100101101111010110111001011010010101111000010010000001001101000100110000010011000101001100000100100000010110000101011011100101101001010110110101011000010101110100010110100101011011110101101110010010000001011010010101101110010010000001011000100101101001010111010001011101110101101001010111001101011001010100100000010110001101011110010101100011010110110001011010010101100011010010000001011101000101100001010110011101001011100100000011010
from ctbasic.
Fixed by hornc/abctag#8
from ctbasic.
../abct/abct-cli $(./CTBASIC.py examples/ANIMTEST001.bas -tABCT) 2 | cut -f5 | grep -v '^$'
now produces the correct endlessly looping output as expected using the latest abct code, v1.2.0 Not a bug in this example or interpreter. Closing as fixed!
from ctbasic.
Related Issues (20)
- Example: rotating cube HOT 1
- Example: Utah teapot HOT 2
- Add a command to change pen / line style
- Smooth CLS animation
- Sinclair BASIC multiple commands on one line, separated by a colon HOT 2
- Allow, but ignore, BASIC line numbers
- Only output the rightmost (most recent) STX/ETX bounded group to prevent past output repetitions
- Describe and document
- END = CLEAR 10 ?
- ANIMTEST001.bas broken on master HOT 2
- CHR$(n) -> CHR$ n
- PRINT separators `,;'`
- review context switching HOT 1
- Interactive mode
- Optimise interpreter to process whole productions at a time based on datastring, instead of bit-by-bit.
- List bit/(frame?) length of each command in COMMANDS.md
- update rotating cube example anim
- Strobing on CLEAR using Tek4010 emulator / How to do Tektronix animation properly? HOT 2
- Rule 110 resources
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctbasic.