Fork me on GitHub
Drew Verlee13:08:38

what does bundling mean in the context of coding?


in the context of iOS / macOS it refers to the app bundle which is basically a directory with a specific layout

Drew Verlee13:08:34

what about this context then: >react-native start command like you can see starts a web server. Th purpose of this webserver is to bundle your javascript code and serve it while you are in development mode

Drew Verlee13:08:51

and thanks for the help


oh, im less familiar with frontend development but i know that certain frameworks require a "compilation" step that basically merges / minifies javascript and moves other resources into the right place.


so maybe this webserver does a lighter version of that?


basically, yeah


While developing, you will have a crapton of small files, but browsers don’t allow you to download a crapton of files at the same time

☝️ 4

so an automated tool concatenates them all into a single file.


basically a tar, everything old is new again


and then if you stretch the metaphor, minification is a gzip equivalent 😄


(this is the same reason as why people create a single large image file which is like a mosaic of smaller images, and then use css to display tiny slices of the mosaic where smaller images would normally go)


There’s a constant race to make your website both performant and responsive as early as possible; and people control this via how many, and how large the linked files are.


For example, ages ago, when the internet was SLOW, it was in vogue to cut up the large images into a number of smaller ones, so that they would load concurrently. Now the internet is fast and servers don’t like the same client to block X sockets, so people started coalescing smaller images into one large image, as I described above.


And as a completely separate issue, the Javascript (ES, Typescript, whatever) everyone writes these days is not the Javascript that a lot of browsers understand, because of implementation lag and also people don’t upgrade browsers, so you use a transpiler to downgrade to a previous version, essentially.


I'm trying to implement something akin to macros. I've got it in my head that this is essentially a breadth first search, is that correct? I want my macros to have some ability to defer their evaluation based on adjacent/parent structures in the tree which may be unexpanded as of yet. My solution has been to use a queue, and allow macros to defer themselves and queue their dependencies. I'm using the same solution to perform eager evaluation of parameters too. Does this make sense, or am I missing an alternative architecture for this?

hiredman19:08:03 is part of a compiler based on something like macroexpansion, where the "macro expansion" process did just about everything, including hoisting type declarations top level scope, so expansion passed around environments, one pushing information down the tree, and the other passing information up the tree


it expands sort of twice, once going down the tree and once coming back up the tree, so a macro could not expand going down the tree, and then expand coming back up if it needed information from down the tree


I'm doing something a little bit unusual, I have edn like:

{:a #ref [:b]
 :b #join ["a" "b"]}
And I'm trying to make it possible to implement #ref.


are you familiar with topological sorting?


what you have is a graph, get a topo sort of the nodes, and then fill in the nodes as you go


I am, that's how it's currently implemented. The idea is to open up the possibility to do this in an extensible way (without a special mode for just #ref).


That might be foolish though, and keep ref a special, and layering on a normal macro system makes more sense.


hoplon/ui ( is a library that offers an abstraction over html elements, so that instead of a big pile of dom element types you're given very few, essentially just one single elem type with very flexible attribute system letting you define size of elements and spacing between them, etc. I found it's the only way I've been able to actually succeed in specifying UIs without endless trial and error of css properties, etc. Does anyone know of any other similar attempts at "re imagining html primitives" like this? Not talking about CSS frameworks like bootstrap


I guess put another way, I don't think the ease of using hoplon/UI can be accomplished with just css properties, it requires also the composition of elements (it uses a "box model" which uses 3 nested divs per element), and things like adjusting child element properties based on parent element attributes. Does anything like this exist in the javascript world perhaps?


it sounds like hoplon/ui is using canvas, instead of the DOM?


many other people have tried such a thing. it suffers from the fact that you now have to re-implement all of HTML and CSS


things like accessibility usually suffer pretty badly


@rakyi very cool! @lilactown It doesn't use canvas but rather builds its element primitive out of actual dom elements, and there are flexible enough attributes to the generic element type to usually in most cases represent all layouts you would build in html/css. Though yeah I'm sure it can't take advantage of some of accessibility stuff, it's more for rendering "Web app" type stuff than documents so I don't think it loses much from losing the semantics of the html elements in practice