-
Notifications
You must be signed in to change notification settings - Fork 23
Rewrote some erlang glue code and made use of some header files and records #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…erl based on the file.hrl from the erlang standard library
…able and idiomatic (I think?) using the file.hrl and simplifile_file_info.hrl records.
…taking advantage of the new record I wrote to make code more concise and idiomatic (I think?)
|
Hi! This is my first Github contribution ever and my work in Gleam and Erlang ever! I was reading the source code for simplifile to learn some Gleam and specifically about how the FFI to Erlang works which lead me to reading the Erlang file documentation and realizing there are some slightly nicer coding patterns (I think?) that could be used on the Erlang side by writing header files. |
|
Howdy! Thanks for making this PR! I'm not exactly a pro erlanger either, so take my feedback with a grain of salt :) I'm not overly fond of the I'm also not a big fan of the introduction of the I very much like the refactoring of This is really good stuff for a first time with Gleam and Erlang 😎 I'm not sure simplifile is the best library to contribute to for the purpose of learning gleam, as it is heavily ffi based. That said the contribution is still very much welcome :) |
Thank you very much for the feedback! I'm interested in the whole BEAM ecosystem in general really. Also I did specifically want to understand how to write FFI in Gleam. Gleam just seems like the cleanest and simplest to actually write things in. I've never done FP before so I'm still trying to wrap my head around everything involved. I found myself using the library a lot for my small practice projects so I wanted to understand it a bit better! I will update my PR with your suggestions. |
…nctions taking advantage of the new record I wrote to make code more concise and idiomatic (I think?)" This reverts commit 767245a.
|
I just amended my PR with the changes you suggested. |
Added a header file to represent simplifile's file_info type and rewrote the file type checking functions to take advantage of it.