Weekly meeting notes
A sizeable update has been posted to the Improving memory / memalloc thread.
Leo
- Published and updated
memallocrepo - Updated the Improving Memory thread with a deep dive explaining the new typeclass hierarchy
- Focused mostly on re-creating the most-used APIs from
memory- Successfully split
ByteArray/Accessup intoAddress,LayoutandAllocatorplus various allocation types- Allocation types are
Handle,Ref,Array, andPointer - Non-specific allocation type-classes include
CastableandRetainable
- Allocation types are
- Reached parity with
ByteArrayby implementingByteArray.allocRetusingAllocator.alloc withAddressneéByteArrayAccess.withByteArrayis part ofAllocatornow but might become an allocation access class- Combined with
Array, we have achieved our core goal of re-creating theByteArray/Accessclass API- We still need to implement the functions and instances that use them though
- Successfully split
- Created an example of using
ImplicitParamsto hide thealr :: Allocator alrargument to better recover the originalmemoryinterface- There are a few other methods of doing this
- eg if the monad supplies the allocator
- or if the resulting allocation or data structure keeps a reference to its allocator
- or if the allocator is a singleton so we can just infer it / use a Proxy
- There are a few other methods of doing this
- Implemented the Std allocator that uses GHC’s wrapping of the C malloc and free
- It isn’t finished yet but I used it to illustrate the problem that I’ll be dealing with next
- Basically
Allocationis of kind*butHandle,Reference,Pointer,Arrayare all of kind* -> * - But we need to allow both allocating eg a polymorphic
Ptr abut also something like a monomorphicByteStringthat is secretly aPtr Word8that is secretly anAddr# - But I think I have a solution via parametric allocators / allocations - this is my main goal this week
Joris
- Last week continued looking into using hs-bindgen
- Also was working w/ autoconf (legacy way of configuring packages w/ system dependencies) for build scripting - but now looking into cabal hooks instead for
- Main reason wanted to do this was because he noticed he was trying to write actual programs in autoconf instead of scripts - eg parsing c macros, significant logic, at that point just use cabal hooks and write a haskell program
- This makes the build scripts way more accessible to other devs
- also going to look at the memalloc stuff (thx!)
- main task is hs-bindgen
Jose
- Unable to attend
Outcome
This week:
- Leo
- Have a 1:1 with Jose
- Continue to work on
memallocin order to use it inbotan-lowfor managing allocation (and inbotanin the future) - Focus on parametric allocators / allocations
- Update the
memallocrepo again - Update the Improving Memory thread again
- Joris
- Continue working on hs-bindgen
- Look into cabal-hooks
- Read up on the new
memallocstuff
Until next time!