57 Matching Annotations
  1. Jan 2026
    1. In the mid-1600s, Gottfried Leibniz devised a notation for integrals and derivatives (the familiar ∫ and dx/dt) that made difficult ideas in calculus almost mechanical. Leibniz developed the sense that a similar notation applied more broadly could create an “algebra of thought.” Since then, logicians and linguists have lusted after a universal language that would eliminate ambiguity and turn complex problem-solving of all kinds into a kind of calculus.

      Bret Victor, en Media for thinking the unthikable, compara a Leibnitz con Steve Jobs, diciendo que el primero era un gran inventor de interfaces de su época, en la forma de nuevas notaciones.

      Cardumem, de hecho, empezó como un ejercicio mental pensando una nueva notación para expresar "álgebras hipertextuales" que pudieran ser embebidas en un motor wiki (al comienzo vía Lua en JavaScript y luego del lado del servidor, con sistemas hipermedia). Y dicha notación fue concebida en la medida en que las herramientas externas para manipular hipertexto, como TiddlyWiki Pharo generaban mucha fricción en los miembros de la comunidad de Grafoscopio, al punto que su uso era marginal. Una nueva herramienta con una nueva notación alentaría usos y personalizaciones compartidas que con herramientas separadas eran muy esporpadicos y más bien solitarios, entre un puñado de personas, a lo sumo.

      Dado que las piezas para armar el wiki (Djot y YueScript) ya estaban integradas al ecosistema Lua, y que originalmente se pensaba en integrarlo directamente a TiddlyWiki, del lado del navegador web, en lugar del servidor, Lua este fue elegido en lugar de Pharo para los procesos de prototipo, dando muy buenos resultados iniciales hasta el momento.

  2. Dec 2025
    1. We saw block-based editors as the future, not just for productivity but for social interactions. We centered Anytype on unique and extendable primitives: objects, types and relations. Why couldn’t a page be a blog post, a forum thread or some other object? Why not connect everything in a unified graph database, viewable as sets and collections? We were thrilled with the possibilities, though the complexity was immense.

      Es interesante esta generalidad desde los bloques (objetos, tipos y relaciones, que se juntan en un grafo). Los Dumems en Cardumem son otra forma de generalización desde el hipertexto programable (gracias al scripting en YueScript) y los metadatos personalizables que permiten las tablas de Lua.

      Sin embargo, para disminuir la complejidad y aumentar la practicidad, en Cardumem no apuntamos a tecnologías de la llamada web 3.0, sino que usamos las buenas y confliables web 2.0 con algo de retrofuturismo en los sistemas hipermedia.

  3. Jul 2025
    1. The index is a key-value associative array. The keyterm is the human-readable name, and the value is the location of the leaf on a tree in your Zettelkasten. For instance, here’s an example taken directly from my own Zettelkasten: ‘Truth’: ‘5455/1’. This should look familiar if you’re familiar with data structures like JSON, Python dictionaries, or YAML arrays. You can get pretty advanced with your index and create nested items. However, I won’t cover such now.
  4. Feb 2025
    1. pero, por otra, en su interior el desarrollo de este libro está plagado de parches, hackeos, y traducciones del sistema original que tuve que hacer sobre la marcha, viviendo la diglosia cultural y readaptándolo para mis propias necesidades de formas recursivas.

      Es raro. Pandoc me ha servido para propósitos similares y también hemos tenidos que adaptarlo con hacks, pero estos son soportados por el sistema para que ocurran de modo relativamente sofisticado, vía filtros en Lua. Me pregunto qué hace de Magicbook un sistema tan inflexible y no logré ubicarlo en el capítulo 10, donde hice comentarios más extensos entre dichas alternativas de publicación reproducible y abierta.

  5. Jan 2025
    1. The editing, debugging and inspecting abilities are not limited to Smalltalk languages either. Glamorous Toolkit itself is based on Rust-based plugins, so naturally we wanted to develop these plugins from the environment, too. In the screenshot below we see an environment opened on the sources of a Rust-based plugin.

      Interesante mirar cómo hacer algo similar o incluso más sencillo con Lua.

  6. Nov 2023
  7. May 2023
  8. Mar 2023
  9. Dec 2022
  10. Nov 2022
    1. Work in Progress¶ The HandwritingRecognition plugin uses cloud-based handwriting recogntion to recognize handwritten text from a selection or page layer in a user-specified language.

      This HandwritingRecognition plugin is a work-in-progress, but extremely exciting. They ran into some issues using Google's API; broke strokes into batches of 150 which would make reassembling more than a couple sentences a nontrivial problem.

  11. Oct 2022
  12. Sep 2022
  13. Jan 2022
    1. require require('file_path') でluaファイルをモジュールとして読み込みます。Neovimの runtimepath ディレクトリ内の lua ディレクトリに格納されているLuaファイルを require で読み込めます。 例 init.vim lua require('plugins') ~/.config/nvim/lua/plugins/init.lua を読み込みます。 lua require('plugins.completion') ~/.config/nvim/lua/plugins/completion.lua を読み込みます。 lua require('plugins/completion') . or / どっちでもOKです。 . のほうがよく見ます。
  14. Sep 2021
  15. Nov 2019
    1. -- patch os.getenv to not have existing environment variables interfere local _getenv = os.getenv os.getenv = function() end -- luacheck: ignore finally(function() os.getenv = _getenv -- luacheck: ignore end)

      patch os.getenv

    1. Here is the code from main() using different variables, both work fine:

      How to import and call a function in a module in lua. You can also use the local MM = require('mymodule') syntax.

    1. It's good practice to keep file loaded by content_by_lua_file at a minimum and place all processing logic into external modules. This allows lua_code_cache to work its magic and simplifies your testing.

      Kinda counter intuitive but in a way it makes sense since require does built in caching and it makes it easier to test. This actually makes me feel a lot more comfortable making a utils area and just testing the functions in there.

  16. Oct 2019
    1. Is anyone aware of a lua http lib that supports keepalive?

      When sending a request you can pass the following keepalive settings which will keep the connection open:

      local http = require "resty.http"
      local httpc = http.new()
      httpc:connect("127.0.0.1", 9081)
      local response, err = httpc:request({
        path = "/proxy" .. ngx.var.request_uri, 
        method = "HEAD",
        headers = ngx.req.get_headers(),
        keepalive_timeout = 60,
        keepalive_pool = 10,
      })
      
    1. non-blocking internal requests

      Note ngx.location.capture only works on internal requests which means if you want to request an external endpoint dynamically then you need to setup something like below and call that internal endpoint instead of calling the external url directly.

      Say for example you want to send a request to / endpoint with the thirdparty url as part of the path (http:proxy-server.com/http://example.com).

            location /external/ {
              internal;
              set $upstream "";
              rewrite_by_lua_file ./lua/get_external.lua;
              resolver 8.8.8.8;
              proxy_pass $upstream;
      

      Where lua/get_external.lua:

      -- strip beginning '/' from uri path
      ngx.var.upstream = ngx.var.request_uri:sub(2)
      
  17. Sep 2019
    1. This API function (as well as ngx.location.capture_multi) always buffers the whole response body of the subrequest in memory. Thus, you should use cosockets and streaming processing instead if you have to handle large subrequest responses.

      So my interpretation of this is the request is issued, the entire response is buffered in memory, then res.headers is read from that buffer. I wonder if there is a way to cut off this buffer and close the connection early such that only the headers make it into the buffer for responses that are very large.

    2. Network I/O operations in user code should only be done through the Nginx Lua API calls as the Nginx event loop may be blocked and performance drop off dramatically otherwise. Disk operations with relatively small amount of data can be done using the standard Lua io library but huge file reading and writing should be avoided wherever possible as they may block the Nginx process significantly. Delegating all network and disk I/O operations to Nginx's subrequests (via the ngx.location.capture method and similar) is strongly recommended for maximum performance.

      Very important ngx.location.capture does not block in nginx.

    1. local LuaSocket = require("socket") client = LuaSocket.connect("example.com", 80) client:send("GET /login.php?login=admin&pass=admin HTTP/1.0\r\nHost: example.com\r\n\r\n") while true do s, status, partial = client:receive('*a') print(s or partial) if status == "closed" then break end end client:close()

      How to issue an http request through a socket in lua.

    1. access_by_lua ' local res = ngx.location.capture("/auth") if res.status == ngx.HTTP_OK then return end if res.status == ngx.HTTP_FORBIDDEN then ngx.exit(res.status) end ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)

      Potentially something like this for getting the content-type response header and using that to decide which proxy server to send the original request to.

  18. Jul 2017
  19. Apr 2017
  20. terralang.org terralang.org
  21. Feb 2017
  22. Jan 2017
  23. Dec 2016
  24. Sep 2016
    1. I don't know what then, I just remember somehow. Around the same time I install renoise, I also install vim. Then in renoise I go to Help>Show Preferences Folder.... Then I right click on Config.xml, then edit in VIM. Then I /search for showscr or something like that. Change false into true, done. On windows sometimes I'm lazy and I just modify the one shortcut that I use to have --scripting-terminal or something as an argument. Also: if you really do a lot of (re)installs I would advise to back up your Config.xml anyway, just like the KeyBindings.xml, TemplateSong.xrns, etc, it'll save you a lot of time right?

      How to enable Scripting Tools in Renoise Tools menu