Dear All,
We are happy to announce a new edition
of the Dogelog player:
- Enhanced '$YIELD'/1:
Previously the '$YIELD'/1 instruction was hard coded
to understand an integer for sleep/1 and an atom for
native library loading. The implementation has been
change to accept a Promise object, known from
JavaScript. Emulations were made available for
Java and Python.
- Async I/O:
Based on the new '$YIELD'/1 and a buffer fast path
idea, the console reading, file property and file
reading have been asyncified. There is no change in
the Prolog API, files are still to be opened via the
ISO core open/3 and accessed via ISO core get_code/2
respectively ISO core peek_code/2. But input can now
be executed quasi-parallel by multiple tasks.
- HTTP client:
The ISO core open/4 has been moved to the library(spin).
The support of the HTTP and HTTPS protocol in open/3
and open/4, has been extended from the JavaScript
browser to the JavaScript command line (by means of
new fetch in nodejs >21). Further supported targets
are now Python and Java (by means of new HTTP client
in JDK >21).
Have Fun!
Jan Burse, http://www.xlog.ch/ , 07.03.2024
Axios is a promise-based HTTP Client for node.jshttps://axios-http.com/docs/intro
and the browser. It is isomorphic (= it can run in
the browser and nodejs with the same codebase).
On the server-side it uses the native node.js http
module, while on the client (browser) it uses XMLHttpRequests.
Notable Changes - Oct 17, 2023https://nodejs.org/en/blog/announcements/v21-release-announce
The recent update to Node.js, version 21, includes
an important change to the fetch module as well as
WebStreams . Both modules were marked as stable
after a recent update.
Dogelog Player is a Prolog system that is 100% written
in Prolog itself. It is avsailable for the JavaScript,
Python and Java platform. We show how the stable
ordering of Prolog variables in Dogelog Player allows
highly efficient constraint solving approaches.
We convert the undirected graph into a directed graph
and create adjacency lists. This inequality graph doesn’t
have the same delayed evaluation overhead than
(#=)/2 and dif/2. We demonstrate map coloring and
sudoku solving. Further improvements in a
subsequent article.
See also:
Map Coloring and Sudoku Solving https://twitter.com/dogelogch/status/1766885890712883276
Map Coloring and Sudoku Solving
https://www.facebook.com/groups/dogelog
Mild Shock schrieb:
Dear All,
We are happy to announce a new edition
of the Dogelog player:
- Enhanced '$YIELD'/1:
Previously the '$YIELD'/1 instruction was hard coded
to understand an integer for sleep/1 and an atom for
native library loading. The implementation has been
change to accept a Promise object, known from
JavaScript. Emulations were made available for
Java and Python.
- Async I/O:
Based on the new '$YIELD'/1 and a buffer fast path
idea, the console reading, file property and file
reading have been asyncified. There is no change in
the Prolog API, files are still to be opened via the
ISO core open/3 and accessed via ISO core get_code/2
respectively ISO core peek_code/2. But input can now
be executed quasi-parallel by multiple tasks.
- HTTP client:
The ISO core open/4 has been moved to the library(spin).
The support of the HTTP and HTTPS protocol in open/3
and open/4, has been extended from the JavaScript
browser to the JavaScript command line (by means of
new fetch in nodejs >21). Further supported targets
are now Python and Java (by means of new HTTP client
in JDK >21).
Have Fun!
Jan Burse, http://www.xlog.ch/ , 07.03.2024
First of all XMLHttpRequests is deprecated in the browser, use fetch() instead.
On Sun, 10 Mar 2024 23:49:38 +0100, Mild Shock wrote:
First of all XMLHttpRequests is deprecated in the browser, use fetch()
instead.
I don’t know why you would say that. Fetch is only for downloads <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API>, while XMLHttpRequest works in both directions <https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest>.
Do you mean POST requests?
You can do them also with fetch:
There is a POST example as the first fetch example: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
So you can use fetch also for upload.
Not only for download.
Lawrence D'Oliveiro schrieb:
On Sun, 10 Mar 2024 23:49:38 +0100, Mild Shock wrote:
First of all XMLHttpRequests is deprecated in the browser, use fetch()
instead.
I don’t know why you would say that. Fetch is only for downloads
<https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API>, while
XMLHttpRequest works in both directions
<https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest>.
async function postData(url = "", data = {}) {
const response = await fetch(url, {
method: "POST",
[...]
body: /* put your upload content here */
Notable Changes - Oct 17, 2023https://nodejs.org/en/blog/announcements/v21-release-announce
The recent update to Node.js, version 21, includes
an important change to the fetch module as well as
WebStreams . Both modules were marked as stable
after a recent update.
On Mon, 11 Mar 2024 09:07:44 +0100, Mild Shock wrote:
async function postData(url = "", data = {}) {
const response = await fetch(url, {
method: "POST",
[...]
body: /* put your upload content here */
How is that better than XMLHttpRequest?
The same code runs on nodeJS.
No need to install some XHR library.
On Tue, 12 Mar 2024 00:19:57 +0100, Mild Shock wrote:
The same code runs on nodeJS.
No need to install some XHR library.
You don’t know how to use XMLHttpRequest directly?
Natively Node.js does not provide the browser XHR API.
Axios is a promise-based HTTP Client for node.jshttps://axios-http.com/docs/intro
and the browser. It is isomorphic (= it can run in
the browser and nodejs with the same codebase).
On the server-side it uses the native node.js http
module, while on the client (browser) it uses XMLHttpRequests.
Notable Changes - Oct 17, 2023https://nodejs.org/en/blog/announcements/v21-release-announce
The recent update to Node.js, version 21, includes
an important change to the fetch module as well as
WebStreams . Both modules were marked as stable
after a recent update.
On Wed, 13 Mar 2024 02:05:10 +0100, Mild Shock wrote:
Natively Node.js does not provide the browser XHR API.
Browsers do, though.
Please go see a psychatrist, the point of
departure of my post was this advertisement,
which adresses the problem how to have
a single application code base for both browser
and node.JS, which you can also archive by using
3rd party node XHR API module. Or the 3rd party
library AXIOS is yet another alternative:
Axios is a promise-based HTTP Client for node.jshttps://axios-http.com/docs/intro
and the browser. It is isomorphic (= it can run in
the browser and nodejs with the same codebase).
On the server-side it uses the native node.js http
module, while on the client (browser) it uses XMLHttpRequests.
I then remarked that AXIOS isn't necessary anymore,
since fetch() is also isomorphic among Browser
and Node.js since release 21.x.x. With the benefit
that you wont have any 3rd party dependency anymore,
with fetch() everything will be native,
in the browser and in node.JS:
Notable Changes - Oct 17, 2023https://nodejs.org/en/blog/announcements/v21-release-announce
The recent update to Node.js, version 21, includes
an important change to the fetch module as well as
WebStreams . Both modules were marked as stable
after a recent update.
What don't you understand here? How stupid on
a scale of 1-1000 are you? Level 9000 stupid?
Lawrence D'Oliveiro schrieb:
On Wed, 13 Mar 2024 02:05:10 +0100, Mild Shock wrote:
Natively Node.js does not provide the browser XHR API.
Browsers do, though.
Dogelog Player is a Prolog system that features
Tell us, in outline, about some of the data structures--- Synchronet 3.20a-Linux NewsLink 1.114
in the JavaScript version of the system and
how they are implemented.
Some of the datastructures are documented here: https://www.novacuor.ch/doctab/rscsrv/docs/17_host/package.pdf
On 24/03/2024 11:23, Mild Shock wrote:
Some of the datastructures are documented here:
https://www.novacuor.ch/doctab/rscsrv/docs/17_host/package.pdf
<snip>
No they're not. Only functions are described.
John
Fucking liar, look again. Like hier:
4.1 Folder "util"
Section "meta"
4.2 Folder "albufeira"
Section "instruction"
Section "stages"
4.3 Folder "player"
Section "platform"
4.4 Folder "playerpy"
Section "platform"
4.5 Folder "playerj"
Section "platform"
Section “handlers”
A Prolog interpreter doesn't need much datastructures.
John Harris schrieb:
On 24/03/2024 11:23, Mild Shock wrote:
Some of the datastructures are documented here:
https://www.novacuor.ch/doctab/rscsrv/docs/17_host/package.pdf
<snip>
No they're not. Only functions are described.
John
Fucking liar, look again. Like hier:
4.1 Folder "util"
Section "meta"
On 26/03/2024 19:21, Mild Shock wrote:
Fucking liar, look again. Like hier:
4.1 Folder "util"
Section "meta"
<snip>
Section "meta" has 13 lines of text. Tell us which ones describe a data structure. And no, "cross_loading/1" is not a description.
Your JavaScript code includes some form of garbage collection. Has that influenced the data structures ?
John
Do you have even the slightest clue of logic programming?
Dogelog Player is a Prolog system 100% written
in Prolog itself. Where do you expect the data to
be stored? For your informaton moron, this here:
cross_loading/1
Is a so called predicate indicator (PI), giving
you the formation of the predicate name and predicate
arity. So the data model in very shortened relational
notation is this here:
cross_loadeing(_)
Where:
cross_loading: The table name
_: The single column.
Hope this helps. More accademic names for data inside
Prolog are, the so called extensional database (EDB):
The set of facts is called the extensional
database or EDB of the Datalog program
https://en.wikipedia.org/wiki/Datalog
John Harris schrieb:
On 26/03/2024 19:21, Mild Shock wrote:
Fucking liar, look again. Like hier:
4.1 Folder "util"
Section "meta"
<snip>
Section "meta" has 13 lines of text. Tell us which ones describe a
data structure. And no, "cross_loading/1" is not a description.
Your JavaScript code includes some form of garbage collection. Has
that influenced the data structures ?
John
Your JavaScript code includes some form of garbage
collection. Has that influenced the data structures ?
Dogelog Player is a Prolog system that features--- Synchronet 3.20a-Linux NewsLink 1.114
a generational garbage collector scheme and a
change_arg/3 primitive built-in. So far the two
didn’t go together and we had to use a cludge.
With the upcoming release we provide a proper
solution based on marking write-barriers.
Our remembered set on the variable binding trail
has the benefit that it can reduce itself during
backtracking. By adopting conductor variables, i.e.
instantiated variables that are not trailed, from
formerly Jekejeke Prolog, we could recreate a
similar benefit for Dogelog Players change_arg/3.
See also:
Marking Write-Barriers for Dogelog Player https://twitter.com/dogelogch/status/1771559896741192186
Marking Write-Barriers for Dogelog Player https://www.facebook.com/groups/dogelog
John Harris schrieb:
Your JavaScript code includes some form of garbage collection. Has
that influenced the data structures ?
There is a long thread about the early Garbage Collection
of Dogelog Player in comp.lang.python. Especially whether
it can be made fast, with useful input from a few
Pythonistas.
Then I post regularly about the evolution of the GC
of Dogelog Player. It was just posted a few days ago,
when you were still on your silly tangent that my
posts are nauseating. Now you are asking stuff, that
I am anyway posting about. Whats is wrong with you?
Do you have a PhD in being the most stupid person
on this planet? See here, few days ago,
to be exact 5 days ago:
Mild Shock schrieb 23.03.2024, 16:43:
Dogelog Player is a Prolog system that features
a generational garbage collector scheme and a
change_arg/3 primitive built-in. So far the two
didn’t go together and we had to use a cludge.
With the upcoming release we provide a proper
solution based on marking write-barriers.
Our remembered set on the variable binding trail
has the benefit that it can reduce itself during
backtracking. By adopting conductor variables, i.e.
instantiated variables that are not trailed, from
formerly Jekejeke Prolog, we could recreate a
similar benefit for Dogelog Players change_arg/3.
See also:
Marking Write-Barriers for Dogelog Player https://twitter.com/dogelogch/status/1771559896741192186
Marking Write-Barriers for Dogelog Player https://www.facebook.com/groups/dogelog
Of course before reading anything about Dogelog Player
you have to start with the reference section also known
as bibliography, which is found at the end of PDF here:
Dogelog Player Host Version 1.1.5, December 17, 2023 https://www.novacuor.ch/doctab/rscsrv/docs/17_host/package.pdf
You need to first understand the below things before
you dig and put your nose into Dogelog Player:
[1] ISO (1995): Prolog, Part 1: General Core,
International Standard ISO/IEC 13211-1, First Edition, 1995-06-01 http://www.iso.org/standard/21413.html
[2] Clocksin, W. (1983): A portable Prolog compiler, Logic Programming Workshop, Albufeira Portugal, January 1983 http://www.softwarepreservation.org/projects/prolog/lisbon/lpw83/p74-Bowen.pdf
[3] Carlson, M. et al. (1988): Garbage collection for Prolog based on
WAM. Communications of the ACM 31, 6, 719–740, June 1988 http://dl.acm.org/doi/10.1145/62959.62968
Dogelog Player implements variants of [1], [2] and [3].
SWI-Prolog also implementes [3], but it doesn't implement
the generational part of [3]. Recently I managed to also
implement the generatioal part of [3] via some coloring
approach. If I am not mistaken you find a blog about it
also announced here and somewhere on medium.com.
And most recently I removed a cludge from change_arg/3
also related to [3]. And according blog I also announced
here to be exact 5 days ago. Its also on medium.com.
Maybe you need medium.com membership to be able to read it.
Mild Shock schrieb:
John Harris schrieb:
Your JavaScript code includes some form of garbage collection. Has
that influenced the data structures ?
There is a long thread about the early Garbage Collection
of Dogelog Player in comp.lang.python. Especially whether
it can be made fast, with useful input from a few
Pythonistas.
Then I post regularly about the evolution of the GC
of Dogelog Player. It was just posted a few days ago,
when you were still on your silly tangent that my
posts are nauseating. Now you are asking stuff, that
I am anyway posting about. Whats is wrong with you?
Do you have a PhD in being the most stupid person
on this planet? See here, few days ago,
to be exact 5 days ago:
Mild Shock schrieb 23.03.2024, 16:43:
;
Dogelog Player is a Prolog system that features
a generational garbage collector scheme and a
change_arg/3 primitive built-in. So far the two
didn’t go together and we had to use a cludge.
With the upcoming release we provide a proper
solution based on marking write-barriers.
;
Our remembered set on the variable binding trail
has the benefit that it can reduce itself during
backtracking. By adopting conductor variables, i.e.
instantiated variables that are not trailed, from
formerly Jekejeke Prolog, we could recreate a
similar benefit for Dogelog Players change_arg/3.
;
See also:
;
Marking Write-Barriers for Dogelog Player
https://twitter.com/dogelogch/status/1771559896741192186
;
Marking Write-Barriers for Dogelog Player
https://www.facebook.com/groups/dogelog
Dogelog Player is a Prolog system that features
a generational garbage collector scheme and a
change_arg/3 primitive built-in. So far the two
didn’t go together and we had to use a cludge.
With the upcoming release we provide a proper
solution based on marking write-barriers.
Our remembered set on the variable binding trail
has the benefit that it can reduce itself during
backtracking. By adopting conductor variables, i.e.
instantiated variables that are not trailed, from
formerly Jekejeke Prolog, we could recreate a
similar benefit for Dogelog Players change_arg/3.
See also:
Marking Write-Barriers for Dogelog Player https://twitter.com/dogelogch/status/1771559896741192186
Marking Write-Barriers for Dogelog Player https://www.facebook.com/groups/dogelog
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,007 |
Nodes: | 10 (0 / 10) |
Uptime: | 181:08:38 |
Calls: | 13,143 |
Calls today: | 1 |
Files: | 186,574 |
D/L today: |
272 files (90,096K bytes) |
Messages: | 3,309,787 |