Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 03:17
    duanxuelin starred luvit/luvit
  • Jan 30 2019 14:15
  • Jan 29 2019 17:39
    luftballon starred luvit/luvit
  • Jan 29 2019 08:13
    zhaozg edited #1050
  • Jan 29 2019 08:13
    zhaozg edited #1050
  • Jan 29 2019 08:09
    zhaozg opened #1050
  • Jan 29 2019 02:39
    aiverson commented #1049
  • Jan 28 2019 22:50
    squeek502 commented #1049
  • Jan 28 2019 21:06
    creationix commented #1049
  • Jan 28 2019 13:00
    Miigon commented #1049
  • Jan 28 2019 06:42
    jettangs starred luvit/luvit
  • Jan 27 2019 23:50
    aiverson commented #1049
  • Jan 27 2019 23:19
    squeek502 commented #1049
  • Jan 27 2019 14:49
  • Jan 27 2019 14:49
    skyter10086 starred luvit/luvit
  • Jan 27 2019 06:24
    ik5 starred luvit/luvit
  • Jan 27 2019 03:28
    Miigon commented #1049
  • Jan 27 2019 00:44
    SinisterRectus commented #1049
  • Jan 27 2019 00:42
    sundayz starred luvit/luvit
  • Jan 26 2019 23:27
    squeek502 commented #1049
Tim Caswell
@creationix
well you can’t require js code
Adam Martinek
@harageth
oh right. That is a function call from the require('weblit-static')
Tim Caswell
@creationix
but you can load it using module in luvit 2.0 and the “resource” module in the upcoming luvit 3.0
Adam Martinek
@harageth
require('/Users/adam9500/workspace/super-agent/TTY/pipes') this could be changed to require('./TTY/pipes')
Tim Caswell
@creationix
right
though libraries are best put in “libs/*” so you don’t need relative at all
relative is generally used for files within a multi-file package
Adam Martinek
@harageth
and again my testing would go much better if I remembered luvit server.lua instead of lua server.lua
Tim Caswell
@creationix
@harageth do you want to pair for a bit or do you need lunch?
I need some food, it’s 1:30 here
Adam Martinek
@harageth
lunch will happen soonish and I need to help do something to prepare dinner over lunch too since my father in law is coming for dinner
Tim Caswell
@creationix
Good morning all
Tim Caswell
@creationix
Just finished alpha version of postgres driver for luvit https://github.com/virgo-agent-toolkit/super-agent/tree/master/libs
this is temporary location, will be moved to proper repo later
nodecraic
@webworkio
hey, if anyone has any remote remote , designer, DevOps or Sysadmin jobs they can post them at http://webwork.io
Indra Gunawan
@coderbuzz
Hi, I come from Node.js background and found Lua has luvit.io that awesome. Just start learning and have few questions:
  1. Can luvit generate & execute (lua) bytes code? I don't seem see this options
  2. What's different luvi and luvit? A project in-between luv and luvit? I'm confused
Nodejs don't have create/run bytecode options (distributing nodejs (bytecode) app), Lua has... so here I'm
Indra Gunawan
@coderbuzz

As described here https://github.com/luvit/luvi (Luvi has a somewhat unique, but very easy workflow for creating self-contained binaries on systems that don't have a compiler.), tried this:

Using this sample code:
local http = require('http')

http.createServer(function (req, res)
local body = "Hello world\n"
res:setHeader("Content-Type", "text/plain")
res:setHeader("Content-Length", #body)
res:finish(body)
end):listen(1337, '127.0.0.1')

print('Server running at http://127.0.0.1:1337/')

The output:

vagrant@vagrant-ubuntu-trusty-64:~/app$ ./luvi myapp
[string "bundle:main.lua"]:1: module 'http' not found:
no field package.preload['http']
no file './http.lua'
no file '/usr/local/share/luajit-2.1.0-beta1/http.lua'
no file '/usr/local/share/lua/5.1/http.lua'
no file '/usr/local/share/lua/5.1/http/init.lua'
no file './http.so'
no file '/usr/local/lib/lua/5.1/http.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
vagrant@vagrant-ubuntu-trusty-64:~/app$

It seem http module provided seamless by luvit.io
Is this possible create self-contained binaries of luvit.io app using luvi?

Ryan Phillips
@rphillips
@coderbuzz yes there is
@coderbuzz in your package.lua add a depedency for luvit/luvit@2
to get luvit 2.0
Indra Gunawan
@coderbuzz

hi @rphillips , sorry new to lua, have tried like this:

package.lua

return {
name = "HelloWorld",
version = "0.0.1",
description = "A simple description of my little package.",
tags = { "lua", "lit", "luvit" },
license = "MIT",
author = { name = "coderbuzz", email = "coder@buzz.com" },
homepage = "myapp.com",
dependencies = {
"luvit/luvit@2.9.1"
},
files = {
"*.lua",
"!test
"
}
}

Then run it with luvi:

$ luvi myapp
[string "bundle:main.lua"]:3: module 'http' not found:
no field package.preload['http']
no file './http.lua'
no file '/usr/local/share/luajit-2.1.0-beta1/http.lua'
no file '/usr/local/share/lua/5.1/http.lua'
no file '/usr/local/share/lua/5.1/http/init.lua'
no file './http.so'
no file '/usr/local/lib/lua/5.1/http.so'
no file '/usr/local/lib/lua/5.1/loadall.so'

Is that way correct?

Try set dependencies "luvit/luvitblablaxxx@2" with but no error message, seems no effect

How the correct way? Thanks
Ryan Phillips
@rphillips
@coderbuzz you need to run lit install then run luvi
Indra Gunawan
@coderbuzz
Hi, thanks @rphillips, appreciated
One more, is luvi/luvit run on Windows? Is generated binary also support Windows?
I don't see in documentation
Ryan Phillips
@rphillips
@coderbuzz it does
Windows binaries are here: https://github.com/luvit/luvi/releases
Tim Caswell
@creationix
@coderbuzz what docs were you reading? The official install instructions mention windows. https://luvit.io/install.html
Indra Gunawan
@coderbuzz
@rphillips Yes I have downloaded for Windows, but it is luvi only, no lit, is enought for deployment?
@creationix hi Tim, yap already read official instructions. There is LIT, LUVI and LUVIT but I don't seen lit.exe for Windows that's why I ask
Indra Gunawan
@coderbuzz
BTW this luvit is great options, thank you for making this. I hope as soon luvit could be famous as NodeJS :smile:
Tim Caswell
@creationix
@coderbuzz Under the section "Get Lit" there is a powershell script it tells you to run that downloads luvi.exe, lit.zip and builds lit.exe. Is that not the route you went?
Jiang Lu
@jianglu
~~ lit.luvit.io is broken
Jiang Lu
@jianglu
it's alive
andros705
@andros705
Hello I was looking for an option to run lua scripts from Node and I found Luvit :P Is it mature enaugh to replace Node?
daurnimator
@daurnimator
andros705: that's not what luvit is
andros705: luvit is a node.js-like set of libraries/runtime environment for lua that will seem familiar to node.js devs
andros705: for running lua scripts from node you might want to look at fengari. https://github.com/fengari-lua/fengari
Geoff Bourne
@itzg
@creationix sorry for the duplicate message, from the IRC channel I just noticed you're on Gitter. Can you help take a look at this "invalid fingerprint" message I'm bumping into? https://groups.google.com/forum/#!topic/luvit/62hGY9m15-I
Shreyansh Chouhan
@BK1603

Running this snippet in neovim on Windows. After the callback is executed for the first time and is being passed to w:start for the second time, all the arguments passed to it seem to be nill. What am I doing wrong with this? Also vim.loop is the same as uv, so vim.loop.new_fs_event() is the same as uv.new_fs_event
Lua:5.1 LuaJIT:2.0.5

What's confusing is that the exact same code seems to be working fine on linux, and even works fine when the callback is executed for the first time on windows.

Satish Chandra Palakoti
@SatishChandraPalakoti
Anyone here worked on fengari and executing lua scripts in the node js world ?
I've been battling to understand how to execute a lua file with fengari module in the nodejs project of mine.
d4rkmen
@d4rkmen
hi @ all
how can I install and use lua package (like luasocket luamqtt etc) along with Luvit?
d4rkmen
@d4rkmen
its very powerful indeed, but too less packages available
i was trying to require lua modules but it just closes before return
xOCh
@xochilpili
hello everyone, does someone has experiencing with nodejs (vanilla) and lua fengari? just need a right direction