Skip to content

Commit

Permalink
0.51.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 10, 2025
1 parent 6999eb8 commit 425e44e
Show file tree
Hide file tree
Showing 110 changed files with 1,186 additions and 1,192 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.50.2</eo.version>
<eo.version>0.51.3</eo.version>
<stack-size>32M</stack-size>
<heap-size>2G</heap-size>
</properties>
Expand Down
100 changes: 46 additions & 54 deletions objects/org/eolang/bytes.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3

# The object encapsulates a chain of bytes, adding a few
# convenient operations to it. Objects like `int`, `string`,
Expand All @@ -35,27 +35,55 @@
data > @
$ > as-bytes
eq 01- > as-bool

# Turn this chain of eight bytes into a number.
# If there are less or more than eight bytes, there will
# be an error returned.
[] > as-number
if. > @
eq nan.as-bytes
nan
if. > as-number
eq nan.as-bytes
nan
if.
eq positive-infinity.as-bytes
positive-infinity
if.
eq positive-infinity.as-bytes
positive-infinity
eq negative-infinity.as-bytes
negative-infinity
if.
eq negative-infinity.as-bytes
negative-infinity
if.
size.eq 8
number ^
error
sprintf
"Can't convert non 8 length bytes to a number, bytes are %x"
* ^
size.eq 8
number $
error
sprintf
"Can't convert non 8 length bytes to a number, bytes are %x"
* $
# Turn this chain of eight bytes into a i64 number.
# If there are less or more than eight bytes, there will
# be an error returned.
if. > as-i64
size.eq 8
i64 $
error
sprintf
"Can't convert non 8 length bytes to i64, bytes are %x"
* $
# Turn this chain of four bytes into a i32 number.
# If there are less or more than four bytes, there will
# be an error returned.
if. > as-i32
size.eq 4
i32 $
error
sprintf
"Can't convert non 4 length bytes to i32, bytes are %x"
* $
# Turn this chain of two bytes into a i16 number.
# If there are less or more than two bytes, there will
# be an error returned.
if. > as-i16
size.eq 2
i16 $
error
sprintf
"Can't convert non 2 length bytes to i16, bytes are %x"
* $

# Equals to another object.
# A condition where two objects have the same value or content.
Expand All @@ -68,42 +96,6 @@
# Represents a sub-sequence inside the current one.
[start len] > slice /org.eolang.bytes

# Turn this chain of eight bytes into a i64 number.
# If there are less or more than eight bytes, there will
# be an error returned.
[] > as-i64
if. > @
size.eq 8
i64 ^
error
sprintf
"Can't convert non 8 length bytes to i64, bytes are %x"
* ^

# Turn this chain of four bytes into a i32 number.
# If there are less or more than four bytes, there will
# be an error returned.
[] > as-i32
if. > @
size.eq 4
i32 ^
error
sprintf
"Can't convert non 4 length bytes to i32, bytes are %x"
* ^

# Turn this chain of two bytes into a i16 number.
# If there are less or more than two bytes, there will
# be an error returned.
[] > as-i16
if. > @
size.eq 2
i16 ^
error
sprintf
"Can't convert non 2 length bytes to i16, bytes are %x"
* ^

# Calculate the bitwise and operation.
[b] > and /org.eolang.bytes

Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/cti.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+version 0.50.2
+version 0.51.3

# Compile Time Instruction (CTI).
#
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/dataized.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+version 0.50.2
+version 0.51.3

# The object dataizes `target`, makes new instance of `bytes` from given data and behaves as result
# `bytes`.
Expand Down
5 changes: 3 additions & 2 deletions objects/org/eolang/error.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3
+unlint unit-test-missing

# 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.
Expand Down
3 changes: 2 additions & 1 deletion objects/org/eolang/false.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+version 0.50.2
+version 0.51.3
+unlint unit-test-missing

# The object is a FALSE boolean state.
[] > false
Expand Down
4 changes: 2 additions & 2 deletions objects/org/eolang/fs/dir.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.fs
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3

# Directory in the file system.
# Apparently every directory is a file.
Expand Down
5 changes: 2 additions & 3 deletions objects/org/eolang/fs/file.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.fs
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+unlint broken-ref
+version 0.51.3

# The file object in the filesystem.
[path] > file
Expand Down
29 changes: 12 additions & 17 deletions objects/org/eolang/fs/path.eo
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.fs
+version 0.50.2
+unlint broken-ref
+version 0.51.3

# A `path` represents a path that is hierarchical and composed of a sequence of
# directory and file name elements separated by a special separator or delimiter.
Expand All @@ -42,6 +41,13 @@
string uri.as-bytes
posix
string uri.as-bytes
# The system-dependent default name-separator character.
# On UNIX systems the value of this field is "/";
# on Microsoft Windows systems it is "\\".
if. > separator
os.is-windows
win32.separator
posix.separator

# Utility object that joins given `tuple` of paths with current OS separator
# and normalizes result path.
Expand All @@ -57,29 +63,18 @@
win32 joined-path
posix joined-path

# The system-dependent default name-separator character.
# On UNIX systems the value of this field is "/";
# on Microsoft Windows systems it is "\\".
[] > separator
if. > @
os.is-windows
win32.separator
posix.separator

# POSIX specified path.
# A standardized way to represent file or directory locations in a Unix-like system.
[uri] > posix
$ > determined
"/" > separator
(file uri).as-file > as-file
(dir (QQ.fs.file uri)).as-dir > as-dir
uri > @

# Returns `true` if current path is absolute - starts with '/' char.
[] > is-absolute
and. > @
uri.length.gt 0
(uri.as-bytes.slice 0 1).eq separator
and. > is-absolute
uri.length.gt 0
(uri.as-bytes.slice 0 1).eq separator
uri > @

# Return new `path` with normalized uri.
# Normalization includes:
Expand Down
3 changes: 1 addition & 2 deletions objects/org/eolang/fs/tmpdir.eo
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.fs
+version 0.50.2
+unlint broken-ref
+version 0.51.3

# Temporary directory.
# For Unix/MacOS uses the path supplied by the first environment variable
Expand Down
3 changes: 1 addition & 2 deletions objects/org/eolang/go.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+version 0.50.2
+unlint broken-ref
+version 0.51.3

# Non-conditional forward and backward jumps.
# Forward jump instantly returns provided object to `g.forward` without touching
Expand Down
4 changes: 2 additions & 2 deletions objects/org/eolang/i16.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3

# The 16 bits signed integer.
# Here `as-bytes` must be a `bytes` object.
Expand Down
4 changes: 2 additions & 2 deletions objects/org/eolang/i32.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3

# The 32 bits signed integer.
# Here `as-bytes` must be a `bytes` object.
Expand Down
4 changes: 2 additions & 2 deletions objects/org/eolang/i64.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.50.2
+rt jvm org.eolang:eo-runtime:0.51.3
+rt node eo2js-runtime:0.0.0
+version 0.50.2
+version 0.51.3

# The 64 bits signed integer.
# Here `as-bytes` must be a `bytes` object.
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/bytes-as-input.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Makes an `input` from bytes.
# Here `bts` is sequence of bytes or an object that can be dataized
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/console.eo
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# The `console` object is basic I/O object that allows to
# interact with operation system console.
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/dead-input.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Dead input is an input that reads from nowhere and always
# returns empty sequence of bytes `--`.
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/dead-output.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Dead output is an output that writes to nowhere.
[] > dead-output
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/input-length.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Reads all the bytes from provided `input` and returns its length.
[input] > input-length
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/malloc-as-output.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Makes an output from allocated block in memory.
# Here `allocated` is `malloc.of.allocated` object.
Expand Down
3 changes: 2 additions & 1 deletion objects/org/eolang/io/stdin.eo
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3
+unlint unit-test-missing

# The `stdin` object is a convenient wrapper on `console` object
# which is used as input only and allows to read the data from console.
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/stdout.eo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# The `stdout` object is convenient wrapper on `console` object which
# uses it as output only and allows to print given argument to console as `string`:
Expand Down
2 changes: 1 addition & 1 deletion objects/org/eolang/io/tee-input.eo
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
+architect [email protected]
+home https://github.com/objectionary/eo
+package org.eolang.io
+version 0.50.2
+version 0.51.3

# Tee input is an input that reads from provided `input`,
# writes to provided `output` and behaves as provided `input`.
Expand Down
Loading

1 comment on commit 425e44e

@0pdd
Copy link

@0pdd 0pdd commented on 425e44e Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 3481-02ddf8e7 disappeared from objects/org/eolang/txt/text.eo), that's why I closed #293. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.