Live data from Hacker News

Ask HN: Programming ideas that redefine the way you look at programming

news.ycombinator.com

11–12 of 12 posts

Re: Ask HN: Programming ideas that redefine the way you look at programming

#11
post #6

Views in k/q. A view is like a variable whose value is determined by a dependency expression. / any time c changes, f will be updated f::32+1.8 c / temp (F) from temp (C) / any time m or x or b change, y will be updated y::b m*x Lots of conditional logic falls away when dependent relationships can be described this way.

this is cool, i haven't used k/q myself, this looks similar to reactive declaration in svelte.

https://svelte.dev/tutorial/reactive-declarations

Re: Ask HN: Programming ideas that redefine the way you look at programming

#12
post #10

K's coupling of data and user interface elements. All data can have a gui widget type in its metadata. The benefit was: * If you changed the widget then the data changed. * If you changed the data then the widget changed. The layout of the data implied the layout of the widgets. Using that version of k was the only time that I ever willingly did UI development.

i once did gui development in racket/gui. The dependency between widgets and variables is a pain to deal without something like that.

P.S: don't take this to mean i hate on racket, i'm just complaining about the default state of racket/gui, there have been attempts to improve it by 3rd party libraries(https://docs.racket-lang.org/gui-easy/index.html).

Post reply on HN