2024/09/21

Newest at the top

2024-09-21 21:50:03 +0200 <tomsmeding> tuxpaint: https://paste.tomsmeding.com/2YnbokDI
2024-09-21 21:49:59 +0200 <EvanR> it
2024-09-21 21:49:56 +0200 <EvanR> probably because I have to tricked out with fancy font
2024-09-21 21:49:21 +0200 <EvanR> in xterm there is noticable delay in haskell and C :(
2024-09-21 21:48:45 +0200 <tuxpaint> terminal=st
2024-09-21 21:48:43 +0200 <EvanR> the best term
2024-09-21 21:48:35 +0200 <tuxpaint> i notice a difference in my zsh between ./pure and ./pureinc
2024-09-21 21:48:34 +0200 <EvanR> I'll try xterm
2024-09-21 21:48:20 +0200 <tomsmeding> I notice it less in fish, apparently fish prompt drawing takes time too :')
2024-09-21 21:47:57 +0200 <tomsmeding> in bash, I do notice a difference between 'echo hi' and './pure'
2024-09-21 21:47:24 +0200 <EvanR> imperceptibly different from the equivalent C program
2024-09-21 21:47:11 +0200 <tomsmeding> that is true
2024-09-21 21:47:07 +0200 <dolio> Sufficiently instantly for like 99.999% of use cases.
2024-09-21 21:46:45 +0200 <tomsmeding> how instant is "instantly" :P
2024-09-21 21:46:33 +0200 <EvanR> without the time command
2024-09-21 21:46:20 +0200 <EvanR> it says real = 0.012s or 0.013s but when you press enter on ./pure, I am back to the prompt instantly
2024-09-21 21:45:27 +0200 <tuxpaint> hmm. so it's waiting to exit or something? i noticed it was "slow" initially because of the time it spent to return me back to interactive
2024-09-21 21:45:11 +0200synchromesh(~john@2406:5a00:241a:5600:5db8:4c32:8611:a0fa)
2024-09-21 21:44:58 +0200 <tomsmeding> how long does that take?
2024-09-21 21:44:54 +0200 <tomsmeding> repeat that last command ~10 times
2024-09-21 21:44:47 +0200 <tomsmeding> EvanR: `echo 'main = pure ()' >pure.hs; ghc pure.hs -o pure; time ./pure`
2024-09-21 21:44:28 +0200 <tomsmeding> and the first thing after the wait is a futex wait
2024-09-21 21:44:24 +0200 <EvanR> I have no noticed any startup time in haskell
2024-09-21 21:43:52 +0200synchromesh(~john@2406:5a00:241a:5600:5db8:4c32:8611:a0fa) (Read error: Connection reset by peer)
2024-09-21 21:43:35 +0200 <tomsmeding> with `main = putStrLn "hi"`, and looking at strace output with nanosecond timestamps attached, a whole bunch of stuff happens, then the write, then 8ms of nothing, then a few more syscalls and exit
2024-09-21 21:42:46 +0200 <tomsmeding> it seems the time is spent in shutdown, not in startup
2024-09-21 21:42:01 +0200 <tuxpaint> huh, but if i set both above 20ms, it then caps at 22ms runtime again
2024-09-21 21:41:25 +0200 <tuxpaint> so it seems it waits for either the first tick of the reschedule timer, or the clock timer or something?
2024-09-21 21:41:05 +0200 <tuxpaint> yeah. if i set V=100ms, and i=5ms, i get 7ms
2024-09-21 21:40:12 +0200 <tomsmeding> oops
2024-09-21 21:40:09 +0200 <tomsmeding> s
2024-09-21 21:39:07 +0200 <tuxpaint> i'm looking around for 20ms in the code. maybe it has something to do with the rescheduling timer?
2024-09-21 21:39:00 +0200 <tomsmeding> case in point: I also got 12ms for the `main = pure ()` with default settings on my machine, but starting a full blown web server and immediately exiting with `exitSuccess` if there are no command line arguments (to ensure that nothing can be optimised away) takes 15ms
2024-09-21 21:36:49 +0200 <tuxpaint> haskell is fun; it was my first language when learning to code many years ago. the IO monad was very nice to work with - didn't have a chance to do IO when i first touched haskell.
2024-09-21 21:36:27 +0200 <tuxpaint> of course there's a balance between the user experience in how easy it is for me to write the cli (more features), and how fast it executes
2024-09-21 21:36:20 +0200 <tomsmeding> same would hold for nodejs
2024-09-21 21:36:06 +0200 <tuxpaint> i am, which is why it was very confusing that haskell was starting up in the same amount of time
2024-09-21 21:35:51 +0200 <tomsmeding> tuxpaint: one thing that you may or may not be taking into account with perl and python is that they are interpreted, hence if you import a bunch of libraries, your startup time is going to suffer significantly
2024-09-21 21:35:49 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-09-21 21:33:36 +0200 <tomsmeding> strict functional language, funny syntax sometimes (especially data type declarations), somewhat fewer fancy type system features than haskell, first-class mutability
2024-09-21 21:32:35 +0200 <tuxpaint> ocaml sounds fun, i may give it a try
2024-09-21 21:32:11 +0200 <tuxpaint> yeah, so far i have perl, python, c, go, nim, rust, haskell, c# done
2024-09-21 21:31:40 +0200 <tomsmeding> rust is a good candidate if you like haskell, otherwise (but I don't know anything about startup time here, so YMMV) ocaml
2024-09-21 21:31:27 +0200 <tuxpaint> so i've been going through seeing how the basic experience of reading flags and files is, along with writing to stdout.
2024-09-21 21:31:03 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 21:30:41 +0200 <tuxpaint> 12ms startup time in a cli is perceivable to a user. i'm exploring languages to write clis in.
2024-09-21 21:30:01 +0200 <tuxpaint> interestingly, if i set it to a 8ms clock, runtime is 10ms. if i set it to 15ms clock, runtime is 17ms, up to 20ms, where anything there and above gives me ~22ms
2024-09-21 21:29:50 +0200 <tomsmeding> tuxpaint: is this startup-time benchmark just curiosity, or do you have a real usecase for 1. wanting to use a high-level language like haskell, and 2. needing fast startup time?
2024-09-21 21:28:43 +0200connrs(~connrs@user/connrs)
2024-09-21 21:28:11 +0200 <tomsmeding> ooh