Size: a a a

2020 August 05

DF

Denis Fakhrtdinov in ErlangRus
Интересно.
источник

ИИ

Иванов Иванов... in ErlangRus
так там выше написано - написано так , чтобы те выражения которые на этапе компиляции известны не вызывали варнингов
источник

V

Vasilii Demidenok in ErlangRus
Иванов Иванов
так там выше написано - написано так , чтобы те выражения которые на этапе компиляции известны не вызывали варнингов
аааа..... типо когда компилятор настолько умён что видит, что там всегда будет true и генерит ворнинг
источник

DF

Denis Fakhrtdinov in ErlangRus
Ага, верно.
источник

ИИ

Иванов Иванов... in ErlangRus
Vasilii Demidenok
аааа..... типо когда компилятор настолько умён что видит, что там всегда будет true и генерит ворнинг
ага. хуже когда он настолько умен, что  выкидывает код молча
источник

V

Vasilii Demidenok in ErlangRus
логично, пасиб
источник

TT

Taras 🦀 Taraskin in ErlangRus
Denis Fakhrtdinov
затем, что операция сложения определена на number(), но вас типы, на котрых операция определена, не сильно волнуют.
на сколько я помню, мы говорили о типе данных boolean

мне кажется, boolean =/= number
источник

DF

Denis Fakhrtdinov in ErlangRus
Как об стену горох.
источник

TT

Taras 🦀 Taraskin in ErlangRus
мир - дружба - фиалки, проехали?)

я вас ни в чем не убеждаю, ничего вам не продаю,
и вы меня тоже не убеждаете 😉

и мирное общение без взаимооскорблений 😉

хорошего вам дня! )) и всем в чате тоже)
источник

S

Simon in ErlangRus
Maksim Lapshin
Сами.

То, что было вокруг, раздражало своим мнением насчет http клиента и логгера (стандартное для эрланга).
Пророк,
в итоге, пишу своего клиента
сутки потратил на поиск как оно там должно работать, но почему-то не работает
источник

ИИ

Иванов Иванов... in ErlangRus
Simon
Пророк,
в итоге, пишу своего клиента
сутки потратил на поиск как оно там должно работать, но почему-то не работает
тогда ты получается миссия
источник
2020 August 06

ML

Maksim Lapshin in ErlangRus
коллеги, а чего делает BIF_TRAP?

вот что это за trap-ы?
источник

V

Vasilii Demidenok in ErlangRus
у happy в thebeambook нет ничего про это?
источник

V

Vasilii Demidenok in ErlangRus
Maksim Lapshin
коллеги, а чего делает BIF_TRAP?

вот что это за trap-ы?
я бы предположил про trap exit сигналов в bife, а контекст какой?
источник

ML

Maksim Lapshin in ErlangRus
Vasilii Demidenok
у happy в thebeambook нет ничего про это?
пойду почитаю.

Это что-то про сохранение текущего пойнтера и данных в стейте и возврат из функции
источник

V

Vasilii Demidenok in ErlangRus
у kvakvsa в его beam wisdom traps находится в todo списке 😄 но в крайнем случае его тоже можно пингануть на эту тему
источник

V

Vasilii Demidenok in ErlangRus
```
1.77 The design and purpose of the trap mechanism of Erlang ERTS Published: 2009-02-18 Keyword: The trap mechanism of bif_traperlang is used a lot in the implementation, and can basically be seen in the time-consuming BIF operation. Its realization requires the cooperation of erl vm. It basically has three functions: 1. Time-consuming operations are done in stages. Since erlang is a soft real-time system, a process or bif cannot occupy the cpu time unlimitedly. Therefore, when each process of erlang executes, it can only execute a certain number of instructions at most. This is a design goal. It must be matched to the realization. So, for example, md5, list_member search, this potentially time-consuming operation is implemented by the trap mechanism, which means that when the process is scheduled, a certain number of calculations are performed and the context is trapped to abandon the execution and wait for the next scheduling to continue. Calculation. 2. Delay execution to realize upper-level decision-making. The obvious example is the send operation. When sending, the nodes may not be connected, so the send operation cannot continue, trap first, and then execute the node connection operation during the next scheduling. Once the send operation is successful, continue to execute. This operation is transparent to customers. He doesn't know these things behind you.
3. Take the initiative to abandon the CPU yield. The design of erlang is quite detailed! PS: BIFs involved in time-consuming operations include:do_bif_utf8_to_listets_delete_1spawn_3monitor_2spawn_link_3spawn_opt_1send_2crc32_1adler32_1md5_1send_3build_utf8_returnbuild_list_returnfinalize_list_to_listdo_bif_utf8_to_listets_select_reverseets_match_spec_run_r_3 re_run_3re_exec_trapkeyfindmonitor_node_3
источник

V

Vasilii Demidenok in ErlangRus
это перевод с китайского если что
источник

ML

Maksim Lapshin in ErlangRus
Vasilii Demidenok
```
1.77 The design and purpose of the trap mechanism of Erlang ERTS Published: 2009-02-18 Keyword: The trap mechanism of bif_traperlang is used a lot in the implementation, and can basically be seen in the time-consuming BIF operation. Its realization requires the cooperation of erl vm. It basically has three functions: 1. Time-consuming operations are done in stages. Since erlang is a soft real-time system, a process or bif cannot occupy the cpu time unlimitedly. Therefore, when each process of erlang executes, it can only execute a certain number of instructions at most. This is a design goal. It must be matched to the realization. So, for example, md5, list_member search, this potentially time-consuming operation is implemented by the trap mechanism, which means that when the process is scheduled, a certain number of calculations are performed and the context is trapped to abandon the execution and wait for the next scheduling to continue. Calculation. 2. Delay execution to realize upper-level decision-making. The obvious example is the send operation. When sending, the nodes may not be connected, so the send operation cannot continue, trap first, and then execute the node connection operation during the next scheduling. Once the send operation is successful, continue to execute. This operation is transparent to customers. He doesn't know these things behind you.
3. Take the initiative to abandon the CPU yield. The design of erlang is quite detailed! PS: BIFs involved in time-consuming operations include:do_bif_utf8_to_listets_delete_1spawn_3monitor_2spawn_link_3spawn_opt_1send_2crc32_1adler32_1md5_1send_3build_utf8_returnbuild_list_returnfinalize_list_to_listdo_bif_utf8_to_listets_select_reverseets_match_spec_run_r_3 re_run_3re_exec_trapkeyfindmonitor_node_3
т.е. какой-то закат солнца вручную с сохранением всего контекста в процессе
источник

V

Vasilii Demidenok in ErlangRus
ага
источник