2025/02/26

Newest at the top

2025-02-26 19:53:47 +0100lxsameer(~lxsameer@Serene/lxsameer) lxsameer
2025-02-26 19:53:22 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-26 19:50:58 +0100tv(~tv@user/tv) tv
2025-02-26 19:49:17 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-26 19:42:50 +0100fun-safe-math(~fun-safe-@2601:1c2:1b7f:801f:26d6:a094:aa3b:66cd) fun-safe-math
2025-02-26 19:42:45 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-26 19:42:23 +0100zungi(~tory@user/andrewchawk) (Remote host closed the connection)
2025-02-26 19:41:35 +0100fun-safe-math(~fun-safe-@2601:1c2:1b7f:801f:6422:3799:4fbd:4a99) (Quit: No Ping reply in 180 seconds.)
2025-02-26 19:40:58 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-02-26 19:39:24 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2025-02-26 19:37:28 +0100Everything(~Everythin@46-133-48-141.mobile.vf-ua.net) Everything
2025-02-26 19:35:30 +0100Everything(~Everythin@46-133-48-141.mobile.vf-ua.net) (Quit: leaving)
2025-02-26 19:29:01 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2025-02-26 19:28:47 +0100acidjnk_new(~acidjnk@p200300d6e7283f80fcc6edffa39079b3.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2025-02-26 19:26:47 +0100 <dolio> I guess it's possible you could accomplish that while doing some reordering, but it'd be pretty complicated to pull off.
2025-02-26 19:26:22 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2025-02-26 19:25:44 +0100 <mauke> yes, the "common prefix" hack
2025-02-26 19:25:33 +0100 <dolio> They need to be in order because you're allowed to do a rudimentary sort of subtyping on structs, I think.
2025-02-26 19:24:51 +0100 <mauke> (public:, private:, protected:)
2025-02-26 19:24:43 +0100 <c_wraith> ah. Silly language. Make no guarantees about their relative offsets, but require them to be in order.
2025-02-26 19:24:37 +0100 <mauke> C++ compilers are allowed to re-order segments separated by visibility markers, but that's it
2025-02-26 19:24:37 +0100califax(~califax@user/califx) califx
2025-02-26 19:23:54 +0100 <mauke> nope
2025-02-26 19:23:46 +0100 <c_wraith> I thought compilers were allowed to re-order members
2025-02-26 19:22:32 +0100tv(~tv@user/tv) (Read error: Connection reset by peer)
2025-02-26 19:22:32 +0100 <mauke> the idea is to declare a struct with a char as its first member (which throws off the alignment of the second member) and then check how much padding the C compiler inserted before the second member
2025-02-26 19:20:51 +0100 <hseg> yeah, the #alignment macro, looking at the hsc2hs docs
2025-02-26 19:20:17 +0100 <mauke> nowadays it's built into hsc2hs, I believe
2025-02-26 19:20:08 +0100 <mauke> computes the required alignment of a given type (by asking the C compiler)
2025-02-26 19:19:32 +0100 <hseg> what does that alignment macro do?
2025-02-26 19:19:15 +0100 <hseg> I see the package is used by darcs and idris, loos like a safe dependency
2025-02-26 19:19:05 +0100 <mauke> oh hey, that's my alignment macro! I invented that
2025-02-26 19:18:40 +0100 <mauke> yeah, needs capi if you don't want to write a C wrapper
2025-02-26 19:17:59 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2025-02-26 19:17:18 +0100 <hseg> AFAICT, it looks sensible
2025-02-26 19:16:51 +0100 <hseg> https://github.com/biegunka/terminal-size/blob/master/src/System/Console/Terminal/Posix.hsc
2025-02-26 19:16:45 +0100 <hseg> right -- the code I'm considering including FFIs to it and only exposes it already partially applied in its second parameter
2025-02-26 19:16:24 +0100califax(~califax@user/califx) (Ping timeout: 264 seconds)
2025-02-26 19:15:38 +0100 <geekosaur> I was commenting on the recommendation to use `ioctl`; if you do that, you should FFI to it directly because a generalized ioctl binding is pretty much impossible (the third type depends on the value of the second parameter)
2025-02-26 19:15:08 +0100 <mauke> terminfo size entries are kinda useless unless you're dealing with an actual terminal, which no one does
2025-02-26 19:14:41 +0100 <geekosaur> yes, I started from the ticket
2025-02-26 19:14:15 +0100 <hseg> geekosaur: Right -- if you look at the ticket I'm working on, this is a fallback for if the terminfo entry is absent
2025-02-26 19:13:43 +0100 <EvanR> a right arrow that forks, one way goes to the target type, the other way doesn't
2025-02-26 19:13:30 +0100 <tomsmeding> (for best effect, view on a dark terminal)
2025-02-26 19:13:23 +0100 <dolio>
2025-02-26 19:12:50 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-02-26 19:12:42 +0100 <tomsmeding> Y 15-14> X
2025-02-26 19:12:41 +0100 <EvanR>
2025-02-26 19:12:22 +0100Everything(~Everythin@46-133-48-141.mobile.vf-ua.net) Everything
2025-02-26 19:12:08 +0100 <dolio> Often it's an arrow with only the top point.