When using Erlang's record, I learned that I should use Record.extract, but it will be quite long.
iex(1)>require Record
nil
iex(2)>r=Record.extract(:sctp_initmsg, from_lib: "kernel/include/inet_sctp.hrl")
[num_ostreams::undefined, max_instreams::undefined, max_attempts::undefined,
max_init_timeo: : undefined ]
Is there any other way besides writing this every time? I hope there is something like include that you can write once.
erlang elixir
Selfless, but while I was looking for something else, I happened to find the correct (?) use case.
(Source: https://stackoverflow.com/questions/17345939/elixir-and-erlang-records-pattern-matching)
defrecord:xmlText, Record.extract(:xmlText, from_lib:"xmerl/include/xmerl.hrl")
Instead of using Record.extract/2 every time you want to use a record, you feed it to the defrecord.
608 GDB gets version error when attempting to debug with the Presense SDK (IDE)
581 PHP ssh2_scp_send fails to send files as intended
910 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
570 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.