Live data from Hacker News

Show HN: I made a web-based notepad with a built in unit calculator

numpad.io

221–230 of 246 posts

Re: Show HN: I made a web-based notepad with a built in unit calculator

#221

Earlier quoted context omitted.

I thought CM had some example code on how to override the tab behaviour. Might be worth checking out as I agree it sucks to not have tab = indent 4 spaces

2 spaces! (ducks) (but srsly)

Actually you are right :)

Re: Show HN: I made a web-based notepad with a built in unit calculator

#223
post #164

Earlier quoted context omitted.

I've found that a super simple way to parse basic expressions is a recursive descent parser. It is very simple to implement. No need to to break into tokenizer/parser, no need to generate an AST, just evaluate the expression while parsing.

Do you have an example of a simple parser like that?

https://gist.github.com/revivalizer/935dfcc345b009a0207a033c...

Even includes error handling :)

At the bottom you can see some test examples of what it can do. Obviously it is a basic calculator.

Re: Show HN: I made a web-based notepad with a built in unit calculator

#225
post #192

Earlier quoted context omitted.

> It's true of source code but not artifacts. That's simply not true. Please don't do stuff like this—to go off and make these kind of proclamations in public. It's negligent at best.

Just when I thought I understood the MIT license, I'm back to confused. Can you link me to where this is clearly outlined? Do you need to attribute somewhere in artifacts or not?

Not sure what you want. A link where this is clearly outlined? The license is two sentences and sets out the terms.

The repeated distinction between source code and "artifacts" in this context is pure make-believe. The license doesn't even have those words in it, let alone say something like "Redistribution and use in source form requires inclusion of this permission notice and the above copyright notice, but if you're just building a product and publishing it as non-source code artifacts instead of distributing source, then lol don't worry about it bro" (or whatever it is the people here seem to think).

The CodeMirror maintainer definitely expects people who build closed source stuff to include the notices that are in the CodeMirror LICENSE file. And anyone telling you the license doesn't require this (and e.g. this is a peculiarity of CodeMirror itself) is delusional.

Re: Show HN: I made a web-based notepad with a built in unit calculator

#226

The docs say that this is using CodeMirror. The CodeMirror license says that you're allowed to use CodeMirror for your stuff, but that stuff has to in turn include: 1. the copyright notice 2. the text itself that explains that you/others have this permission/obligation Currently, it looks like NumPad isn't doing either. From comments here, NumPad is evidently also using decimal.js, which has similar terms.

Both are MIT licensed, I don't think this is the case.

Relevant bit of the MIT License:

> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

I think that second part is relevant to the discussion.

https://opensource.org/licenses/MIT

Re: Show HN: I made a web-based notepad with a built in unit calculator

#227
post #192

Earlier quoted context omitted.

> It's true of source code but not artifacts. That's simply not true. Please don't do stuff like this—to go off and make these kind of proclamations in public. It's negligent at best.

Just when I thought I understood the MIT license, I'm back to confused. Can you link me to where this is clearly outlined? Do you need to attribute somewhere in artifacts or not?

MIT makes no distinction between source and artifacts. The requirement to include a notice stems from any distribution of the software.

https://opensource.org/licenses/MIT

Re: Show HN: I made a web-based notepad with a built in unit calculator

#230

It's very nicely done, but I'm afraid I don't "get it" with things like this and written out calculators in general. Why would I type out something long like: " Alice's food = £30 Bob's food = £25 VAT = 20% Alice's food + Bob's food + VAT " Rather than just punch (30+25)*1.2 straight into a calculator?

I can see this being useful as a narrative document for collaboration. Explaining to someone how a business process might work given x/y/z pricing. Easy to embed the "why" aspects of things but also it autocalcs things so they could play with the numbers and see the change in impact. Some people can "think in spreadsheet" (I'm quite happy there) but that's not the best medium for everyone.
Post reply on HN