Blog

BoxLang 1.0.0 Beta 7 Launched

Luis Majano July 26, 2024

Spread the word

Luis Majano

July 26, 2024

Spread the word


Share your thoughts

We are pleased to announce the release of BoxLang 1.0.0-Beta 7! This latest beta version includes improvements and essential bug fixes, but more importantly it certifies the execution of ColdBox HMVC and TestBox.

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different programming languages, including Java, ColdFusion, Python, Ruby, Go, and PHP, to provide developers with a modern and expressive syntax.

It is also a drop-in replacement for Adobe ColdFusion and Lucee Engines.

How to get started?

Visit our docs at https://boxlang.ortusbooks.com and get coding today. If you want to try it out on the web then go to our online REPL at https://try.boxlang.io. You can also checkout our YouTube playlist: https://www.youtube.com/playlist?list=PLNE-ZbNnndB-40LvAbeSeT2Oi3V2gm_B8

Release Notes

Here are the latest release notes: https://boxlang.ortusbooks.com/readme/release-history/1.0.0-beta-7

Improvements

BL-376 web support error template only shows details of exceptions if IN debug mode else secure by default

If you are using the MiniServer or CommandBox, then if an exception occurs, only in DEBUG MODE, will you get the exception stacktrace, details and more. This makes it secure by default of not exposing any potential data for exceptions.

BL-392 Consolidate the runtime into services without the need of getInstance()

A simple internal improvement to improve locking and instance usage.

New Features

BL-374 threadNew()

This is a new BIF for BoxLang. We have a way to create threads using the thread{} component in both script and template, and we have threadJoin(), threadTerminate() but we never had a way to create threads functionally.

Signature

threadNew( lambda/closure, [attributes={}], [threadName], [priority=normal] )

Examples

threadNew( () => {
    printLn( "thread is done!" );
    sleep( 1000 );
    result = "done";
} );

threadNew( () => calculateOrder( invoice ), {invoice:myData}, "order-builder", "high" )

Please note that the attributes is a struct of data that we will bind into the thread's local scope.

BL-388 Stream type and collector member methods

Java streams are now a native BoxLang type, which for now we don’t try to coerce, but simply match any existing instance or subclass of java.lang.Stream. This means we can now add member methods to ANY stream from BoxLang source code and make Streams also dynamic:

  • .toBXArray()
  • .toBXStruct( [String type] )
  • .toBXQuery( [Query query] )
  • .toBXList( [String delimiter] )

Examples

Collect stream of objects into BoxLang array

foods = [ 'apples', 'bananas', 'pizza', 'tacos' ];
result = foods.stream().parallel().toBXArray();

import java.util.stream.IntStream;
result = IntStream.range(1, 6).toBXArray();

Collect stream of Map entries into a struct

foods = { 'apples' : 'healthy', 'bananas' : 'healthy', 'pizza' : 'junk', 'tacos' : 'junk' };
result = foods.entrySet()
    .stream()
    .filter( e -> e.getValue() == 'healthy' )
    .toBXStruct();


data = [ 'd' : '', 'c' : '', 'b' : '', 'a' : '' ];
result = data.entrySet().stream().toBXStruct( "sorted" );

Collect an array of structs into an existing query object

qry = queryNew( "name,title", "varchar,varchar" );

[
  	{ name: "Brad", title: "Developer" },
  	{ name: "Luis", title: "CEO" },
  	{ name: "Jorge", title: "PM" }
].stream().toBXQuery( qry );

Collect a stream of objects into a list

foods = [ 'apples', 'bananas', 'pizza', true ];
foods.stream().toBXList();

[ "www", "google", "com" ].stream().toBXList( "." )

BL-390 orThrow( type, message ) for attempts

Attempts now allow you to do a custom exception type and message. Check out the attempt docs.

BL-391 ifSuccessful() alias to ifPresent() on attempts

Attempts now allow you to have an alias to ifPresent() that's fluent: ifSuccessful(). Check out the attempt docs.

Bugs

BL-373 Parser detection for unparsed tokens only works if there are 2 or more tokens left

BL-377 Declaring UDFs in function context doesn't always work

BL-378 CFConfig datasources aren't importing due to lack of support for the 'dbdriver' key

BL-379 Runtime can deadlock due to syncronized methods

BL-380 NPE calling isNumeric()

BL-381 JSONSerialize() errors when useSecureJSONPrefix not a boolean

BL-385 Cannot call getWriter(), getOutputStream() already called

BL-386 empty url vars coming through as null

Tasks

BL-372 Create tests for al valid and invalid dot and array access expressions

Add Your Comment

Recent Entries

Ortus Solutions Returns to CFCamp as Platinum Sponsor – Join Us to Redefine the Future with BoxLang!

Ortus Solutions Returns to CFCamp as Platinum Sponsor – Join Us to Redefine the Future with BoxLang!

We’re thrilled to announce that Ortus Solutions and BoxLang will once again join CFCamp as Platinum Sponsors for the 2025 edition. As passionate advocates of innovation in the CFML and modern JVM space, we’re proud to keep pushing boundaries—and this year is shaping up to be our biggest presence yet.

Day 1 Keynote by Luis Majano

CFCamp 2025 will kick off with a keynote delivered by none other than our CEO and BoxLang creator, Luis Majano. Join...

Cristobal Escobar
Cristobal Escobar
April 25, 2025
Must-See Into the Box 2025 Sessions for CommandBox Users!

Must-See Into the Box 2025 Sessions for CommandBox Users!

Power Up your CommandBox experience and practices at Into the Box 2025

Want to get hands-on with the new CommandBox features or learn how others are pushing it to the next level? These are the must-see sessions at ITB 2025 if you're a CommandBox user:

Maria Jose Herrera
Maria Jose Herrera
April 21, 2025
Must-See ITB 2025 Sessions for TestBox Users!

Must-See ITB 2025 Sessions for TestBox Users!

Are you a fan of TestBox or looking to level up your testing game in 2025? Whether you're just getting started with unit testing or you're already building advanced specs for ColdBox and BoxLang apps, Into the Box 2025 has an exciting lineup tailored just for you. Into the Box 2025 has an exciting lineup tailored just for you. With the recent launch of TestBox 6.3.0 we have amazing new tools, features and tips and tricks to get your testing experience to the next level, review our sessions and test like a pro efficiently and easy!

From hands-on testing strategies to BoxLang innovations, here are the sessions you won’t want to miss this May — and why they matter to you as a TestBox user.

Maria Jose Herrera
Maria Jose Herrera
April 17, 2025