Hacker News new | past | comments | ask | show | jobs | submit | aarpmcgee's comments login

This looks so cool and might use it for my project. Are there any examples showing how to use Sqlite? I dug around the docs for some time but only found mention of sqlite in passing. I'm developing a notes app and will be using sqlite's full text search extension a lot—wondering if anyone knows if the react bindings/hooks will properly update the UI if the UI is showing data from virtual tables.


Triplit is pretty opinionated about how things get stored so it doesn't work with existing SQLite schemas. We support basic `like` operators for searching but are definitely interested in supporting full text search. If you want to try that out, we use Sqlite in our server implementation so you can see an example there: https://github.com/aspen-cloud/triplit/blob/main/packages/se...


Interesting! So with this configuration, would there be any sqlite instance running in the browser, or does triplit only sync with sqlite on the server?


For me, in both Firefox and Chrome (but not Safari), all the code samples look like this:

https://imgur.com/yGXHb1h

Anyone know what's going on here?


I wouldn't say no to first-party integration with crsqlite! [1]

[1] https://github.com/vlcn-io/cr-sqlite


I didn't know that. Especially the first approach [1] sounds interesting to me, because as far as I know the transactions of Yjs seem to be a problem on heavily changing documents. Thanks!

[1] https://github.com/vlcn-io/cr-sqlite#approach-1-history-free...


Stanford Encyclopedia of Philosophy has an article on Simone Weil [1]. I haven't read it yet, but now I plan to.

[1] https://plato.stanford.edu/entries/simone-weil/


I have found that it is pretty difficult to find what I'm looking for when searching for articles/issues that relate in any way to the Next router. "App router" and "pages router" were two of the most ungooglable and generic name they could have chosen. Suddenly it is much more difficult to find what I'm looking for in the ecosystem.


Sorry about this. I work on the documentation (author of the post). Are you talking about searching through the docs or searching through GitHub? ARe there specific things you've searched for you couldn't find?


It has been primarily related to web search and Github. It has been a month or two since I last tried the Next.js app router and I don't remember specifics, but I do recall that my workflow often involved searching for an issue, article, or guide related to how to accomplish something or fix something in relation to the router, but with the distinction between routing mechanisms being represented by these relatively generic nouns (app/pages), I found it difficult/cumbersome to identify if the information I was looking at was pertinent to the routing mechanism I was using. I wouldn't be surprised if the situation has improved by now.

I'd also like to mention that I regret my uncharitable phrasing in my original comment "…the most ungooglable and generic name they could have chosen…". While I do think more specific names might have helped in some ways, I can appreciate the difficulty in coming up with names for this kind of thing.


Naming things is hard. On the one hand, I prefer descriptive names like app router. On the other, idiosyncratic names like, idk, Pinecone are more googleable but opaque and hard to remember sometimes.

I used the CSS toolkit called Less and that name took the worst out of each hand. That was just terrible re: searching for things.


Agreed, nextJS feels incredibly overloaded with lots of terms that seem to conflate.

I tried to use the new app router, but it felt infuriatingly opaque to me, so I just went back to pages. Fortunately you can use the newest nextJS v13 and still have access to the old Pages system.


Perhaps Crank.js[1] would belong on this list

[1]: https://crank.js.org/


Thanks for the recommendation -- looking through the docs, it seems like it fits! I'll add it in a few or feel free to make a PR.



the irony of "join our discord community" really hits pretty hard on that one


I loved the ending too. I found it very emotionally resonant and I teared up a bit.


All I know is, the parts of my app that I implemented with state machines are by far the most stable, least buggy.

fwiw, if xstate feels like too much for whatever reason, https://thisrobot.life has seemed like a decent alternative to me.


Same here, state machines are fantastic to extend state driven UIs without worrying about breaking existing behavior. If you find XState too verbose consider using a DSL that compiles down to JS like Lucy: https://lucylang.org


http://www.colm.net/open-source/ragel/ is good if you're more on the C side.

hmm… seaside… C side… has this been used for anything yet?


It seems like both of your links are projects from the same person, he must be passionated about state machines.


I am, thank you. : - )


Thanks for all your valuable contributions to this space! I have been curious if development on Lucy is continuing? I might like to port some of my existing machines over if the project is still active.


Can confirm.


Looks like Lucy compiles down to XState.


There's also a pared down, minimal version of xstate: https://github.com/statelyai/xstate/tree/main/packages/xstat...


I didn't know about this. Thanks a bunch.


You could also just make a very simple State machine. They don’t take a huge amount of code. you have a variable with the current state, you have a function that takes the previous state and the new State as arguments, now implement whatever logic you need. Not everything needs a library.

Pardon the unnecessary caps, I am using voice dictation.


When I need something lightweight I usually implement state machines using generators/coroutines when the language provides them, as they compose well and I find it easier to follow to control flow anyways.


I’m curious how you use and compose generator functions?

I created a JavaScript state machine library using them to define each state. https://github.com/JavaScriptRegenerated/yieldmachine

I imagine your approach must be different?


To compose generators I use `yield*` (or `yield from` in python) https://developer.mozilla.org/fr/docs/Web/JavaScript/Referen...* (note that last star is actually part of the link)

The main drawback with this approach is that it is easy to blow the stack, but it is not too hard to implement trampolining on top of it (by yielding the continuation to a wrapper generator)

To use the generator I send its inputs using `.next()` and obtain current state information, as shown on your library webpage.


Nice. I was going to use Next for my current project, but may give your solution a try instead!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: