12 ms·
Skip: A programming language to skip the things you have already computed
- xialvjun 5y agoViewing https://news.ycombinator.com/item?id=18077612 https://news.ycombinator.com/item?id=18077612 , Skip seems to be an interesting and promising programming language. I hope it will continue to be developed.
- klohto 5y agoIs it used anywhere? Github seams dead and the main contributor have left Facebook to start SkipLabs with DB related product SQLive.
- macintux 5y agoLooks very interesting, but the last blog entry was over three years ago, and there are no mailing lists/IRC/Slack/any community forums to indicate signs of life. A shame.
- _9hey 5y agoFooter is fb not meta? Legit affiliation? > Copyright © 2022 Facebook Inc.
- tekknolagi 5y agoIt used to be a FB project, but no longer.
- detaro 5y agoautomatically generated to current year and the repo hasn't been updated in 3 years.
- jamesfinlayson 5y agoSite doesn't load for me right now but looks like it: https://hub.packtpub.com/facebook-releases-skiplang-a-general-purpose-programming-language/ https://hub.packtpub.com/facebook-releases-skiplang-a-genera... I remember a colleague seeing this presented at a conference a few years ago but that was the last I'd heard of it.
- sidpatil 5y agohttp://web.archive.org/web/20220218003133/http://skiplang.com/ http://web.archive.org/web/20220218003133/http://skiplang.co...
- _zooted 5y agoHomepage is skipping loading.
- oshiar53-0 5y agoTo be fair, it has computed the page at least once at some point...
- arrow7000 5y agoCame here to say this
- mcluck 5y agoLooks interesting but here's what I don't understand. So many programming languages do not show example code on the homepage. That's like if Mazda didn't show cars on their homepage. Sure, you won't really know what it's like to drive it without getting your hands dirty but at least let me see the trim.
- viktorcode 5y agoJust click "learn more" button and you'll see step by step examples of the language features. A quick take on the front page can't possibly explain much about a language, maybe just a sample of syntax? I don't know why it would've been useful.
- xigoi 5y agoLook at Nim's front page: https://nim-lang.org/ https://nim-lang.org/ It features several code samples showcasing many important language features.
- alpaca128 5y agoI can only speak for myself, but this kind of abstract listing of features is absolutely meaningless to me. Why would I want to use it instead of others, how do the unique features make a difference at solving a frequent problem? After reading the page I know Skip does something with caching, but I still have no clue what difference it actually makes in a program. In my opinion a programming language landing page without code example is like a game's Steam store page without screenshots - it's cool to know it's a "fast-paced racing game" but that could apply to everything between Tux Racer and Gran Turismo. TypeScript's website shows right at the top in a few lines how it makes an easy mistake in JS impossible. Zig's site has a nice example that gives you an idea of some added features, how it differs from C but still feels similar. Rust's website had an editable and runnable code snippet showing iterators and pattern matching (although for some reason they later replaced it with the phrase "blazingly fast" in the redesign).
- Mawr 5y ago> Just click "learn more" button and you'll see step by step examples of the language features. I got bored after about 5 pages, everything presented there is the same as in any other language. I want to see what differentiates this language from others, not what's the same. That is what a landing page of any new language must accomplish - sell the reader on the power of your unique features as fast as possible.
- julienv 5y agoIt's still very much used at SkipLabs. In fact, it's the language that SQLive is written in: http://sqlive.io http://sqlive.io Unfortunately, we use a proprietary fork of SKIP, so that's why the OSS project looks dead. We might open-source our version some day, but no plans for now.
- jerye 5y agoThis sounds interesting... Though it doesn't seem like that domain is working.
- julienv 5y agoFixed! thanks!
- interpenetrate 5y agoIf done right, SQLive is the sort of thing that could entirely change the way many applications are written. Solving the problem of real time collaboration at the database level has been a dream of mine for years. Unfortunately I'm doubtful that existing RDBMSs will be able to integrate such a thing, seeing how shoddy implementations of materialized views have been. I really hope you are successful in tackling this problem and that you can share your work.
- julienv 5y agoThanks! You can try the version in the site for testing if you want! If you want to build something, let us know!
- FridgeSeal 5y agoCheck out the work Materialize is doing as well - similar vein.
- interpenetrate 5y agoI did just that recently. They certainly seem to offer the most complete solution. Definitely worth keeping an eye on. I had to pass because of its prohibitive license (for now) and the head-scratching bugs I ran into with the direct Postgres source. I also had some concerns about the complexity Materialize would add to architecture of the sort of small apps I typically build. I know this is unappreciative of the complexity of the problems that Materialize solves, but it would be so nice if Postgres just had observable (with triggers), no-compromise incremental materialized views. What sort of experiences have you had with Materialize, if any?
- unnouinceput 5y agoIt's so dead that even the Facebook copyright at the bottom was not updated
- dapids 5y agoIt literally says 2022
- phonethrowaway 5y agoit doesn't say meta, duh
- dapids 5y agoFacebook still owns Facebook.
- brundolf 5y agoIt mentions on the home page: > Caching with Reactive Invalidation But a Cmd+F for "cach" in the docs doesn't turn anything up. Anybody know where it goes into more detail on that?
- rco8786 5y agoA whole homepage about a programming language, and nowhere on the page does it show the programming language. :-/
- rowls66 5y agoWhy is seeing the syntax of a programming language so interesting? I think that syntax is one of the least interesting aspects of a programming language.
- deleted 5y ago[deleted]
- gigatexal 5y agoIt’s actually the opposite: one will be writing that syntax when using the language if it’s a chore to write then nobody will want to use the language. Also it’s easier to understand what a language is doing looking at code than a technical document.
- spicybright 5y agoI can't find any code that highlights the main feature of the language. Only example programs like hello world, arithmetic, etc. which are fairly useless.
- moron4hire 5y agoThis seems to be their main hook that differentiates the language: http://skiplang.com/docs/lvalues.html http://skiplang.com/docs/lvalues.html. Otherwise, it looks basically like TypeScript with some of the keywords renamed.
- stirfish 5y agoIt's nice to be able to see what a new language is able to express easily. Have you ever browsed Rosetta Code? I find syntax interesting because it shapes how a language is used. https://rosettacode.org/wiki/Rosetta_Code https://rosettacode.org/wiki/Rosetta_Code
- oshiar53-0 5y agoI assume this uses thunks not unlike some lazily-evaluated languages?
- dang 5y agoRelated: Skip – A programming language to skip the things you have already computed - https://news.ycombinator.com/item?id=18077612 https://news.ycombinator.com/item?id=18077612 - Sept 2018 (100 comments)
- hayley-patton 5y ago> Thanks to Skip's tracking of side effects the garbage collector only has to scan memory reachable from the root of a computation But any typical copying GC only has to scan memory reachable from the root(s) of a mutator. I suspect there are more interesting optimisations, but I am unable to discern them from this statement.
- julienv 5y agoWell, imagine your type-system was able to tell you exactly what roots are mutable in what scope. Now you can run a garbage collection on a single scope. That's not how it works, but in pseudo code: collect { // Some code return ...; } Well, if you don't have a type-system that tells you what is mutable, you have to either scan all the mutable roots, or maintain a write-barrier to know what could have captured data in the scope. The problem with write-barriers, which is the go-to solution for generational GCs. Is that it is a conservative approach. Meaning, it will promote garbage in the cases where the pointer that lived outside of the scope is dead. Let's take an example, again, in pseudo code: myObject = { field1: []}; collect { myObject.field1 = [A, B, C]; myObject = null; } If you use a write-barrier, what is going to happen is that [A, B, C] is going to be promoted, because the barrier is going to track the object myObject, and it doesn't realize that it's dead. However, instead, imagine you have a type-system that tells you that in that scope, the only thing that can be mutated is myObject! Well, now you can run that in a loop, without accumulating garbage! Makes sense?
- hayley-patton 5y agoSo, myObject and the list are allocated in different generations/scopes/etc, and we'd typically trip the write barrier, if we kept the program as is. Right. I don't see how it follows after, that we can avoid the barrier based on just mutability information. It is true that we can only "capture" data with the involvement of mutable objects, but I am struggling to figure out what more we can derive from mutability information. It feels like I'm missing some inference step between "the only thing that can be mutated is myObject" and "now you can run that in a loop, without accumulating garbage" and I can't think of one. I would be more tempted as a compiler writer to delete all the code, since nothing is ever read outside the loop; but such analysis again doesn't depend on mutability type information per se, rather on what mutations occur in the program.
- fennecs 5y agoIt’s not like memoisation and thunks are new features. What has this language added in this space I can’t do in say Haskell? >written by a bunch of html/js developers Ah so because they have rediscovered something it’s meant to be revolutionary?
- KnobbleMcKnees 5y agoMy first thought was wondering why this couldn't be partially implemented (i.e. the important bits like memoisation of idempotent, state-bound functions or contexts) in any other programming language. Then I wondered if this was already implemented for some functional languages. Then I read your comment. It was quite the ride.
- syrusakbary 5y agoIt seems the last blogpost was from Aug 2018 [1] and last commit in the repo from June 2021 [2], so it doesn't look very maintained at the moment of writing this comment (Feb 2022) [1]: http://skiplang.com/blog http://skiplang.com/blog [2]: https://github.com/skiplang/skip https://github.com/skiplang/skip
- farzher 5y agoadopting a new language is such a huge task. doesn't seem like a big enough feature for a whole entire new language. glad people are trying new things though
- xwdv 5y agoImagine if we had a shared distributed database and could even skip any computation that has ever been computed.
- continuational 5y agoBut then you have to wonder - what is the storage requirements for storing the results of every computation, ever?
- Salgat 5y agoReminds me how you can do the same thing with a simple "@cache" at the top of a python function.
- brundolf 5y agoThat doesn't work if one of the arguments gets mutated
- llIIllIIllIIl 5y agoDifferent arguments would provide a different result, wouldn’t it?
- pygy_ 5y agoI think this also caches closures, and recomputes them either when the inputs change or the closed over values are mutated. Edit: Oh, apparently that's not the case... Or maybe I missed something. http://skiplang.com/playground/#bXV0YWJsZSBjbGFzcyBGb28obXV0YWJsZSB4OkludCkgewogIG11dGFibGUgZnVuIGdldCgpIDpJbnQgewogICAgZGVidWcoKCJnZXR0aW5nIiwgdGhpcykpOwogICAgdGhpcy54CiAgfQp9CgpmdW4gbWFpbigpOiB2b2lkIHsKICBmb28gPSBtdXRhYmxlIEZvbygwKTsKICBmID0gKHg6SW50LCB5Om11dGFibGUgRm9vKSAtPiB4ICsgeS5nZXQoKTsKICBkZWJ1ZyhmKDEsIGZvbykpOwogIGRlYnVnKGYoMSwgZm9vKSk7CiAgZm9vLiF4PTE7CiAgZGVidWcoZigxLCBmb28pKTsKICAKfQo= http://skiplang.com/playground/#bXV0YWJsZSBjbGFzcyBGb28obXV0... Edit2: `debug()` is tracked as an effect, causing `get()` not to be memoized. Unfortunate... http://skiplang.com/playground/#bXV0YWJsZSBjbGFzcyBGb28obXV0YWJsZSB4OkludCkgewogIG11dGFibGUgZnVuIGdldCgpIDpJbnQgewogICAgZGVidWcoKCJnZXR0aW5nIiwgdGhpcykpOwogICAgdGhpcy54CiAgfQp9CgpmdW4gbWFpbigpOiB2b2lkIHsKICBmb28gPSBtdXRhYmxlIEZvbygwKTsKICBmID0gKHg6SW50LCB5Om11dGFibGUgRm9vKSAtPiB4ICsgeS5nZXQoKTsKICBkZWJ1ZyhmKDEsIGZvbykpOwogIGRlYnVnKGYoMSwgZm9vKSk7CiAgZGVidWcoKCJiYXJlIGdldCgpIiwgZm9vLmdldCgpKSk7CiAgZm9vLiF4PTE7CiAgZGVidWcoZigxLCBmb28pKTsKICAKfQo= http://skiplang.com/playground/#bXV0YWJsZSBjbGFzcyBGb28obXV0...
- brundolf 5y agoIt gets complicated as soon as there’s a pointer involved Do you compare the pointer for equality, or do you follow it and deep-compare what’s on the other side? What about the next pointer jump? What if there’s a class instance? What if there’s a reference cycle? Python lets you implement custom logic in __eq__() to manually bridge some of these gaps, but doing that for everything can get out of hand. Also, deeply-traversing large objects to check equality can get arbitrarily expensive. Immutable structures simplify these comparisons (just compare everything as a value, any change will mean a new pointer), but obviously introduce certain constraints. By tracking observed properties of mutable structures at runtime, and then publishing cache invalidations only when they change, you can: - Do no extra work to know whether or not a cache has been invalidated - Automatically and perfectly track everything the function “cares about” - Track only the things it cares about, so changes to properties it doesn’t actually use won’t invalidate the cache See the MobX docs for more (I’m not closely familiar with Skip directly, but from what I’ve seen it works on very similar principles): https://mobx.js.org/understanding-reactivity.html https://mobx.js.org/understanding-reactivity.html
- bbarn 5y ago"In Skip the = operator introduces a new variable, but unlike other languages the = operator alone can not modify an existing variable." Using != to assign a value feels really strange to me. I know some languages use := but in those languages typically it's because = is an equality operator. I'm sure there are some exceptions but != just so universally means "not equal" to me.
- sgillen 5y agoI too would prefer := or even =!
- asddubs 5y agoor <= which vhdl does (it differentiates between variables and signals so it uses both := and <=)
- samatman 5y agoWhat's stopped me from using this syntax in the past is that it means LTE in basically any language I can think of. One can certainly design a grammar where it's unambiguous, I have in fact, but it still doesn't look right to me.
- mst 5y agoR uses <- which is less ambiguous at the cost of no longer having an equals sign in it.
- Dylan16807 5y agoThat sounds like a benefit to me, not a cost.
- lostmsu 5y agoThat also means they have to use spaces? Otherwise what is the difference between x <- 1 and x < -1?
- pygy_ 5y agoThis looks fascinating, I wish I had found it sooner. Am I correct that the cache invalidation logic is akin to pull streams, unlike computations in projects like S.js/Surplus, Solid.js or Sinuous, that are push-based?
- shrimpx 5y agoI guess the vision is to have SQLive hooked up to Skip hooked up to React. Then your website is a pure function of your database, and clicks in the UI just mutate the DB, and all the views updates seamlessly.
- otikik 5y agoThis part caught my eye: http://skiplang.com/docs/lvalues.html http://skiplang.com/docs/lvalues.html I think some of the phrasing there ("the variable x is going to be updated to point to a new copy of the object pointed to by x where field1 has the value 0") would really benefit from some graphics. Nothing fancy, something similar to what the Rust book does for ownership would help. https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html https://doc.rust-lang.org/book/ch04-01-what-is-ownership.htm...
- amelius 5y agoFor how long are values cached? And how is garbage collection of the cache handled?
- pygy_ 5y agoFor context, this is the brainchild of Julien Verlaguet, one of the creators of the Hack language used at FB. Skip was meant to gradually replace Hack, but the FB codebase turned out to be too tangled to gradually convert to the reactive paradigm, and a big rewrite was not possible, so FB pulled the plug, then Julien kept on pushing the project independently.
- comboy 5y agoIt would be nice to put right there on top info what's the difference between it and using already popular functional language with memoization. Guessing if something has side effects instead of making it explicit makes me already want to run away when I think about debugging.
- noduerme 5y agoWhoa so - I had to kinda dig to get to the Lvalues section of the docs, but ya really bury the lede there! I love the concept of x.!o = 3 and !x.o = {copy of x, with o=whatever}. I didn't read far enough to understand whether this makes deep clones with sub-objects. (I'm guessing...not?) Still, that itself is very innovative.
- thom 5y agoI've been tempted to learn Rust just for Differential Dataflow, less sure I'd learn something even more esoteric for some similar functionality, but a very interesting space to see progress in.
- andrewfromx 5y agoI like the name. In 4th grade I presented the argument to my PE teacher that skipping was better exercise than running and he let me skip around the track while everyone else ran.
- deleted 5y ago[deleted]
- pshirshov 5y agoA quick question: does it support HKTs and implicits/typeclasses? Is there a decent macro system?
- rvcdbn 5y agoInterested to learn more about how memory management works - any details on this?