HNHacker News
TopNewBestAskShowJobs

lennel

89 karma · joined February 27, 2013

submissionscomments
lennel··on Is jQuery Too Big For Mobile?
its a tad more complex that you would imagine from the get go. Certain coding patterns don't work well with closure; for example obj["name"] = a and elsewhere obj.name will cause issues. Of course it would make a lot of sense if they simply wrote it for AO, but I doubt that will happen.

tldr: The reason people pull it as an extern is because it does not work with advanced optimisations.

lennel··on Is jQuery Too Big For Mobile?
the problem is that you will still include the whole of jquery given that it is passed in through an externs file to the compiler.
lennel··on Why Most Unit Testing is Waste [pdf]
Mockito easily leads to a false belief that code is tested. Mocking dependencies and simply asserting those mocks is useless yet I see that all the time.
lennel··on Apple Removes Shadow DOM from Safari
That is what I thought, so dead the tech is dead in the water.
lennel··on Apple Removes Shadow DOM from Safari
what impact will this have on the web component standard implementation in webkit?
lennel··on Do you really know JavaScript?
i mean teams of 20-25 people, working with millions of lines of code over all the modules, that has to be regressed the whole time. Big for the tech stack it is. This is not counting our bucketloads of java and scala code as well.
lennel··on Partial Application in JavaScript using bind()
the use of bind with event listeners will lead to memory leaks since you have no way of removing the event listener, given that you don't have access to the function bind returns (at least in the code examples the writer created).
lennel··on Do you really know JavaScript?
we use java to render our templates on the server side. https://developers.google.com/closure/templates/ And yes response times, it makes a massive massive difference in perceived responses. Our stack is the same stack which gmail uses (we use the full closure suite so compiler, templates, stylesheets, linter and library)
lennel··on Do you really know JavaScript?
I create fully fledged JS apps on a big scale, the difference from this test to reality is startling. The difference is I enforce the use of the closure compiler in our team so 99% of these issues are caught by the compiler. end of story. this test is bullshit.
lennel··on React: Finally, a great server/client web stack
we use rhino for some types of testing. brutally slow.
lennel··on React: Finally, a great server/client web stack
i assume you work on the team at FB. Are you considering writing jsx compilers for platforms like the jvm?
lennel··on React: Finally, a great server/client web stack
I started with this line: >initial rendering should definitely be on the server

this technique is called pre-rendering, and yes, I am amazed people don't do it.

"PyExecJS (which just uses raw JavaScriptCore)." this seems pretty slow or can you cache the execution function. (aka you don't have to parse the js multiple times)

Our backend is jvm so we decided on closure, with this on startup we compile our templates on the server and then pass the rendering functions around pumping the data into it to render initial pages. At the same time, we compile the same templates into javascript functions which are included into our app via the closure dependency system to render on the client. This has the advantage of not having to parse and "compile" a template at the point of delivery.

This is why I think react is an excellent library, because it allows anybody to do this and brings this notion into the minds of developers who jump easily on bandwagons.

I also think that the react team are well on their way to building a library which would fair excellently under all sorts of static analysis

lennel··on React: Finally, a great server/client web stack
initial rendering should definitely be on the server, his premise to render content on the server side and then async load it in is flawed, he adds latency and the dom still has to parse a string at the end of the day and put them on the display tree, so the only bit he offloaded was a bunch of string concatenation (given he used a sane templating system) at the cost of latency. bad trade off IMO.

the downside to his reasoning is that he is tying himself to a single back end (node) if he used something like mustache he coulkd use any backend, but mustache implies parsing templates on the client. googles closure compiles to javascript functions and I am sure something like that exists for mustache and this would seem very sensical.

Converting a large string to a dom element is not expensive, it is when that dom element is added to the actual display tree when things go a bit awol, this is to be expected, redrawing any GUI costs a lot.

React is an excellent library and I am glad people use it, none of the ideas are radical however.

lennel··on We spent a week making Trello boards load fast
<<harsh criticism - i feel bad for, yet I also feel the standards are too low in general>>

pre-rendering the board on the server would have solved his perceived problem immediately.

then in more detail:

layout thrashing only now a consideration? (advice use a mock dom and see what your operations do in your testing if you decide to handle dom manipulation yourself)

as a developer you only started using the profiler when?

too many http request, can be much optimised (yes i realise cdn, but ttl there can be managed nicely even for a single delivery)

css not remaned and compressed

own js badly minified

using jquery ffs!

>> anyway, perceived rendering would have solved this by the metrics solved is measured here and simply rendering on the server and giving a 500ms ttl on the cdn would have been faster + not overburden their servers. I don't know their stack so perhaps the next staement is useless: is this api with the big taskboard open aka can I have a stab at it and try to explain and proof what I am talking about.

lennel··on We spent a week making Trello boards load fast
blocked rendering works, but reuse of existing dom components do not. much cheaper to break it into the list item and render around your display area in larger blocks than you would if you use native. detaching from the dom changing is cheaper than item reuse, still cheaper to render multiple fragments and converting and adding them once.
lennel··on Down The Rabbit Hole We Go: Mind-Expanding Documentaries
I agree with you 100%, reading is a much better way to absorb information with fewer emotional strings available for the plucking with yer brain in a more rational state.

We all however know people who got through university without ever reading an inch of their set list, wrapped in a bubble of uncaring, who could do with a jolt again, a boost to remember why they want to be alive and that money is not the only reason to be alive. For these people, recommending a good documentary is your duty. It could kickstart a moral highground for a month or so in them!

lennel··on Web Framework Benchmarks - Round 8
You describe dropwizzard then rule it out, I don't follow why?
lennel··on Mongodb – not evil, just misunderstood
that is an paragon of maintainability if I ever saw one.
lennel··on South Africa's Nelson Mandela dies
There was no push for war. The apartheid government just wanted to finish their plundering and not be liable for the economic position they created.
lennel··on South Africa's Nelson Mandela dies
tactic yes, but also a great appeal to his humanist intellectual position.
lennel··on South Africa's Nelson Mandela dies
We moved back to SA a week after Mandela was released. My thoughts on SA as someone who saw this goal of transformation fail. Mandela was an incredible humanist, more so than people realise. his government was run on charm, persuasion and super bright people completely unqualified for their roles. The outcome of that was that technocrats (given the failings) and the movement of technocrats took over post (Mbeki). The vacuum (of burocratic skill and knowledge [i go uggh]) which was running a system that big could not (and never can) be built in a resistance movement. So arise the technocrats. Technocrats cannot understand/appease the person living in a shack not having any money or future 20 years post apartheid. So now the deal they negotiated in 90+ 96 + 99 (and yes it was a good deal in many ways (Chicago school) bad in so many as well) has only created a greater imbalance. Now we have entered the era of populists. figure that one out yourself.

Mandela's death will do more for SA and a fair bit of southern africa than most occurrences will, and era of memberance, reading reflection, humanism will come about. for a while. My greatest grievence with Mandela simply lies in that he did not break up the tri party alliance early (trade unions, communist party and the anc which is extremely right wing in contrast) allowing them to get 60%+ votes which effectively means it is a new dictatorship. (i am sorry if 80% of the votes are prone to gerrymandering + an extremely uneducated populace i won't call it a true democracy - then again first past the post - hah!).

a great human. the meaning and writing and so indefinitely misused from now.

lennel··on The lie of the API
"I didn't know there was a dubbed version." "The original version is so much better." ? was it remade?

ps. I have also not seen a dubbed one, but it is obviously subtitled.

lennel··on Small things add up: 4chan's migration to a cookieless domain
The thing that will break your code is this type of notation this['function'] since the compiler can have no idea what renaming should apply. There are aspects of the library that lets you expose public apis.

I can really recommend the compiler in AO mode, the type saving is insane (75% reduction in file size) and type checking is sweet

lennel··on Small things add up: 4chan's migration to a cookieless domain
closure kicks uglify for size when compiling with advanced optimisations.
lennel··on Project Oberon - The Design of an Operating System, a Compiler, and a Computer
We also programmed in Oberon at varsity. I think oberon with scheme and c would be a great set of 3 languages to teach from school level through till end of undergrad at varsity.
lennel··on I'm writing a book: "JavaScript Application Design: A Build First Approach"
I am wondering the same thing. I would imagine that if your whole stack (especially build system) is built ontop of javascript you could have a level of meta programming via esprima, but the rest is bla
lennel··on I'm writing a book: "JavaScript Application Design: A Build First Approach"
I am in the dark, the pasge describes a build tool, what's the fantastic idea here? What is your build doing. or do you mean simply build vs using an ftp server? sorry if this sounds weird, but the blurb explains nothing new, and nothing which cannot be done waaaaay better.
lennel··on Umberto Eco: Exploring Imaginary Lands With One of Italy’s Masters of Fiction
Your reading list for Eco is perfect, I can recommend his essays as well, his intellectual range is amazing. BUT, as you said, above all of this stand Foucoults pendulum. A book about being human and fearing, history, human believe system and and and. A masterpiece.
lennel··on Why 23andMe Terrifies Health Insurance Companies
once the tech is solid I am 100% sure health insurance companies will ask (probably not mandate due to human rights) their customers to do this and give them a financial incentive as such.
lennel··on Join the Compiler Creation Club
Nitpicking certainly but I would say use something like antlr rather than peg.js

antlr "schemas" are extremely close to ebnf's (some exceptions obviously) and the compiler creation club could benefit from that. Antlr 3 is usable in a variaty of languages (although 4 is a hellavalot simpler and solves a fair bit around left recursive grammers, but non jvm support is non existent still I suspect)

← PreviousPage 2 of 4Next →