« first day (3607 days earlier)      last day (173 days later) » 

4:11 AM
posted on September 15, 2020 by @hostilefork Brian Dickens

@hostilefork wrote: I've been tinkering around with Rust this past week. It's an interesting language that tries to blend together best practices of C++ as things that are compiler-enforced...and inherits some Haskell for good measure. It's gotten me back to thinking about how basic choices make a big difference. And I feel like const parameters may m

 
 
11 hours later…
2:44 PM
Does Rebol know timestamps?
 
@iArnold Not built in, though perhaps it's the sort of thing that should be. rebol.net/cookbook/recipes/0051.html
 
Yes I think it should be standard. Does 'now turn the timestamp into the current time first.
 
3:12 PM
Answer is yes, it uses macro OS_Get_Time that in turn uses C function gettimeofday
https://linuxhint.com/gettimeofday_c_language/
 
 
3 hours later…
6:23 PM
Question on usermode threads / green threads. Would setting timers/delays be something I can do with green threads? E.g., start a script with a timer for X seconds on one thread, continue other processing on main thread, and interrupt to output a message when the timer expires?
 
7:06 PM
@Edoc As long as you don't make any "blocking" calls to the OS, it is technically possible for green threads to be scheduled cooperatively so that even an infinite loop on one "green thread" could be interrupted to service something (like a timer).
Previously, reading a line of input from the terminal on Windows (for instance) was an example of a fully "blocking" call. Now it is more granular so that characters are taken one at a time and the input can be "peeked". So one thing I would like to see would be something like the console prompt showing a time that updates as you wait.
These things are easier said than done; but there's at least some hope of putting together a coherent story that can do it now...without having to make the language actually thread safe.
Enough APIs have variants that are non-blocking (like network connections) that some interesting things should be possible.
Right now, though, we don't have a good "event loop". The REBEVT event stuff that's there is more comprehensible than its been in the past, but that isn't necessarily saying much.
 
7:25 PM
@HostileForksaysdonttrustSE Right, thanks. Yes, I was thinking in terms of being able to push messages/feedback to the console prompt based on a timer while other (non blocking) stuff is processing.
 

« first day (3607 days earlier)      last day (173 days later) »