HNHacker News
TopNewBestAskShowJobs

gren

1,219 karma · joined April 12, 2010

http://greweb.fr/
submissionscomments
gren··on Flatstrap - Bootstrap with no rounded corners, gradients or drop shadows
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."

Antoine de Saint-Exupery

gren··on Unveiling Play 2.1 JSON API Bonus: JSON Inception with Scala 2.10 macros
Nope this is not what happened. Play team made the decision months before to start moving to Scala when experimenting the play-scala module of Play1.

This is a technical decision to build a web framework to the JVM. And even if the core is written in Scala, it doesn't mean you can't use it in Java. Give a try!

gren··on Unveiling Play 2.1 JSON API Bonus: JSON Inception with Scala 2.10 macros
Making stronger apps?

Let's take the Play 1 vs Play 2 example:

How many times I got a 500 pages in the face due to a basic NullPointerException in Play 1 groovy templates...

In new play 2 templates, because they are type-safe, they guarantee that you will not have those basic errors.

Of-course, it doesn't guarantee everything, but it's way less error-prone. You actually CANNOT make this kind of NPE errors with type-safe scala code.

where in java you do something like:

user.address.town // oops I forgot to test if user.address is not null

in scala:

// user.address.town wouldn't work, because address is represented as an Option[Address]

user.address.map(_.town).getOrElse("")

gren··on Unveiling Play 2.1 JSON API Bonus: JSON Inception with Scala 2.10 macros
My two cents:

- non-blocking IO with the powerful iteratee concepts (a nice approach to play with streams (EventSource/WebSockets/*) which is not only an event-based approach like in NodeJS, but more a "reactive" approach)

- functional approach of things with Scala

- everything is much more type-safe (especially templates) which make apps stronger (not prone to simple error like NPE in templates) but also faster (templates are compiled)

gren··on Linkedin gets a new look
I don't really like this dark header in contrast with the body. Also the dropdown menu dark border looks horrible IMHO.

The rest is quite ok! :-)

gren··on 6.5 Million LinkedIn Password Hashes Leaked
aha! same for me ;)
gren··on Welcome To Life
Brilliant!
gren··on Chinese Physicists Smash Distance Record For Teleportation
"Teleportation turns out to be extremely useful." <= lol! Who doubts it?
gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Thanks!
gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
you can refresh / bookmark / share the page URL at any time and you will retrieve your work.

And also I don't have to store anything on my server, bit.ly like services are the new way of storing the information :)

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
you are right! For sure it would be more efficient, and shaders are incredibly powerful. I have considered that, but it wouldn't work everywhere today. So for now I have this implementation I will use for my web games ;)
gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Thanks for that, it was always unclear in my mind, now it's clear!

ok so I'll move it to LGPL soon then ;)

Yep, This is what I want for Illuminated.js. I prefer to have benefits of the library modifications. It's a bit more restrictive coming from MIT (I used to use it for some projects) but it's not as restrictive as a "non-commercial only" license, so IMO it's quite ok, it's a minimum of thanks to the library.

Regards

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Thanks.

Yeah, I need to fix that, this is link to my wrong sampling implementation.

If you use only 1 sampling you will see it is fixed.

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
This is what I do except I use drawImage.

You think using getImageData and putImageData is more performant that drawImage(canvas, 0, 0) ?

BTW i'm not sure it will works for combining images together with special composite operation.

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
AFAIK, with GPL you are allow to use the library in a proprietary project but if you modify it, you must publish the library modification, not the whole project.

Am I wrong?

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
eah I think the default scene use too much samples, like 51 for the right light.

Now my technique of combining shadow samples together is probably not the most efficient, I draw them with source-over and an alpha which is also a wrong hacky current implementation... but maybe using the CanvasData would be less efficient (technically I need to make the average of shadow samples' grayscales) - well we never know, I haven't tried yet ;)

I would be happy to have any contribution in the library :)

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Sorry for that, I though having this

    history.replaceState({}, title, "#"+hash);
would have fixed it.

( https://github.com/gre/illuminated.js/blob/master/demo.js#L1... )

Any idea?

gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
you are right, I ignore the light if its center is inside an object, it was before I implement these samples. I should still fix it, maybe it's just by removing this check but I remember having some strange effects.
gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Mmh unfortunately requestAnimationFrame() seems to be very "greedy", it seems its strategy is to consume as much resource as possible (if the render() is not enough fast).
gren··on Illuminated.js – 2D lights and shadows rendering engine for HTML5 applications
Performance has been my focus on this work, I use a lot a cache canvas to not redraws gradient and path things but just copy caches. But i'm stuck on Canvas and requestAnimationFrame performances. Let's hope it will continue to improve, otherwise I could try to use WebGL but it will not be supported by every browsers for today.

Do you use a lot of sampling in the lights? I reach good fps on my macbook pro, especially on Chrome (but also on my home computer under Linux).

I hope we can use it with less sampling and less compute() calls for our games :)

gren··on Why France Has So Many 49-Employee Companies
This is a bug for me, it seems we have a discontinuous function in the Code Du Travail !
gren··on Show HN: I ported an XBox Live Indie Game to HTML5 in 2 days.
It seems not to work on Linux.
gren··on Kickstarter: Make a Better CoffeeScript Compiler
I like CoffeeScript but I see it as a temporary language providing cool syntax features on top of Javascript.

no offense but IMHO, we should focus on releasing the next Javascript and make it possible instead of writing better CoffeeScript compilers.

gren··on Play Framework 2.0 Final released
give Play 2.0 a try guys, it's a fresh new framework, more robust than ever, and with awesome concept for handling Input/Output.
gren··on 30 minutes to make a collaborative paint with Play2, Canvas and WebSocket
Hi rkalla and thanks for your feedback.

The idea behind Play2 is to have a framework written in Scala (the core) but providing a full API for both Scala and Java languages. Hence, users can choose their preferred language to write web applications.

gren··on 30 minutes to make a collaborative paint with Play2, Canvas and WebSocket
Mmh sorry for that, that's strange I thought Youtube has HTML5 video support - moreover i've encoded my video in WebM format.
gren··on Twitter sells multi-billion tweet archive
so true. public is public. Anyone could have data mined all these twitts... But the difficult question that may rise is the "right to delete". IMO it's a hard dilemma: history VS privacy. Can someone decide to delete all its trace and destroy everything he built? On the other hand, we need to keep trace of what's happened in the past, don't you think?
gren··on MusicForProgramming();
totally agreed. I've been listening to di.fm and Armin Van Buuren week shows for 5 years.
gren··on Search: .lenght - Github
What about this one: https://github.com/search?type=Code&language=JavaScript&...
gren··on Create - A new kind of web editing interface
I would love to have this system for documentations and articles. Imagine if you let people easily improve texts, fix spelling mistakes, or translate pages, for documentation you wrote.

More generally, this would be awesome to use on a wiki.

This makes editing even more accessible.

← PreviousPage 3 of 4Next →