Nick Smith 2020-08-24 05:10:56 Why isn't any kind of logic programming considered a https://en.wikipedia.org/wiki/Model_of_computation? Why do we talk about Turing Machines and recursive functions as fundamental, but not inference? I can't find any resources discussing this disparity. It's like there are two classes of academics that don't talk to each other. Am I missing something?
S.M Mukarram Nainar 2020-08-24 05:33:41 I'm not an expert, but logic programming a la prolog etc is usually based fundamentally on term rewriting, which is essentially what the untyped lambda calculus is. (Please correct me if I'm wrong, this is something I've been studying recently but I'm still quite new to the field)
Nick Smith 2020-08-24 05:40:41 Isn't term rewriting destructive, i.e. it consumes an input to produce an output?
S.M Mukarram Nainar 2020-08-24 05:50:38 I suppose? i am afraid I am not sure what the relation is and what you are getting at here.
Would you consider beta-reduction "destructive"?
Nick Smith 2020-08-24 05:58:37 I guess a better question is: what is the "term" that is getting re-written in evaluating a logic program? Is it the entire program? As a conjunction of clauses? I guess the destructivity doesn't manifest in such a case because you're producing a "new program" (term) which you guarantee is going to be strictly larger than the last one (adding new deductions). That suggests term rewriting might be "too powerful" for logic programming though, because it can also model the deletion of facts (unless you want that capability, for some reason).
But yeah, I'm now seeing how you could map inference to term rewriting!
Andrew F 2020-08-24 08:45:29 Interesting. When logic shows up in the foundations of computing, it's usually in the context of the Curry-Howard isomorphism. From that perspective, logical inference is sort of... program synthesis, I think? More broadly, finding elements that occupy a type that represents a proposition.
It could be that logical inference is (IIUC) inherently search-oriented, so people who make "models of computation" don't see it as a good primitive operation: too many steps and decisions behind the scenes. If that's the case, I think there's still some good mileage to be had from making a model where logical inference is stupid easy to write and tractable for an optimizer as well. (Uncoincidentally, this is an approach I'd like to do, but I don't know enough yet)
Duncan Cragg 2020-08-24 09:48:18 There probably are two classes of academics not talking, yes, and the logic folk seem to have lost the popularity race to the functional folk.
You can implement functional programming with term rewriting or reduction and similarly you can use rewriting or reduction in proof systems. My memory of all this has faded since my university days mind you.
Nick Smith 2020-08-24 11:29:10 S.M Mukarram Nainar I read some pages from that book just now, and the whole system looks overly complicated. Meanwhile the authors are using the words “simple”, “easy”, and “natural” everywhere, but I can’t find any good justification for why I should keep reading. The Wikipedia article is the same. It’s raising a lot of red flags.
Nick Smith 2020-08-24 12:03:58 @Andrew F Not all logic programming involves search. Each logic language comes with its own “standard” evaluation strategies, and by my understanding, each strategy effectively yields a different model of computation (including different time and space complexities).
S.M Mukarram Nainar 2020-08-24 12:06:08 Well, it is an academic reference work. While unfortunate, I think that's pretty normal. I posted it because it is one of the few "production" systems based on term rewriting that I am aware of.
Andreas S. 2020-08-24 11:12:08 Hi #thinking-together ! Could someone explain or give links to resources that compare MVVM and the react Approach? How do they compare and relate?
Duncan Cragg 2020-08-24 11:44:27 React is quite thin and one-way, so not really comparable! It's a View of a (View?)Model in some ways.
Ivan Reese 2020-08-24 14:18:14 Yeah, this is a #present-company question. @Andreas S., kindly repost it there.
I'm going to leave this thread here so that other folks can calibrate their sense of what should go where.
No more comments on this thread, thanks!
Mike Cann 2020-08-26 03:52:58 Cameron King 2020-08-26 19:28:40 I've been trying to get it running, but the local development environment isn't Windows-friendly, and doesn't seem to play well with Windows Subsystem for Linux. On dfx start
, I keep getting Permissions too open for path
errors with a reference to a Rust file whose source I can't find. Changing the permissions of the path in question alternates the original error with a Permission Denied
error. Google turns up nothing.
I think the Internet Computer as a whole is a fascinating idea, Motoko aside, and I'd love to work with it because it fits well with the philosophy of a project I've had planned for a few years, but I guess I'll have to wait until the dev experience is more stable/I have energy to install a full unix distro.
Mike Cann 2020-08-26 23:51:21 @Cameron King ah thats a shame you are having issues on windows. Im a windows user too and was planning on having a tinker with it when I get a spare min
Tyler Adams 2020-08-26 08:57:17 Does anybody have experiences with non-standard keyboard layouts like dvorak? I'm writing a blogpost about keyboard layouts and would love to hear about your experiences
Nick Smith 2020-08-26 12:57:18 I once used a QWERTY keyboard with a split space bar and the keys aligned into columns. It was allegedly “ergonomic”, but it was not worth it. My typing was perhaps 10% better, but it was suddenly hard for me to jump between different devices. Given that typing speed is completely irrelevant to productivity for everyone except perhaps professional writers, I’ve never tried any weird keyboards since. There are 100 things a person can optimize to receive better returns than a new keyboard layout. For example: a note-taking methodology, diet and exercise, or social media rationing.
Chris Maughan 2020-08-26 13:11:26 I tried one of these, but found the mental effort to learn it too much; and it was very slow compared to touch typing on my favourite MS Sculpt keyboard: https://twiddler.tekgear.com/
I also recently tried an ergodox EZ, but the layout of keys was again quite a high effort to learn (and I found it awkward that many of the symbol keys I expected to find on the right, or beside the Z were not there). Lots of folks make up their own keyboard layouts for it (but I imagine this is easier if you aren't a touch typist to start with): https://ergodox-ez.com/
I have a Mattias half keyboard too: http://matias.ca/halfkeyboard/ This is a weird one; your brain really does fill in the gap and let you type with one hand, 'mirroring' the other half. I've found it occasionally useful for use during CAD tools, but its more of a novelty than something I would seriously use all day (unless I didn't have the use of one hand).
Finally, I tried a Kinesis FreeStyle Edge:
https://gaming.kinesis-ergo.com/product/freestyle-edge/
This was OK, but eventually I had to admit to myself that my typing speed was significantly slower using Cherry/Mechanical keys; it just takes so much more effort to press them than the short travel of the MS Sculpt. I was also finding my hands were far more tired by the end of the day. I haven't measured my output, but I type a lot during a given day. One of the reasons I'm really interested in input devices!
My dream keyboard is the MS Sculpt, separated into 2 halves that I can spread apart on the desk.... I believe I am on my 6th Sculpt. I probably kill one in less than a year.
https://www.microsoft.com/accessories/en-gb/products/keyboards/sculpt-ergonomic-desktop/l5v-00006
Ivan Reese 2020-08-26 14:26:12 I recently bought a Microsoft Sculpt too, to ward off RSI that might be looming in my future. (Trying to "listen to my body", you know?)
Since the layout is different enough, I've decided that this keyboard is going to be my home-row Dvorak instrument, and my regular Apple keyboards are going to be my bad-habit two-finger QWERTY instrument.
(I use "instrument" here because, to me, the idea of having different layouts for differently shaped devices feels just like switching between, say, clarinet and guitar. Totally normal.)
I've been learning Dvoark using https://www.typingclub.com, and I'm up to about 20 WPM after 2 weeks, practicing about 15 minutes a day. Learning all the keys was pretty quick for me, and now I'm enjoying just building up my speed.
Unlike what Nick said above, I do feel like my productivity — and my enjoyment — while using the computer is restricted by my typing speed. This is my medium for thought. I'm writing right now to express my thinking. I can think of these words far faster than I can type them (and I currently type something like 70 WPM). So I think it's totally worth it for me to attend to my discipline.
Ivan Reese 2020-08-26 14:39:33 (On a meta note, I'd love to know how you see the matter of keyboard layouts as part of the future of programming. Or if that's not really relevant to your blog post, Tyler, that's fine — but #present-company would be the best channel for this sort of conversation. When your post is done, you should share it there!)
Chris Maughan 2020-08-26 15:25:54 Totally agree on the speed; for me optimal typing makes me a better/more productive programmer. It's one of the reasons I use Vim, and regularly research keystrokes/combinations to improve.
Ivan Reese Did you get a Dvorak Sculpt (if such a thing exists) or are you using a regular one with keystrokes remapped?
Ivan Reese 2020-08-26 15:34:17 Standard US-layout Sculpt. I'm on Mac, so I remapped alt -> command and win -> option. I just use the Dvorak layout included with Mac OS, and switch layouts with control-space. I never look at my keyboard, so the stuff printed on the keys doesn't matter to me :)
Kartik Agaram 2020-08-26 17:07:49 In my experience there's a correlation between typing faster and RSI. I used to use hjkl for arrow keys, but I stopped when my body started telling me to use the arrow keys.
Tyler Adams 2020-08-26 18:37:38 Fascinating, thank you everybody, keep it coming! Ivan Reese - I think the most interesting innovation will be in the field of RSI prevention since that's what everybody's worried about. Although my post is focused on speed, speed is very minor concern for many people compared to RSI. Both on the HW front with more comfortable keyboards, and on the sw front with different ways of letting users stay on their home row more
Chris Maughan 2020-08-26 18:40:56 Regarding RSI, I've always favoured low-travel, non-clicky keys. After 26+ years of programming full time, I've never had RSI problems or pains in my hands - except when I've tried to use a cherry keyboard. Now back-pain, that's another story 😉
Lukas Schwab 2020-08-26 19:16:44 Bought an ergodox recently to improve my posture. Getting used to ortholinear QWERTY wasn't too bad (except for learning to strike B
with my left hand).
The rearrangement of modified keys has made writing code pretty slow; brackets/braces have been muscle memory for me for so long (and I have a habit of typing the opening bracket, then the closing bracket, and then the back arrow to fill the contents), but both brackets/braces and the arrow keys are displaced.
tl;dr: I prefer the split keyboard for typing text, even though I'm somewhat slower, because the improved posture is good. I do not prefer it for writing code.
Alexey Shmalko 2020-08-26 21:57:04 I'm a Workman user for ~4 years now. Have tried Dvorak before but couldn't switch and I like Workman better now. A couple of differences are: (1) taxing the middle column (and better priorities overall), so hands rarely move sideways, less pinky load, (2) less emphasis on hand alternation and more "rolling" combos (e.g., t/h, s/t, d/r are next to each other, so it feels nice and easy typing them).
I also use Vim-like keybindings and they work surprisingly well. The only one remapping I do is swap j and k (because j is on the top row but means "down," and k is on bottom row but means "up"—couldn't make my mind adjust to that). Other than that, Vim bindings on Workman work great. As a bonus, you learn to use hjkl less and rely on better movement commands more.
As a downside, when I have to type on other people's keyboards, that's awful. I have to look at the keys or I type trash otherwise.
William Taysom 2020-08-27 07:56:16 Advising a friend on a Sci-Fi story, I imagined what a keyboard a few decades hence might be. I recommended the character point in the direction where she wants the text to appear in the world, wiggle her finger as though swiping on a phone (yes, QWERTY style), and mumble what it is that she means to write (for the audience). We could imagine subvocalizations as well. Moral being that the noisy signals (subvocalizations and finger wiggles) get fused by the dictation software. Just a thought.
Chris Maughan 2020-08-27 09:55:17 @Alexey Shmalko I thought you were going to say you remapped 'jk' to escape; which is what I do; it's a real typing saver in vim; never reaching for escape again; easy to learn, with only the minor inconvenience that you have to remap every vim editor you use to :noremap jk <Esc>
Chris Maughan 2020-08-27 09:58:42 @William Taysom I always thought that a futuristic (or maybe not so future) keyboard would just involve wiggling fingers. I think it should be possible to learn to gesture stenographically in space. Perhaps the new iPhone will enable more experiments like this. I'm fascinated by this whole field of efficient gesture input; I even learned T-line shorthand when I was a kid, for 'fun' 🙂 We have been hamstrung by keyboards for far too long.
The other reason we need gestures for typing is of course VR.
Alexey Shmalko 2020-08-27 10:03:36 Chris Maughan this trick doesn't actually work with Workman. Because of the rolling combos, most of the keys that are close, also occur often in the text. I mapped ESC on Caps Lock place though
Andrew Reece 2020-08-27 15:05:11 I've been using colemak for a good few years now. I recently made some of the more common mods ("Angle", "Wide", "Curl-DH" https://colemakmods.github.io/ergonomic-mods/)
because I started to notice RSI symptoms in my right pinky and realized how much of the keyboard it normally controls.
I've also remapped tapping caps lock to be escape and holding it to be ctrl, both very useful for vim.
(Another change I made recently was to entirely remap vim, e.g. making the equivalent of IJKL act as arrow keys instead of HJKL).
I'm on a normal keyboard atm (Microsoft Sidewinder X4), but I've been planning to make my own split ergo keyboard for a while, maybe the Dactyl (pictured)...
Happy to answer any questions.
Andrew Reece 2020-08-27 15:07:08 When I occasionally move back to QWERTY it reminds me how terrible of a layout it is - lots of stretching for digrams and common letters out of easy reach. I changed more for reducing finger strain than for speed
Chris Maughan 2020-08-27 15:08:54 I'm curious if you have measured your speed? On QWERTY or otherwise.
Nick Smith 2020-08-27 03:37:49 I'd like to apologise to those with whom I've had recent conversations about linguistics, logic, and ontologies, for brushing off the relevance of the latter topics to the former. It seems these topics are more deeply intertwined than I had previously realised.
- The field of logic emerged as a means of studying how humans reason using natural language. Logic is irrevocably tied to the structure of natural language, and therefore it seems foolish to try to add natural language to a programming system without basing it on logic.
- Ontology is the study of categories and relationships. Ontology languages like OWL are actually based on Description Logic (I was surprised!), which could be perceived as a type system based on first-order logic. This gives us a formal way of conceptualising entities and have the computer check that a program is going to respect that conceptualisation.I had been dissuaded from reading into the use of ontologies in information systems because most resources I encountered about it are about the "Semantic Web"; I had equated the two. I'm interested merely in programming systems, and accordingly I have no interest in trying to make or support global standards for the categorisation of information. But the fundamental idea of ontology is sound: it seems like a bridge between natural language, logic, and type systems. I'd be a fool to ignore it given I'm designing a logic programming system.
Next up: Several weeks studying the interplay between logic, natural language, ontologies, and type systems!
Ivan Reese 2020-08-27 15:41:56 (On a meta level — this was a fantastic #thinking-together post, Nick. Thank you for writing it.)
Harry Brundage 2020-08-27 13:18:23 I was rewatching Are We There Yet the other day (https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey/) which is Rich Hickey (mr Clojure himself)'s treatise on how he sees the world, how objects are lies, and how modelling whole applications as streams of new states produced by pure functions with structural sharing to keep performance good. super interesting to see him talking about this in the Java community in 2009 and see it percolate through to the JS community with immer and redux and whatnot, but i was struck by a certain feeling that i'd love to know if y'all share.
The whole OOP/functional debate, this talk, and frankly a lot of my thinking seem to principally be about modelling logic, and striving to get to some place where state is abstracted away. I/we seem to want to get to a world where I/we think mostly about computation and not about state change over time. I had a very strange experience switching from working on a backend team where state is the devil and ruins performance of everything (it'd be so fast if it didn't store anything!) to working in analytics where data is everything and where the code is a tiny little ever-changing bit of glue that manipulates this massive, permanent, far more important artifact. I found it nasty. It's nasty because the data captures every mistake ever made, which pile up and force every user to care about until fixed. It's nasty because it's big and hard to make development responsive. It's nasty because it feels wrong to write "poor" code you run once to fix something then delete, and it is really hard to get a handle on the shape, or quality, or meaning of real big datasets.
I think I had (have) data-phobia, and it took getting immersed in a data-heavy product to realize that I think I/we have it backwards, and that the data is more important than the instructions for manipulating it, and deserves to be the focus, not the nagging feeling at the back of your head. What I was struck with in Rich's talk is that the epochal time model and FP writ large seem like they are born of the same phobia, trying to escape the shackles of state management in order to get back to some pure world of computation that doesn't actually exist. A bunch of Bret Victor's work circles around this too, where the instructions to run the code are way less emphasized than the (often visual) data created by what the instructions are actually doing. All the hover-to-see-the-value or watch-this-expression debugging tools are us being forced to go back from pure computation to look at the actual data flowing through once more. Airtable/spreadsheets are counter examples of non-data-phobic tools that seem to be easier to use, maybe because they put the data first.
So ... am I off my rocker? Is data-phobia a real thing, a force that has shaped our tools to demote a super important piece of our lives? Is there an antidote?
Duncan Cragg 2020-08-27 14:18:28 Yus data/state-phobia is real, as evidenced by both imperative (OO) and declarative (FP/LP) approaches, which deprecate or hide it.
Duncan Cragg 2020-08-27 14:19:21 and state -> f() -> state -> f() -> state
is a good model for programming.
William Taysom 2020-08-27 14:19:38 Thinking how structured programming shows the control flow of you program, the steps, but not the... yeah what Duncan Cragg said.
Konrad Hinsen 2020-08-27 15:15:52 Not sure if phobia is the right term, but I also perceive an aversion to dealing with data particularly in the academic CS world that would prefer so much to concentrate on pure computations.
At the highest level, computing is always about that big mass of data that is sitting on your computer's disk. All that stuff that accumulated over time as the result of lots of computations and equally many user interactions. There is no way around this fact. That mass of data is the reason why we use computers at all.
On the other hand, that mass of data is also what we mess up all the time, so we have been looking for ways to do data updates in some principled way. In the end, that's what both OO and FP are about. OO divides the state into compartments so that we can look at small pieces at a time. FP focuses on data transformations, which it divides into compartments so that we can better reason about them.
Ivan Reese 2020-08-27 15:45:41 What Konrad said, but in joke form: that there's an "expressionless" emoji 😑 but there's no "stateless" emoji should tell you everything you need to know about the world.
Jack Rusher 2020-08-27 15:51:34 Rich's position seems to be not "state is bad" so much as "shared mutable state is bad" and "change occurs over time." An example of the former in the small is that is your code will be easier for everyone, including you, to understand if it's made of functions that take inputs and outputs rather than ones that change a shared scratch pad. The latter is why Datomic keeps all previous versions of what's been written to it and treats a handle to a database as pertaining to a snapshot at a particular moment in time.
Shalabh Chaturvedi 2020-08-27 16:21:34 Instead of "data" I like to think of the information expressed via "data" and really the "meaning" induced in our minds - which is what we really care about in the end. Yes I agree there isn't enough study of these aspects of computing. Many pieces of data can mean the same thing (xml, json, in-memory struct, db, object...). They use different mediums, but how do these mediums affect the representations? How do we determine equivalence? What can be directly represented in the medium vs what needs to be simulated (e.g. Objects can represent "identity", or you can simulate it via 'ids' in a system that doesn't have them. "Time" is built-in to some models, but may be simulated via version_ids, etags etc.).
Importantly how do these mediums affect the description of computations (programs)?
nicolas decoster 2020-08-27 16:30:22 It is interesting to note that in many languages Computer Science is called Informati(que|k|ca|...), focusing more on the data.
Harry Brundage 2020-08-27 18:39:44 I agree that epochal time model for programming makes a lot of sense and the small amount of work i've done with Datomic was nice, but, it seems strange how much work Datomic has to go through to present to us a consistent snapshot of the world so our programs can pretend it isn't changing. the databases bend over backwards to present to us an unrealistic model of data because we want to program in this way that pretends things arent changing or messy or big, and i feel like i get intuitively why things have evolved that way, but i feel like there's a whole branch of research that i don't know about or hasnt been done yet for the alternative model of embracing state and change and the mess
Harry Brundage 2020-08-27 18:42:00 Rich went to great lengths to explain why observations are always out of date and why we should be designing for real latency between event, observation, and reaction, and i think the epochal time model fits that, but it seems to twist the data to fit the code when perhaps it could be the other way around
Harry Brundage 2020-08-27 18:43:14 (i feel it terribly heretical to disagree with anything Rich Hickey says and definitely don't know what I'm talking about, I just have this nagging feeling that we're missing something)
Harry Brundage 2020-08-27 18:45:11 like using Rich's analogy of the people watching a baseball field, i'm more interested in the players playing the baseball game, the ones who have to make decisions and affect outcomes, and they are perceiving data but reacting to it and changing it. for example, what's the programming equivalent of fast twitch muscle fibres vs slow twitch? or pre-game visualization? or 10000 practice swings of a bat? our bodies are extreme examples of perceptors that participate effectively in a highly complex, dynamic situation, i want to build things that can do that
Harry Brundage 2020-08-27 18:45:38 the audience is easy to build, they just eat pretzels and hoot and holler
Shalabh Chaturvedi 2020-08-27 18:45:50 So if you look at NAMOS/pseudo time - it doesn't give up the idea of 'objects' or identity and instead of putting the 'timestamp' into one database - a corner of your system - the timestamps are pervasively spread out all across the system (each message carries a timestamp identifiying which 'version' it is from - these are pseudo (virtual) timestamps).
Andrew F 2020-08-27 18:51:13 Stateful computations are hard to analyze, for humans or machines, which means they're hard to get correct. Large masses of data are hard to understand. I think this is the basic cause of data phobia to extent it exists, and I don't think it's entirely unreasonable to program in a way that works around it.
Drewverlee 2020-08-27 22:42:32 Harry Brundage
It seems what your talking about is presenting the probabilities. Which is a much more honest way of viewing reality. It's also one we humans are terrible at, a result that has been repeatedly shown in studies.
Most customers are much happier to see that there is one shirt in their size vs some function that accounts for the chance someone else purchased it by the time they get this message.
Nothing about the storage of observations at a given time effects presenting a more robust model though. It just needs to justify itself against the cognitive overhead it causes.
Garth Goldwater 2020-08-27 23:16:35 it’s almost like state is the ur-impurity—in the same way that functional programming languages still have to eventually interact with the outside world, the vast majority of user applications etc are only useful insofar as they modify or save some state (eg: a word document). the thing that frustrates me personally is that they never go so far as to eliminate state entirely. as in: a word document is a function of character and mouse presses. your saved file happens to be a snapshot of the result of running that function at with the timeline of inputs as it’s only parameter. if you really want to be data blind please go all the way
on the other hand, i really sympathize with this idea. most of what i want to do personally is get really good at modifying ASTs so i can write code quickly in a flow state. the bottom of all programming is a state change from no program source to more program source
Jack Rusher 2020-08-28 08:04:29 Harry Brundage It's interesting to see the phrase "alternative model of embracing state and change" when that's exactly what Rich is presenting in his various projects, relative to the normative approach taken by (say) most Java or C++ programs. I wonder if there's a better way to communicate that perspective. 🤔
Some of the problems here are a consequence of the kind of universe in which we happen to live: there's no central clock and all observations are local to the observer. Lambda calculus is a great way to model computation, but it is serial and operates within a single frame of reference. When we want to compute with multiple observers, which we very often do in a networked/multicore world, additional theory is needed to make things sensible.
Most approaches one encounters at the end of that road start to look more like biology, where there are -- using the terms in quotes because they're familiar, though not exactly correct -- "objects" with local "threads" that communicate via "messages". This can look like the https://en.wikipedia.org/wiki/Actor_model, https://dspace.mit.edu/handle/1721.1/44215, https://en.wikipedia.org/wiki/Π-calculus, or any number of other things, but they all share the idea that we're performing dataflow between "processors". (N.B. Nodes in a dataflow system can be thought of as lazy functions from inputs to outputs, possibly with local state, called incrementally by whatever execution engine is at work.)
Stefan Lesser 2020-08-28 10:11:52 I’m sure there’s some zen-like state(!) of enlightenment one can eventually reach, where it becomes totally obvious that computation and state are one and the same. Something like the particle-wave duality in physics or so…
Dennis Heihoff 2020-08-28 17:38:31 My favorite way to think about this is data-phobia as a symptom/consequence of our tools. Rich also once noted that prog lang and database designers are rarely the same people. Any major programming language has next to no definition of real-world-state, meaning that beyond mutable variables and data-structures ideas about persistence, querying data etc are missing. Arguably every programming language transforms data but it rarely has a rich idea of where this data comes from and where it will go? Real-world information is an afterthought for all major programming languages and if we buy into the medium being the message notion then the medium, code, only ever transforms some data that we usually can't see, because it's maybe to big to see or it's in format that we can't (usually) see in our tools (images, video, animation). Beyond that code is static. It transforms data but data can not be seen being transformed so again the tool, the language carries an implicit motivator for the programmer to write transformation code, not visualizations or comprehension tools.
Jack Rusher 2020-08-29 07:52:38 Stefan Lesser If we dig into this particular Buddha nature we find it at every level. 😊
Although we colloquially divide state from the algorithm that specifies transformations of that state, the algorithm itself exists as state encoded in the registers, stack, instruction pointer, and so on. Sometimes we modify the behavior of the system by having the algorithm change its own code while running. Okay, code is also data.
If we implement the naive B-tree algorithm, the shape (and thus performance) of the constructed B-tree depends entirely on the entropy present in the sequence of keys we insert into it. In this situation the B-Tree compiles a tiny state machine from the "code" of the input keys. Okay, data is also code.
https://zoo.cs.yale.edu/classes/cs112/2012-spring/helpdoc/pike.html old Rob Pike quote also regards this matter:
Code and data > are> the same, or at least they can be. How else can you explain how a compiler works?
Everything is state and computation is just state over time.
Steve Dekorte 2020-08-29 16:15:06 The functions vs objects and static vs dynamic typing wars seem to come from the assumption that all-or-nothing is the only reasonable option. Why can’t each of these have their appropriate use cases and the best system be one that can use each where the trade offs make the most sense for a given project’s goals?
Jonathan Edwards 2020-08-30 17:45:37 Harry Brundage I agree. State is essential to many problems, and the central concern of many users, yet is the source of much difficulty in programming. So we have tried valiantly to make it go away, or make it someone else's problem (the database). Some people peddle cures for state like snake oil, so don't believe everything you hear. State is still an unsolved problem.
Duncan Cragg 2020-08-30 18:32:45 I'd say that anyone creating an end user system should start with state and build around it.
Cameron Yick 2020-08-28 21:25:49 🐦 JD Long: Observation from Jupyter Land: The Jupyter ecosystem has a big headwind because the initial target audience for the tool (Julia, Python, R) has a small overlap with the tool/skills needed to expand the ecosystem, namely Javascript.
That's not a criticism, just an observation.
Cameron Yick 2020-08-28 21:29:16 People have gone quite far with making r/python libs to generate JavaScript, eg streamlit/Plotly/shiny (for r)
Ivan Reese 2020-08-28 21:52:12 I'm not entirely sure what meaning you have for "made from the same medium". If it helps, some of the specific terms of art for making the thing in itself are: meta-circularity (which is where a compiler is written in the language it compiles, like ClojureScript and gcc) and bootstrapping (which is, IIRC, where an interactive system is implemented entirely using things that can be edited from within that system at runtime, like some Smalltalk implementations). I'm going to assume you're referring to that sort of thing, perhaps in a slightly broader sense, which in my mind would include Jupyter being used to edit the same language it's implemented in.
As for how important it is — I would say it depends on what the goals of the environment are. It's a tradeoff.
Without knowing for sure what sense of "interfaces" you mean (GUIs? FFIs?), there are plenty of good reasons to do it, like the one mentioned in the tweet, or like wanting to prove that the system you're building is expressive enough to express itself (eg: if Jupyter could only handle ASCII, that would be a lack of expressive power needed to be a general JavaScript editor). On the other hand, there are a ton of reasons not to do it — perf, often being the #1 cited reason I've seen, but also simplicity, in that you might not want to spend the effort to make your environment so expressive that it can express itself.
Cameron Yick 2020-08-28 22:28:15 Thanks for the very clear answer in spite of the slightly muddled question Ivan Reese ! I feel like a big part of why I was drawn to VSCode (from sublime text) was knowing I could write extensions in JS instead of Python.
Realizing that not every language/ecosystem aspires/has good ergonomics for used for GUI/editor toolmaking makes me think that if someone wanted to change the Jupyter situation, it may be more efficient trying to get JS devs curious about plugin-making then modifying Jupyter so that plugins could be written using the science scripting languages eg Python/Julia/R.
Jack Rusher 2020-08-29 07:17:28 In the best case, the environment is "made of something you want to make with" and is completely interactive. The biggest failing of projects like Atom and VSCode is that although they run inside a live environment they do not provide a REPL that allows code execution in the context of the editor itself. This makes plugin development a static compile-test-run sort of affair rather than an interactive "build up from small pieces" experience.
Cameron King 2020-08-29 14:56:21 I hate to bring up the tired old distinction of "product vs process", but let me see if it has new life in this context. Is self-bootstrapping important? Is the software at hand supposed to be a concrete product providing a reliable experience, or is it a fluid process for experimenting toward experiences we haven't imagined yet? In "The Computer Revolution Hasn't Happened Yet", Alan Kay talked about Squeak as a tool to help you build the next version of itself. In contrast, he says that commercial Smalltalk didn't change much once it was released. It's difficult to build software products with a moving foundation. I think there's a fundamental tension between (r)evolutionary software-as-process and commercial software-as-product. The balance between progress and stability is tough to strike.
On a different note, one thing I like about self-bootstrapping systems is the conceptual unity. Once you "get it", you get a LOT. That's one reason I too jumped to VSCode--writing plugins using the same tech those plugins are supposed to work with reduced cognitive load. But then I got annoyed with VSCode because of the compile-test-run cycle. VSCode is a product, not a process. There is an essential staticness to it. You can't tinker with it to create something fundamentally other than what it is.
That's why I started experimenting with a self-bootstrapping JS editor. Ideally, application development and editor live-tinkering should be the same fundamental process. Ideally, I think end-user development abstractions should be built directly on top of developer constructs (e.g., hadron.app). I think self-bootstrapping, if taken to its limit, offers the chance to build a deep ubiquitous language for communication between users and developers in building pliable software.
Konrad Hinsen 2020-08-29 15:34:36 "How important..." for reaching which goal? Jupyter is a development environment like most others, in that it is a tool designed by tool designed for end users who are not supposed to modify it. So the toolchain used for Jupyter development is something Jupyter users don't care much about - otherwise they probably wouldn't use Jupyter.
Personally, I find tools that I can adapt myself much more empowering, and for reaching that goal it helps a lot to have a single medium. But such tools are rare, most people have never experienced one, and so they are not asking for it.
Jack Rusher 2020-08-30 09:34:29 @Cameron King The thing you're feeling here is why I've been using emacs for 35 years. While it's easy for me to imagine a new (especially more graphically capable) environment built around some language I like more than elisp, such a thing would absolutely need to be "emacsy" in this sense.
Chris Pearson 2020-08-29 07:01:21 I'd like to know more about how Eve managed reactivity (eg 'commit vs bind' and the idea of tables that contain events). What worked well? Did later iterations/inspired projects tweak this approach? How (if at all) can lazy vs eager reactivity be managed using this approach?
http://docs-next.witheve.com/v0.2/handbook/bind/
William Taysom 2020-08-29 09:27:07 The quote sounds about right. I forget why, but I remember getting sequences of commits to work was tricky in Eve. Stepping back, first-class time is a really interesting idea that I'd like to see more systems explore.
Chris Pearson 2020-08-29 13:00:56 when you say 'first-class time', do you mean having a ticker (of varying granularities) that can be observed?
hamish todd 2020-08-30 18:07:21 In the thing I am making, you can't have a variable without choosing a specific example value for that variable. This is surely something that's been discussed here before since Bret does it in Inventing On Principle. What do folks think of it?
hamish todd 2020-08-30 18:08:54 With the way things are going I could embrace a more abstract way of doing things and be like "yeah don't worry, you can program without example values". I am pretty sure this is the right way to go though. My favourite mathematician/mathematics teacher, Tadashi Tokieda, says you should have lots and lots of examples
hamish todd 2020-08-30 18:09:42 It's not necessarily Bret-Victor-ian to have things be this way either, in theory every time you use a debugger you are "programming by example"
hamish todd 2020-08-30 18:10:59 But I can certainly conceive of an experienced programmer/mathematician saying "no, the "abstract view"/"general case", wherein a variable can take on many values, is fundamental and should be tackled first because [something]
Mariano Guerra 2020-08-30 18:47:41 I came here to say programming by example, but I see you already mentioned it 🙂 as long as it works for your tool, I find it really nice, you can't build invalid things since you are always referencing a valid example