How do I require a module in LUA wasm? - module

recently I've came across this:
https://github.com/vvanders/wasm_lua
It works perfectly fine, but when I try to require a module in it it outputs an error saying that this module isn't there, even though I put it in the main directory of the page.
I've tried putting the module in every single folder of this, but it seems that Lua is running somewhere out of this folder.
How do I solve this issue? Where Lua runs, if it's not running in the main site directory?

Lua WASM is a way to run Lua by the browser, but it uses Lua within the system itself to perform the tasks, which means browser runs only the Front End (HTML for example)
see that when you try to import a library, it gives an error and shows a directory on the website system where it looks for the library (honestly the risk of hacking the website server is really huge that way)
You can even import a library, but for that you need to have lua WASM installed on your own computer, run it on your own server, and then have the library you want inside the folder where lua WASM looks for. That way, Lua WASM will search for the library on YOUR computer, not on the computer on the site where Lua WASM is hosted

Related

Intellij Java Webstart Basics

My question is "How do you get a Java Web Start project started in the IntelliJ IDEA IDE?"
First Attempt
IntelliJ's default JavaFX Project Template includes an artifact configuration that (when the native bundle is set to exe) seems to set you up to deploy your application using Java Webstart (or at least test it on your machine).
Once you Build Artifacts, it gives you a .jnlp file, as well as an HTML file containing a link to run the .jnlp file.
Yet! With even the most basic application, it's not getting off the ground.
In order to provide exact detail, I'll include the code for the HTML and .jnlp files as well as a video that shows what happens.
HTML File
.jnlp File
Video
Progress
Swing on Tomcat
I was able to successfully launch a Swing application from the local Tomcat server I just installed using some help from a tutorial—confusingly, using the similar steps of jarring, signing, and putting on webserver with a JavaFX application results in a stupid blocked window even though the file is included in the Exception Site List.
This makes me wonder if it's a signing issue. (I signed the jar with a homemade keystore, but notably without certificate or timestamp—this caused no problems with Swing; could it be causing problems with JavaFX? If I need a more-legitimate certificate and timestamp, how do I get them?)
Surely I'm missing something. What other steps need to be taken to deploy a JavaFX application using Webstart? Is anyone willing to provide a SSCCE?

Consuming .dylib from a server runtime

I have a requirement where I have to get the compiled code dynamically from the server and execute them from the OS X application. In short, the idea is to have few classes and methods in the compiled code(it can be a .dylib, .a or a bundle) hosted on a server, and the application downloads it form the server and accesses those classes dynamically. The completed code might contains HTML, javascript, Objective-C, or Swift.
Option 1. Static library
It has to be part of the consuming application at compile time, so i think we can rule this option out.
Option 2. Dynamic library
I am struggling here, is it possible to download the dylib form the server and copy them in one of the application folders, and run from there dynamically using dlopen. is it possible?
Option 3. Bundle
I did not look into this yet, but the idea is similar to dylib.
Option 4. any other possibilities..
Surely you can download a dylib. Why should that be impossible?
Then you can store it in one of the paths the dynamic linker is looking for. This is described here.
Even I did not test it, I do not know, why this shouldn't work.

Yii Application Migrating From Windows To Linux Platform

We have developed a project with Yii framework on local windows server. It is working with no problem on a local windows server.But when we uploaded the project to a linux hosting it started giving us problems. Not getting where is an issue?
Linux accesses files (and therefore all classes it autoloads) case-sensitively. You may run into problems when your models are called something like Contractperiod and accessing them like ContractPeriod. Rename their files to use the same name as their classes (.php) and any code using those classes to use the right names to fix this kind of issue.
Then there's the permissions; your runtime and assets folders need write access under Linux. Windows needs this as well but usually gets it automatically by being ran under an administrator account (unless you've properly configured your Windows web server). See chmod.
You may experience issues due to different PHP versions as some Linux distributions such as Debian don't have updated PHP versions in their default packages. Another possibility is that your PHP is configured differently on your Linux server; showing errors that are hidden on Windows. Generally these should be solved by repairing the code.
To get a more specific answer (or guess) for your instance you're going to have to provide us with more information, such as a copy of some of the errors.

Can a web server dynamically generate an executable on the fly?

Ninite.com seems to be doing it currently. I'm wondering how.
While it's possible for them to have every combination of app pre-generated, it seems unlikely/hacky.
[EDIT]
Is compiling a Windows executable using this method resource-intensive? Can it be done ~100k times a day without exorbitant cost? I'm asking because Ninite announced that they're going paid-only... can it be costing them that much?
[EDIT2]
The downloads aren't huge, it's just a small hundred KB web-based downloader+installer app that knows which apps to install.
^^ Regarding this, the EXE file served up by the webapp is named something like Ninite AIMP Audacity Chrome Digsby FastStone Installer.exe when given 20+ apps to install. It's probably likely that the server is serving up the same file under different filenames, and the app is then configuring itself based on the filename, no?
The site doesn't seem to create executable but just provide them for download.
[EDIT] Creating those huge downloads on the fly would create a huge burden on the server. Moreover it could create buggy software. So my guess is, if these people know what they're doing, they have a server which prepackages everything, tests it and then dumps it in the download directory of the web server.
But of course, nothing stops a server from invoking any kind of program (with maybe the exception of the patience of the surfer). So they can run compilers, archivers, whatever.
Why would a web server not be able to dynamically generate an executable?
Sure, just run a compiler on the server with exec().
I do something similar with generating PDF files from LaTeX sources, since that is basically compiling as well...

Powerbuilder run

I'm using Powerbuilder to call an external function from a DLL created in C#
If I generate an executable it works fine, it call the web service perfectly well, but when I'm trying to run it in "development" mode it don't use the "application_name.exe.config" file.
I tried to set "app.config" file hard coded in the DLL, but I was unsuccessful
Clues to resolve this issue?
I think you described it yourself: you're looking for it to use something used by the EXE when you're running from development mode. When you run from development mode, there is no EXE generated or used, so Windows won't be leveraging functionality linked to the EXE. (PB starts your application so quickly because it is only loading the application to the virtual machine and running its Open event.) If you need this, it sounds like you'll have to include Deploying of the EXE and running it as part of your testing cycle.
Good luck,
Terry.
When you compile and run from the exe you're using your exe. But when you run from the dev environment you're actually using pbxxx.exe (pb115.exe, pb110.exe etc.). You may be able to copy the "application_name.exe.config" into your pb directory and rename it something like pbxxx.exe.config. At least that's the way it works with manifest files -- I had two, one called appname.exe.manifest and one called pb115.exe.manifest.
Just curious but how many libraries/objects are in your application?
I have some very large applications and the longest any of them takes to do a full build is about 30 minutes. Something odd about your aapplication for it to take 2 hours to do a full build.
DLL's dont have config files. Only EXE's.