Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.prolog > #14566
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.prolog |
| Subject | <parallel> Ant Task doesn't need threads (Was: Time Sharing: Martin Richards, Ken Thompson and Linus Torvalds) |
| Date | 2025-06-19 14:54 +0200 |
| Message-ID | <103119s$10k4j$1@solani.org> (permalink) |
| References | (2 earlier) <102rtdc$ubej$1@solani.org> <1030ubj$10imb$1@solani.org> <1030ups$10ir8$1@solani.org> <1030vm8$10j9c$1@solani.org> <10310cj$10jlf$1@solani.org> |
Hi,
I find fewer and fewer use cases for threads.
Here some fun with <parallel> Ant Task:
<target name="dogelog_transpile">
<parallel>
<ant dir="../player/cross"
antfile="run.xml"/>
<ant dir="../playerpy/cross"
antfile="run.xml"/>
<ant dir="../playerj/cross"
antfile="run.xml"/>
</parallel>
</target>
Transpiling Dogelog Player in parallel. Except
for a totally broken Ant log file, works
smooth and shows a solid speed up. Although everything
is heavily forked and possibly processes. I assume
Ant offers tries to use threads, back from the time
Java people were proud of their threads,
but it nowadays with high speed solid state disks
and large memory capacity, it doesn't make a dent anymore.
LoL
Bye
P.S.: No GitHub Actions nonsense allowed here. Although
matrix build looks interesting. Its possibly to uniform
paralleliz. Unfortunately I have cases where I mix <parallel>
with <sequential> in ant task. And for the lazy ones there
is <macrodef> . What I didn't try yet is a better logger,
it seems Gradel would provide that? One could have a DOM
as Log datastructure, before the log gets committed.
Simulating the mailboxes of SWI-Prolog message system.
But the idea of "mailboxes" already indicate messages would
leave process borders. Thank god I have delegated everything
to Ant, don't need to make my hands dirty here.
Mild Shock schrieb:
> Hi,
>
> Threads are just a variant of processes that
> share a heap, which can be the bottleneck. Processes
> are good for time sharing systems. Some history:
>
> How it started, support small CPUs:
>
> TRIPOS (TRIvial Portable Operating System)
> https://en.wikipedia.org/wiki/TRIPOS
>
> How it is going, more small CPUs excitement:
>
> The Origins of Linux—Linus Torvalds
> https://www.youtube.com/watch?v=WVTWCPoUt8w
>
> But what about GUI programming, or even web
> servers database access? Threads have massively
> fallen back with other models mainly through
>
> JavaScript, in the GUI via the browser and
> on the server via node.js. So don't be fooled
> by multi-threading Prolog systems,
>
> could be a complete nonsense...
>
> Mild Shock schrieb:
>>
>> I wasted a half dozen months with simulated
>> “threads” by using CheerpJ. This was a very
>> interesting experience, I could run formerly
>> Jekejeke Prolog written in Java inside JavaScript.
>>
>> Main problem a simulation of “threads” cannot
>> use certain GUI programming patterns from
>> JavaScript. Because then you have still pre-emptive
>> yield, like if you do it with auto-yield.
>>
>> But in JavaScript you have critical regions
>> for free, just between two awaits, there will
>> be no yield. Such properties might impact how
>> you model your “concurrent” logic.
>>
>> This puts some weight on having a shield/1
>> primitive. The CheerpJ threads were not that
>> bad, I added auto yield, but shield/1 is a
>> later invention from Dogelog Player.
>>
>> Mild Shock schrieb:
>>> Hi,
>>>
>>> When did the quantum leap happen in Dogelog Player?
>>> Well very early on: The first binary release was here:
>>>
>>> ANN: Dogelog Player 0.9.7
>>> The new version 0.9.7 of the Dogelog
>>> player now masters DCG.
>>> Admin User, created 09/06/2025
>>>
>>> And '$YIELD'/1 stuff came 9 months (sic!) later:
>>>
>>> ANN: Dogelog Player 0.9.8
>>> The Dogelog Player supports a new interpreter
>>> that can relinquish control.
>>> Admin User, created 21/03/2022
>>>
>>> See for your self:
>>>
>>> https://www.xlog.ch/izytab/doclet/home/12_news/package.html
>>>
>>> 9 months, like Homo sapiens gestation period. (*)
>>>
>>> LoL
>>>
>>> Bye
>>>
>>> (*) To be frank, it was the perfect pass time during
>>> the COVID-19 pandemic.
>>>
>>> Mild Shock schrieb:
>>>> Hi,
>>>>
>>>> Somebody wrote:
>>>>
>>>> > Right, but what I’m saying is that with the
>>>> > current implementation as a separate process,
>>>> > running independently of the editor and only
>>>> > communicating over the channel defined by the
>>>> > protocol, the ability to have fine-grained
>>>> > asynchronous communication is limited.
>>>>
>>>> Not my problem not seeking the state of the art. You
>>>> need of course a Prolog system that is all flesh
>>>> and blood cooperative multitasking. If you want
>>>>
>>>> to do a GUI in Prolog similar like JavaScript
>>>> does it now, or a native GUI adapter. And I don't
>>>> count Tau-Prolog, although they showed amazing
>>>>
>>>> stuff. But not amazing enough, still based
>>>> on continuations, and not based on promises. Or then
>>>> async/await. I am not sure what SWI WASM now delivers?
>>>>
>>>> SWI Tinker shows me errors talking about threads when
>>>> I use the query background execution feature and if I
>>>> abort. But people from cooperative multitasking tend
>>>>
>>>> to not use the terminology "thread", they prefer to
>>>> talk about "tasks". Ciao Playground doesn't count either,
>>>> since their channels to a background worker can even
>>>>
>>>> not process an interrupt correctly.
>>>>
>>>> Bye
>>>>
>>>> Mild Shock schrieb:
>>>>> Hi,
>>>>>
>>>>> The fukkers stole my name:
>>>>>
>>>>> Jan - Local AI Assistant
>>>>> https://github.com/menloresearch/jan
>>>>>
>>>>> Bye
>>>>>
>>>>> P.S.: Meanwhile I am struggling with Quantum Paper
>>>>> whille doing a dark/light CSS. Look my light olive turned dark
>>>>> olive, that is somewhere near chocolate or is it dog shit?
>>>>>
>>>>> P.P.S.: Just figured out yesterday that some browser defaults
>>>>> are more Motif/OSF than Material/Google, aka Quantum Paper.
>>>
>>
>
Back to comp.lang.prolog | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java and OpenJFX or JavaScript and WHATWG? Mild Shock <janburse@fastmail.fm> - 2025-06-17 10:47 +0200
Why do IDEs have Power Save mode? (Was: Java and OpenJFX or JavaScript and WHATWG?) Mild Shock <janburse@fastmail.fm> - 2025-06-17 10:49 +0200
Dog Shit: Call my name "jan.ai" (Was: Why do IDEs have Power Save mode?) Mild Shock <janburse@fastmail.fm> - 2025-06-17 16:17 +0200
There is no flesh and blood async Prolog! (Was: Dog Shit: Call my name "jan.ai") Mild Shock <janburse@fastmail.fm> - 2025-06-19 14:04 +0200
When did the Dogelog Player Quantum Leap happen? (Was: There is no flesh and blood async Prolog!) Mild Shock <janburse@fastmail.fm> - 2025-06-19 14:11 +0200
Main problem with simulated “threads” (Was: When did the Dogelog Player Quantum Leap happen?) Mild Shock <janburse@fastmail.fm> - 2025-06-19 14:26 +0200
Time Sharing: Martin Richards, Ken Thompson and Linus Torvalds Mild Shock <janburse@fastmail.fm> - 2025-06-19 14:38 +0200
<parallel> Ant Task doesn't need threads (Was: Time Sharing: Martin Richards, Ken Thompson and Linus Torvalds) Mild Shock <janburse@fastmail.fm> - 2025-06-19 14:54 +0200
Corr.: wrong date, should read 2021 (Was: When did the Dogelog Player Quantum Leap happen?) Mild Shock <janburse@fastmail.fm> - 2025-06-19 17:47 +0200
csiph-web