strmpnk
Joined 16 years ago
Joined 16 years ago
This shows a significantly different story between the two with at least similar code. Note I am not trying to optimize for the fastest factorial here as both can be made much quicker but roughly equivalent code seems to tell a different story for me.
(NOTE: I put the code in a module as iex interpreted expressions on the top level are always slower than compiled modules, even when pasting them into iex. Doing the same for Ruby didn't show any difference for me.)
It looks like their test includes plenty of ad heavy sites like news articles which seems to confirm that the results are cherry picked.
Before I came out I felt very awkward with regards to my own pronoun display. I wasn’t ready on one hand and on the other I felt terrible seeing other pronouns even if it was attached to my deadname only.
I’d encourage people to do it if they’re comfortable with it on a personal level as it can be a very personal thing. I also want to thank all of those who do add it. It’s a big deal for many of us and can make a real difference in exchange for very little effort.
It depends on what you'd like to accomplish, but given that powerful FPGAs are now more affordable and plenty of great FPGA friendly libraries are emerging which work with open source tools, the barrier for Soft-CPU implementations has lowered significantly. This sort of project looks great for cases where trusting blackbox chips was questionable.
I also spend time on Windows and nothing seems to come close to this convenient (win-. has a few useful things like the character picker panel in macOS but to get more, tools like autohotkey feel really cumbersome).
The article makes it look trivial but if you note the ASCII diagram starts by labeling each byte-row with 7 not 0. Without some way to switch bit numbering (kind of like bit endianness) of the entire expression, we can't make something that looks like continuous bits in one view look continuous in the other.
A reduced example:
7 6 5 4 3 2 1 0
------------------------+-------+
0 5 X 0 | Y |
------------------------+-------+
1 13 X 6
Here we can't say <<Y:2/little, X:14/little>> (Y is bits [0,1], X is bits [2,15]) because we need to read <<X1:6/little, Y:2/little, X2:8/little>> (X1 is bits [0,5], Y is bits [6,7], X2 is bits [8,15]).The interpretation of the contents of those bits will be done in "little endian order" (odd term since endianness is a byte order not bit numbering concern) as the expression says but because Erlang or similar syntax has no knowledge of the bit numbering we have in this diagram, it can't automatically assume that the first bit is numbered 7 not 0.
Laying the bytes out on a line makes the notational problem more obvious:
7 6 5 4 3 2 1 0 | 15 14 13 12 11 10 9 8
------------------------+-------+---------------------------------
5 X1 0 | Y | 13 X2 6
------------------------+-------+---------------------------------
Even if we know that we interpret each number with a given endianness, the bit stream numbering here needs to be expressed separately at the top level. Generally, this is why serialized protocols prefer to start bit numbering at 0 like the written in the IPv4 header example.To get an idea of the instruction stream of the BEAM (not the same as .beam asm), you can use the erts_debug module:
iex> :erts_debug.df(String)
This will dump a BEAM machine instruction stream to a file named Elixir.String.dis in your current working directory. You'll see things like: 000000001B81AFB0: i_func_info_IaaI 0 `'Elixir.String'` `at` 2
000000001B81AFD8: is_integer_fx f(000000001B81AFB0) x(1)
000000001B81AFE8: is_ge_literal_fxc f(000000001B81B008) x(1) `0`
000000001B81B000: i_call_only_f loc(`'Elixir.String'`:`do_at`/2)
000000001B81B008: allocate_tt 2 2
000000001B81B010: move_window2_xxy x(1) x(0) y(0)
000000001B81B018: i_call_f loc(`'Elixir.String'`:`length`/1)
000000001B81B020: i_plus_xyjd x(0) y(0) j(0) x(0)
000000001B81B030: is_ge_literal_fxc f(000000001B81B060) x(0) `0`
000000001B81B048: move_shift_yxx y(1) x(0) x(1)
000000001B81B050: i_call_last_fQ loc(`'Elixir.String'`:`do_at`/2) 2
000000001B81B060: move_deallocate_return_cQ `nil` 2
Each of those instructions are what the .beam file loader currently generates. With the JIT, these will be replaced by machine code.When the news of the acquisition hit, everyone wanted to see the WhatsApp talk. The organizers knew this so we swapped rooms. So, I started my talk by asking if anyone in the room was here for the WhatsApp talk and told them they could quietly leave and I wouldn't mind and a bunch of people got up.
Heheh. I don't blame them. I didn't really like my talk and Rick Reed is very good at what he does and the talk is no exception.