7 ms·
Hey HN, Creator here. I thought this would be of interest to the HN crowd for things like the LaTeX equation integration and Lua live-edit mode. Happy to answe
by ttd 9y ago
Hey HN,
Creator here. I thought this would be of interest to the HN crowd for things like the LaTeX equation integration and Lua live-edit mode. Happy to answer any questions!
- whatnotests 9y agoLooks great. Is the scripting language in the gif example Ruby?
- ttd 9y agoThanks! The scripting language is Lua 5.2.
- deleted 9y ago[deleted]
- jpfed 9y agoAm I correct in thinking that diagrams have something like a "program-mode" part and a "normal-mode" part? From a new diagram, if I place some objects in normal mode and then switch to program mode, there's no textual representation of those objects.
- ttd 9y agoIn your scenario, the way to gain access to the objects you created in normal mode (e.g. to modify their properties) is by using the `Layer:getObject()` method to retrieve objects by their index. You can see an example in the "Modifying Existing Drawing Elements" in the program mode section of the user guide: https://www.vexlio.com/user-guide/#program-mode https://www.vexlio.com/user-guide/#program-mode
- mipmap04 9y agoI think it would be nice if, when drawing shapes, it would generate the Lua code and the program mode text would persist when switching between modes. I definitely realize that would be quite the task.
- deleted 9y ago[deleted]
- jpfed 9y agoSo it's more that Program mode is an imperative means to add objects to the diagram, and switching between modes commits those changes?
- pbourke 9y agoThis looks really sharp! You mention Lua as a scripting language - was it used for the entire program?
- ttd 9y agoThanks for the compliment! Vexlio itself is written in C# (the Mac version in development uses Xamarin.Mac). I'm using the open-source NLua library to provide Lua hooks to call into the application.
- kittiepryde 9y agoSweet, C#, any chance plugins could be implemented in C#?
- ttd 9y agoI won't rule it out, as it would probably be a (relatively) small extra bit of work to load a C# assembly which interacts with the same API exposed via NLua, but Lua plugins will come first.
- mipmap04 9y agoLove it so far. Is there a way to make HTTP requests in the Lua code (or a way to add plugins)? I can think of a few applications where it would be nice to generate some diagrams off web requests using Lua-cURL and a json parser.
- ttd 9y agoPlugins are definitely on the roadmap. Much of the complexity there is just exposing the API, which is already done for program mode. Your idea of generating diagrams from web request data is great! I'll definitely keep that one in mind. On a related note, it's also planned that you will be able to invoke Vexlio from the command line with a Lua script to programmatically generate diagrams from the shell. That is not yet implemented, however.
- samstave 9y agoCan you please give examples of the applications you're thinking of?
- erinaceousjones 9y agoMaking pretty diagrams from swagger JSON specifications of live APIs would be pretty awesome
- mipmap04 9y agoMostly around data visualization for quarterly reports. Occasionally I make infographics for stakeholders that involve some unusual data visualization / presentation that is more artistic than the usual bars and lines. A tool like this would allow me to build the template for my periodic infographics and then I could enter the data on a website and have the infographic generate on the fly. I've used d3.js for something very similar in the past, but I find d3.js to be a bit complicated and this would be a lot easier to share with less technical team members who I would like to eventually own the creation of these reports.
- deleted 9y ago[deleted]
- ComodoHacker 9y agoI would buy your software if it has template library comparable to Visio or at least Dia. Template library is the thing which defines productivity.
- InitialLastName 9y agoDo you find the Dia templates usable? Every time I use it I end up banging my head against the wall trying to use their symbols until I just give up and make my own.
- veli_joza 9y agoCongradulations on your release. A few questions, if you will: 1) What happens if Lua execution blocks? Or if you construct an infinite loop of drawing primitives? 2) The page claims that you can switch between code representation and normal mode. Are they somehow kept in sync? For example, if I draw a circle, will it generate an API call in Lua code? 3) The interface seems very similar to Inkscape's. Is this intentional?
- ttd 9y agoI'm doing some small amount of sandboxing for the program-mode drawings, but right now there's nothing preventing an infinite loop of primitive creation from exhausting memory and eventually crashing the application. Switching between normal and program mode has several restrictions, but at no point will your drawing lose any objects (if it does, that's a bug). Creating objects in normal mode does not generate API calls, meaning in order to interact with those objects in program mode, you need to use the method I outlined in this comment: https://news.ycombinator.com/item?id=14555028 https://news.ycombinator.com/item?id=14555028. Additionally, switching back to normal mode after using program mode will "commit" the Lua commands, and the next time you switch back to program mode, it will be as if the drawing was entirely created in normal mode. This piece is a bit of a pain point for me, so this behavior may change in the future. Vexlio's interface was definitely inspired by Inkscape in some areas (perhaps most notably, the color bar at the bottom).
- samstave 9y agoHave you installed this on Linux with wine? Werky?
- ttd 9y agoI haven't done that experiment yet, but it's an excellent idea.
- samstave 9y agoI like the draw by grid, but it would be great to have a radial array as well. In your user manual, you show an alias for ellipse which draws on "current layer" - how to make an alias that will draw an object on a set later every time, and if layer doesn't exist, create it... Also, will you have dragable guides (like Visio) from top and bottom, I use them extensively in the diagrams I draw... (drawn thousands)
- ttd 9y agoRadial arrays are a planned feature. I'm still undecided on how the UI will work (if it will be similar or not to the existing duplicate on a grid tool), which is why it didn't quite make it into this release. You can define your own function to do what you're describing. It would just be a part of the function you define before calling the underlying Vexlio `ellipse()` function. Your alias function signature would look something like `function myEllipse(L, ...)` where L is the specified layer to check and create. Then the rest of the varargs would be passed to the `ellipse()` function. Draggable guides are a good idea (Inkscape has them as well) that I'd like to add.
- delhanty 9y agoIt looks very slick. Is the license activation per machine? (As opposed to be being per user.)
- ttd 9y agoThe legalese states that you are allowed to install and use Vexlio on up to 3 machines per license key.
- derekmcloughlin 9y agoDo you plan to add connectors to shapes - i.e. lines that stay connected to the objects at either ends? Dealbreaker for me.
- ttd 9y agoAbsolutely -- it's an important feature for me as well. I have a development branch already with initial support for "sticky" lines with this behavior, but it did not make it into this release.
- fasteo 9y agoCongrats for the release. Slightly off-topic. Did you use a predefined Hugo theme for the landing page ?
- ttd 9y agoI am using a fairly heavily customized version of the "Universal" theme for Hugo: http://themes.gohugo.io/hugo-universal-theme/ http://themes.gohugo.io/hugo-universal-theme/. It's a port of a template by these people: https://bootstrapious.com/p/universal-business-e-commerce-template https://bootstrapious.com/p/universal-business-e-commerce-te.... It is only $10 to remove their attribution from the footer, but I'll happily give them a plug here.
- fasteo 9y agoThanks for the pointers.
- mkl 9y agoHi, what are you using to do the LaTeX formula layout?
- daveroberts 9y agoHow did you make / optimize the animated gifs on the front screen?
- ttd 9y agoI used the ShareX screen recorder (https://getsharex.com/ https://getsharex.com/) to record each GIF at 30 fps. I believe underneath ShareX is using ffmpeg to do the encoding. They were a bit of a pain to make, as it's a very manual process to get something that looks rehearsed and smooth.