Path: ...!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.prolog Subject: How Scryer Prolog became the disgrace of Computer Science (Was: Is Scryer Prologs failure measurable?) Date: Tue, 13 Aug 2024 15:48:16 +0200 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 13 Aug 2024 13:48:16 -0000 (UTC) Injection-Info: solani.org; logging-data="1252129"; 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.18.2 Cancel-Lock: sha1:Lf+ZwcHiDSYPzsG6XwoVp5pdNAc= In-Reply-To: X-User-ID: eJwVzAkRADEIBDBLpbBA5fD6l3BzERCwkpaJQgWLJQ4Dxa49S9693E45EynZWafc95mjRy5pRgEafSa8/kE+dhgWVg== Bytes: 1851 Lines: 23 I can make a case of such a comparison, DCG pipe dream versus proper look-ahead: /* Scryer Prolog 0.9.4-135 */ ?- time((between(1,1000,_), data(X), json_chars(Y,X,[]), fail; true)). % CPU time: 0.283s, 2_506_022 inferences true. /* SWI-Prolog 9.3.8 */ ?- time((between(1,1000,_), data(X), atom_json_term(X,Y,[]), fail; true)). % 44,998 inferences, 0.016 CPU in 0.006 seconds (281% CPU, 2879872 Lips) true. I think the speed difference of a factor 20x is not because of native float parsing. The example doesn’t have much float: data("{ \"a\":123 }"). So whats the bug in the DCG parser by Scryer Prolog? Why does the parser written by Jan W. not have the same defect? Why does the number of inferences differ so much?