Trending in Erlang News
A new Erlang announcement has been posted:
Original announcement:
https://erlangforums.com/t/patch-package-otp-29-0-6-released/5911
New
A new Erlang announcement has been posted:
Original announcement:
New
A new Erlang announcement has been posted:
Original announcement:
https://erlangforums.com/t/patch-package-otp-27-3-4-17-released/5913
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
benwilson512
NICE. Anyone know if this would apply to
:etstables as well?OvermindDL1
Aww, I was just coming here to post this. ^.^
Here is the Release doc on Github at least: Release OTP 20.0 · erlang/otp · GitHub
I was keeping a watch on this feature so I am pretty sure the answer is “Yes”, but it works on literals. A literal is not something like
42in this context, rather a literal is something like:The
%{a: 42, b: %{zwoop: 3}}part is the literal if my understanding is right, it is ‘baked into the compiled source’, thus it ‘always’ exists, meaning garbage collection does not need to be run on it and it can be passed in messages via a pointer (internally) instead of copying. Thus this should apply to ETS as well (as long as the information was passed in from the running system and not loaded from a file or so)This is a huge performance feature for certain styles, I’ve been wanting it for a long time.
benwilson512
Yeah it’s a pretty big boon to Absinthe as well because our schema types involve a lot of literals, and removing the copy penalty for those opens up a lot of interesting techniques for us that would have performed poorly before.
NobbZ
Hmmm…
Okay,
listwill be copied, thats out of question, but what happens to the appended tail?OvermindDL1
Some notes I want to focus on:
erlang:garbage_collect/2 for control of minor or major GC: Whoo hoo! This will make Benchee and the like much more accurate for testing memory usage.In the OTP 20 release candidates the function erlang:term_to_binary/1 changed the encoding of all atoms from ATOM_EXT to ATOM_UTF8_EXT and SMALL_ATOM_UTF8_EXT. This is now changed so that only atoms actually containing unicode characters are encoded with the UTF8 tags while other atoms are encoded ATOM_EXT just as before.: Time to update our ETF libraries!!! Note this anyone that uses one!!!Dirty schedulers enabled and supported on VM with SMP support.: Whoo we can assume Dirty Schedulers exist in the system now!erlang:system_info/1 atom_count and atom_limit: This is quite useful for detecting runaway atom growth ‘before’ it becomes a problem.Pattern matching for maps is optimized: Maps are even faster for matching now!Atoms may now contain arbitrary unicode characters.: No I don’t think Elixir will allow smiley-emoji function names.Significantly updated string module with unicode support and many new functions: I wonder how much of this can be offloaded from Elixir back to Erlang now…A new event manager to handle a subset of OS signals in Erlang: This is utterly awesome and I’ve wanted it for so long!erl_tar support for long path names and new file formats: Whoo-hoo Release improvements!New math:fmod/2: Whooo finally! I was just needing this a few days ago!Well
++will get called every time thatfoois called, meaning that list will be copied, meaning that is not a ‘literal’ send, so normal copying as it already does now. However ‘this’ could be optimized iflistwere a literal as it is sent verbatim (consequently the literal[1,2,3]will also not be copied in this case):It depends on what you send, not how you transform it.
‘However’, the ‘contents’ of the list in your
++might not be copied.NobbZ
It has to get copied, because the last cons-cell gets changed, and wie have
copy-on-writein the BEAM.OvermindDL1
The pointers to the content would get copied, but not necessarily the contents. If the
listwas populated by calling, say, this:Then those two tuples would not be copied but rather pointed to directly. It would have to recreate the list itself, but not necessarily the ‘contents’ of the list.
michalmuskala
Here’s the spec for Unicode support in syntax in Elixir 1.5 https://hexdocs.pm/elixir/master/unicode-syntax.html
This means it’s possible to use emojis in quoted atoms/function names, but unquoted emoji functions are not supported. But all Unicode letters should be supported - this has probably the biggest impact on test names since they can now contain arbitrary Unicode.
The tail of the list doesn’t need to be copied on
++, this means it will remain a literal and shouldn’t be copied under the new optimisation.josevalim
We don’t plan to offload much because our implementation is faster since it works exclusively on binaries. On average, 3x faster. The exception is
String.normalize/2that is faster in Erlang. We could likely make ours faster but since their version is fairly encapsulated in the:unicodemodule, it makes sense to depend on their implementation.For integration between Elixir and OTP 20, there is this issue: Support Erlang 20 new features · Issue #5851 · elixir-lang/elixir · GitHub
gregvaughn
José, I suspect you don’t hear it enough, but I am very thankful and grateful to you for keeping up with all of these sorts of details and directing the Elixir language in a wise way. Thank you.