HNHacker News
TopNewBestAskShowJobs

jarek-foksa

1,958 karma · joined April 19, 2011

I'm the developer of boxy-svg.com and xel-toolkit.org.
submissionscomments
jarek-foksa··on Inkscape 1.1.2
Check Boxy SVG for an SVG-focused vector graphics editor. Its UI is heavily inspired by Inkscape and the Linux version is available for free (you just have to run "snap install boxy-svg").
jarek-foksa··on Tldraw – a tiny little drawing app
There is the standard event.getModifierState() API, but the most reliable solution I found was to listen for "keydown", "keyup", "blur", "pointerdown", "pointermove" and "pointerup" events on the window object and then store the modifier keys state based on the value of event.ctrlKey/altKey/metaKey/shiftKey.

You need to listen for the pointer events because some devices such as Wacom tablets do not dispatch proper keyboard events when you press a button that has a modifier key role assigned to it.

On Apple devices event.metaKey represents the state of the command key, so in most scenarios you would be storing the state as: let ctrlOrCmd = (isAppleDevice ? event.metaKey : event.ctrlKey);

jarek-foksa··on Ask HN: Companies of one, what is your tech stack?
Last time I checked Firefox didn't support Native File System API, Constructable Stylesheets API and HTML Dialog API which are used extensively by Boxy SVG.
jarek-foksa··on Ask HN: Companies of one, what is your tech stack?
I'm using electron-builder too. Things get more complicated when you want to publish your app on different app stores.

I was unable to build a Snap Store package for arm on an amd64 machine. Canonical provides their own remote build service, but proprietary projects can't use it yet.

In order to build a package for distribution on the Mac App Store I have to use macOS with XCode installed and signing certificates stored in the system keychain. Uploading the package to the app store also must be done with macOS-specific tools. At least it is possible to build multi-arch packages, so I don't need two separate machines as it is the case with snaps.

Windows 10 with Windows SDK is required to build an appx package for distribution on the Microsoft Store.

jarek-foksa··on Ask HN: Companies of one, what is your tech stack?
> Finally! one that can import PDFs, a must have for tuning. For example, "Print to PDF" from the browser and import it in an editable format.

To be honest Boxy SVG is not the best tool for manipulating PDFs. It should be able to import most PDF files as it is using Mozilla's PDF.js library under the hood, but once you import the file you have to deal with limitations of the SVG format such as lack of support for multi-page documents, flowed texts and forms.

> My question, as you made it a PWA, why bother with Electron?

Electron-based apps feel much more native than PWAs on macOS, for example you can make the app use native menubar and tabs. The gap between PWAs and Electron/native apps is probably going to be closed at some point in the future: https://fugu-tracker.web.app/

> BTW, I bet you have it tasked, but having a shortcut profile selector with AI and Inkscape ones would help.

I will try to implement this functionality later this year, it is tracked on https://boxy-svg.com/ideas/42/keyboard-shortcuts-presets

jarek-foksa··on Ask HN: Companies of one, what is your tech stack?
Thanks, I will check it out. I didn't know GitHub Actions could be configured to run on proprietary operating systems.
jarek-foksa··on Ask HN: Companies of one, what is your tech stack?
https://boxy-svg.com - vector graphics editor similar to Inkscape and Adobe Illustrator.

Both client- and server-side code is written with vanilla JavaScript. Since I'm targeting only Electron and modern Chromium-based browsers I can use latest web technologies without any transpilers or preprocessors. I'm using mostly raw DOM APIs without any abstraction layers.

Third-party services:

- Firebase (database, storage, hosting, cloud functions)

- Paddle (payments, taxes)

- Algolia (instant search)

- ProtonMail (regular emails)

- SendGrid (transactional emails)

I have been using Firebase, Paddle and Algolia for several years now. So far I had zero problems with them and the overall experience was great (intuitive dashboards, good documentation, clean APIs).

I only wish there was a service that would allow me to easily build Electron packages for multiple operating systems and architectures - currently it is a mess that requires multiple virtual machines with a ton of dependencies.

jarek-foksa··on Stripe Tax
> Meanwhile you act as a company with a single B2B client and one invoice a month

There were some changes in this area recently. Paddle is now providing you two reverse invoices each month, one for sales in the USA done by Paddle.com Inc. and one for sales in the rest of the world done by Paddle.com Market Ltd.

For the accounting purposes you have two B2B clients (belonging to the same group). You still receive a single wire transfer though.

jarek-foksa··on Show HN: Redact – Automated deletion for your content on social networks
This is the new normal for Electron-based apps on macOS. The Electron framework itself is ~350 MB when targeting both Intel- and M1-based Macs.
jarek-foksa··on Headless WYSISWYG Text Editor – tiptap editor
Why not just ask users to also sponsor the ProseMirror project directly? Actually, this is what they are doing on their "Sponsor" page: https://www.tiptap.dev/sponsor/
jarek-foksa··on Show HN: I built a tool to generate triangulated art from images
Similar functionality is already implemented in Boxy SVG editor [1]. There is also another more powerful "Primitivize" generator which has more options, e.g. you can choose whether the vectorized image should consist from triangles or rectangles.

[1] https://i.imgur.com/I8Fq1bM.gif

jarek-foksa··on Show HN: I built a tool to generate triangulated art from images
Also check out my web app Boxy SVG [1] which integrates both vectorization algorithms as "Triangulate" and "Primitivize" generators [2].

[1] https://boxy-svg.com/app

[2] https://boxy-svg.com/blog/9

jarek-foksa··on Icons – Google Fonts
Linux desktop app is free, macOS desktop app costs 9.99 USD (one-time payment), web app costs 9.99 USD / year (no cloud services) or 9.99 USD / month (with cloud services). The complete pricing table is shown in the footer area of the home page when you open it with a Chromium-based browser.
jarek-foksa··on Icons – Google Fonts
This should work as long as the SVG shapes have the "fill" and/or "stroke" set to "currentColor".
jarek-foksa··on Icons – Google Fonts
You can also use Boxy SVG to create and edit SVG sprites: https://boxy-svg.com/#tour-symbols
jarek-foksa··on You might not need jQuery (2014)
The NodeList returned by querySelectorAll() is not live. There is really no reason for it to return a NodeList other than backward compatibility.
jarek-foksa··on You might not need jQuery (2014)
The modern DOM equivalent would look almost the same as the jQuery version:

  document.querySelector(".class").remove();
  document.querySelector(".class").after(...);
jarek-foksa··on You might not need jQuery (2014)
With modern JavaScript you can easily cast a NodeList to an Array, e.g. `let spansArray = [...element.querySelectorAll("span")]`.

I find both `element.nextElementSibling` and `element.next()` to be examples of poor API design. The former one is more verbose than needed while the latter one is so short you can't even tell whether it's a method or a property.

jarek-foksa··on Scientists grow bigger monkey brains using human genes, replicating evolution
Yeah, you can see tribalism even here on HN in discussions on different operating systems or programming languages. We are an animal that is irrational, predatory and highly social by nature. Whether we team up to build something useful or to fight with the other tribe depends mostly on the social programming done by the institutions of power such as media, schools and churches.

These institutions also have the power to decide what defines "our" vs "their" tribe. Just the usage of the terms "pro-life" or "pro-choice" already indicates that someone identifies with a specific tribe as the language is an important part of the collective identity.

jarek-foksa··on Scientists grow bigger monkey brains using human genes, replicating evolution
Maybe what we really need first is a new religion and ethics, one that would eliminate the "playing god" dilemma and enable faster progress in the right direction. It could picture us animals as insignificant and not worthy the attention of the creator of the universe unless we reach ourselves a certain level of intelligence, consciousness and empathy.
jarek-foksa··on Inkscape 1.0.1
Gravit project was started by a different person (Alexander Adam), it is now owned and developed by Corel.
jarek-foksa··on Inkscape 1.0.1
It works on the latest version of any Chromium-based browser such as Chrome, Vivaldi, Opera, Edge, etc.
jarek-foksa··on Inkscape 1.0.1
You might want to try Boxy SVG [1]. Its UI is heavily inspired by Inkscape.

It tries to use as little non-standard namespaces as possible, e.g. check [2] for a comparison of the markup you get after creating a new file and drawing a single rectangle.

The app uses Chromium rendering engine under the hood, so most files should render the same way as when opened with Chrome.

[1] https://boxy-svg.com

[2] https://gist.github.com/jarek-foksa/8f5bdef732827bc2a3bf49e3...

jarek-foksa··on Lesser-known Web APIs
The prompt that asks user for a permission to write a local file says: "<domainName> will be able to edit <fileName> until you close all tabs for this site [Cancel] [Save changes]".

But before this prompt is even shown, user must first manually select the file with the native file picker dialog and click the "Open" button.

Therefore, giving accidental accesses to a file is not going to be as easy as with a camera or a microphone.

jarek-foksa··on Lesser-known Web APIs
The level of security seems to be on pair with Electron apps running inside macOS sandbox. Even if the attacker manages somehow to inject and execute a script on the client side, it will have access only to the files that user has opened with the app recently, not the entire filesystem.
jarek-foksa··on Lesser-known Web APIs
Native File System API [1] is going to be the biggest game changer in 2021. So far it was little known and rarely used because of the origin trial limitations, but it will become available to everyone soon [2].

[1] https://web.dev/native-file-system/

[2] https://bugs.chromium.org/p/chromium/issues/detail?id=853326...

jarek-foksa··on First tax year with Stripe Atlas
Yeah, he is also presenting it from a perspective of someone running a side businesses with low revenue.

As a sole proprietor you pay only 16255 PLN/year for your health and social insurance. This is no matter how big your income is and what your health condition is. You could be making millions while suffering from a chronic disease and you would be still paying the same minimal amount for your insurance. There are also some ways to reduce it even further, e.g. if you are starting your first business.

jarek-foksa··on First tax year with Stripe Atlas
Businesses developing and selling their own software products can easily reduce the effective income tax rate even further to 5% with the new IP Box regulations.

This is an extremely low rate for a developed country and there are plans to make tax avoidance by limited companies even easier in 2021 by incorporating solutions from the Estonian tax system.

jarek-foksa··on Ask HN: How to do cross platform GUI?
I'm developing a cross-platform widget toolkit for Electron and Chromium-based browser called Xel [1]. The next major version of the toolkit (to be released later this year) is going to support dark mode and several new themes [2].

[1] https://xel-toolkit.org/

[2] https://boxy-svg.com/ideas/90/preferences-theme-setting

jarek-foksa··on Universal Basic Income is Capitalism 2.0
> Where is the money for UBI going to come from? What incentive would there be for people to work?

Ideally the money should come from the elite class that is accumulating the capital thanks to automation and monopolization. A huge part of this capital is currently spent in non-productive ways like speculation, lobbying and luxuries. This is what some socialists and social democrats are proposing, though most agree we have not reached the needed level of automation and advancement yet.

Neoliberals don't really want the UBI anytime soon, they just hijacked the term and are now bastardizing it just like they did with many other good leftist ideas because they found them either threatening to their interests or useful for their power games.

As other posters here have already noticed, "neoliberal UBI" will most likely be used to incite conflict and division between the lower and middle class. They will make the middle class pay the bill while promoting victim mentality and degeneracy among the lower class. This should produce a shitshow that will help keep the wage slaves distracted for the next decade or two until a true UBI becomes a possibility.

← PreviousPage 2 of 11Next →