Coder Social home page Coder Social logo

cw-lua's Introduction

Catwell's Lua playground

This repository is used to store the various Open Source tools, algorithms and libraries I write in Lua (or rather LuaJIT + FFI) that do not deserve their own repository.

These are mostly unmaintained prototypes and ideas I gave up on. Projects I become more serious about graduate to their own repositories, and sometimes projects that I stop maintaining end up here.

Contents

  • bimap: mirrored map implementation
  • blake2b: a Lua 5.3 implementation of BLAKE2b
  • bsx: a small tool to manage a Beanstalk queue based on Haricot
  • concurrent-dotproduct: a simple ConcurrentLua example (outdated)
  • crdt: implementation of some Conflict-Free Replicated Data Types in Lua
  • cwbase: deprecated in favor of base2base
  • cwscripts: short Lua utility scripts
  • cwtools: a small collection of useful functions
  • decolonize: Tessel 1 examples using Lua directly (i.e without Colony)
  • deque: simple deque implementation (similar to the lists used in fakeredis)
  • etpan: incomplete libetpan binding
  • fengari-canvas: an example of how to use a canvas with Fengari
  • fengari-pixi: PixiJS + Fengari
  • vengari-vue-luacc-example: Vue + Fengari
  • git: toy implementation of parts of Git
  • iatax: a LÖVE remake of an old Perl/SDL game I wrote in 2004
  • iris-lua: an Iris client
  • itc.lua: a Lua implementation of Interval Tree Clocks
  • lua-chacha: a C and a pure Lua module implementing the ChaCha stream cipher
  • lua-mdb: pure Lua code to read LMDB databases
  • lua-mirrorfs: a FUSE filesystem that mirrors a directory (uses Flu)
  • lua-pipe: syntax experiment, Lua version of Pipe in Python
  • lua-zerorpc: ZeroRPC implementation
  • luajit-msgpack: LuaJIT FFI-based module for MessagePack
  • lualua: an unfinished implementation of Lua 5.2 in LuaJIT
  • micrograd: a port of micrograd
  • nsqc: a NSQ client
  • sha256: a SHA-256 implementation in pure LuaJIT+FFI
  • tcpchat: simple TCP chat + Lua interpreter with LuaSocket
  • unix: luaposix sample code (and C counterparts)
  • wolfram: playing with Wolfram's Basic Form of Models in Teal

cw-lua's People

Contributors

catwell avatar starius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cw-lua's Issues

SHA-256, Intel Core2Duo, XPSP3 x86, lua 5.1.5 + luajit 2.1 from Far 3.0.5843

Command line Far:>lua:local sha=require'sha256' print(sha.hex("abc"))
result: 0000000000000000000000000000000000000000000000000000000000000000
this result returned for any input data, sha256.test.lua don't work.

This variant SHA-256 https://github.com/Egor-Skriptunoff/pure_lua_SHA work ok, like other SHA-256 algorithms.
lua:local sha=require'sha2' print(sha.sha256("abc"))
result: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Is it possible to fix your sha256 code and make it as fast as possible for Far?

SHA256 implementation doesn't work correctly on 32-bit LuaJIT (x86)

The module sha256.lua doesn't work correctly on 32-bit LuaJIT.

-- This program prints 3 different lines when run on LuaJIT for x86
-- On some systems, the first line contains correct value of hash,
-- but the second line is never correct.
local sha256 = require"sha256".hex
print(sha256("abc"))
print(sha256("abc"))
print(sha256("abc"))

Tested on Windows and Linux, on LuaJIT 2.0 and 2.1
always OK on LuaJIT x64,
wrong results on LuaJIT x86.

Another implementation of SHA256 for LuaJIT + FFI (https://stackoverflow.com/a/19988581/6834680) has the same problem.
Is this a LuaJIT bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.