News for hackers. Stuff that matters.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @11:45AM (#14553554)
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!

Re:Show HN: Vexlio – Create precise, beautiful diagrams by mipmap04 on Wednesday June 14, 2017 @02:58PM (#14555115)
Love 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @03:04PM (#14555168)
Plugins 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.

Re:Show HN: Vexlio – Create precise, beautiful diagrams by samstave on Wednesday June 14, 2017 @06:14PM (#14556539)
Can you please give examples of the applications you're thinking of?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by mipmap04 on Friday June 16, 2017 @11:01AM (#14569583)
Mostly 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by erinaceousjones on Thursday June 15, 2017 @10:09AM (#14560515)
Making pretty diagrams from swagger JSON specifications of live APIs would be pretty awesome
Re:Show HN: Vexlio – Create precise, beautiful diagrams by jpfed on Wednesday June 14, 2017 @02:46PM (#14554991)
Am 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @02:50PM (#14555028)
In 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
Re:Show HN: Vexlio – Create precise, beautiful diagrams by mipmap04 on Wednesday June 14, 2017 @03:00PM (#14555134)
I 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by jpfed on Wednesday June 14, 2017 @10:52PM (#14557583)
So it's more that Program mode is an imperative means to add objects to the diagram, and switching between modes commits those changes?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by mkl on Thursday June 15, 2017 @06:26AM (#14559158)
Hi, what are you using to do the LaTeX formula layout?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ComodoHacker on Wednesday June 14, 2017 @03:48PM (#14555510)
I would buy your software if it has template library comparable to Visio or at least Dia. Template library is the thing which defines productivity.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by InitialLastName on Wednesday June 14, 2017 @04:32PM (#14555886)
Do 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by veli_joza on Wednesday June 14, 2017 @04:38PM (#14555927)
Congradulations 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?

Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @04:46PM (#14555990)
I'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. 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).

Re:Show HN: Vexlio – Create precise, beautiful diagrams by delhanty on Thursday June 15, 2017 @12:57AM (#14558008)
It looks very slick.

Is the license activation per machine? (As opposed to be being per user.)

Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Thursday June 15, 2017 @05:36AM (#14558958)
The legalese states that you are allowed to install and use Vexlio on up to 3 machines per license key.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by derekmcloughlin on Thursday June 15, 2017 @04:02AM (#14558656)
Do you plan to add connectors to shapes - i.e. lines that stay connected to the objects at either ends? Dealbreaker for me.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Thursday June 15, 2017 @05:34AM (#14558952)
Absolutely -- 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by whatnotests on Wednesday June 14, 2017 @12:05PM (#14553672)
Looks great.

Is the scripting language in the gif example Ruby?

Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @12:08PM (#14553695)
Thanks! The scripting language is Lua 5.2.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by pbourke on Wednesday June 14, 2017 @02:54PM (#14555062)
This looks really sharp! You mention Lua as a scripting language - was it used for the entire program?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @02:59PM (#14555132)
Thanks 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by kittiepryde on Wednesday June 14, 2017 @08:48PM (#14557141)
Sweet, C#, any chance plugins could be implemented in C#?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Thursday June 15, 2017 @05:40AM (#14558970)
I 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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by fasteo on Thursday June 15, 2017 @05:42AM (#14558982)
Congrats for the release.

Slightly off-topic. Did you use a predefined Hugo theme for the landing page ?

Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Thursday June 15, 2017 @06:04AM (#14559073)
I am using a fairly heavily customized version of the "Universal" theme for Hugo: 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-te.... It is only $10 to remove their attribution from the footer, but I'll happily give them a plug here.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by fasteo on Thursday June 15, 2017 @11:40AM (#14561408)
Thanks for the pointers.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by daveroberts on Thursday June 15, 2017 @10:41AM (#14560807)
How did you make / optimize the animated gifs on the front screen?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Thursday June 15, 2017 @11:12AM (#14561106)
I used the ShareX screen recorder (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.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by samstave on Wednesday June 14, 2017 @05:56PM (#14556426)
Have you installed this on Linux with wine? Werky?
Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @06:01PM (#14556451)
I haven't done that experiment yet, but it's an excellent idea.
Re:Show HN: Vexlio – Create precise, beautiful diagrams by samstave on Wednesday June 14, 2017 @06:18PM (#14556562)
I 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)

Re:Show HN: Vexlio – Create precise, beautiful diagrams by ttd on Wednesday June 14, 2017 @06:27PM (#14556601)
Radial 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.