Wirbel - a new programming language
-
- Posts: 116
- Joined: Wed 30 May 2007, 08:15
Wirbel - a new programming language
As sir Barry Kauler says:
http://www.puppylinux.com/blog/?viewDetailed=00469
I compiled the source package into a pet.
First attachment was compiled using Puppy Linux 4.00
Second attachment was compiled using Puppy Linux 4.10
http://www.puppylinux.com/blog/?viewDetailed=00469
I compiled the source package into a pet.
First attachment was compiled using Puppy Linux 4.00
Second attachment was compiled using Puppy Linux 4.10
Last edited by reckrhodes on Sun 02 Nov 2008, 20:30, edited 2 times in total.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
reckrhodes you are a star
How exciting.
The programmer of Wirbel is as smart as they get.
The documentation (3 tutorials) is already sounding like gibberish.
However that is because smart people don't slow down for the rest of us.
A new language.
Right at its inception - woof woof
did not seem to work for me
anyone have better luck?
How exciting.
The programmer of Wirbel is as smart as they get.
The documentation (3 tutorials) is already sounding like gibberish.
However that is because smart people don't slow down for the rest of us.
A new language.
Right at its inception - woof woof
did not seem to work for me
Code: Select all
# wirbel hello.w
Warning: No baustones index found. Continuing without any baustones.
Fatal: in hello.w:1:
No variable or function with name 'print'
Error while compiling hello.w -> hello.
-
- Posts: 116
- Joined: Wed 30 May 2007, 08:15
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Thank you reckrhodes Sir,
I removed the old version using the package manager
and got the following:
tried cleaning up the files too - still can not install . . .
Anyone else have better luck?
I removed the old version using the package manager
and got the following:
Code: Select all
There was an error expanding package wirbel-0.1.8-i386-for-4.1.tar.gz.
Either the file is corrupted, or has not expanded into its own directory with
name of wirbel-0.1.8-i386-for-4.1/ (which is how most packages expand).
You will have to go into /root/.packages/ directory and manually clean it up.
This script will now exit...
Anyone else have better luck?
I got the same result as Lobster. Did a manual install of the files in the packages directory, but then got this again:
Perhaps I should be relieved not to have any baustones. Sounds painful.
Code: Select all
# wirbel hello.w
Warning: No baustones index found. Continuing without any baustones.
Fatal: in hello.w:1:
No variable or function with name 'print'
Error while compiling hello.w -> hello.
wirbel install
Running pup 4.1 full harddrive install.
I simply followed the instructions on the wirbel site!
You will need your devx file to compile it.
Downloaded the wirbel tar.gz file and did a tar xzf wirbel.0.1.8.tar.gz. Then did a make then a make install and it works fine from the command line.
The baustones are in usr/local/lib/wirbel.
I simply followed the instructions on the wirbel site!
You will need your devx file to compile it.
Downloaded the wirbel tar.gz file and did a tar xzf wirbel.0.1.8.tar.gz. Then did a make then a make install and it works fine from the command line.
The baustones are in usr/local/lib/wirbel.
I'm getting the same error, no matter how the directories are structured. Is it just me or does someone have the pet working (other than compiling from scratch)?Keef wrote:I got the same result as Lobster. Did a manual install of the files in the packages directory, but then got this again:Perhaps I should be relieved not to have any baustones. Sounds painful.Code: Select all
# wirbel hello.w Warning: No baustones index found. Continuing without any baustones. Fatal: in hello.w:1: No variable or function with name 'print' Error while compiling hello.w -> hello.
I feel close to passing a few baustones myself at this point....
Lobster, I to had the same error as you but I renamed the folder "wirbel-0.1.8-i386" in /root/.packages/ to "wirbel-0.1.8-i386-for-4.1" (without the " " ) and then installed the .pet.
After creating the hello file I attempted to execute and now I am getting this error
Has anyone had this problem?
After creating the hello file I attempted to execute and now I am getting this error
Code: Select all
# wirbel hello.w
wirbel: /usr/lib/libstdc++.so.6: no version information available (required by wirbel)
wic: /usr/lib/libstdc++.so.6: no version information available (required by wic)
wic: /usr/lib/libstdc++.so.6: no version information available (required by wic)
hello.w:2: Error: syntax error, unexpected TOK_UNINDENT, expecting TOK_LINEEND
Parse error.
Error while compiling hello.w -> hello.
-
- Posts: 116
- Joined: Wed 30 May 2007, 08:15
error in compiling
Again its my fault. I compiled the source into pet even if it has a "wrapper error" when i untarred the source.
I recompiled the new downloaded source into pet this time. Tested the simple "hello.w" by using the command:
wic hello.w then ./hello it displays hello world.
hopefully this will work now.
this my hello.w simple program
print("hello world.")
note:
1. devx_400.sfs should be loaded first
2. please press enter after the close parenthesis so that the program above will work
Please use this pet I attached not the one above.
I recompiled the new downloaded source into pet this time. Tested the simple "hello.w" by using the command:
wic hello.w then ./hello it displays hello world.
hopefully this will work now.
this my hello.w simple program
print("hello world.")
note:
1. devx_400.sfs should be loaded first
2. please press enter after the close parenthesis so that the program above will work
Please use this pet I attached not the one above.
-
- Posts: 286
- Joined: Tue 16 Aug 2005, 03:47
- Location: Appalachian Mountains
test_w.w
test_c.c
test_b.sh
test_w => 68k
test_c => 8k
test_b.sh => 4k
64k of overheat is going to add up quick.
Is there something I am missing here?
Code: Select all
#!/usr/bin/wirbel
print("test")
Code: Select all
#include <stdio.h>
main()
{
printf ("test \n");
return 0;
}
Code: Select all
#!/bin/sh
echo test
test_c => 8k
test_b.sh => 4k
64k of overheat is going to add up quick.
Is there something I am missing here?
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Thanks guys - got it working now
Find out - write to the author
mk -at- mathias-kettner.de
I wrote to him to make him aware of this thread.
Where is Barry?
Has anyone converted any Python - used UPX on that 64k file?
Anyone know a simple python program that can be converted
and used in Puppy?
Remember with Wirbel we can create self running code - no python libraries needed - m m m . . .
It is a new language and optimisation may come later or may not be possible (because of the nature of the language)64k of overheat is going to add up quick.
Find out - write to the author
mk -at- mathias-kettner.de
I wrote to him to make him aware of this thread.
Where is Barry?
Has anyone converted any Python - used UPX on that 64k file?
Anyone know a simple python program that can be converted
and used in Puppy?
Remember with Wirbel we can create self running code - no python libraries needed - m m m . . .
- MathiasKettner
- Posts: 3
- Joined: Sun 09 Nov 2008, 10:59
- Contact:
Hello and size of executable
Hello to you all,
first I want to thank you for your interest in Wirbel and to apologize for the
unconveniances Wirbel still has. Of couse the lack of documentation and
many other things is a great drawback. Also I've to apologize for my often
weird an incorrect English, I try my best
Now to your topics:
Code size: per default the output files are not stripped. If you strip them
with 'strip hello', the code size of the hello wolrd program for example
will go down from 69206 to 22648. In the current version 0.1.10 this
is done automatically if you call wic with the option -O (which also does
optimization).
Improvement: It will probably possible to further reduce the size of the
hello world program. But it will never be as small as a hand crafted C
program. It has - for example - to carry code for dynamic string handling,
even if you only print "hello world.". String handling is *very* inconveniant
in C. Every higher level language has some sort of dynamic strings at
the price of bigger code - may it be in some library or included in the executable
itself. If the size of the executable matters a lot in your environment, one
might think of putting as much as possible into a dynamic library that can be used
by all Wirbel programs. Currently Wirbel uses the static-library approach, because
that has the advantage that Wirbel executables run independent of *any*
component of Wirbel.
Greetings,
Mathias
first I want to thank you for your interest in Wirbel and to apologize for the
unconveniances Wirbel still has. Of couse the lack of documentation and
many other things is a great drawback. Also I've to apologize for my often
weird an incorrect English, I try my best
Now to your topics:
Code size: per default the output files are not stripped. If you strip them
with 'strip hello', the code size of the hello wolrd program for example
will go down from 69206 to 22648. In the current version 0.1.10 this
is done automatically if you call wic with the option -O (which also does
optimization).
Improvement: It will probably possible to further reduce the size of the
hello world program. But it will never be as small as a hand crafted C
program. It has - for example - to carry code for dynamic string handling,
even if you only print "hello world.". String handling is *very* inconveniant
in C. Every higher level language has some sort of dynamic strings at
the price of bigger code - may it be in some library or included in the executable
itself. If the size of the executable matters a lot in your environment, one
might think of putting as much as possible into a dynamic library that can be used
by all Wirbel programs. Currently Wirbel uses the static-library approach, because
that has the advantage that Wirbel executables run independent of *any*
component of Wirbel.
Greetings,
Mathias
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Hi Mathias
Welcome to the kennels (Puppy Community)
Glad you accepted my invitation - good to have you here
- just want to add something for Cur Dog
Your error messages (I got them in geany too) are caused by Linefeeds
- my solution from terminal type leafpad (another editor)
and paste text and save without linefeeds use CR (carriage return) instead - you can probably do this in Geany too . . .
Welcome to the kennels (Puppy Community)
Glad you accepted my invitation - good to have you here
- just want to add something for Cur Dog
Your error messages (I got them in geany too) are caused by Linefeeds
- my solution from terminal type leafpad (another editor)
and paste text and save without linefeeds use CR (carriage return) instead - you can probably do this in Geany too . . .
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Mathias your programming language is rejecting me
What did i do to it?
code (converting from python) enclosed
Code: Select all
# wirbel t2.w
input buffer overflow, can't enlarge buffer because scanner uses REJECT
Error while compiling t2.w -> t2.
#
code (converting from python) enclosed
- Attachments
-
- t2.tar.gz
- (3.14 KiB) Downloaded 367 times
- MathiasKettner
- Posts: 3
- Joined: Sun 09 Nov 2008, 10:59
- Contact:
- MathiasKettner
- Posts: 3
- Joined: Sun 09 Nov 2008, 10:59
- Contact:
Hi,
the main syntactic problem is, that your lines are ended with CR rather
than LF. Current wirbel expects line feeds. You can help yourself for
example with. Also you need a linefeed
at the end of the file.
The other problem is, that though Wirbel is very similary to Python it
is not exactly like Python (and cannot be for several reasons). Converting
programs like the one you attached to Wirbel is not difficult but neccessary.
A few hints for differences between the two languages are here
http://mathias-kettner.de/wirbel_differ ... ython.html.
Also many library functions differ from those in Python.
Greetings,
Mathias
the main syntactic problem is, that your lines are ended with CR rather
than LF. Current wirbel expects line feeds. You can help yourself for
example with
Code: Select all
tr \\r \\n < t2.w > t3.w
at the end of the file.
The other problem is, that though Wirbel is very similary to Python it
is not exactly like Python (and cannot be for several reasons). Converting
programs like the one you attached to Wirbel is not difficult but neccessary.
A few hints for differences between the two languages are here
http://mathias-kettner.de/wirbel_differ ... ython.html.
Also many library functions differ from those in Python.
Greetings,
Mathias
[/code]Lobster wrote:Mathias your programming language is rejecting me
What did i do to it?Code: Select all
# wirbel t2.w input buffer overflow, can't enlarge buffer because scanner uses REJECT Error while compiling t2.w -> t2. #
code (converting from python) enclosed
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Okay, here is the latest version, compiled for Puppy 4.x.
This is how I compiled it and created the PET package (of course you need the 'devx_411.sfs' file loaded to be able to compile):
# tar -zxf wirbel-0.1.10.tar.gz
# cd wirbel-0.1.10
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# make
# new2dir make install
# cd ..
# dir2pet wirbel-0.1.10-i486
If you have installed the earlier Wirbel PET pkg, uninstall that first.
This is how I compiled it and created the PET package (of course you need the 'devx_411.sfs' file loaded to be able to compile):
# tar -zxf wirbel-0.1.10.tar.gz
# cd wirbel-0.1.10
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# make
# new2dir make install
# cd ..
# dir2pet wirbel-0.1.10-i486
If you have installed the earlier Wirbel PET pkg, uninstall that first.
[url]https://bkhome.org/news/[/url]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Version 0.1.10 has an interesting new feature. This is an email that I have just received from Mathias:
I want to rewrite this Bash code in Wirbel:
It would be so nice if I could do this:
...that is, I wanted to be able to insert a Wirbel variable into the system() shell script at runtime, in the above example, the variable 'line'.
My earlier request to him was this:I'm glad to announce that I've implemented a little feature
into Wirbel that you've inspired. It's now (0.1.10) possible
to embedd variable and even expressions into strings - very
much like in the shell but even more flexible. You'll find
here how it works:
http://mathias-kettner.de/wirbel_dollarstrings.html
You'll need the most current version (0.1.10):
I want to rewrite this Bash code in Wirbel:
Code: Select all
if [ -f /root/.usb-drive-log-probedisk ];then #force /proc upate mechanism
for ONEUSBDRV in `cat /root/.usb-drive-log-probedisk | tr '\n' ' '`
do
dd if=/dev/$ONEUSBDRV of=/dev/null bs=512 count=1 >/dev/null 2>&1
#v4.01 faster.
done
fi
Code: Select all
if fs::file_exists("/root/.usb-drive-log-probedisk"):
f=fs::file("/root/.usb-drive-log-probedisk")
for line in f.readlines():
if not line.empty():
system("dd if=/dev/${line} of=/dev/null bs=512 count=1 >/dev/null 2>&1")
f.close()
[url]https://bkhome.org/news/[/url]