-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
110 changed files
with
1,186 additions
and
1,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`, | ||
|
@@ -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. | ||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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. | ||
|
@@ -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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 `--`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`. | ||
|
Oops, something went wrong.
425e44e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
3481-02ddf8e7
disappeared fromobjects/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.