Software (Programming) >
(on Wikipedia)
https://github.com/bamboo/boo
boo-lang.org
2019-11-22 - The main website is dead and the project hasn't been modified in 6 years
Inspired by Python and Ruby. Compiles into a Common Intermediate Language and then into an executable that can be run by mono.
I tinkered with it and didn't like it.
- https://github.com/bamboo/boo/wiki
- https://groups.google.com/forum/#!forum/boolang
- I have notes and scripts in https://github.com/spiralofhope/shell-random/tree/master/dead/boo.
- boo example code
- MonoDevelop has Boo support.
-
vi syntax highlighting:
-
I have an old note that says Boo has some structure for writing IRC bots.
--
- for later
-
Performance Quiz #9 : IList
; List and array speed -- solution - Compare speeds of lists, arrays and hashes - with different configurations and accessing the information differently.
--
- 2009-03-31 - 0.9.1.3287 on (distribution not recorded)
-
2009-03-30 - 0.8.2.2960 in CLR v2.0.50727.42 on (distribution not recorded)
Terms ∞
- IEnumerator - something that'll generate a list when summoned.
-
generator - a procedure (a re-usable block of code)
Notes ∞
From 2009-03-31, likely version 0.9.1.3287
Code must be ordered this way:
- Classes
- Functions
-
Statements
--
- Similar to Ruby's irb, boo has a shell:
booish
- Comment with one of: //, #, and a range with /* */
- char and string
-
'string'
,"string"
,"""string"""
'string'
and"string"
can span only one line. Can use backslash-escaping."""string"""
can span multiple lines. Takes everything literally with no escaping.- Common escape characters:
-\n
newline
-\r
carriage return
-\t
tab
- (more is possible) - Insert variables into strings with
${}
, likea="hi";print "hello ${a}"
- booleans (
a=false
) -
To keep things safe, you can't first use a variable as type x and then later re-purpose it as type y (or an object). So this fails:
vara=42 ; vara="string"
- But you can explicitly specify a type:
varb as string ; varb="42" ; varb="string"
- You can also specify it as an object:
varc as object ; varc="string" ; varc=42
- You can also cast a variable of one type to be acted upon like another type. I don't really understand why it only seems to work in one situation and not for stuff like:
-vard as string ; vard="5" ; vard=cast(int, vard) + 1
-vare as string ; vare="5" ; vare=(vare as int) + 1
-varf as string ; varf="5" ; print (varf as int) + 1
- Actually, I can't get it working at all under any circumstances, even withbooc -ducky
- But you can explicitly specify a type:
builtins: https://github.com/boo-lang/boo/wiki/Builtin-Functions-Summary
2009-03-31 - 0.9.1.3287 ∞
I used the binary:
- All notes from 0.8.2.2960 still apply.
-
delete
doesn't work
2009-03-30 - 0.8.2.2960 in CLR v2.0.50727.42 ∞
General:
- I cannot have a space before
if
. -
I don't like
not
. I would rather have statements likei = 0 ; if i !> 5: print 'i is not greater than 5'
Shell: booish
home
/end
don't work.control-left
/control-right
don't work.control-c
kills booish completely.control-backspace
/alt-backspace
don't work.-
7/3.00 = 2.33333333333333 ? It just should be 2.33 since 3.00 has two significant digits.
- With 7/3.00 the 3 becomes a floating-point number, forcing floating-point division here. I would have to implement code for it to do the division and still honour the significant digit rules.
- Oh, there are single, double, and decimal numbers. Maybe there's something in there that I ought to use.
-
control-l
should clear the screen.
Last updated 2019-11-22 at 02:54:27