HNHacker News
TopNewBestAskShowJobs

kjksf

6,940 karma · joined September 5, 2009

My website is https://blog.kowalczyk.info

Working on https://filerion.com/, a web based file manager (s3, Dropbox and more).

I created https://www.sumatrapdfreader.org

submissionscomments
kjksf··on Show HN: Edna, note taking app for developers
Actually, it's based on CodeMirror
kjksf··on Show HN: Edna, note taking app for developers
Heynote is a scratchpad, a single note, and has no plans to support multiple notes or really grow it beyond what it is right now.

Which I respect but I needed at least multiple notes, bringing this much closer to apps like Obsidian, Bear etc.

And then I added a bunch of features that I wanted to have, like UI for opening/creating/deleting nots inspired by Notational Velocity, encryption, command palette, history, Ctrl + B for navigating between blocks.

Edna is basically a superset of Heynote: it does everything Heynote does and lots more.

So yeah, the vision is pretty different.

kjksf··on Show HN: Edna, note taking app for developers
This is one of the uses for me as well: jotting temporary notes when programming.

One of the default notes is `scratch` for exactly that and you can summon it quickly with `Alt + 1`

kjksf··on Show HN: Edna, note taking app for developers
Edna actually has Emacs mode which you can choose in settings.

You can see implementation: https://github.com/kjk/edna/blob/main/src/editor/emacs.js

I can't say how well it works. I just noticed that I would need to change some keybindings because they conflict with Emacs keybindings.

kjksf··on Show HN: Edna, note taking app for developers
The above is a partial list, Edna supports about 30 langs.

To add another one, you need to find library that implements CodeMirror mode for that language, add it to package.json and update languages.js

kjksf··on Show HN: Edna, note taking app for developers
Desktop would be easy to do but seems a bit pointless.

You can install a PWA shortcut which gives you even more desktop experience in the sense that it looks like an app separate from the browser.

That is what I do.

What are those corporate rules and how are they enforced?

Is it about storing data? Because Edna stores the notes on your computer, it's never sent to any server.

kjksf··on Show HN: Edna, note taking app for developers
Yeah, so far this behavior is inherited from Heynote.

I've been thinking about making math an option within markdown.

The type of the block is shown at the bottom, in the status bar.

kjksf··on Greece introduces the six day work week
I'm confused because economically it doesn't add up.

Shortages of labor should lead to higher wages. Supply and demand.

So it would make sense to relax laws prohibiting working more than 40hrs in order to unleash additional economic output i.e. increase the amount of money made.

The article claims that for some reason that defies logic, it will just make employers demand more work for same amount of money.

I see two possibilities for that.

A country-wide collusion between employers to fix wages. That doesn't seem possible. If employer A has profit to spare and could make even more profit if he had more employees, what logic would lead him to NOT raise wages and steal workers from employer B? The wages should raise because workers would migrate to the highest paying jobs.

Or there just isn't profit to pay more in which case there's noting the government can do either way.

kjksf··on EVs Are Selling Well for Everyone Except Tesla
The ruling was mostly not about board's competence but based on judge's opinion that during original vote the shareholders weren't properly informed about things.

Given that re-approval happened at similar levels of shareholders support, that judgement seems incorrect.

And yes, it is unprecedented as in "there's no similar ruling in Delaware history".

And I stress "similar", not the "board competence" idea you made up.

As you yourself noted, the precedent in Delaware is that judges stay away from second guessing boards or shareholders and this seems like an activist ruling, not something based on past Delaware rulings.

kjksf··on EVs Are Selling Well for Everyone Except Tesla
It was re-approved by a shareholder vote, just like it was approved by a shareholder vote the first time.

At the same time a move to Texas was approved by shareholder vote, but it had nothing to do with approval of pay package.

Plus, moving to Texas would not void the Delaware ruling.

kjksf··on Germany is No 1 in Europe for EV production, No 2 in the world
This is not the news that informs.

I can't tell from the article if they count Tesla's Berlin factory as "German assembly line".

If not, the article should say that.

If yes, to say that "Germany’s automakers manufactured" 1 million EVs is misleading given that around 25% of that was Tesla's Model Y.

Tesla has a factory in Germany but it's a stretch to call it a German automaker, just like Toyota has factories in Mexico but we don't call it Mexican company.

Either way, to namecheck Volkswagen or BMW but not Tesla is just bizarre.

kjksf··on Needlessly Public
Counterpoint: this kind of fiddling is what makes C++ unpleasant and unproductive language.

You spend so much time finding solutions to problems that don't exist in other languages and contribute nothing to actually shipping the software

"Let's make this member private, because others should not touch it".

"Shit this function I just wrote must touch it. I know! I'll add a friend declaration".

Now you changed the header and spend 5 minutes recompiling the whole program.

I speak as someone who wrote 120k loc of C++ in SumatraPDF.

I just don't bother making things private. Or to put it differently: I use other ways to do it, when possible (confine as much as possible to .cpp files, don't expose classes at all) but if I can't hide the whole class like that, I would rather expose it all than waste my cycles on micro-managing visibility.

"Ok, it works for you but surely won't scale to large teams!"

All the giant ruby, python, javascript codebases tell us otherwise.

On a side note: I don't think I ever seen Go being praised for coming up with the brilliant design of making public / private visibility a matter of a module, not struct, like literally everyone else, even those who did it after Go. This strikes the perfect balance of being able to hide details of a module without affecting productivity of people implementing the module.

kjksf··on Qimgv – Fast, simple image viewer
I like the UI optimized for power users (keyboard shortcuts).

But good lord, it's 130 MB of dlls on Windows.

A much svelter alternative (on Windows) is CactusViewer (https://github.com/Wassimulator/CactusViewer), at mere 2.3 MB.

kjksf··on Can ketones enhance cognitive function and protect brain networks?
Your body starts producing ketons when you stop eating. Typically it starts 12 to 24 hrs.

It'll start faster if you don't eat carbs / sugar and instead use protein because the body start producing ketons when it runs out of glycogen stores. Sugar and carbs add glucose to your blood. The less of it you have, the faster the body will start producing ketons.

Exercise also helps because it uses glucose faster. Of course assuming you'll not just start eating carbs / sugar after exercise. That includes all drinks that include sugar.

But really you'll get most benefit of exercise just from a walk after meal.

Why after meal? Because that's when glucose spikes and a walk uses glucose faster.

kjksf··on Can ketones enhance cognitive function and protect brain networks?
It's not nonsense and you're not addressing the main point: overuse.

A glass of wine is harmless. A bottle of hard spirit will poison and potentially kill you.

Your body can nullify small amounts of alcohol. But if you drink more toxin than what your body can neutralize it poisons you.

Sugar and carbs rise glucose level in your blood. When it's small amount your blood will re-distribute it to cells as fuel.

But if you eat enough sugar and carbs that your body cannot absorb all the glucose, you become fat and develop diabetes.

So yeah, sugar is fuel and tastes good but in modern food products it's used everywhere which makes moderate use very hard to achieve.

That's why 99 million of Americans are overweight, 70 million are obese.

29 million have diagnosed diabetes, 10 million estimated undiagnosed diabetes and 115 million pre-diabetes.

kjksf··on Asqi: A codebase explorer designed to help navigate and understand Git projects
I like the speed and compactness of the UI.

Hopefully constructive feedback.

1. That message about upcoming feature obscures the code and is actually a big div taking the whole right side, from top to bottom, which blocks events like scrolling with mouse wheel. It's white so it looks like part of code but blocks scrolling of code.

2. those circular things are a gimmick in my mind. And acting on hover is confusing: I move the mouse and things flash wildly.

Give me a clear option to permanently hide the circular thingy.

Only act on click, not mouse over.

3. When I clicked on an enum definition (e.g. in postgres parser) I expected a way to see all places that use that enum. It's not possible or I'm missing something.

4. The "search everywhere" dialog is confusing. Again, a big circular thingy, invisible cursor so I don't even know I can type something and I don't know what I'm searching there. File names? I expect search to be full text search of all files.

5. I was confused by `C-u`. Now I get that it's `Ctrl-u` but make it more obvious . At least in help use the full `Ctrl-u` and add tooltips with full version.

6. The color of tabs is the inverse of what I expect based on pretty much all other software I use. A current tab should have the same color as the panel, so that it looks like it's part of it. Since panel is white, selected tab (e.g. History vs. Tree) should also be white. It's black. Or find some other way to make it clear which tab is selected.

kjksf··on Webview: Tiny cross-platform webview library for C/C++
In case you're not just riffing: no, it's not statically linked.

The WebViewLoader.dll is embedded in the source code and then loaded into memory as if it was loaded via LoadLibrary() or by Windows .exe loader which loads referenced .dll automatically.

Granted, he re-implemented LoadLibrary() to load from memory, which can potentially break if Microsoft changes the details of how LoadLibrary() is implemented.

This is one of my pet peeves with Microsoft API design. LoadLibrary() only works with files from disk.

It should be implemented as a trivial wrapper around LoadLibraryFromMemory() but Microsoft didn't implement LoadLibraryFromMemory so we have to resort to re-implementing LoadLibrary when we want this very useful functionality.

kjksf··on iTerm2 removes AI feature from core, creates separate plugin
I actually worked with George and he is about the nicest person there is. This is not sarcasm or double speak. He really was a great guy to work with.

Now he's spending his free time working almost daily on free, open source gift that is iTerm.

The issue here really is the hysteria of people who complain about it.

It's something you had to configure by entering an API key and it wouldn't do anything if you didn't.

Didn't stop people being wrong about what happens and refusing to accept they were wrong even when it was explained to them they were wrong.

You try to spend your free time providing great software to people, add a useful people and have a stream of ignorant complains and hate rain down on you.

I'm sure you would be all sainty about.

kjksf··on Storing knowledge in a single long plain text file
Yes, Codemirror.

What I know about Codemirror I mostly learned by reading other people's code so I suggest that.

Specifically code of silverbullet: https://github.com/silverbulletmd/silverbullet/tree/main/web... (and a few other directories there).

It implements very advanced Markdown mode, lots of code to learn from.

kjksf··on Storing knowledge in a single long plain text file
To save on disk you must use Chrome or Edge because only they support necessary APIs.

Initial note storage is in localStorage. To switch to disk: right-click for context menu, `Notes storage` / `Move notes from browser to directory`.

Then choose a directory on disk and we will do one time migration from localStorage => disk.

You can then switch to another directory (some apps call it a "workspace"). Because why not.

Encryption is probably the next feature I'll add because I want to store secrets in my notes and I'll feel better if those notes are encrypted.

More docs: https://edna.arslexis.io/help

Multiple notes is pretty big addition. I loved the concept and implementation of blocks in Heynote but a single note was a deal breaker for me.

I've also added some UI like right-click context menu for discoverability, ability to enable spell checking.

And I'm really trying to optimize for speed of use, including speed of switching between notes.

For example you can assign Alt + 0 .. Alt + 9 as note quick access shortcuts.

By default I create 3 notes: scratchpad, daily journal and inbox and they get Alt + 1, Alt + 2, Alt + 3 quick access shortcuts but you can assign them to any page you want.

kjksf··on Storing knowledge in a single long plain text file
Probably not to Edna. It's focused on being fast and lightweight.

I've been thinking about more featureful markdown note taker that would support images and more.

I've started on such a thing but stalled. It's way more work. The good thing about Edna is that I spent less than a month adding the features I wanted to Heynote fork.

The current version is at https://notedapp.dev/ but don't use it for actual notes.

kjksf··on Storing knowledge in a single long plain text file
Yeah, I loved the simplicity and speed of Heynote and math mode.

I wanted multiple notes and I didn't get why it was made as a desktop app first given that all functionality to implement it is available in a browser (well, Chrome).

So I forked it and added those features.

Been using it daily so it was worth it.

kjksf··on Storing knowledge in a single long plain text file
Not at the moment.

I was thinking about making math more like a mode i.e. make it available in every block type, as opposed to it's own block type.

Then it would be active in plain text, markdown and even code blocks.

As to data fetching - falls a bit outside of scope.

kjksf··on Storing knowledge in a single long plain text file
Edna is a fork of Heynote with a bunch of changes.

Mostly it supports multiple notes and it's a web app, not a desktop app.

I could build a desktop app but it would not offer almost any advantages given that Edna can also save notes on disk (that's how I use it).

You can use Chrome's "Install" feature to make it look act like a native app (it opens in it's own window and acts independently of the browser).

kjksf··on Storing knowledge in a single long plain text file
Chrome implements APIs that allow accessing files on the disk.

So Edna either stores notes in localStorage or in a directory of your choosing on disk.

In Edna you can right-click for context menu to switch between localStorage and disk.

If you ask: "how do the browser APIs work", you can look at https://github.com/kjk/edna/blob/main/src/fileutil.js

Basically, there's `window.showDirectoryPicker()` to ask user for permission to access directory (either read only or read write). And then using that directory handle you can read list of files, read / write files or create new files.

kjksf··on Storing knowledge in a single long plain text file
I've built a web-based tool for myself that has similar philosophy: https://edna.arslexis.io/

It does support multiple pages but you can use just one.

It has a nifty feature in that you can divide the single file into virtual parts. They just have alternate backgrounds to tell them apart. And each virtual part can have a type for syntax highlighting (plain text, markdown or a programming language).

I've been using it for a few months now and it's my primary note taking / knowledge recording thing.

Even though it's web based, on Chrome you can save notes on disk so it works like a desktop app.

Each note is a plain text file so you can edit them in any text editor.

If you put notes on a shared drive (Dropbox, OneDrive, Google Drive etc.) you can work on notes on multiple computers.

It's also open-source: https://github.com/kjk/edna

kjksf··on Wuffs: Wrangling Untrusted File Formats Safely
Google was never trying to write PDF reader from scratch so they never "gave up".

They just bought foxit code to save years of development when they wanted to ship PDF reader in Chrome.

Your comment about "the only viewer that is semi-correct" is also wildly off the mark.

Parsing correctly written PDF files is hard but multiple engines can do it correctly.

Parsing real life PDFs is much harder then correctly implementing PDF spec because lots of PDFs are just broken. They generators create invalid PDF files and then PDF readers have to spend heroic efforts to somehow make sense of this brokenness. Adobe does it better than most because... well it would be embarrassing if they didn't. They invented the format, they make money from their tools, they were doing it the longest, they have the largest archive of broken PDFs for testing etc. It's hard to expect that e.g. an open-source project with one or two developers can match that.

I work on SumatraPDF so I know.

kjksf··on Swift sucks at web serving or does it?
Dart "lost" because it was a completely different language than JavaScript, with completely different , much smaller ecosystem of libraries and thus huge switching costs.

TypeScript, being a type system over JavaScript, re-uses JavaScript ecosystem and allowed incremental adoption.

Dart is now "winning" because Flutter is a very good way to write once and deploy on Android and iOS (and maybe in the future on web and desktop). That drives adoption of Dart and builds ecosystem of libraries.

kjksf··on He Lost $36B in a Week. Now Bill Hwang Is Fighting to Avoid Prison
Imagine you have a house and you go to 5 different banks and take 5 different mortgages.

One mortgage is safe for the banks because they can take back the house. Low risk means low rates.

If you could take 5 mortgages, that would be very risky for the banks so they wouldn't give you a loan or charge much higher interest.

Hence you can't take more than one mortgage.

But what if you lie to the bank when you apply for mortgage?

Well, to prevent that we made lying to the banks about such things a crime.

Hwang is accused of a variation of that: he got loans from multiple banks without telling them about other loans i.e. lying to banks.

He made leveraged investments into lousy stocks and when he got called on those loans, he couldn't repay them and banks that gave him loans lost billions.

kjksf··on Does the American Diabetes Association work for patients or companies?
So you go from "does not seem well rounded" to "therefore is essential"?

Here's some facts.

There are nine essential amino acids that our body needs to function properly and cannot produce by itself from something else.

Meat provides those amino acids and carbs do not.

Carbs are a source of energy but so is fat, proteins, ketones and alcohol.

In addition to reversing diabetes, people on low carb / high fat diets, including carnivore, often report increase in overall energy levels and lifting of a mental fog that they experienced on standard carb and sugar heavy diet.

That energy spike that carbs and sugar give you is a glucose spike in blood and the downside of it is that often it goes in the other direction (i.e. lethargy) when you come off of it.

That's the "nap after heavy meal" effect.

This is not an anti-carb just anti what you do, elevating carbs into some unquestionably good, unique energy source necessary for you to think or love your body.

Consuming carbs in moderation is fine.

The problem is that our modern diet and what is available in grocery stores or restaurants make it almost impossible to consume carbs in moderation.

And apparently plenty people like you don't even understand that carbs are, in fact, bad for most people.

U.S. stats on this are shocking: 73.6% americans over 20 are overweight and 42.4% obese (all obese people are overweight but not all overweight people are obese)

← PreviousPage 9 of 34Next →