Deutsch   English   Français   Italiano  
<vhknmh$n27k$1@solani.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Mild Shock <janburse@fastmail.fm>
Newsgroups: comp.lang.prolog
Subject: Prolog System running on JS/Bun ? (Was: Night Train to Lisbon)
Date: Wed, 20 Nov 2024 14:20:18 +0100
Message-ID: <vhknmh$n27k$1@solani.org>
References: <v32hjd$s3qh$1@solani.org> <v7g0du$475u$1@solani.org>
 <v7j9g9$643u$1@solani.org> <v7mem6$6uld$1@solani.org>
 <ves6vs$i6cm$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Nov 2024 13:20:17 -0000 (UTC)
Injection-Info: solani.org;
	logging-data="755956"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Firefox/91.0 SeaMonkey/2.53.19
Cancel-Lock: sha1:Ge71SbX2mnrkIV40g6TGznQt7Qo=
In-Reply-To: <ves6vs$i6cm$1@solani.org>
X-User-ID: eJwdx8kRgDAMA8CW4kMyKScIu/8SYHjtLIJGVRJMDGZ/wZZVu2r8nLEa8pdYK1Wu+8GE6lzZVKyWGOMJ6/0CXRAVyg==
Bytes: 3160
Lines: 81

Hi,

Strange things happen in the Zig world:

Bun is a JavaScript runtime, package manager,
test runner and bundler built from scratch using
the Zig programming language. It was designed by
Jarred Sumner as a drop-in replacement for Node.js.
Bun uses WebKit's JavaScriptCore as the JavaScript
engine, unlike Node.js and Deno, which both use V8.
https://en.wikipedia.org/wiki/Bun_(software)

Should give a try via Dogelog Player for JavaScript.

Python/PyPy (2.288s)
Js/Node (1.595s)
C/clang -O0 (1.566s)
Go (1.528s)
Js/Bun (1.434s)
1 Billion nested loop iterations
https://benjdd.com/loops2/

The above is a micro benchmark, might not give an
indicative whether Bun will choke or not. Lets see.

Bye

Mild Shock schrieb:
> Hi,
> 
> what is wrong with rust and linux????
> https://www.youtube.com/watch?v=T2OKdv4SPdQ
> 
> Pure souls are getting purrified to become even purer.
> 
> Bye
> 
> P.S.: Zig moves to fast for the kernel?
> https://ziglang.org/learn/overview/
> 
> How about a new Prolog system written in Zip?
> 
> Mild Shock schrieb:
>> Maybe Scryer Prolog is a failure, because Rust
>> is a failure. Building Scryer Prolog on my machine,
>> after a git pull of a small change, did just
>>
>> take this much time:
>>
>> $ time cargo build --release
>> [...]
>> real    6m52.663s
>> user    7m39.043s
>> sys     0m3.241s
>>
>> What did Rust do? And this tabling test case,
>> 2000 shuttle, hangs:
>>
>> /* Scryer Prolog 0.9.4-107 */
>> ?- use_module(library(tabling)).
>>     true.
>> ?- [user].
>> :- table c/1.
>> c(X) :- c(Y), 0 =< Y, Y < 20000, X is -Y-1.
>> c(X) :- c(Y), -20000 < Y, Y =< 0, X is -Y+1.
>> c(0).
>>
>> ?- time(c(_)).
>> %%% hangs ? %%%
>>
>> It is solved in a blink in SWI-Prolog:
>>
>> /* SWI-Prolog 9.3.8 */
>> ?- time(c(_)).
>> % 540,077 inferences, 0.047 CPU in 0.051 seconds (92% CPU, 11521643 Lips)
>> true .
>>
>> The test case is from here:
>>
>> https://github.com/JanWielemaker/tabling_benchmarks/tree/master
>