Search results

  1. A

    Type cast

    You need not explicitly cast regular expression match to Bool to check if there was any match. Here is an example from here: I re:‘^[a-z]{3,10}’.match(s) words.append(s) And of course you can write this: V match = re:‘^[a-z]{3,10}’.match(s) I match...
  2. A

    Type cast

    Currently, only Python-like explicit type casts are supported (e.g. Int("54") or String(54)). Why do you need this? explicit operator bool() is a replacement of the old safe bool idiom, and it is called in if (match) ... (and in if ((bool)match) ... of course, but it makes no sense to write...
  3. A

    Documentation suggestions

    Ok. I agree.
  4. A

    Documentation suggestions

    Yes, of course. Ok. I accept this suggestions. Ok. I added a new section (‘Built-in global variables’). The documentation of 11l was intentionally made a super brief and a little puzzling. Because I believe that when you guess something by yourself, then it will be remembered much better...
  5. A

    Supported modules

    I have updated transpiler Python → 11l → C++, and made some modifications to exs2sfz.py file, so it can be successfully compiled. Also I performed some performance tests. Here is the results for NaturalKit.exs: Time (in milliseconds) Factor (relative to CPython) CPython 238 1x...
  6. A

    Supported modules

    It prints [when trying to convert BLUTHNER.exs]: RuntimeError: Couldn't locate sample bluthner f c0.6.wav! And RuntimeError: Couldn't locate sample natural_b0_35.wav! for NaturalKit.exs
  7. A

    Supported modules

    Does this converter has performance issues? If so: 1. Can you provide .exs file for testing? 2. Have you tried PyPy for better performance?
  8. A

    Transpiler GCC version check

    I agree. (The current code was written for primary testing only, and it certainly needs to be improved.) I have Ubuntu 18.04 installed [on Virtual Machine], and despite the fact that I have installed GCC-8, the g++ and gcc refers to the GCC 7.4.0, therefore g++-8 is used instead of g++. I...
  9. A

    Supported modules

    I've added https support for this forum. Please let me know if you still have any issues with security.
  10. A

    Supported modules

    The current development of transpiler Python → 11l → C++ is task-driven, i.e. the transpiler is extended by specific tasks solving (at the present moment mainly from Rosetta Code). Can you provide your source file wholly or code sample that you want to compile? P.S. I added support of...
  11. A

    Разработка когнитивно-эргономического синтаксиса для нового аппаратно-ориентированного языка программирования

    Цитата из статьи: Имеется в виду код в функциональном стиле. Например такой: (1..10).each {|i| puts "#{i}\t в квадрате = #{i**2}"} (Взято отсюда, там же чуть выше пример с обычным for.) Проблема такой записи в том, что в ней нельзя использовать break/continue, а также удалять элементы...
  12. A

    Разработка когнитивно-эргономического синтаксиса для нового аппаратно-ориентированного языка программирования

    Неудачный пример. Код на C++ можно ведь [было] написать в стиле кода на Python: while (true) { if (instr[i] == '[') nesting_level++; else if (instr[i] == ']') if (--nesting_level == 0) break; i++; ... }
  13. A

    Разработка когнитивно-эргономического синтаксиса для нового аппаратно-ориентированного языка программирования

    Эта тема форума предназначена для обсуждения данной статьи. Авторская версия статьи прикреплена к этому сообщению.
  14. A

    Size of Float built-in type

    In favor of 64 bits: Compatibility. Floating point literals in C/C++ are treated as 64 bits (e.g. auto f = 0.0;, then type of f is double, which is 64 bits on most platforms). Time in 11l is represented as a floating point number of seconds since the epoch, the mantissa of which must be at...
  15. A

    Size of Int built-in type

    In favor of 32 bits: Compatibility. Integer literals in C/C++ are treated as 32 bits (e.g. auto i = 0;, then type of i is int, which is 32 bits on most platforms). Economy and sufficiency. In the vast majority of situations, 32 bits are quite enough.
  16. A

    Int8, Int16, Int32, Int64 vs Int1, Int2, Int4, Int8

    Bytes are used in PostgreSQL and in Fortran 77. Bits are besides being used much more often, provide an opportunity to define arbitrary precision integers, e.g. Int2 or Int4 for 2 or 4 bits like in Object Vision, or even Int3 for 3-bits integer (which translates into C bit fields: int i : 3).
  17. A

    Что использовалось при разработке транспайлеров Python → 11l и 11l → C++

    1. Лексический анализатор. Ничего не использовал. Руководствовался при его разработке только логикой, а также базовыми понятиями (т.е. информацией о том, что лексический анализатор разбивает исходный код на лексемы/токены). Ну ещё [при составлении списка категорий/классов токенов] я немного...
  18. A

    Int8, Int16, Int32, Int64 vs Int1, Int2, Int4, Int8

    Какой способ обозначения размерности Int/Float вы предпочитаете? Биты или байты?
  19. A

    Размер встроенного типа Float

    Какой размер по вашему должен иметь тип Float?
  20. A

    Размер встроенного типа Int

    Какой размер по вашему должен иметь тип Int?
Top