Skip to content

Commit

Permalink
New release for eo-0.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor authored and yegor256 committed May 9, 2024
1 parent dea37d3 commit 3b5f3a5
Show file tree
Hide file tree
Showing 48 changed files with 469 additions and 473 deletions.
2 changes: 1 addition & 1 deletion make/jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SOFTWARE.
<artifactId>jvm</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<eo.version>0.37.0</eo.version>
<eo.version>0.38.0</eo.version>
<stack-size>32M</stack-size>
</properties>
<build>
Expand Down
10 changes: 7 additions & 3 deletions objects/org/eolang/as-phi.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Turns an object into a φ-term.
# Turns an object into a phi-term printable to console.
#
# This object is mostly used for testing/debugging, when it's necessary
# to inspect the structure of an object. The output will omit recursive
# links.
[x] > as-phi /string
24 changes: 11 additions & 13 deletions objects/org/eolang/bytes.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Bytes.
# The object encapsulates a chain of bytes, adding a few
# convenient operations to it. Objects like `int`, `string`,
# and `float` encapsulate `bytes`.
[] > bytes
# Return itself.
$ > as-bytes

# Equals to another object.
[b] > eq /bool

Expand All @@ -38,8 +43,7 @@
[start len] > slice /bytes

# Turn this chain of bytes into a string in UTF-8.
[] > as-string
string ^ > @
string ^ > [] > as-string

# Turn this chain of eight bytes into an integer.
# If there are less or more than eight bytes, there will
Expand Down Expand Up @@ -72,19 +76,13 @@
[] > not /bytes

# Calculate bitwise left shift.
[x] > left
^.right x.neg > @
^.right x.neg > [x] > left

# Calculate bitwise right shift.
[x] > right /bytes

# Converts to bool.
[] > as-bool
^.eq 01- > @

# Return itself.
[] > as-bytes
^ > @
^.eq 01- > [] > as-bool

# Concatenation of two byte sequences:
# the current and the provided one,
Expand Down
19 changes: 12 additions & 7 deletions objects/org/eolang/cage.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# This object is doing exactly the same as "memory", but allows
# you to store objects, not only data. In other words, it doesn't
# do dataization when objects are being stored.
# This object is doing exactly the same as `memory`, but allows
# to store objects, not only data. In other words, it doesn't
# do dataization when objects are being stored. Also, when the
# encaged object is retrieved, not the bytes gets out, but the
# object that was put there.
#
# The `cage` object is considered a bad practice in EO and most
# probably will be removed in the next versions of the language.
# It is not recommended to use it, unless for debugging and
# transition purposes (from another language to EO).
[object] > cage
@.self > new

Expand All @@ -38,8 +45,6 @@
# Object encaged by locator.
[locator] > encaged
$ > self

# Retrieved encaged object by locator.
[] > @ /?

# Encage new object by locator.
Expand Down
17 changes: 11 additions & 6 deletions objects/org/eolang/cti.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Compile Time Instruction.
# Make possible to highlight deprecated methods.
[delegate level message] > cti
delegate > @
# Compile Time Instruction (CTI).
#
# The object may be used to add compile time information to
# other objects. This mechanism is somehow similar to annotations in,
# for example, Java and C#. For example, the object makes it possible
# to highlight deprecated methods. EO compiler, when it meets the
# `cli` object, takes its `message` and prints to the log/console
# with the `level` severity level (use `INFO`, `WARN`, or `ERROR`).
delegate > [delegate level message] > cti
9 changes: 7 additions & 2 deletions objects/org/eolang/dataized.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,25 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# The object dataizes `target`, makes new instance of `bytes` from given data and behaves as result
# `bytes`.
# The object is used as implementation of caching syntax (`!`).
# The next two lines of code behaves identically:
#
# ```
# some-object > cached!
# (dataized some-object).as-bytes > cached
# ```
#
# Dataization is a process of retrieving data (bytes) from an object, by taking its \Delta
# attribute.
# An example of usage:
#
# ```
# # Some 64+ characters comment should be here.
# [] > foo
# [] > @
# ^.inner.five > @
Expand All @@ -47,6 +51,7 @@
# (dataized foo).as-bytes > result # result is 00-00-00-00-00-00-00-05
# result.as-int > f # f is 5
# ```
#
# Here, when `.as-bytes` is taken, the `dataized` dataizes (takes `bytes`) from the object `foo`
# and returns them. The `.as-bytes` is used to prevent double dataization.
[target] > dataized /bytes
8 changes: 4 additions & 4 deletions objects/org/eolang/error.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# 2016-2022 Objectionary.com
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,12 +23,12 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# This object must be used in order to terminate the program
# due to an error. Just make a copy of it with any encapsulated object.
# The first attempt to dataize it will lead to runtime error and program
# termination. The only way to catch such an error is by using
# the object 'try'.
# the `try` object.
[message] > error /?
15 changes: 6 additions & 9 deletions objects/org/eolang/false.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,20 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# False.
# The object is a FALSE boolean state.
[] > false
00- > @
true > not

# Control structure that allows for conditional execution of code.
# Since $ is FALSE - behaves as `right` object.
[left right] > if
right > @
right > [left right] > if

# And.
[x] > and
^ > @
^ > [x] > and

# Or.
[x] > or
01-.eq x > @
01-.eq x > [x] > or
15 changes: 7 additions & 8 deletions objects/org/eolang/float.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# 2016-2022 Objectionary.com
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,10 +23,11 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Float.
# The `float` object is an abstraction of a 64-bit floating-point number that
# internally is a chain of eight bytes.
[as-bytes] > float
as-bytes > @

Expand Down Expand Up @@ -97,12 +98,10 @@
[x] > plus /float

# Negation of $.
[] > neg
^.times -1.0 > @
^.times -1.0 > [] > neg

# Difference between $ and x.
[x] > minus
^.plus x.neg > @
^.plus x.neg > [x] > minus

# Quotient of the division of $ by x.
[x] > div /float
27 changes: 12 additions & 15 deletions objects/org/eolang/go.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# 2016-2022 Objectionary.com
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,8 +23,8 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Non-conditional forward and backward jumps.
# Forward jump instantly returns provided object to `g.forward` without touching
Expand Down Expand Up @@ -58,28 +58,25 @@
8
m.put m.id > [m]

# To.
[body] > to
try > @
body token
[e]
[e] >>
if. > @
&.^.id.eq e.id
^.^.id.eq e.id
e.value
error e
true

# Token.
[] > token
# Backward jump.
error > backward
[]
&.^.^.to &.^.body > value
&.^.^.id > id
jump
^.^.to ^.body

[value] > jump
^.^.^.id > id

# Forward jump.
[res] > forward
error > @
[]
res > value
&.^.^.^.id > id
^.jump
res
19 changes: 9 additions & 10 deletions objects/org/eolang/int.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# 2016-2022 Objectionary.com
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,10 +23,11 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Integer.
# The `int` object is an abstraction of a 64-bit signed integer that
# internally is a chain of eight bytes.
[as-bytes] > int
as-bytes > @

Expand All @@ -43,7 +44,7 @@
int
x > value!

# Tests that $ x.
# Tests that $ <= x.
[x] > lte
not. > @
^.gt
Expand All @@ -52,22 +53,20 @@
# Tests that $ > x.
[x] > gt /bool

# Tests that $ x.
# Tests that $ >= x.
[x] > gte
not. > @
^.lt
x > value!

# Change the sign of the number.
[] > neg
^.times -1 > @
^.times -1 > [] > neg

# Add to the current one.
[x] > plus /int

# Subtract from the current one.
[x] > minus
^.plus x.neg > @
^.plus x.neg > [x] > minus

# Multiplication this one by another int.
[x] > times /int
Expand Down
8 changes: 4 additions & 4 deletions objects/org/eolang/io/stdin.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# 2016-2022 Objectionary.com
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,10 +23,10 @@
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang.io
+rt jvm org.eolang:eo-runtime:0.37.0
+version 0.37.0
+rt jvm org.eolang:eo-runtime:0.38.0
+version 0.38.0

# Stdin.
# The `stdin` object reads the console.
[] > stdin
# Consumes only one line from the standard input stream
# Dataizes to an error object if there is no line to consume.
Expand Down
Loading

0 comments on commit 3b5f3a5

Please sign in to comment.