Lua Bytecode to Lua human "readable" - lua

I just got an script that I want to make some changes and I'm looking for someone to develop me a freelance job to make the loadstring that I will give readable for editing.
The Lua code is like this:
------------------------- ENGINE -----------------------------
code='\27\76\117\97\81\0\1\4\4\4\8\0\56\0\0\0\64\67\58\92\85\115\101\114\115\92\74\101\
I want it to be turned into a human code. I already searched about the subject and found that there are some tools like Chuckspy, Luadec51 and Unluac that can do this job. Anyway, I never programmed before in lua and got no compiler knowledge to perform that.
I'm looking for someone to help me, I have no idea how I'll do it.
Thanks anyway
The link of two archive:
http://www.4shared.com/file/uQguRL4D/Avani_Dice_Script_1.html
http://www.4shared.com/file/FSLbD9tA/Avani_Dice_Script_2.html

luac -l will print out the Lua bytecode in human-readable form. With a basic understanding of Lua's instruction format, this is fairly easy to manually turn into source code.
As with other languages, automatic decompilers will rarely produce source code which is useful for understanding or editing the code.

Related

Is there something like Python help function in Fsharp interactive?

Using Python in command line you can write help(function) to see docstring.
Is there something similar in Fsharp for fsi?
Do you have any tips and tricks for working in fsi anyway?
What is even possible to find out without using IDE? Just from interactive session.
EDIT:
This question is actually addressed to Python guys who know Fsharp as well. I guess MS guys relying on their VS might find my question pretty strange :)
So far it seems that my question has simple answer: NO.
EXAMPLE:
Lets say you are logged to remote computer via console. I dont know whether this is typical or even possible scenario. For some reason I started fsi and now what? Am I lost or do I have some chances to get some help from fsi directly
DISCLAMER:
I know Scott Wlaschins fsharpforfunandprofit.com pretty well. But his example is dedicated to C# users. Pythonists have different workflow.
If you are used to interactive python, and you like the approach, you may have a look at this F# engine for iPython Notebook:
https://github.com/fsprojects/IfSharp
Yes.
Simple introspection can be done by typeof <_> or typedefof<_>.
For example:
typeof<System.Console>;;
In fsi you can use TAB completation, but apperantly just from command line. It is not working in my Xamarin.
Neat trick is to run:
fsi --use:yourfile.fsx
which run your file and let you test it interactively.
For more info you can use in command line fsi.exe --help.

Java2dart, how use it

I have downloaded the sources, then... I don't know what I'm supposed to do.
I think that we have to compile these, but I'm not really familiar with java.
Do you have a complete example for use it ?
The java2dart tool was written for Google's own use, to help convert many of the tools from Java into Dart. Is was not intended to support conversion of all Java apps; just what was required to get things like the IDE tools (Analyzer, etc.) into Dart.
As such, there's not a huge amount of info on what it can/can't do or the best way to use it. It is written in Java, and there doesn't appear to be a pre-built binary; so it would almost certainly involve compiling the Java yourself. Unfortunately I have almost zero experience with Java (or fortunately, depending on your point of view :))
You can find a little info on this in the Dart Google Group here:
https://groups.google.com/a/dartlang.org/d/msg/misc/4mSK-M7dm2U/ARbTh6emb-sJ
I wonder whether anyone has tried running java2dart on java2dart to get a nice Dart version? :) Or even then running it through dart2js to get a JavaScript version! ;)

OCRopus documentation?

Is there a documentation for ocropus?
I am looking for an explanation for the functions like:
make_SegmentPageByRAST():
segment()
RegionExtractor():
setPageLines()
extract()
Thank you.
A requirement of Lua API for OCRopus has been filed in the bug-tracker list of the project.
They will soon be releasing this documentation in the next beta release(expected).
First, note that you can use the command line tools without actual Lua programming.
A good place to see how to use ocroscript is to look at the test cases in
ocroscript/tests and the command line driver scripts in ocroscript/scripts.
Note: The Lua bindings follow the C++ API very closely (the binding is mostly
automatic), so C++ and Lua documentation are pretty much the same problem.

Can Coco/R turn a parsed file into bytecode?

I want to write a simple compiler for educational purposes in Delphi. I have read about Coco/R and found this implementation for Delphi: http://code.google.com/p/dcocor/ . From what I have read, this is a parser for the Delphi 2009 syntax.
What would I have to do to turn the parsed file into a bytecode? Can Coco/R do this?
I know about scripting languages like FastScript or DWS, but I'd like to try and write my own for my own purposes.
Please give me some advice or clarify things a little.
What would I have to do to turn the parsed file into a bytecode?
First, decide what kind of bytecode would you like to have: JVM? LLVM? MSIL? Inventing your own?
Can Coco/R do this?
Coco/R is a parser generator framework, it only generates lexer-parser for a language you define and feed to the generator. Steps after that is your responsibility. Though there might be projects out there that can help generating ast/target code (but I haven't found any for Coco/R ).

How to print Smalltalk code from Pharo/Squeak?

What is the best way to print - syntax colored and well formatted - code from Pharo/Squeak on paper?
1) Is there a way to print directly from within Pharo/Squeak? (i use it on macosx)
2) Is there a way to export syntax colored, well formatted code from Pharo/Squak?
3) Are there external tools to color and format a filed out piece of code?
For the appendix in my master thesis I used the Pier CMS-to-LaTeX converter in the Pier-Documentation package. However, this plugin only takes class comments and method comments into consideration, it does not print the source code. Pier also provides a package ShoutPier for syntax highlighting of Smalltalk code, so I guess it would require little work to bring the two together. You can find the mentioned extension packages in http://source.lukas-renggli.ch/pieraddons.html.
Pharo browsers seem to use syntax highlighting.
What difficulty are you having reading Smalltalk code using the browsers and senders/implementors ?
Edit: Would something that produces UML give the overview you're looking for? The Dandelion website only shows downloads for old Squeak versions - I don't know if they would work with Pharo.
And perhaps this GSoC project "Generate UML diagrams from Smalltalk code for Pharo" suggests not.
Here's how I did it on my Mac, I think this should work on other platforms too.
Save your categories to a Monticello local folder on your disk -- see the Pharo manual on how to do this: http://book.pharo-project.org/book/PharoTools/Monticello/?_s=hdGOLc_FXsvVY1iR&_k=YYH-Ln8f5mtWZ8z2&_n&148
Browse to this folder, and unzip the .mcz file
You'll see all your code in snapshot/source.st file
You'll need to edit this a bit, to remove the ! characters for e.g., there might be a tool to do this?
-Eric.
There is webdoc project, which allows you navigating code in web browser:
http://ss3.gemstone.com/ss/webdoc.html
(and of course you can print code from your favorite web browser)..
1) Install shout from www.squeaksource.com
2) I don't know. May be you can customize shout.
3) In gnu-smalltalk you have a smalltalk mode for emacs. But I am not pretty sure to understand what you are looking for.

Resources