kallaballa / janosh Goto Github PK
View Code? Open in Web Editor NEWA json document database with a shell interface.
A json document database with a shell interface.
I am getting a bus error, without a stack strace or something else while trying to send strings which are 20 characters or longer. The bug is reproduceable by running the following minimal lua script...
#!/lounge/bin/janosh -f
function receive(handle, message)
print(message)
end
Janosh:wsOpen(8080)
Janosh:wsOnReceive(receive)
while true do
Janosh:sleep(1000)
end
...and pasting the following snippet in your browsers javascript console.
var socket = new WebSocket('ws://10.20.30.40:8080');
socket.onopen = function() { socket.send('a'.repeat(20)); }
...which kills the server process. It works if one sends less than 20 characters.
Any ideas?
Some tests fail on Darwin - add/remove. Needs to be looked into.
seclorum@Darwin-machine:~/Documents/metalab/kallaballa/Janosh.seclorum {(janosh-on-darwin)}
$ ./test.sh
truncate: ok
truncate:46082543134820304
mkarray: ok
mkarray:5095506346131095679
mkobject: ok
mkobject:6033625201148905563
append: ok
append:9510324768122757536
set: ok
set:17106756998089531113
add: failed
add:772402077030743180
remove: failed
remove:772402077030743180
replace: ok
replace:1926185854176296875
copy: ok
copy:7217090941002447847
shift: ok
shift:3752346509794287921
the json the server returns will be broken if the values posted include a backslash.
need to investigate if this is caused by users posting backslash values or if converting to json has a bug.
I'm posting this issue to this repo, because Janosh should never return malformed json. I'm going to look into this later on, looks like a problem with with "url". Maybe it's related to #3 ?
{ "active":"false","category":" ","url":" " } ,"browser": { "active":"false","category":"image","url":"http://10.20.30.90/img/power_down_warning.png" } ,"clients": [ "test","BLA" ] ,"display": { "blank":"false","resolution":"1920x1080" } ,"image": { "active":"false","category":"","url":"" } ,"pdf": { "active":"false","category":"","url":"" } ,"player": { "active":"true","category":"youtube","url":"http://youtu.be/IkYfB1C0Zgc" } ,"playlist": { "index":"128","items": [ { "source":"http://www.youtube.com/watch?v=6KKKGpAZHAA","title":"OVERWERK - Daybreak (GoPro HERO3 Edit) [Electro House]","url":"http://r6---sn-uxaxufv-8pxe.googlevideo.com/videoplayback?ratebypass=yes&expire=1426805268&sver=3&dur=304.088&pl=19&ipbits=0&signature=E092A4BB3C79E3AB0EDC78C2425B7A0CFAAEEF78.4FA007BCAC2FDF87A57BAAECFD1BF478F6A006DE&itag=22&mm=31&requiressl=yes&mime=video%2Fmp4&source=youtube&ms=au&key=yt5&mv=m&mt=1426783576&fexp=900720%2C905648%2C907263%2C934954%2C9406733%
at the moment duplicate subscriptions to the same key prefix are not allow and result in a failing assertion.
now that we have the exception wrapper for luajit replace all asserts in lua related code with exceptions.
implement c++ code that guards transactions in lua.
At the moment it is possible to (try to) open a transaction inside an open transaction. The results in a deadlock. find a mechanism to report a nested transaction as error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.