News for hackers. Stuff that matters.

ahasani

Re:Show HN: Base, an SQLite database editor for macOS on Monday August 25, 2025 @06:06PM (#45019681)
not similar, but more like jupyter

https://duckdb.org/docs/stable/core_extensions/ui

Re:Run VSCode and terminal on any iOS device on Thursday May 30, 2024 @07:54AM (#40522634)
I previously used a raspberry pi as a development companion to my ipad, now it's an Android phone. Full linux distro (via termux proot along with its limitations) to edit compile run on the go for js/python/java/c/c++/rust. Yes you read right, best development companion device on an Ipad is an Android phone at least for me. Me carry no laptop no more :D
Re:Should I Use jwts For Authentication Tokens? on Monday May 27, 2024 @10:01PM (#40496662)
While mignt not agreeing with all the reasons mentioned, verifying signature for every resource access is cpu intensive (your commercial compute provider would love you though). Comparing session id to a map is cheap. For me jwt to authenticate and random session token for resource access, problem solved
Re:Writing an OS in Rust: Async/Await on Tuesday March 31, 2020 @03:18AM (#22735524)
Interesting points, thanks

> Would need to see what the implementation actually looked like and how it was worked on

Examples are but not limited to Simulink, Rhapsody, Unreal Blueprint, QT SCXML

>The graphs may look nice, but I've never seen people program effectively by editing graphs

graph mentioned is a state transition graph, not necessarily a visual graph, although its a nice eventuality

> You don't step through the graph in a debugger, for example.

Yes you do, if using the mentioned example

Combining a state machine with actor model has been a work wonder for me. I have to agree with you on locality in pure state machine, but if a state machine is defined as an Actor you get locality by definition. Its more of a deterministic abstract modelling, testing and execution

Re:Writing an OS in Rust: Async/Await on Monday March 30, 2020 @11:42PM (#22734762)
What do you think about hierarchical state machine [1] ?

>Has it already been through state X?

Like everything else, logging

>Will it come back to this state in the future?

Mentioned in the comment before, there is a transition graph that you can do static analysis on, note that you might run into a halting problem

>Is there a route from state Y to state Z?

There is a transition graph

>State machines are effectively goto writ large...

quoting Prof Carl Hewitt of Actor Model, "goto is harmless"[2], function/procedure call is a goto, much like sending an named event while in particular state with/out parameters

[1] https://en.wikipedia.org/wiki/UML_state_machine

[2] https://www.youtube.com/watch?v=7erJ1DV_Tlo&t=34m54s

note: edited for formatting

Re:Ask HN: How do you update multiple disparate databases? on Thursday March 26, 2020 @09:42AM (#22693463)
Need to watch out for update failure, some sort of transaction management/atomic commit[2] such that if one update fails, other updated dbs should rollback.

1. https://en.wikipedia.org/wiki/Atomic_commit

Wicked stuff, looks like an excellent candidate for matrix synapse front end
Re:Oracle Reveals Funding of Dark Money Group Fighting Big Tech on Thursday February 27, 2020 @04:41AM (#22431947)
I like how you use gravity as an example. Using the quote logic, Apollo project comes to my mind ;-)
Re:Inrupt, Tim Berners-Lee's Solid, and Me on Sunday February 23, 2020 @08:04AM (#22396652)
Inkandswitch is also working on similar problem https://news.ycombinator.com/item?id=19804478
Re:Actix – Actor Framework for Rust on Sunday February 16, 2020 @05:23AM (#22340894)
Sharing state is what actor model tries to eliminate, it has a very strong locality concept. Singleton in OOP (which you have to implement atomic and thread safety often by yourself) can be easily implemented as an actor. Erlang has gen_server for this exact scenario. About isolation, you can actually impose class isolation in OO languages by declaring all variables as private. Public variable can never happen in actor model
Re:Actix – Actor Framework for Rust on Sunday February 16, 2020 @05:14AM (#22340864)
If you mean by return value like function call, actor actually can send reply message back to the caller provided the called actor knows the caller address
Re:Actix – Actor Framework for Rust on Thursday February 13, 2020 @07:12PM (#22322707)
Yes they are, atom is in isolation, cell has membrane, we have a body we have isolation and encapsulation in physics/chemistry/biology. In actor model message passing is interaction. Since you mentioned game, check out https://github.com/aeplay/kay, which is the isolation "objects" for https://github.com/citybound/citybound "physics engine". On multiple bank accounts, well an account is an actor, so there is no problem there, please have a look at http://proto.actor/blog/2017/06/24/money-transfer-saga.html
Re:Statecharts: A visual formalism for complex systems [pdf] on Sunday January 19, 2020 @10:54PM (#22096174)
It should be, please have a look at http://scion.scxml.io/tutorials/fundamentals It is a pretty faithful implementation of SCXML in js
Re:Statecharts: A visual formalism for complex systems [pdf] on Sunday January 19, 2020 @10:42PM (#22096138)
It is ahead of its time and we are getting closer, one example, please check out UE4 Blueprint visualizing animation states at https://docs.unrealengine.com/en-US/Engine/Animation/StateMa...