Inicio Foros Clientes y programación FluffOS 2.17

Mostrando 2 respuestas a los debates
  • Autor
    Respuestas
    • Dunkelheit
      Participante
      Número de entradas: 456

      Me gustaría dale un poco más de vida a los foros de programación de drivers, así que iré publicando de vez en cuando cosas a ver si alguien se anima a discutir estos temas. Estreno el foro de FluffOS con la noticia de la publicación de la última versión, que data del 16 de Septiembre.

      Encontraréis el código fuente del driver adjunto a este post, pero también podéis descargarlo del sitio oficial.

      Los cambios con respecto a la versión 2.16 son los siguientes:


      math package updates: Added vector norm, dotprod, distance, angle.
      Also added log2() and round() which works on floats (surprisingly useful).
      Added int args to the efuns as apppropriate (Hamlet)
      fixed above so the int args actually work without needing casts for the result
      fixed 64bit malloc for large allocations (never happened on dw, so I doubt it was a problem!)
      added 32bit malloc (malloc32) which is sysmalloc with realloc replaced by
      malloc->memcpy->free, saves lots of memory
      telnet environment support (Cratylus)
      windows compile fix for add_action (Cratylus)
      added dtrace support! just define DTRACE in local_options if you have it
      zmp support
      zmp calls from the client result in an apply on the player object
      zmp_command(string command, string *args);
      sending zmp is done with
      send_zmp(string command, string *args);
      check if a player supports zmp, returns 1 if they do, 0 otherwise.
      has_zmp(object player)
      note: zmp protocol is just a way to transfer information for zmp packages,
      You'll still need to implement those in LPC
      fixed the use of select()
      compiles with C++ again (with dw's local_options anyway)
      even more places to look for mysql libs
      fixed profiling recursive functions
      fixed profiling when a runtime error happens
      fixed filedescriptor leak with compressed save files
      fixed crasher in unloading object programs (this should have happened constantly
      , so there's probably a bug preventing this from actually happening most
      of the time).
      the driver now finishes all async IO before finishing shutdown()
      blocked socket fix for lpc network sockets (Hamlet)
      package async now does sql!
      async_db_exec(int db, string request, function callback);
      don't use the same database handle with this call if you also use it
      with db_exec(), just make an extra connection for your async sql.
      new efun restore_from_string(string savedata), does what it says on the tin,
      the string format is the same as a save file.
      added optional int argument to request_term_size(). If 0, the client is asked
      _not_ to offer any further term size updates (Hamlet, suggested by Detah)

      Con un poco de suerte podremos disfrutarla en las próximas semanas.

    • arima
      Participante
      Número de entradas: 65

      Perdona mi ignorancia pero , ¿el driver es el que genera los randoms del mud? El otro día vi que comentaste por chat que ibas a mirar esas rútinas, ¿era verdad o sólo para reirte de mi obsesión con el random xD?

    • Dunkelheit
      Participante
      Número de entradas: 456

      @arima wrote:

      Perdona mi ignorancia pero , ¿el driver es el que genera los randoms del mud? El otro día vi que comentaste por chat que ibas a mirar esas rútinas, ¿era verdad o sólo para reirte de mi obsesión con el random xD?

      Sí, el driver es el encargado de calcular los números pseudo-aleatorios.

      FluffOS trae de serie una función int random(int n) que devuelve un número aleatorio entre 0 y n-1. Esa función utiliza internamente drand48(). Basándonos en random() se implementó una función para realizar tiradas de dados XdY, también a nivel de driver, y que es la que hace que nos entretengamos en el chat estos días.

      En efecto, estoy repasando cómo puede mejorarse la entropía. Pero por ahora son sólo pruebas.

Mostrando 2 respuestas a los debates
  • Debes estar registrado para responder a este debate.