Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
kbr
9y ago
Yup. Moon is completely different internally than Vue. Submitting a PR to Vue would require a rewrite of Vue itself, and would change a lot of it. Moon's goal isn't to have complete API compatibility with Vue, but instead to have
92.
▲
by
kbr
9y ago
Yeah, I was just saying my thoughts against the hate towards new JS frameworks in general. While this reaction was a joke, there are tons of people that would have been ranting about another Javascript framework. I am by no means trying to
93.
▲
by
kbr
9y ago
It might not be revolutionary, but it _is_ an improvement. I just don't like when people say they hate something because they don't want to make decisions. I'd rather have feedback than someone ranting about "just anothe
94.
▲
by
kbr
9y ago
This is really cool! I'll definitely look into this and apply some of it to Moon.
95.
▲
by
kbr
9y ago
Yes, and that is because Vue uses hyperscript. This allows you to use JSX, but at the same time makes a render function slower. Since Moon's virtual DOM syntax is stricter, it allows for the compiler to make lots of optimizations.
96.
▲
by
kbr
9y ago
Honestly, I think libraries are great, if they improve on existing solutions and actually bring something new. Don't try and stop innovation just for the sake of having to make less decisions. Moon's purpose is to provide an API s
97.
▲
by
kbr
9y ago
Sorry about that! I just updated the font-weight and colors. There should be more contrast now.
98.
▲
by
kbr
9y ago
No, that comment was a joke. (A really bad one). Moon's compiler will do all of the work.
99.
▲
by
kbr
9y ago
Moon is a part of js-framework-benchmark[1] (in the non-keyed results), and it performs faster than Vue there. The article I wrote a while back also has some benchmarks[2]. Finally, the overview section of the documentation also has benchma
100.
▲
by
kbr
9y ago
Thanks! I created a static site generator called Sold [1]. The Moon configuration for Sold is available at the gh-pages branch [2]. [1] https://github.com/kbrsh/sold [2] https://github.com/kbrsh/mo
101.
▲
by
kbr
9y ago
The compiler treats everything as static by default. When the compiler detects something dynamic (such as a {{mustache}} template), it will mark the current node as dynamic, and the parent node as well. These propagate up the tree so Moon e
102.
▲
Show HN: Moon – fast 7k Vue alternative
(github.com)
268 points
by
kbr
9y ago
|
192 comments
103.
▲
by
kbr
9y ago
I usually don't invite contributors to my own project. Instead, people who are interested will naturally begin to make more and more issues and pull requests as they get more into your project. If you get a project out there, people in
104.
▲
by
kbr
9y ago
It wouldn't take much work to insert data actually, in fact it would be done pretty fast. Updating something will take more time, as it needs to update the whole structure. I totally agree, search is an extremely interesting topic and
105.
▲
by
kbr
9y ago
Yeah, the memory is the only downside of Wade. I'm still looking into ways to optimize the trie used while still keeping the size around 1-2kb. The stop words that are being removed can be configured via `Wade.config.stopWords`, which
106.
▲
by
kbr
9y ago
You're right, there are still a ton of optimizations I can do. I'll check out all of these links, thanks for the great tips!
107.
▲
by
kbr
9y ago
Cool, glad you understood. The library returns an array of results, and will return an empty array if there are none. Try searching for "h" or "hey" for an example.
108.
▲
by
kbr
9y ago
The article doesn't exactly simulate what Wade returns, but uses a simpler version. I added a note about it now. [1, 1] The item at index 0 is 1. This means that the item in index 0 of the data ("Hey") has a score of
109.
▲
by
kbr
9y ago
Actually, it is supposed to be [1, 1]. The actual value of the element corresponds to the score it has, and the index of it refers to the index in the data. I'll add a note in the article.
110.
▲
by
kbr
9y ago
Yeah, it's really interesting stuff! I explored a variety of different algorithms when first writing Wade, including Knuth-Morris-Pratt and Boyer-Moore. In the end I ended up using a trie as it has great performance at the cost of a li
111.
▲
by
kbr
9y ago
Thanks. DefiantJS uses a different way of searching because it needs to be able to search JSON. Wade is focused on a simpler use case of searching within an array of strings.
112.
▲
by
kbr
9y ago
Thanks! Glad you liked it.
113.
▲
by
kbr
9y ago
My bad, it supports English, but the only feature dependent on this is the part that removes stop words. You can easily configure the stop words that Wade removes by editing `Wade.config.stopWords`.
114.
▲
by
kbr
9y ago
Well, for future reference, the library itself is for Javascript. The post is more focused on how it works, rather than what language it uses.
115.
▲
Inside Wade, a 1kb search library
(blog.kabir.ml)
88 points
by
kbr
9y ago
|
29 comments
116.
▲
by
kbr
9y ago
You're right, I'll try and setup a js.org subdomain, or start looking for some nice domain names.
117.
▲
by
kbr
9y ago
Yeah, I'm a student trying to save money wherever I can, but I really need to start migrating all of my work to more reliable domain names.
118.
▲
by
kbr
9y ago
Yeah, this one has been around since early 2015. Not sure when the other one was released. Sorry about the confusion!
119.
▲
Show HN: Moon – a tiny UI library inspired by Vue
(github.com)
11 points
by
kbr
9y ago
|
6 comments
120.
▲
Show HN: Wade – fast 1kb JavaScript search library
(github.com)
3 points
by
kbr
9y ago
|
0 comments
More ›