6 ms·
Isomorphic Go
- everyone 9y agoBah. I thought this was the game 'go'. Isomorphic go (the game) sounded awesome!
- opportune 9y agoYou could probably do some very interesting work with Go and lattice theory. It's a very symmetric game
- everyone 9y agoI like go and I make games. I have considered making a go client with loads of mad options that you can configure at will. Eg. More than 2 players, triangular or hex grids, toroidal, play at same time, analog (place stone wherever) etc.
- igtztorrero 9y agoAdd some demo apps
- opportune 9y agopedantic, but I don't like this application of the term "isomorphic"
- danharaj 9y agoNot pedantic, the word isomorphism shouldn't be abused like this.
- abritinthebay 9y agoI assume you’re against the usage of it in every now non-mathematical field then? Because it’s a perfectly applicable usage when used outside of mathematics
- jack_h 9y agoI'm guessing a lot of people take issue with the term because it feels out of place. Software engineering doesn't use a lot of greek derived terminology like mathematics, chemistry, etc... Rather it seems to primarily use English derived terminology. At least that's my reading of the situation.
- danharaj 9y agoI'm opposed to sloppy uses that don't really apply except in the most trivial sense and don't actually convey any useful information. It's a buzzword now and I'm embarrassed for programming.
- abritinthebay 9y agoIt absolutely conveys useful information. At least... when used correctly. It's talking about applications that share a similar structure and composition. An isomorphic application is one that is structured similarly on the server and the client (often sharing most of the code) but will not have all the code the same. For example - server side code may deal with Auth or routing whereas the client is more data driven. This is quite different to a 100% server rendered page OR a client-rendered page. It shares some features with both. This is also quite different from the implication of a universal application - which would imply both the client and server run the exact same code (otherwise how can it be called universal?). So it's very information rich compared to any alternative.
- jdoliner 9y agoWhat's wrong with it? Generally speaking in mathematics isomorphisms are mappings that admit inverses. That seems like a fairly accurate description of what's going on in that you can map code from server to client and back again without changing its meaning. What word would you use?
- deleted 9y ago[deleted]
- hyperpallium 9y agoMappings that admit inverses are bijections. An isomorphism is a special kind of bijection in which, if two things have some relationship before the mapping, they have some other relationship after the mapping. e.g. if a*b = c, then ln(a)+ln(b) = ln(c) EDIT The isomorphism is the mapping from x to ln(x); the two things before the mapping are a and b; their relationship before the mapping is that their product is c; the two things after the mapping are ln(a) and ln(b); and their new relationship is that their sum is ln(c). In this example, it's not just "some other relationship" after the mapping, but involves c, also mapped.
- jdoliner 9y agoRight, particularly they're homomorphisms that admit inverses. I confused myself into thinking that the fact that they admit an inverse implies that they're structure preserving but that obviously isn't true. Still I don't see anything here that doesn't basically apply to running the same code on client and server. Since the entire point is that you are preserving structure, Go is supposed to have exactly the same semantics on client and server.
- hyperpallium 9y agoYep. But as others have said, it's not really isomorphism in a mathematical sense. The article defines "Isomorphic web applications" as "where the web server and the web browser (the client), may share all, or some parts of the web application code." Just, "same shape" on both sides. If it was identical code, I would (mathematically) call it an identity (which, to be fair, is an isomorphism). But it's not identical; they transpile go to js ("GopherJS - A compiler from Go to JavaScript"). This compilation itself is arguably an isomorphic mapping, with the same code doing equivalent things on both sides. e.g. equivalent assignments between equivalent variables. Two problems with this interpretation (1) a transpiler doesn't have to be isomorphic (e.g. could use different idioms); (2) that's not really the aspect they're referring to.
- hermanhermitage 9y ago"monoglot" might be a more accurate term, but "isomorphic" seems to have the mind share. "isomorphic" would seem to imply having the same structural composition - eg. big ball of mud on the front end and back end, or broken into services implemented as objects (sequential) or actors (concurrent).
- anonacct37 9y agoI'm actually building my latest project this way. Not using this project though. I actually really enjoy it. I have all of my go test stuff running in subpackages, and a fairly thin main package that hooks my models up to vue.js and builds some frappe charts. I very much enjoy taking the workflow I use to build efficient services and using it to build my simple frontends. two-way data binding on a go struct is actually kind of magical and not something you could really go without javascript since (I assume) it relies on Object.observe and go doesn't really have properties. Goroutines and channels in javascript are also really magical.
- mzzter 9y agoAre you using GopherJS? What’s the performance of Go in the browser?
- anonacct37 9y agoYes I'm using gopherjs. It actually performs really well. For a taste check out this article on raw numeric perf where gopherjs beats native go. Of course there's a catch/explanation but it's interesting to see how well it can perform even on tight numeric loops. https://medium.com/gopherjs/surprises-in-gopherjs-performance-4a0a49b04ecd https://medium.com/gopherjs/surprises-in-gopherjs-performanc...
- MrBingley 9y agoWeb dev, the beast that consumes all. Nothing is sacred.
- anonacct37 9y agoI think the change is going the other direction. Native code and clean libs that don't depend on window/document globals are coming to the web via projects like this and the other 1/2 dozen ways the browser now has of running gcc/llvm target output.
- MrBingley 9y agoI was referring more to its use (abuse?) of the word "isomorphic", which already has a well-established meaning in mathematics.
- spullara 9y agoGoogle already did this with Java & GWT right? Edit: I was responding to their claim "Up until the release of Isomorphic Go, JavaScript had been the only game in town providing the capability to create truly isomorphic web applications."
- epynonymous 9y agoah, i see, so compile some golang/template code into javascript? makes sense to me now, but i never liked the gwt type constructs, i for one actually like the fact that you have ui people working with javascript or whatever languages/frameworks they like and the backend guys doing what they like, and the contract between them is an api.
- paulddraper 9y agoOr ScalaJS w/ ScalaTags?
- philwelch 9y agoI’m pretty sure you could do similar things with Clojure and ClojureScript.
- camus2 9y agoor Ruby and Opal... The claim of that website is BS.
- ktpsns 9y agoWhat's the advantage of the term "isomorphic" in contrast to "full stack framework"? I acknowledge that, using go, this is another paradigm in contrast to what people call a "framework". But it feels like inventing cool terms.
- inimino 9y agoRails is a framework, and to use it you need to know both Ruby and, if you want to do anything on the client, JS. Really, the page explains what "isomorphic" means in this context...
- skybrian 9y agoYou can share logic between the client and server, and render pages on the server for better SEO.
- ktpsns 9y agoThis is exactly what full stack frameworks such as https://www.meteor.com/ https://www.meteor.com/ provide.
- abritinthebay 9y agoMainly that they mean different things.
- ryandvm 9y agoThe main effect is that your API guys can now suffer from the same framework burnout that front-end devs endure.
- frwhlr 9y agoIt's an ad!
- innagadadavida 9y agoThe risk with reading framework books is that it is obsolete before you finish reading them, also there are too many of them.
- epynonymous 9y agototally confused by the use of the word isomorphic, isnt this what we used to call a dynamic web app where the server side renders template files and then javascript embedded in the generated html files, most likely, does additional client side work? i’m confused, it mentions saving time by leveraging code for both server and client side, this sounds a bit like nodejs, but i have no idea how golang code gets run in the browser, confused, i must be missing something...
- inimino 9y ago"isomorphic" came from the JS community using it as a buzzword meaning that the same code runs on the client and server side and can be shared or reused.
- ceefry 9y agoThe site mentions GopherJS (https://github.com/gopherjs/gopherjs https://github.com/gopherjs/gopherjs), which compiles Go to javascript.
- abritinthebay 9y agoIt means isomorphic in the biology/crystal sense. Two apps - server & client - that share an extremely similar structure (and code). It’s not the same as mathematical isomorphism but it’s a perfect description of the dynamics at play if you understand the other meanings of the term.
- isomorphic 9y agoIt still feels a little like abuse of the (more common) mathematical usage of the term, but the same sort of abuse is ongoing with the term "serverless." These things have moved into developer vernacular, so there's no point fighting it, even if I'm a little biased.
- abritinthebay 9y agoI mean... it’s explicitly not the mathematical usage so that feeling is something you’re bringing to the table, not the users of it.
- eximius 9y agoIs it really isomorphic if Go isn't running in the client?
- kristianp 9y agoGo code is, in effect, running on the client, I assume it's compiled to javascript using gopherjs.
- deleted 9y ago[deleted]
- eadmund 9y ago> Up until the release of Isomorphic Go, JavaScript had been the only game in town providing the capability to create truly isomorphic web applications. Ummm, Parenscript[0] has been around for eight years. Not to take anything away from Isomorphic Go, which definitely looks cool. [0] https://common-lisp.net/project/parenscript/ https://common-lisp.net/project/parenscript/
- nameless912 9y agoNot to mention recent efforts to do Clojure/Clojurescript stacks. Not to call someone full of shit, but this guy has drunk the Go kool-aid a little hard.
- rebhan 9y agoUnfortunately the windows build of gopherjs stopped working since the developers only work with Mac/Lin machines, and the main developer moved on to create a Webassembly Backend for the Go compiler.