Skip to content

Commit

Permalink
fixed missing memory context on method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
maniospas committed Oct 8, 2024
1 parent 947cad5 commit 9cf9a14
Show file tree
Hide file tree
Showing 60 changed files with 99 additions and 1,660 deletions.
Binary file modified blombly.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/advanced/preprocessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ print(mylib.add(1, 2));

```java
// mylib.bb
#include "libs/std"
#include "libs/oop"
enable oop;

module mylib {
Expand Down
28 changes: 14 additions & 14 deletions docs/advanced/servers.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# Servers

Blombly offers the ability to set up REST services.
Instantiating a server is as simple as calling `routes=std::server(port)`,
where the port is provided. The server starts running immediately,
and you can dynamically add or remove routes from it.

## Routes

Blombly offers the ability to set up REST services.
Instantiating a server is as simpleas calling `routes=std::server(port)`,
where the port is provided.
Treat the generated server as a map from resource location strings to code blocsk
to be called when the respective resource is requested. Blocks called this
Treat the generated server as a map from resource location strings to code blocks
to be called when the respective resource is requested. Blocks that run this
ways should returned either a string plain text or a request result struct (see below).
Parts of resource names that reside in angular brackets `<...>` indicate that the respective
part of therequest should be treated as a string argument to the callable.

For example, the following snippet uses the standard library to create the alias `server`
for `std::server` and then redirects `echo/<input>` to echo the provided input;
For example, the following snippet redirects `echo/<input>` to echo the provided input;
run code and open the browser and visit `localhost:8000/echo/MyTest` to see this in action.

```java
// main.bb
#include "libs/std"
routes = server(8000);
routes["/echo/<input>"] = {return input;}
while(true) {} // wait indefinitely
```


## Request data
## Request input data

In addition to the keyword argument values obtained by parsing the request, calls
to route code blocks may be enriched with several positional arguments, if available.
Expand All @@ -43,9 +42,6 @@ These are listed below:

```java
// main.bb
#include "libs/std"
enable std;

new {
value = 0;
routes = server(8000);
Expand All @@ -61,4 +57,8 @@ new {

print("Give me some greetings at localhost:8000/hi/<number>");
while(true) {} // wait indefinitely
```
```

## Non-text results

*This segment is under constructions.*
12 changes: 0 additions & 12 deletions examples/benchmarks/factorial/factorial.py

This file was deleted.

10 changes: 0 additions & 10 deletions examples/benchmarks/factorial/main.bb

This file was deleted.

29 changes: 0 additions & 29 deletions examples/benchmarks/factorial/main.bbvm

This file was deleted.

59 changes: 0 additions & 59 deletions examples/benchmarks/lists/push.bb

This file was deleted.

116 changes: 0 additions & 116 deletions examples/benchmarks/lists/push.bbvm

This file was deleted.

57 changes: 0 additions & 57 deletions examples/benchmarks/lists/push.py

This file was deleted.

7 changes: 0 additions & 7 deletions examples/benchmarks/vectors/benchtest.bb

This file was deleted.

12 changes: 0 additions & 12 deletions examples/benchmarks/vectors/benchtest.bbvm

This file was deleted.

Loading

0 comments on commit 9cf9a14

Please sign in to comment.