Commit Graph

56 Commits

Author SHA1 Message Date
72cde36478 Update.
All checks were successful
CI / build-linux (push) Successful in 1m3s
2026-01-26 16:28:49 +01:00
fe2f087d9f UPdate.
Some checks failed
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
WrenCI / linux (push) Failing after 55s
2026-01-26 05:12:14 +01:00
a59dbe1d55 Update. 2026-01-25 22:09:29 +01:00
1ee28a1644 Update. 2026-01-25 19:02:02 +01:00
a830238d11 Update. 2026-01-25 13:09:28 +01:00
735596fdf6 Update. 2026-01-25 10:50:20 +01:00
2e425571ca Update. 2026-01-25 04:58:39 +01:00
957e3a4762 Update. 2026-01-25 02:47:47 +01:00
8c1a721c4c Update. 2026-01-24 23:40:22 +01:00
1a0f7f51a1 dwn examples.
Some checks are pending
WrenCI / linux (push) Waiting to run
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
2026-01-24 21:15:13 +01:00
236d69c2d7 New modules.
Some checks are pending
WrenCI / linux (push) Waiting to run
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
2026-01-24 19:35:43 +01:00
1a08b3adf0 Networking. 2026-01-24 09:57:59 +01:00
Bob Nystrom
744147fd94 Flush prompt in animals example. 2018-08-01 07:28:48 -07:00
Bob Nystrom
8210452970 Relative imports!
This is a breaking change because existing imports in user Wren code
that assume the path is relative to the entrypoint file will now likely
fail.

Also, stack trace output and host API calls that take a module string
now need the resolved module string, not the short name that appears in
the import.
2018-03-24 11:10:36 -07:00
Bob Nystrom
5ddd783ff5 Use strtoll() for hex literals to handle 64-bit ones even on 32-bit. 2017-01-12 21:53:21 -08:00
Will Speak
04a7c9b5c8 Improve Travis Build & Test Coverage
Build Wren for more targets, and run the test suite on both 32 and 64
bit builds.

 * Update the build config to test both with and without NAN_TAGGING
   defined.

 * Updatest `util/test.py` to take the executable suffix as a
   parameter. This allows the makefile to control which binaries will be
   tested.

   Adds a new target to the makefile to be run by travis, this runs the
   test suite against all of the configurations it builds.

 * Gcc on some 32 bit platforms was complaining about numeric overflows
   when -INFINITY was used. Update the logic for converting a double to
   a string to not explicitly check against the literal values.

 * Make CI builds run the tests on both 64 _and_ 32 bit builds.

 * If I limit the number of CPUs on my MBP I can get some of the tests
   to time out, I'm imagining that the specs of the Travis Macs means
   that the same is happening there too. Updated the test script to
   allow an extra few seconds for the test to complete successfully
   before killing it.

 * Due to slight differences in accuracy in some computations tests were
   failing on 32 bit builds. Stop comparing things quite as exactly in
   the cases where it is causing issues.

   For some reason 12.34 was refusing to compare equal to itself. Bad
   show 12.34 :-/. I've also updated the test so it doesn't leak handles
   even if the assertions fail.

 * Double-cast from `double` to `uint32_t` to prevent undefined
   behaviour on overflow of basic integers. This should hopefully
   prevent 32 bit test failures on Linux.

 * Move to a version of LibUV with a fix for the 32 bit build error on
   Travis.
2016-12-29 17:52:38 +00:00
Bob Nystrom
b8e85c83a8 Fix test and add skynet example. 2016-02-14 22:21:50 -08:00
Bob Nystrom
a38753d1d6 Add an animals guessing game example. 2015-11-29 09:43:47 -08:00
Bob Nystrom
78655c68b0 Simple string interpolation.
This allows "%(...)" inside a string literal to interpolate the
stringified result of an expression.

It doesn't support custom interpolators or format strings, but we can
consider extending that later.
2015-11-11 07:55:48 -08:00
Bob Nystrom
2c5926b32b Add guess a number example. 2015-10-17 11:19:25 -07:00
Bob Nystrom
58e4d26648 "IO" -> "System".
Get rid of the separate opt-in IO class and replace it with a core
System class.

- Remove wren_io.c, wren_io.h, and io.wren.
- Remove the flags that disable it.
- Remove the overloads for print() with different arity. (It was an
  experiment, but I don't think it's that useful.)
- Remove IO.read(). That will reappear using libuv in the CLI at some
  point.
- Remove IO.time. Doesn't seem to have been used.
- Update all of the tests, docs, etc.

I'm sorry for all the breakage this causes, but I think "System" is a
better name for this class (it makes it natural to add things like
"System.gc()") and frees up "IO" for referring to the CLI's IO module.
2015-09-15 07:46:09 -07:00
Bob Nystrom
2e83f056c1 No more default constructors.
Fixes #296.
2015-09-01 08:16:04 -07:00
Bob Nystrom
71ab3ca887 Use "construct" instead of "this" to define constructors. 2015-07-21 07:24:53 -07:00
Bob Nystrom
5fb6186d7d Make constructors just methods.
* Eliminate "new" reserved word.
* Allow "this" before a method definition to define a constructor.
* Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
Bob Nystrom
3196735f39 Add block arguments and operators to syntax example. 2015-06-26 22:14:32 -07:00
Kyle Marek-Spartz
fc7612c843 Run examples as tests. Would have prevented #266 2015-05-20 10:10:40 -05:00
Bob Nystrom
a114f34a2a Remove outdated set example. Fix #266. 2015-05-20 07:07:47 -07:00
Luchs
f132f59649 Add syntax example file 2015-04-25 18:10:17 +02:00
Bob Nystrom
bdb8634743 Tweak style. 2015-02-19 06:32:46 -08:00
Paul Woolcock
4260a10983 add simple example for importing a module 2015-02-18 11:39:31 -05:00
Kyle Marek-Spartz
c0b0920d67 Update set example to new Syntax. Replaces #30 2015-01-09 16:02:40 -06:00
Kyle Marek-Spartz
fa85bb1eef Remove spaces from after method definitions 2015-01-09 15:15:34 -06:00
Kyle Marek-Spartz
c2e6181b01 Newline at end of file 2015-01-09 15:15:34 -06:00
Kyle Marek-Spartz
2253d9269f Fix for iterate handling null 2015-01-09 15:15:34 -06:00
Kyle Marek-Spartz
a67cde69bb Update set example to use bitwise operators 2015-01-09 15:15:34 -06:00
Kyle Marek-Spartz
18af6514f0 Add Set example 2015-01-09 15:15:34 -06:00
Bob Nystrom
96d728cc5d Reorganize makefile and scripts. 2014-01-23 23:29:50 -08:00
Bob Nystrom
9645ddcb26 Add a little ASCII art Mandelbrot example. 2014-01-07 23:04:30 -08:00
Bob Nystrom
b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00
Bob Nystrom
6c3aa85228 Make IO a static class instead of a singleton. 2013-12-21 19:25:09 -08:00
Bob Nystrom
ee504435f7 Real hello world example. 2013-11-17 08:55:04 -08:00
Bob Nystrom
8f6881c6a8 Change syntax for blocks -> fns. 2013-11-06 07:47:47 -08:00
Bob Nystrom
64f1b39ee9 Get infix arithmetic operators working. 2013-10-31 07:04:44 -07:00
Bob Nystrom
95fb0863d9 Add IO class.
With io.write(), can start writing tests now.
2013-10-27 22:45:40 -07:00
Bob Nystrom
b9baf46e9a Argument lists. 2013-10-26 16:01:44 -07:00
Bob Nystrom
f867bb8348 String literals and objects. 2013-10-25 20:40:24 -07:00
Bob Nystrom
b7de165950 Line comments. 2013-10-25 20:07:04 -07:00
Bob Nystrom
32f8c412c7 Method calls. 2013-10-24 21:32:17 -07:00
Bob Nystrom
2f930f727e Make blocks callable. 2013-10-24 13:01:24 -07:00
Bob Nystrom
911f586e7b Block objects.
Also clean up newline handling in parser.
2013-10-24 12:39:01 -07:00