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)
Show HN: I made a web-based notepad with a built in unit calculator
221–230 of 246 posts
Re: Show HN: I made a web-based notepad with a built in unit calculator
#222Re: Show HN: I made a web-based notepad with a built in unit calculator
#223Earlier 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?
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
#224There are a few bugs as people have mentioned but the currency support is a huge win for me. Thanks for making this!
Re: Show HN: I made a web-based notepad with a built in unit calculator
#225Earlier 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?
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
#226The 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.
> 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.
Re: Show HN: I made a web-based notepad with a built in unit calculator
#227Earlier 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?
Re: Show HN: I made a web-based notepad with a built in unit calculator
#228Anyone knows if there's a way to have this feature in Joplin[0] ?
Re: Show HN: I made a web-based notepad with a built in unit calculator
#229Re: Show HN: I made a web-based notepad with a built in unit calculator
#230It'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?