More from dthompson
I'm happy to announce that guile-bstructs 0.2.0 has been released! About guile-bstructs Guile-bstructs is a library that provides structured read/write access to binary data for Guile. A bstruct (short for “binary structure”) is a data type that encapsulates a bytevector and a byte offset which interprets that bytevector based on a specified layout. See the guile-bstructs project page for more information. Notable changes Added support for anonymous structs and unions. Contrived example: (define-bstruct <location> (struct (id int) (union (struct (x double) (y double) (z double)) (coords (array 3 double))))) Made bstruct-wrap offset optional. Added bstruct-by-value syntax. Added void primitive type. Added support for array elements to bstruct-ref, bstruct-set, etc. Bug fixes Fixed guard clause for bstruct-by-value. Added missing symbolic-match? check in define-bstruct-primitive. Internal type descriptor ids are now stable to allow for clean redefinition at the REPL. Download Starting with this release, I am no longer uploading release tarballs. This is due to Guix moving away from them and for good reason after events like the xz-utils backdoor. Build from the v0.2.0 tag in Git, instead.
I'm happy to announce that guile-websocket 0.3.0 has been released! Guile-websocket is an implementation of the WebSocket protocol, both the client and server sides, for Guile Scheme. Highlights for this release are: New (web socket) module that provides a standard Scheme port interface for WebSockets. WebSocket is a framed protocol, not a simple bytestream, but the new wrappers websocket and wrap-websocket provide the useful illusion of a raw bytestream. The #:max-attempts argument to read-data-frame can now be #f, meaning that the read operation should never give up in the case of a read timeout. This is useful for keeping server-side client connections alive as long as the client hasn't hung up, even if ping frames haven't been sent in awhile. New websocket-upgrade-request?, websocket-upgrade-response?, and make-websocket-upgrade-response procedures in (web socket server). These new procedures allow for integration of WebSockets into custom Guile HTTP servers rather than having to use the overly simplistic built-in one that only handles WebSocket requests. The #:configure-socket argument to open-websocket-for-uri has been deprecated. In practice, user code just needs to set some socket flags, particularly SOCK_NONBLOCK for asynchronous I/O. Use the new #:flags argument instead. source tarball: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.3.0.tar.gz signature: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.3.0.tar.gz.asc See the guile-websocket project page for more information. Bug reports, bug fixes, feature requests, and patches are welcomed.
I'm happy to announce that guile-websocket 0.2.1 has been released! Guile-websocket is an implementation of the WebSocket protocol, both the client and server sides, for Guile Scheme. This small patch release contains the following changes: Greatly improved validation of initial handshake request on server. In previous releases, when bots discovered a server and sent random HTTP requests they’d cause needless exceptions to be thrown and clog up server logs. The accept-client hook can now return #t when a new client has not connected but the server loop should continue anyway. source tarball: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.2.1.tar.gz signature: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.2.1.tar.gz.asc See the guile-websocket project page for more information. Bug reports, bug fixes, feature requests, and patches are welcomed.
I'm pleased to announce that the very first release of guile-bstructs, version 0.1.0, has been released! This is a library I've been working on for quite some time and after more than one rewrite and many smaller refactors I think it's finally ready to release publicly. Let's hope I'm not wrong about that! About guile-bstructs Guile-bstructs is a library that provides structured read/write access to binary data for Guile. A bstruct (short for “binary structure”) is a data type that encapsulates a bytevector and a byte offset which interprets that bytevector based on a specified layout. Some use cases for bstructs are: manipulating C structs when using the foreign function interface packing GPU vertex buffers when using graphics APIs such as OpenGL implementing data types that benefit from Guile's unboxed math optimizations such as vectors and matrices This library was initially inspired by guile-opengl's define-packed-struct syntax but is heavily based on "Ftypes: Structured foreign types" by Andy Keep and R. Kent Dybvig. The resulting interface is quite similar but the implementation is completely original. This library provides a syntax-heavy interface; nearly all of the public API is syntax. This is done to ensure that bstruct types are static and well-known at compile time resulting in efficient bytecode and minimal runtime overhead. A subset of the interface deals in raw bytevector access for accessing structured data in bytevectors directly without going through an intermediary bstruct wrapper. This low-level interface is useful for certain batch processing situations where the overhead of creating wrapper bstructs would hinder throughput. Example Here are some example type definitions to give you an idea of what it’s like to use guile-bstructs: ;; Struct (define-bstruct <vec2> (padded (struct (x float) (y float)))) ;; Type group with a union (define-bstruct (<mouse-move-event> (struct (type uint8) (x int32) (y int32))) (<mouse-button-event> (struct (type uint8) (button uint8) (state uint8) (x int32) (y int32))) (<event> (union (type uint8) (mouse-move <mouse-move-event>) (mouse-button <mouse-button-event>)))) ;; Array (define-bstruct <matrix4> (array 16 float)) ;; Bit fields (define-bstruct <date> (bits (year 32 s) (month 4 u) (day 5 u))) ;; Pointer (define-bstruct (<item> (struct (type int))) (<chest> (struct (opened? uint8) (item (* <item>))))) ;; Packed struct modifier (define-bstruct <enemy> (packed (struct (type uint8) (health uint32)))) ;; Endianness modifier (define-bstruct <big-float> (endian big float)) ;; Recursive type (define-bstruct <node> (struct (item int) (next (* <node>)))) ;; Mutually recursive type group (define-bstruct (<forest> (struct (children (* <tree>)))) (<tree> (struct (value int) (forest (* <forest>)) (next (* <tree>))))) ;; Opaque type (define-bstruct SDL_GPUTexture) Download Source tarball: guile-bstructs-0.1.0.tar.gz GPG signature: guile-bstructs-0.1.0.tar.gz.asc This release was signed with this GPG key. See the guile-bstructs project page for more information.
More in programming
Yesterday, I received this email as a response to You Can't Vibe Code Love. It's such a remarkable and powerful statement that I asked permission to share it here, in its entirety, with personal information redacted: Hey Jeff, Hope you and your family are doing well.
A frustrated Reddit post about being a condom between an AI and production made the rounds in our team. Here is why I think the opposite is true and what it means for how we review code, plan work and think.
And here we are three years after I wrote about the Google Pixel Fold being announced, followed now with the announcement of the iPhone Duo...(I have questions about the naming by the way). Four years ago I was talking about web primitives in the platform for the Surface Duo. My how time flies. There are CSS media features, a Viewport Segments API, a Device Posture API but Chromium based browsers are the only ones currently supporting these things. I haven't been able to find any signal yet on whether Safari will support these things in the web platform as the developer docs focus on application development. If you're interested in trying out the platform features, you can emulate the Surface Duo and Galaxy Z Fold in the developer tools. And if you're thinking, do I really have to have my website adapt to two screens? The answer is no. Adding a design to an application or dual screen makes sense if you have an experience that has two simulataneous contexts that are useful e.g. a list of email messages/inbox on one screen, an open message, email thread or email composer on the other. Here's one of my talks from 2022 if you're interested in learning more about what's available in the browser for dual screen/foldable devices. Happy building :)
After a write-up in the New York Times, Mommy Bloggers had two options. Either lean in, or step back. Given how popular it became after that, it's not hard to guess which option they chose. The post Mommy bloggers react appeared first on The History of the Web.