Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 00:35:14 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: [lua] Logo interpreter - A logo interpreter written in Lua  (Read 1171 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« on: 02 November, 2011, 16:36:59 »
+4

I've been a bit busy making a logo interpreter in Lua.
I'm going to participate with it in the Ti-Planet / Inspired-Lua contest (math section).

While I still need to make an on calc ui and editor, here are some screenshots that show some turtle graphics (together with the code):



1
2
3
4
5
6
to square
  repeat 4 [left 90 forward 80]
end

repeat 36 [left 10 square]



1
2
3
make "x 1
repeat 150 [forward :x left 89 make "x :x + 1]
Logged

adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 23:13:22
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1193


Total Post Ratings: +185

View Profile WWW
« Reply #1 on: 02 November, 2011, 16:38:31 »
0

This is awesomeeeeeeee

Congratulations !

For the Lua contest, right ? Cheesy
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #2 on: 02 November, 2011, 16:39:20 »
0

Thanks =)
Yes, its for the contest Smiley
Logged

Stefan Bauwens
Creator of Myst 89 - סטיבן
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 12:56:14
Date Registered: 25 February, 2011, 15:41:10
Location: Belgium
Posts: 1697


Total Post Ratings: +132

View Profile WWW
« Reply #3 on: 02 November, 2011, 20:15:28 »
0

Good luck with all the rest.
I'm not so advanced in languages as you are but.. Good job, I guess. Cheesy
Logged

Chockosta
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 15:36:14
Date Registered: 03 June, 2011, 20:14:17
Location: France
Posts: 440


Total Post Ratings: +159

View Profile
« Reply #4 on: 02 November, 2011, 20:31:28 »
0

Wow. Good luck, it is awesome.
Not really useful, but I'd love to play with that.
Logged

Chockosta (Loic Pujet) - Sorry for my poor English...
Look at my projects :
in C code : Periodic table, Space invaders, Fall, Snake, Minesweeper, nCraft (WIP)
in Lua : Snake, Space invaders, Bobby Carrot, Minesweeper, Mazes 3D, nSpaint, FreeCell, Tiny3D-Viewer, CubeField, Gravity Guy
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #5 on: 02 November, 2011, 20:33:01 »
0

Thanks =)

Quote
Not really useful
You can visualize lot of mathematical stuff with it Wink
Logged

Spyro543
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:49:04
Date Registered: 15 April, 2011, 01:42:09
Location: Ohio
Posts: 990


Total Post Ratings: +59

View Profile WWW
« Reply #6 on: 02 November, 2011, 21:16:44 »
0

How about the mode I suggested where you can see the turtle move and draw the pattern instead of the pattern just appearing?
Logged

Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #7 on: 02 November, 2011, 22:01:07 »
0

I'm not yet done, just finished the main core.
Logged

Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #8 on: 08 November, 2011, 18:33:22 »
+1

I submitted my first version for the TI-Planet contest.
While its not yet done, most you need is there.

Here is a little animated screenshot:


Note that the colors (grey's) look a bit better on a real calculator Cheesy
Logged

Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Last Login: Today at 00:12:45
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3738


Total Post Ratings: +598

View Profile
« Reply #9 on: 08 November, 2011, 18:42:41 »
0

ooh, yum, that looks nice shocked
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Chockosta
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 15:36:14
Date Registered: 03 June, 2011, 20:14:17
Location: France
Posts: 440


Total Post Ratings: +159

View Profile
« Reply #10 on: 08 November, 2011, 19:49:58 »
0

Congrats !

Could you post a link to download ?
TI-Planet staff haven't done it yet, and I really want to play with this awesome program !
Logged

Chockosta (Loic Pujet) - Sorry for my poor English...
Look at my projects :
in C code : Periodic table, Space invaders, Fall, Snake, Minesweeper, nCraft (WIP)
in Lua : Snake, Space invaders, Bobby Carrot, Minesweeper, Mazes 3D, nSpaint, FreeCell, Tiny3D-Viewer, CubeField, Gravity Guy
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 23:13:22
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1193


Total Post Ratings: +185

View Profile WWW
« Reply #11 on: 08 November, 2011, 20:02:35 »
0

I'm going to put it on TIPlanet.org today Smiley
« Last Edit: 08 November, 2011, 20:02:41 by adriweb » Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #12 on: 08 November, 2011, 20:53:29 »
0

Thanks guys Cheesy
I'll upload the package after the contest has ended, as there are some bugs that I need to fix.

I just discovered a bug that the calculator reboots sometimes if you have a " in the code.
This is not my fault, but TI's. (Probably will get fixed if I report it)
The problem here is that " is a special token in Logo, and used allot.
One way to be sure it doesn't crash is to replace

1
2
"thiscode
with

1
2
first [thiscode]

It has the same effect in Logo.

Edit: as you can see in the screenshot, the bug is fixed in 3.10 (the emu runs 3.10), while I still had 3.02 on my calculator.
So, I'm happy again \o/
« Last Edit: 08 November, 2011, 22:17:20 by jimbauwens » Logged

Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Topic starter
Total Post Ratings: +180

View Profile WWW
« Reply #13 on: 09 November, 2011, 17:44:04 »
0

While there is already a sierpinski curve included, here is sierpinski's triangle (not included):

1
2
3
4
5
6
7
8
to sierp :n :l
    if :n=0 [stop]
    repeat 3 [sierp :n-1 :l/2 fd :l rt 120]
end

pu bk 100 lt 90 bk 100 pd
sierp 5 200

This is the result:
« Last Edit: 09 November, 2011, 18:54:15 by jimbauwens » Logged

adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 23:13:22
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1193


Total Post Ratings: +185

View Profile WWW
« Reply #14 on: 09 November, 2011, 18:36:38 »
0

looks awesome for such a small code...

can you comment line by line the code tho ? Shocked
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.502 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.