Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!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 compile a DSL, does it need Types? (Re: Side Note, Why not DSLs? (Re: Chicken and egg, with curry?) Date: Fri, 3 Jan 2025 22:50:11 +0100 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 3 Jan 2025 21:50:11 -0000 (UTC) Injection-Info: solani.org; logging-data="2291609"; 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:QUBxVoiiyQuPqinqGEgsZ/SBgJ4= X-User-ID: eJwFwYEBACAEBMCVeLwaJ8n+I3QXRuVNZ9BjYm47O1jStrJlRA1DAYzjnlreyg2+A0vdWFZ6VQo56yDeBzJLFF4= In-Reply-To: Bytes: 3203 Lines: 69 Hi, Well you don't need always types. JavaScript has also no types. And there is a trend to have gradual types. Make them kind of optional and arive at TypeScript. If I am not mistaken, you can omit Types in TypeScript here and then, and simply get JavaScript. You can still prove things about, just assume that you have an "any" type. What other benefit do you think have types? For example the Floyd Warshall algorithm in DSL works without any declared types although it has a manifest type of matrice somehow. Also many Program transformations, such as the compilation of the DSL doesn't need types. Here you see the compilation of the DSL, I just turned the helper predicate into expansion rules: goal_expansion(let V = E, let2(E,V)) :- var(V), !. goal_expansion(let D[R,C] = E, (let2(E,V), arg(R, D, H), nb_setarg(C, H, V))). goal_expansion(let2(V, V), true) :- var(V), !. goal_expansion(let2(D[R,C], V), (arg(R, D, H), arg(C, H, V))) :- !. goal_expansion(let2(E+F, R), (let2(E, V), let2(F, W), R is V+W)) :- !. goal_expansion(let2(V, V), true). goal_expansion(if E > F, (let2(E, V), let2(F, W), V > W)). Sadly I don't have yet goal expansion in Dogelog Player. But SWI-Prolog has it. I might introduce it in the next release provided I find an ultra simple solution. Or an inline directive. Bye The SWI-Prolog thread was this: https://swi-prolog.discourse.group/t/floyd-warshall-algorithm-in-prolog/8685 Julio Di Egidio schrieb: > On 03/01/2025 22:12, Mild Shock wrote: >> Ok I see its repeating my posts to comp.lang.prolog, >> because the sci.logic post has a shitty header! >> >> Fuck Fuck Fuck Julio what are you doing Fuck Fuck Fuck > > I set the follow-up to comp.lang.prolog, the specifics of Prolog are not > relevant to the general discussion. > > Pity you don't know how Usenet works.  And that e.g. one can simply > delete locally the spurious messages, so it's no big deal really... > > -Julio >