Shared posts

25 Nov 15:54

El CERN libera bajo licencia Creative Commons los datos de sus experimentos en el LHC

by Yúbal FM

Cern

El CERN acaba de lanzar su portal online OpenData, en el que ponen a disposición del público los datos que han ido obteniendo durante los últimos tres años de experimentos en el LHC mediante los experimentos CMS, ATLAS, LHCb y ALICE. Estos datos han sido liberados bajo la licencia Creative Commons CC0, la cual da permiso para su libre utilización y edición incluso para fines comerciales.

El compromiso de apertura lleva presente en el CERN desde su fundación, razón por la que todas sus publicaciones han sido siempre abiertas y accesibles para todo el público. En su nuevo portal esta filosofía se encuentra más presente que nunca, y facilitan todos los datos en dos modalidades, una de ellas destinada a la educación y la otra a las investigaciones de terceros.

En la modalidad de investigación, la más puramente científica, se han liberado los datos en bruto recogidos por el experimento CMS durante las primeras rondas de colisiones del LHC en el año 2010. Después de tres años de estudios internos, estos datos han sido puestos a disposición del resto de científicos junto al programa de código abierto necesario para poder procesarlos y analizarlos.

Se liberan tanto datos como el software para procesarlo y analizarlo

En la segunda modalidad el contenido seleccionado pertenece a los experimentos ALICE, ATLAS, CMS y LHCb, y se ha procesado específicamente para su utilización en ámbitos educativos. Los datos vienen acompañados de una serie de herramientas básicas especialmente diseñadas para facilitar su visualización.

Este nuevo portal online del CERN es un nuevo paso en su compromiso por alimentar la curiosidad y fascinación de los alumnos, y será continuado en el futuro con la introducción de nuevos datos y aplicaciones.

Vía | CERN
En Genbeta | Siete cursos universitarios gratuitos de ciencia y visualización de datos

-
La noticia El CERN libera bajo licencia Creative Commons los datos de sus experimentos en el LHC fue publicada originalmente en Genbeta por Yúbal FM .








24 Nov 06:34

because i want so

by admin

Because we are all encouraged to do things the way we know they work, because reinventing the wheel is something we are supposed to avoid and because being stubborn is seeing as a bad quality… I often decide to hold to my believe that revisiting old stuff my lead to new ways to do things. Because I want so.

In doing so, sometimes, I do find, indeed, new ways to do things. Such as, rendering analytically antialiased spheres with analytical plausible soft shadows and occlusion.

Analytical in this case means not using montecarlo integrating any of these three forms of visibility. Or in other words, noise free, pixel perfect, light-speed images. Sure spheres are special, so what. They are cute too. So the time spent in paper and pencil with the formulas was totally worth it.

Realtime version and code/math, here: https://www.shadertoy.com/view/MsSSWV

21 Nov 06:41

Corning Gorilla Glass 4 se ríe de las caídas

by Miguel Michán

Gorilla 4

Con GT Advanced Technologies fuera del panorama no parece probable que las pantallas de zafiro vayan a aterrizar pronto en el iPhone. Por eso es una buena noticia que Corning haya presentado hoy mismo el nuevo Gorilla Glass 4, la próxima generación de la marca de cubiertas de cristal resistentes a caídas más respetada del mercado.

La compañía asegura que Gorilla Glass 4 es hasta dos veces más resistente que cualquier otro diseño competitivo disponible en la actualidad, y que su formulación se ha propuesto resolver el problema número 1 de este tipo de materiales: las caídas sobre superficies ásperas como el asfalto o el hormigón.


Para ello, Corning ha desarrollado nuevos métodos para test de caídas y tras cientos de horas de análisis, han determinado que el nuevo Gorilla Glass 4 ha demostrado sobrevivir al 80% de caídas sobre este tipo de superficies, mientras que las pantallas normales de cristal se han roto en el 100% de casos. No es una mala estadística, ¿no creéis?

Corning ha suministrado cubiertas de cristal a Apple desde el lanzamiento del iPhone original, el dispositivo sobre el que prácticamente se reconstruyó esta compañía de Brooklyn, Steve Jobs mediante. La segunda generación de cristal se centro en reducir su grosor y mejorar la respuesta táctil, mientras que la tercera, presentada a principios del año pasado, apostó por aumentar la resistencia a arañazos.

La cuarta generación se pondrá en manos de los fabricantes a finales de año así que salvo milagro de última hora, ya sabéis qué simio protegerá las pantallas de los iPhones de 2015.


Más información | Corning

-
La noticia Corning Gorilla Glass 4 se ríe de las caídas fue publicada originalmente en Applesfera por Miguel Michán .








19 Nov 08:49

Preciosos mosaicos hallados en la frontera de Siria

by noreply@blogger.com (Antonio Martínez Ron)
mosaic-1-1024x685

Han permanecido 2.200 años ocultos bajo el suelo y representaban distintos motivos, como las nueve musas que se ven en la imagen. Un equipo de arqueólogos ha encontrado una serie de mosaicos fantásticamente conservados en territorio turco, en la antigua ciudad griega de Zeugma, fundada por uno de los generales de Alejandro Magno. Os recomiendo pinchar en este enlace para ver otras imágenes.

Entrada publicada en Fogonazos http://www.fogonazos.es/
17 Nov 06:32

Geometry Wars 3 trailer is anything but square



If you think about it, geometry is mankind's greatest enemy. It's the study of shapes and stuff, and, when you really get down to it, everything is made up of shapes and stuff—including the things that kill us. Maybe we should go to war with geometry. We'll chip off the acutest of angles, and exterminate the most threatening fractals. It will be hard, laborious work, but eventually we'll have victory within reach. Until one day... one terrible day, when we realise the truth. WE were geometry all along.

It'll be a Euclidean nightmare, and no mistake.

Probably best to keep our geometric rage focused into videogames—and the upcoming Geometry Wars 3 could be the perfect outlet. It's got a trailer. I probably should have mentioned that in the first paragraph.

It looks pretty sharp, but I do have some concerns. The biggest: Bizarre Creations is sadly no more. This sequel is being handled by Sierra—the resurrected studio now tasked with handling Activision's indie concerns. There's always a danger in these cases that the new studio won't be able to capture the same magic—and Geometry Wars is a game that needs the magic.

As for the new 3D level layouts, it'll be interesting to see how they play. Either way, the game retains a 2D "Classic" mode.

Geometry Wars 3: Dimensions is out, on Steam, on 25 November.



16 Nov 08:05

La reacción química que probablemente te recordará a un relato de terror de Lovecraft

by Sergio Parra

Quienes sean lectores de Lovecraft se acordarán de él en cuanto vean la reacción química que encabeza este post. Sobre todo En las montañas de la locura. Ya sabéis: una agujero que conecta con monstruos subterráneos, antiguos dioses perdidos, que sacan sus tentáculos para atraparnos.

En realidad, lo que está representado en el vídeo son dos reacciones: la descomposición de dicromato de amonio y la reacción de combustión del tiocianato de mercurio (II), un polvo blanco e inodoro. Debe realizarse con extremada precaución debido la alta toxicidad de los humos, que contienen vapor de mercurio. Este fuego artificial, de hecho, se vendió como Serpiente del faraón hasta que se prohibió su venta a causa de sus riesgos.

Vía | iflscience

-
La noticia La reacción química que probablemente te recordará a un relato de terror de Lovecraft fue publicada originalmente en Xataka Ciencia por Sergio Parra .

13 Nov 06:11

Nueve cursos universitarios gratuitos de robótica

by Yúbal FM

Lego Mindstorms Nxt Fll

La robótica es la rama tecnológica encargada de diseñar, construir y programar todo tipo de robots mediante disciplinas tan diversas como la mecánica, la electrónica, la informática, la inteligencia artificial, la ingeniería de control y la física.

Una vez más, Internet nos brinda la posibilidad de iniciarnos en la materia sin necesidad de salir de casa, y lo hace gracias a los cada vez más populares cursos abiertos online o MOOC (massive open online course). Hoy hemos recopilado para vosotros una serie de estos cursos para que podáis dejar volar vuestra imaginación mientras os introducís en el mundo de la robótica.

  • Robots y Videojuegos en las aulas es la segunda edición del curso en español para profesores del portal Miríada x, y le enseñará a docentes y curiosos el funcionamiento del programa Scratch y su integración con las placas Arduino para diseñar robots y videojuegos.
  • El curso de control de robots móviles está que nos llega de la mano de Coursera y el Instituto Tecnológico de Georgia nos enseña a conseguir que nuestros robots se muevan con eficiencia y seguridad mediante la teoría del control. Esta teoría es la que nos facilitará influenciar efectivamente en los sistemas dinámicos que cambian con el tiempo.
  • Autonomous Mobile Robots es un curso ofrecido por edX en el que aprenderemos los conceptos básicos y los algoritmos para la locomoción, percepción y la navegación inteligente. Unos conceptos muy importantes para conseguir desarrollar robots móviles que actúen de manera autónoma en entornos complejos.
  • Artificial Intelligence es la adaptación a formato online el curso anual de introducción a la Inteligencia Artificial de la universidad de Berkeley. En él aprenderemos las ideas básicas y las técnicas que hay detrás del diseño de sistemas informáticos inteligentes.
  • El curso Robot Mechanics and Control, tanto en su primera como en su segunda parte, nos introduce a las matemáticas que hay detrás de las mecánicas y el control de robots que se pueden configurar como cadenas cinemáticas. Esto nos dará los conceptos básicos y principios fundamentales detrás de la robótica como disciplina científica.
  • Underactuated Robotics nos enseñará todos los algoritmos necesarios para hacer que nuestros robots puedan caminar, correr, nadar, volar e incluso manipular otros objetos. Con el curso nos introduciremos en las dinámicas no lineales y el control de nuestras máquinas, haciendo énfasis en sus métodos computacionales
  • Educational Robots for Absolute Beginners es un curso que nos dará las nociones básicas de programación para el robot LEGO NXT Robot. Después de finalizarlo, seremos capaces de montar nuestro propio robot autónomo y hacer que se mueva alrededor de nuestra habitación
  • Lego robotics también nos introducirá en el mundo de la robótica de mano de los Lego NXT. Con este curso aprenderemos los aspectos básicos para aprender a programarlos, y crearemos pequeños proyectos como un sensor de luz para instrumentos musicales o un pequeño identificador de monedas.
  • Fun with Beginner LEGO MindStorms EV3 Robotics está dirigido a todos aquellos que quieren aprender desde cero a construir un autómata con el set Lego EV3 MindStorms y saber todo lo necesario para poder programarlo a nuestro antojo. De esta manera aprenderemos los comandos necesarios para que nuestro autómata hable o sonría, para que viaje en línea recta o en curvas, o para que siga el recorrido marcado por una línea.

Imagen | Wikimedia
En Genbeta | MOOCs y el futuro de la educación: ¿dónde quedan las universidades?

-
La noticia Nueve cursos universitarios gratuitos de robótica fue publicada originalmente en Genbeta por Yúbal FM .


11 Nov 09:18

EMC++ Exits Publishing Purgatory!

by Scott Meyers
I just received the following from O'Reilly:

Congratulations! Your book went to print on Friday, and we've now completed production. The Retail Availability Date for ebooks on oreilly.com and Amazon is tomorrow, 11/11. For print books, it's estimated at 12/2. 
Finally!

Scott
01 Nov 12:11

Composr: Crea una canción y mejórala gracias a las aportaciones de la comunidad

by Yúbal FM

Composr

Composr es una aplicación online mediante la cual podremos crear nuestros propios temas musicales de manera colaborativa ayudándonos de la creatividad de la comunidad. Todo gracias a que cualquier usuario registrado podrá entrar a nuestras canciones y proponer sus propias ideas para enriquecerlas.

Esta web puede llegar a ser especialmente útil para aquellos músicos que alguna vez se han sentido frustrados por no haber sido capaces de desarrollar una idea o melodía, o que simplemente no podían incluirle unos instrumentos musicales que no saben tocar aun sabiendo que le vendría como anillo al dedo a su proyecto.

La utilización de esta aplicación es bien sencilla. Primero tendremos que registrarnos y crear un nuevo proyecto musical. Empezaremos a darle forma a nuestro tema grabando y subiendo diferentes pistas de audio mediante el potente editor musical de la web. Este proyecto quedará colgado en Composr y será visible para todos los usuarios, de manera que quien quiera pueda solicitar unirse a él aportando sus propias pistas de audio.

Composr Colabora

El creador de cada tema musical podrá escuchar las pistas propuestas por otros músicos, meditar sobre cómo le quedan a su canción y aceptar o no cada una de las colaboraciones. El resultado de estas colaboraciones puede ser escuchado por cualquiera que acceda al listado de canciones de Composr, y en todo momento nuevos músicos podrán seguir solicitando unirse a los proyectos.

Composr puede ser utilizado tanto en navegadores Chrome y Firefox como en los móviles y tabletas de Apple gracias a una recién estrenada aplicación fruto de varios meses de trabajo. Aun no hay noticias de si habrá o no una versión para dispositivos Android, pero lo que sí está claro es que esta web puede darle un empujón interesante a las colaboraciones entre músicos de medio mundo.

Enlace | Composr
En Genbeta | U2 y Apple ultiman una nueva forma de vender música online para frenar las descargas

-
La noticia Composr: Crea una canción y mejórala gracias a las aportaciones de la comunidad fue publicada originalmente en Genbeta por Yúbal FM .


22 Oct 15:52

Paralítico vuelve a caminar gracias a un trasplante pionero

by Sergio Parra

 78391835 Darek Cyclingmachine 1Darek Fidyka es un paralítico ha sido capaz de caminar de nuevo después de someterse a una terapia pionera que implicó el trasplante de células de su cavidad nasal en su médula espinal. Había quedado paralítico del pecho hacia abajo de resultas de una agresión con arma blanca en el 2010.

El tratamiento lo llevaron a cabo cirujanos en Polonia en colaboración con científicos en Londres. Geoff Raisman, presidente de la regeneración neuronal en el Instituto de Neurología del University College de Londres, dirigió el equipo de investigación del Reino Unido. Los detalles de la investigación se publican en la revista Cell Transplantation.

El procedimiento

El tratamiento hizo uso de unas células especiales que forman parte del sentido del olfato y que se llaman células de glía envolvente olfativas (OEC, por sus siglas en inglés). Las OEC facilitan que las fibras nerviosas en el sistema olfativo se renueven de forma continua. Al usar las del mismo paciente se evitaba el riesgo de rechazo, y el uso de drogas inmunosupresoras, como las que se usan en trasplantes convencionales procedentes de donantes.

En la primera de dos operaciones, se retiró uno de los bulbos olfatorios y cultivaron las células. Dos semanas después trasplantaron las OEC a la médula espinal, que había sido cortada por el cuchillo con que Fidyka había sido atacado, menos por un pequeño trozo de tejido cicatricial del lado derecho. Se disponía tan solo una gota de material con que trabajar: unas 500.000 células. Se realizaron unas 100 microinyecciones de OEC por encima y por debajo de la lesión. Finalmente, se tomaron cuatro tiras de tejido nervioso del tobillo del paciente y se colocaron sobre una brecha de 8mm a la izquierda de la médula espinal, a fin de cerrar la brecha en la médula.

141021153719 Spinal Cord 624 Spanish

La rehabilitación

Tras el trasplante Fidyka continuó con un programa de rehabilitación que no le había dado ningún resultado durante dos años. Seis meses después de la cirugía, Fidyka logró dar sus primeros pasos. Dos años después del tratamiento, ahora puede caminar fuera del centro de rehabilitación apoyándose en un andador, recuperando también cierta sensación en el intestino y la vejiga y función sexual.

Aún es pronto para generalizar este tratamiento, pero de momento se espera tratar a otros diez pacientes en Polonia y Reino Unido los próximos años. Deberemos estar atentos a los resultados. Raisman, sin embargo, que obtuvo el reconocimiento mundial por sus investigaciones con las células de la glía envolvente olfatoria, se muestra optimista:

Nuestra esperanza es que estos tratamientos sirvan de evidencia suficiente para convencer a otros neurocirujanos. El número de pacientes con parálisis es enorme, hay millones de personas esperando y todo esto podría desarrollarse muy rápido con el apoyo de la comunidad global de neurocirujanos.

Raisman también sostiene que la capacidad de autoregeneración de las células glía permitirá no sólo para lesiones medulares, sino también casos de parálisis cerebral, ceguera o sordera.

Vía | BBC

-
La noticia Paralítico vuelve a caminar gracias a un trasplante pionero fue publicada originalmente en Xataka Ciencia por Sergio Parra .

19 Oct 16:59

Nueva batería que se cargará en dos minutos y durará 20 años

by Sergio Parra

Ntu Assoc Prof Chen Xiaodong With Research Fellow Tang Yuxin And Phd Student Deng JiyangBaterías recuperarán el 70 % de su carga en dos minutos, y tendrá 10.000 ciclos de recargar, es decir, durarán hasta veinte años de uso convencional. Así prometen investigadores de la Universidad Tecnológica de Nanyang, en Singapur, que pronto serán las baterías. Esas baterías que duran un suspiro en nuestro smartphone o en nuestros coches eléctricos, por ejemplo.

La clave de este nuevo concepto de batería reside en la aplicación de nanotubos de dióxido de titanio como ánodo en la batería.

Es decir, moldean el dióxido de titanio, que normalmente tiene una estructura esférica, en forma de pequeños nanotubos (diminutos tubos milésimas de veces más pequeños que el cabello humano). Esa función suele pertenecer al grafito, pero el dióxido de titanio es un material común y económico, y tiene una mayor densidad energética. Es comúnmente usado como un aditivo alimentario o en cremas de protección solar para protegernos de los rayos ultravioletas.

Los investigadores, cuyo estudio fue publicado en la revista especializada Advanced Materials, están en busca de subvenciones para construir un prototipo a gran escala. En el mejor de los casos, sólo habría que esperar dos años para ver a estas baterías en el mercado. Hasta el propio Rachid Yazami, inventor del ánodo de grafito para las baterías de litio, ha dicho que es “el siguiente gran salto” para la tecnología de baterías.

Vía | Neoteo

Foto | Nanyang University

-
La noticia Nueva batería que se cargará en dos minutos y durará 20 años fue publicada originalmente en Xataka Ciencia por Sergio Parra .

09 Oct 05:30

Las grandes tecnológicas se alían por una causa común: enseñar a programar

by Rodrigo Garrido

Diversas empresas de tecnología se han unido a la organización Code.org para lanzar la campaña Hour of Code, con la cual pretenden llevar conocimientos de programación a 100 millones de estudiantes para el próximo año.

Empresas como Google, Microsoft y algunas otras son las que estarán apoyando esta iniciativa, y lo harán por medio de una campaña de recaudación. Para llevar a cabo el proyecto se necesitan un total de 5 millones de dólares, es por ello que se lanzó una campaña en Indiegogo, en la cual, por cada dolar donado estas compañías tecnológicas darán un dolar más, todo para llegar a su meta el próximo 14 de diciembre.

Lo que pretende Code.org con esta iniciativa es que diversos estudiantes, no importando su género, grado, o país, puedan recibir algunos de sus cursos de programación, todo pensado para darles un primer contacto con esta temática que hoy en día apunta a ser un conocimiento imprescindible. Según la organización un 90 por cierto de las instituciones no ofrecen estos cursos en su programa estudiantil, es por ello que han apuntado hacia esta campaña.

Vía | WSJ
En Genbeta | Programación y educación: qué países la tienen en su plan de estudios

-
La noticia Las grandes tecnológicas se alían por una causa común: enseñar a programar fue publicada originalmente en Genbeta por Rodrigo Garrido.


08 Oct 05:57

Beautiful Chemical Reactions

by Justin Cone
Beautiful Chemistry presents 8 types of chemical reactions, magnified and time-lapsed for your viewing pleasure. Credits Video & Editing Yan Liang Chemical Reaction Design Xiangang Tao, Wei Huang, & Yan Liang Chemical reactions were shot at the Chemistry Experiment Teaching Center of USTC
01 Oct 08:08

This is Probably the Only Stop Light You Won't Mind Waiting for

Submitted by: (via smart)

Tagged: dancing , design , Video , g rated , win
30 Sep 12:49

Using runtime-compiled C++ code as a scripting language: under the hood

by Stefan Reinalter

Some time ago, I announced that the Molecule Engine uses C++ as a scripting language. Today, I can share implementation details and a few additional tricks that were used to keep compilation times and executable sizes down.

Prerequisites

Why use C++ for scripting when there are many readily available scripting languages out there? Scripting languages boast a few advantages compared to compiled languages:

  • They are mostly dynamically typed. Scripters don’t need to worry about whether something is a string, an integer, a boolean, or something entirely different.
  • They are mostly interpreted, making it easier to reload changes on-the-fly.
  • Scripters don’t have to deal with pointers, references, and other language details.

Scripting languages also exhibit some disadvantages compared to compiled languages:

  • They are not as fast as native code, even when JIT-compilation is used. Additionally, JIT-code is not an option on several (console) platforms for security reasons.
  • Proper debugging needs a 3rd-party debugger, or you have to roll your own debugging tools.
  • Calling C++-code from script code (or vice versa) always needs some kind of wrapper/translation layer in between, which has to be implemented either manually or automatically (using e.g. SWIG). I find both methods tedious.

For scripting in Molecule, I wanted to have the best of both worlds:

  • Scripting code should be as fast as native code.
  • Scripters should never have to deal with low-level language details directly. They shouldn’t need to worry about pointers, references, ownership, memory management, etc.
  • It should be possible to reload script code in a fraction of a second, while the engine is running. I love short iteration times.
  • Debugging should be supported out-of-the-box, preferably by using the platform’s “native” debugger such as Visual Studio, gdb, SN Systems debugger on PS3, etc.
  • The language should be statically typed. In my experience, dynamically typed languages are great for writing code initially, but absolutely suck when you have to find out why some code in a 50kb script file won’t work.
  • Script code should have direct access to all engine code (if desired) without any translation layers in-between.

With a few tricks we can make C++ fulfill all of the above requirements.

How it works

Conceptually, the idea is simple: each script consists of a single C++ file that is compiled into its own dynamic library (e.g. .dll on Windows, .prx on PS3). Whenever the file contents change, we store the script state into memory, unload the library, compile the script, load the new library, and restore the script state from memory. Done.

On the engine side, a script is a class that implements an interface with a few virtual functions. The script system is responsible for updating all registered scripts each frame. The dynamic library exports two C functions responsible for creating and destroying a script.

The script interface is defined as follows:

class ME_NO_VTABLE_INIT ScriptBase
{
public:
  void SetupSharedLibrary(void);

  void SetEnvironment(const ScriptEnvironment& environment)

  virtual void Startup(void) ME_ABSTRACT;
  virtual void Shutdown(void) ME_ABSTRACT;	
  virtual void Serialize(ScriptSerializerBase* serializer) ME_ABSTRACT;	
  virtual void Update(float deltaTime) ME_ABSTRACT;

protected:
  gameScripting::LogBase* m_log;
  gameScripting::DebugDrawBase* m_debugDraw;
  gameScripting::WorldBase* m_world;
};

Whenever a script is created, the creation function initializes the shared library (more on that later), and then the script system sets up the environment – this initializes the protected members which are used by each script to access exposed engine functionality.

This gives us a statically typed language, native debugging using our favorite debugger, the performance of native code, and fast iteration times if we manage to keep the compile times down. Additionally, we can directly access the full C++ codebase and all engine code by linking with the engine libraries.

As you may have guessed already though, there are quite a few things to watch out for in order to make the system work efficiently.

Avoiding low-level language details

Depending on how your engine is setup, this can either be trivial to accomplish, or result in a lot of work. Because Molecule only uses IDs and handles to identify components, entities, and the likes, I did not have to come up with another solution for hiding raw pointers from users. Scripts use the exact same types like regular C++ engine code does, e.g.:

graphics::MeshComponentId mesh = m_world->AddMeshComponent(m_meshEntity[i], math::MatrixIdentity(), "cube", "floortiles");

In case the engine code still identifies assets using raw pointers, I would highly recommend implementing a system that only ever returns opaque data to the user instead of pointers.

Compilation

Scripts are compiled using the platform’s native toolchain, e.g. on Windows I use cl.exe for compiling the C++ code. Molecule’s content pipeline uses a directory watcher to be notified whenever a file changes. As soon as a script modification has been detected, the content pipeline spawns cl.exe in a new process, and compiles the single .cpp file with the correct command-line options. Both the compiler to use as well as the options can be setup per script, similar to any asset consumed by the engine.

Instead of using the batch-file that ships with Visual Studio for setting up the compilation environment, I wrote my own that only does the minimal amount of setup work needed in order to use the compiler, vastly improving compile times. Additionally, each script includes only one file which makes all required engine parts available to the script. This include file uses a pre-compiled header, which further improves compile times.

A simple script such as the one used in the video now takes 0.3s to compile instead of >1 second, which includes spawning a new process, compiling the script, and reloading the script into the engine.

Exception handling

Scripters make mistakes. Programmers make mistakes. Therefore, it would be nice to have at least some kind of protection against mistakes that could bring the whole engine down. Molecule generally uses a custom exception filter that is used to catch things such as access violations, page faults, etc.

The idea is to install a custom exception filter when running the scripts, handle any exception inside the filter, and notify the system that the script “crashed” without having to close the main application. There is one caveat though: simply returning from the exception filter would take us back to the faulty script, which is not something we want to do. Instead, we throw a C++ exception inside the exception filter which is caught by the surrounding code in the script system, as in the following code:

const LPTOP_LEVEL_EXCEPTION_FILTER oldExceptionFilter = SetUnhandledExceptionFilter(&ScriptExceptionFilter); 

bool success = true;
try
{
  script->Update(deltaTime);
}
catch (const ScriptException&)
{
  ME_ERROR("ScriptSupport", "An exception has been caught, forcing the script to be disabled. See the log output for more details.");
  success = false;
}
catch (...)
{
  ME_ERROR("ScriptSupport", "An unknown error occurred, forcing the script to be disabled.");
  success = false;
}

SetUnhandledExceptionFilter(oldExceptionFilter);

The ScriptExceptionFilter captures the call stack and logs some info about the exception that occurred, and then simply executes throw ScriptException();.

Note that in order for this to work we need to compile this translation unit with C++ exceptions turned on. In shipping builds, we can simply call the script’s Update() function, not using any exception mechanisms at all.

Debugging

Capturing the call stack inside the exception filter only works when the correct symbols have been loaded, which can be achieved using SymLoadModuleEx. This works as long as we use StackWalk64 for capturing the call stack.

However, the debugger also needs to load the symbols which is done internally only when calling LoadLibrary. From what I gathered, LoadLibrary internally sends an event to the debugger, which is kind of an undocumented feature that could be simulated by calling RaiseException with the proper parameters.

In Molecule, I copy both the .dll and the .pdb to a temporary location, and load them using LoadLibrary in development builds. In shipping builds, the .dlls are embedded into the resource packages, and loaded from memory because the .pdbs are not needed.

Note that you need to compile the C++ scripts with the /PDBALTPATH option if you want LoadLibrary to find the correct .pdb file. Once everything is setup correctly and the debugger can find the .pdb file, you can set breakpoints and debug your scripts just like you would any other C++ code.

Global state

As you probably know, dynamic libraries can be a bit of a hassle if you have lots of global state, and things like singletons because those “live” inside the main application, as well as inside the dynamic library.

Fortunately, Molecule does not have even one singleton, and only a few global variables. Among those globals are things such as the head and tail pointers to the intrusive linked list of loggers, the string hash database, and the global D3D device. And that’s about it.

Nevertheless, we need to make sure that both the main application and all dynamic libraries access the same objects.

On Windows, we can use Named Shared Memory to store all global state from within the main application, which is later retrieved by each dynamic library upon startup in SetupSharedLibrary().

Optimizing script code size

During development, script code can access all exposed engine functionality via the interfaces stored as protected members. By using interfaces that are setup by the main application, the script does not need to link with all the engine code, but rather only with the C and C++ libraries. Calling a function from the interface is just a regular virtual function call, with the v-table being contained in the main executable already. Not having to link all libraries decreases the code size, and speeds up the compilation process.

But we can do better! Using dumpbin on the generated object file tells us that the script .dll still contains a lot of things we don’t need.

Earlier we said that each script .dll exports two C functions: one for creating the script, and one for destroying the script. We could use ordinary new and delete for that purpose, but that would pull in operator new and operator delete from the runtime libraries.

Instead, we can use a static buffer inside the .dll that is large enough to hold the script, and use placement new to initialize it. This gets rid of requiring an implementation for operator new and operator delete.

Additionally, Molecule scripts do not need static C++ instances, initterm(), atexit(), and a lot of other things supported by the C/C++ runtime. In fact, you do not need to link the C/C++ runtime at all if you are careful: by providing your own _DllMainCRTStartup function and some dummy symbols in order to keep the linker quiet, we only need to link with kernel32.lib – and nothing else.

After those optimizations, the .dll for the script shown in the video is about 3kb, which is less than the 6kb of script (C++ source) code.

Important to note is that you can still link with the engine libraries and use the engine directly as from within the rest of your code. This is especially useful when programmers need to help scripters or need to aid in debugging, and would like to use the engine’s visualization or debugging features. Simply add the C++ code, link the engine libraries (either by changing the compilation options or using #pragma comment(lib)), and presto: all the functionality is available without having to restart the application!

Remarks and conclusion

With the above optimizations employed, C++ can truly be used as a scripting language, offering all the benefits normally only available to scripting languages.

A student of mine has successfully implemented a similar system on the PS3 using .prx libraries (Thanks Niki!).


Filed under: Asset pipeline, C++, Core
29 Sep 05:19

Windows 9 will be free to Windows 8 owners, according to report

by Shaun Prescott

The rumour has circulated for a while, but it looks like Windows 9 will be available free to owners of Windows 8. That’s according to Indonesian news site Detik.com, which has published a statement by Microsoft Indonesia’s Andreas Diantoro seemingly confirming the news. According to a Google translation of the article, Diantoro said Windows 8 will “update automatically” to the new edition of the operating system when it releases.

According to the article Diantoro makes this claim regarding codename ‘Threshold’, which is believed to be Windows 9. Whether the upgrade will apply to owners of Windows 7 or Vista is not specified.

The news comes ahead of an expected preview edition of Windows 9, which will reportedly release either September or October. Given we’re fairly late in September now, it’s reasonable to assume the date has been pushed to October, though Microsoft is expected to officially unveil the new OS during a September 30 event in San Francisco (that’s tomorrow). Chief among the expected changes is the glorious return of the Windows start button.

Windows 9 is expected to release in April. Here’s what we’d love to see in the upgrade.

The post Windows 9 will be free to Windows 8 owners, according to report appeared first on PC Gamer.



18 Sep 18:00

iOS 8 Supports WebGL, Check Out These 'Doom III' and 'Quake III' Browser Tech Demos

by Eli Hodapp

The Javascript API WebGL has been around since early 2011, but like most really cool web browser advancements, it has taken some time to get rolled out to being implemented in actual browsers. The idea behind WebGL is that it allows clever web developers to actually render GPU accelerated 3D graphics inside of your browser without any kind of plug-in. I believe Google Chrome has been supporting WebGL the longest, but, if you updated to iOS 8 yesterday you've now got a browser on your phone capable of the same fancy stuff.

10677619_10100890668071046_1787906150_o

Brandon Jones is a WebGL developer at Google, and his web site is filled with demos that now work in Safari on iOS 8. The most impressive one in my opinion is a Quake III map running in your browser (seen in the screenshot above) but the animated Doom III model demo is pretty rad too. There's also a ton of actual WebGL games out there, but most (all?) of the ones I've tried so far assume you have a keyboard and mouse, leaving no way to control them on your iOS device.

Regardless, this seems like a really cool step in the capabilities of iOS devices. Are there going to be any killer webGL games, or will any developers choose to build things in webGL instead of just native apps? It's hard to say, but at least the tools are now there for anyone to do it if they wanted to.

05 Sep 21:49

format_it: Iterator based string formatting

by Malte Skarupke

format_it is my attempt at writing string formatting that is good enough that it could make it into the C++ standard. It’s not quite there yet but I haven’t gotten to work on it in a few months, so I will publish what I have so far. It is fast (much faster than using snprintf to write to the stack), type safe, memory safe, doesn’t truncate, extensible, backwards compatible for std::ostream and somewhat composable.

The syntax is a mix of printf, ostream and varargs. I’ll just show an example:

// format "100 and 0.5" into 1024 bytes of stack memory
fmt::stack_format<1024> format("%0 and %1", 100, 0.5f);

// print "Hello World" into 1024 bytes of stack memory
fmt::stack_print<1024> print("Hello", "World");

// prints "100 and 0.5\nHello World\n"
auto format_to_cout = fmt::make_format_it(std::ostreambuf_iterator<char>(std::cout));
*format_to_cout++ = format;
*format_to_cout++ = '\n';
*format_to_cout++ = print;
*format_to_cout++ = '\n';

Where the first and second struct mimic snprintf, and the third example introcues the formatting iterator that they use behind the scenes.

First one clarification: I promised memory safety and no truncation, but I am writing to a fixed size buffer on the stack. The way that I guarantee safety is that there is a heap fallback in there. As long as you don’t need the heap fallback that code is much faster than snprintf. For the case where the heap fallback is used, I can construct both cases where it’s faster or slower than snprintf. When explaining the concept of a heap fallback to C++ programmers, they inevitably get angry at me, (even if it’s faster than snprintf) which is why it’s optional. The core of the library is the iterator that I use in the third example, which in the example writes straight to std::cout without formatting to temporary stack or heap memory.

Here’s another example:

std::vector<int> numbers = { 1, 10, 100 };
std::string a_string;
auto format_to_string = fmt::make_format_it(std::back_inserter(a_string));
// writes "{ 1, 10, 100 }" into the string
*format_to_string++ = numbers;
// also possible:
format_to_string.format("\n%0: %1\n", numbers.size(), numbers);
// that wrote "\n3: { 1, 10, 100 }\n" to the string. so the string is now
// {1, 10, 100 }
// 3: { 1, 10, 100 }
//

This formats into a string. As you can see the iterator has more functions than just the iterator assignment. The format() function is the core of the library. The stack_format<> struct from above just uses this. Besides this other available functions are print(), print_separated() and printpacked():


// prints "1 2 3"
fmt::cout.print(1, 2, 3).print('\n');
// prints "1, 2, 3"
fmt::cout.print_separated(", ", 1, 2, 3).print('\n');
// prints "123"
fmt::cout.printpacked(1, 2, 3).print('\n');

Where fmt::cout is a format_it iterator that wraps std::cout.

Since the iterator can write to everything, you might wonder why I even have the stack_format<> struct from my first example. The reason is simple: This has to be faster than snprintf. With all the downsides of std::stringstream, the main reason why C++ programmers don’t use it is that snprintf is faster. You can use format_it to write to a stringstream, but it would remain slower than snprintf. The default behavior, to use stack_format<> can be several times faster than snprintf, and it has to be for people to start using this.

You may have already noticed that this can print more than snprintf or std::ostream can print: It can print containers like the vector that I used in a previous example. It can also print vectors of vectors. If you include the “format_stl.hpp” header it can print all stl containers as well as std::pair and std::tuple. And it’s pretty easy to make it print your structs. But before going into extending format_it, I would like to illustrate one more benefit of it being an iterator: You can use the standard algorithms on it:

std::vector<int> numbers = { 1, 10, 100 };
// prints "{ 1, 10, 100 }"
fmt::cout.print(numbers);
// prints "110100"
std::copy(numbers.begin(), numbers.end(), fmt::cout);
// prints
// 1
// 10
// 100
std::copy(numbers.begin(), numbers.end(), fmt::with_separator(fmt::cout, "\n"));
// prints
// 1
// a
// 64
std::transform(numbers.begin(), numbers.end(), fmt::with_separator(fmt::cout, "\n"), &fmt::hex<int>);

This makes it pretty composable, but this is also one area where I’m not yet happy with what I have. I can explain why at the end.

Another function that I use in there is fmt::hex which prints an integer as hexadecimal. There’s also fmt::upperhex, fmt::oct and fmt::boolalpha. For floating point numbers there is fmt::precise_float, fmt::nodrift_float and fmt::float_as_fixed. There’s also fmt::pad_int and fmt::pad_float as well as fmt::pad_left, fmt::pad_right and fmt::pad_both. (which work on all types) All of these do roughly what they say. precise_float allows you to say how many digits you want, nodrift_float determines the necessary number of digits by itself.

But finally let’s talk about how to make it possible to print your struct. If your struct can print to a std::ostream, then format_it can already print it. Alternatively you can print your struct by writing a format() function in your namespace:

struct print_through_ostream
{
    int id = 0;
    std::string name = "hank";
};

std::ostream & operator<<(std::ostream & lhs, const print_through_ostream & rhs)
{
    return lhs << "id: " << rhs.id << ", name: " << rhs.name;
}

struct print_through_format_it
{
    int id = 0;
    std::string name = "hank";
};
template<typename C, typename It>
fmt::format_it<C, It> format(fmt::format_it<C, It> it, const print_through_format_it & self)
{
    return it.format("id: %0, name: %1", self.id, self.name);
    // alternatively:
    //return it.printpacked("id: ", self.id, ", name: ", self.name);
    // alternatively:
    // *it++ = "id: ";
    // *it++ = self.id;
    // *it++ = ", name: ";
    // *it++ = self.name;
    // return it;
}

std::string print_both(const print_through_ostream & first, const print_through_format_it & second)
{
    std::string out;
    auto it = fmt::make_format_it(std::back_inserter(out));
    it.print_separated('\n', first, second);
    return out;
}

In this example I use both the method of printing to std::ostream, and the method of formatting directly. In the template format_it<C, It> the argument C is the character type, meaning char or wchar_t or u32char_t or whatever else you want to print as, and the argument It is the output iterator. You never need to know what your output iterator is. It could be a std::back_insert_iterator or a std::ostreambuf_iterator or just a char *. You simply need to forward this argument.

Printing to std::ostream has a virtual method call, but it is the only way to print structs that use the pimpl pattern. The fact that format_it supports this means that all of your old structs can already print. But I like to use the function that prints directly to format_it because you have all the format functions available. (that being said I showed you how to make them available for a std::ostream in my first example: it’s just one (long) line of code)

If you are not satisfied with either the format method or printing to std::ostream because you have some complex overload resolution problem, there is a third way: There is a struct called fmt::formatter<> which allows you to do SFINAE tricks. I try to avoid SFINAE because of the compilation time overhead and I don’t use it in the code that ships with the library. But struct overload rules are a bit more powerful than function overload rules, so if you want to use them feel free to specialize that struct.

So in summary: Compared to snprintf this is

  • Faster
  • Memory Safe
  • Type Safe
  • Doesn’t Truncate
  • Extensible
  • Works with std::ostream
  • Composes better
  • Compiles more slowly

That last point is the main downside of this, but ultimately there isn’t much you can do: The reason for snprintf compiling faster is that it drops type information. And that’s why snprintf is the source of so many errors and why snprintf is not extensible.

The main benefit of this over stringstream is that it is faster and that you can use printf style syntax, which is useful in several situations. For example some people use this for translation, where you can have the string “Hello %0, how’s it going?” in English and “Hallo %0, wie gehts?” in German.

OK so why am I not happy with this yet? It’s not stl quality yet. One issue is how it doesn’t compose quite as well as I would like it to. For example there are four different ways to print values with a separator. Every one is used for different situations. I feel like there should be a better way though. And code should only be in the standard library if it composes well and is easily extensible. I think I already beat stringstream in that regard, but the iterator based approach could be more powerful still.

I also wanted to explore the idea of getting some simple scripting in there. I don’t remember where I have this from, but I saw that someone had support for “How is the Commander? Is %{0 male:he, female:she} recovering?” Which is useful for translation because in German that would have to be “Wie geht es %{0 male:dem Kommandanten, female: der Kommandantin}? Erholt %{0 male:er, female:sie} sich?” Which for example the Mass Effect series always gets wrong. The printf style syntax already is a simple form of scripting (because you can move text around) and I feel like adding a tiny layer of text replacement on top of that could improve things a lot. This has to be in the core feature set because users can’t add this. But I need to come up with a good design first. Maybe text replacement is enough, but maybe users should be able to write their own macros. (and maybe I should skip all this because this should be handled at a higher level. But I have seen enough poor translations where a sentence was gender neutral in English but required a different sentence in German depending on if your character was male or female, that I think it would be valuable if this was a basic feature)

Finally performance numbers. I ran each of these lines two million times to get nice big numbers:

Printing strings
fmt::stack_format<1024>(“[%0, %1, %2]”, “foo”, “bar”, “baz”); 182 ms
snprintf(buffer, 1024, “[%s, %s, %s]”, “foo”, “bar”, “baz”); 408 ms
std::stringstream() << ‘[‘ << “foo” << “, ” << “bar” << “, ” << “baz” << ‘]'; 1444 ms
Printing ints
fmt::stack_format<1024>(“[%0, %1, %2]”, i, i * 2, i / 2); 267 ms
snprintf(buffer, 1024, “[%d, %d, %d]”, i, i * 2, i / 2); 397 ms
std::stringstream() << ‘[‘ << i << “, ” << i * 2 << “, ” << i / 2 << ‘]'; 1598 ms
Printing floats
fmt::stack_format<1024>(“[%0, %1, %2]”, static_cast<float>(i), i * 2.0f, i / 2.0f); 1125 ms
snprintf(buffer, 1024, “[%g, %g, %g]”, static_cast<float>(i), i * 2.0f, i / 2.0f); 3198 ms
std::stringstream() << ‘[‘ << static_cast<float>(i) << “, ” << i * 2.0f << “, ” << i / 2.0f << ‘]'; 5473 ms

The floating point code is so much faster because I use Google’s double-conversion library. The other code is faster because I keep type information and because printf is such a huge beast. The printf code is a giant monster that handles a ton of possible flags and combinations. In my code I handle things like hexadecimal printing as extensions which don’t need to be part of the core format_it. I think printf could speed up, but since it’s written in C it has to drop type information and can never be as fast as C++ code. The code used for the profiling is at the bottom of this file.

And once again here is the link to the library. Feel free to take this and to build something standard quality with this. I haven’t had time recently and I don’t think I will have time to finish this for at least the next year.


05 Sep 20:52

GPU Usage tool in Visual Studio 2013 Update 4 CTP1

by RongLu
After shipping a number of improvements to Graphics Diagnostics in Visual Studio 2013 Update 3 RC , the team has been working to bring you more profiling tools for DirectX applications. In Visual Studio 2013 Update 4 CTP1 that released yesterday (Download...(read more)
28 Aug 05:56

Cómo fotografiar al gato de Schrödinger... sin verlo

by noreply@blogger.com (Antonio Martínez Ron)
cat_blue

Un equipo de investigadores austriacos consigue reflejar objetos sobre una superficie sin que los fotones que lo generan hayan tenido contacto con él. Los fotones rojos, que son los únicos que han “visto” al gato, son filtrados y no llegan nunca a su destino, aunque sí lo hace la información. Los fotones amarillos, que crean la imagen del gato, no han pasado en ningún momento a través de él. El experimento lleva lo que sabemos sobre la interferencia cuántica hasta nuevos límites. No te pierdas los detalles.

Seguir leyendo en: Cómo fotografiar al gato de Schrödinger... sin verlo (Next)

Entrada publicada en Fogonazos http://www.fogonazos.es/
27 Aug 05:28

Instagram saca su propia aplicación para crear vídeos "Hyperlapse"

by Miguel López

hyperlapse instagram

Cuando Instagram dice que quiere aprovechar todas las capacidades de los smartphones más modernos, no bromea. El servicio perteneciente a Facebook ha lanzado Hyperlapse, una aplicación capaz de generar vídeos con el efecto del mismo nombre directamente desde nuestro teléfono.

Para los que no lo sepan, un hyperlapse consiste en un vídeo animado fruto de la composición de varias fotografías en movimiento. Podría definirse también como un timelapse, sólo que con la cámara moviéndose y estabilizando cada fotografía para conseguir un efecto de movimiento.

Algunos hyperlapses que han circulado por la red recientemente se han compartido mucho, como este de la ciudad de Barcelona:

Y éstos otros hyperlapses se han hecho con la aplicación de Instagram, para que veáis lo que se podrá hacer con la cámara de un iPhone:

De momento Hyperlapse estará disponible sólo para iOS dentro de "unas horas" (ya está disponible) según comentan en el blog oficial de Instagram. Esperemos que pronto aparezca en otras plataformas.

Descarga | Hyperlapse en la App Store En Applesfera | Hyperlapse, una nueva app creada por Instagram que estabiliza nuestros vídeos al momento

-
La noticia Instagram saca su propia aplicación para crear vídeos "Hyperlapse" fue publicada originalmente en Genbeta por Miguel López.


25 Aug 06:13

Esta proyección facial te va a dejar de piedra [VÍDEO]

by noreply@blogger.com (Antonio Martínez Ron)


Las técnicas de proyección sobre superficies evolucionan a un ritmo escalofriante. Alguna vez hemos visto por aquí alguna proyección sobre fachadas de edificios, que parecen cambiar de forma, derrumbarse o recomponerse. Pero aplicar esta técnica sobre una cara en movimiento ya es otra cosa. En el siguiente vídeo, realizado por OMOTE, la imagen es proyectada en la cara de una modelo que se mueve, interactuando en tiempo real. Para sentarse a verlo despacio:



Vía: Prosthetic Knowledge. Anteriormente, en Fogonazos:

- 55KUBIK, otra arquitectura líquida (vídeo)
- Luces de MC Escher sobre un castillo italiano (vídeo)
Entrada publicada en Fogonazos http://www.fogonazos.es/
22 Aug 05:31

Con Project CARS y Oculus Rift será como si estuviésemos dentro del coche que queramos

by DroidenZ

Si habéis seguido de cerca todo lo relacionado con 'Project CARS' sabréis que estamos hablando del simulador de conducción con los mejores gráficos vistos hasta el momento, al menos con respecto a los vídeos que hemos ido viendo.

No sabemos qué tal lucirá la versión final, lo que sí sabemos es que será totalmente compatible con Oculus Rift y con algún que otro HMD. La combinación de ambos puede brutal para nuestras mentes, al menos este vídeo, aburrido pero ilustrativo, nos muestra como respondería el juego ante el posicionamiento de Oculus Rift DK2.

La calidad del vídeo tampoco es la mejor, pero por lo menos vemos que todo el interior del coche está diseñado a la perfección y que la respuesta de la cámara al movimiento parece más que acertada. La cosa es que tendremos que esperar a la versión final del juego y a tener un Oculus Rift para poder ver si la experiencia es tan buena como parece.

En VidaExtra | ¿Te gusta conducir bajo la lluvia? Te gustará este vídeo de Project CARS [GC 2014]

-
La noticia Con Project CARS y Oculus Rift será como si estuviésemos dentro del coche que queramos fue publicada originalmente en Vidaextra por DroidenZ.








21 Aug 07:19

Near-Final Draft of Effective Modern C++ Now Available (plus TOC and sample Item)

by Scott Meyers
Effective Modern C++ is moving closer and closer to reality. This post contains:
  • Information about availability of an almost-final draft of the book.
  • The current (and probably final) table of contents.
  • A link to the I-hope-I-got-it-right-this-time version of my Item on noexcept.

    Draft Book Availability

    A revised and nearly-final manuscript is now available through O'Reilly's Early Release Program and Safari Books Online's Rough Cuts program. The prose still needs to be sanded down a bit, but practically speaking, this is the final stream of words that will make up the book. Remaining tasks include double-checking the code samples, index generation and final formatting (i.e., typesetting), but this should be quite close to what gets published.

    I've left the line numbers in for the online drafts, because that makes it easier for people to report errors to me. The really truly honest-this-is-it version of the manuscript is due to O'Reilly in early September, so if you see anything that needs improvement, please let me know by the end of this month!

    Probably-Final Table of Contents

    Here's the current table of contents. I'm not wild about the title of the final chapter ("Tweaks"), so if you have suggestions for a better title, let me know.
    CHAPTER 1  Deducing Types
    Item 1: Understand template type deduction.
    Item 2: Understand auto type deduction.
    Item 3: Understand decltype.
    Item 4: Know how to view deduced types.

    CHAPTER 2 auto
    Item 5: Prefer auto to explicit type declarations.
    Item 6: Use the explicitly typed initializer idiom when auto deduces
    undesired types.

    CHAPTER 3 Moving to Modern C++
    Item 7: Distinguish between () and {} when creating objects.
    Item 8: Prefer nullptr to 0 and NULL.
    Item 9: Prefer alias declarations to typedefs.
    Item 10: Prefer scoped enums to unscoped enums.
    Item 11: Prefer deleted functions to private undefined ones.
    Item 12: Declare overriding functions override.
    Item 13: Prefer const_iterators to iterators.
    Item 14: Declare functions noexcept if they won't emit exceptions.
    Item 15: Use constexpr whenever possible.
    Item 16: Make const member functions thread-safe.
    Item 17: Understand special member function generation.

    CHAPTER 4 Smart Pointers
    Item 18: Use std::unique_ptr for exclusive-ownership resource management.
    Item 19: Use std::shared_ptr for shared-ownership resource management.
    Item 20: Use std::weak_ptr for std::shared_ptr-like pointers that can dangle.
    Item 21: Prefer std::make_unique and std::make_shared to direct use of new.
    Item 22: When using the Pimpl Idiom, define special member functions in the
    implementation file.

    CHAPTER 5 Rvalue References, Move Semantics, and Perfect Forwarding
    Item 23: Understand std::move and std::forward.
    Item 24: Distinguish universal references from rvalue references.
    Item 25: Use std::move on rvalue references, std::forward on universal
    references.
    Item 26: Avoid overloading on universal references.
    Item 27: Familiarize yourself with alternatives to overloading on universal
    references.
    Item 28: Understand reference collapsing.
    Item 29: Assume that move operations are not present, not cheap, and not used.
    Item 30: Familiarize yourself with perfect forwarding failure cases.

    CHAPTER 6 Lambda Expressions
    Item 31: Avoid default capture modes.
    Item 32: Use init capture to move objects into closures.
    Item 33: Use decltype on auto&& parameters to std::forward them.
    Item 34: Prefer lambdas to std::bind.

    CHAPTER 7 The Concurrency API
    Item 35: Prefer task-based programming to thread-based.
    Item 36: Specify std::launch::async if asynchronicity is essential.
    Item 37: Make std::threads unjoinable on all paths.
    Item 38: Be aware of varying thread handle destructor behavior.
    Item 39: Consider void futures for one-shot event communication.
    Item 40: Use std::atomic for concurrency, volatile for special memory.

    CHAPTER 8 Tweaks
    Item 41: Consider pass by value for copyable parameters that are cheap to
    move and always copied.
    Item 42: Consider emplacement instead of insertion.
    Technical writing archeologists may wish to compare this TOC with the versions I showed on 18 March 2014, 5 April 2013, and 29 January 2013. I told you things would change!

    Close-to-Final Item on noexcept

    I posted drafts of my Item on noexcept on 31 March 2014 and 4 February 2014, so I felt obliged to show you the final-unless-I've-really-made-a-serious-mistake version. Here it is:
    Let me know what you think. You've never been shy before, and I have no reason to think things will be different this time around :-)

    Scott


    18 Aug 06:04

    SIGGRAPH 2014 Links

    As before, I’m collecting links to SIGGRAPH content: courses, talks, posters, etc. I’ll continue to update the post as new stuff appears; if you’ve seen anything that’s not here, please let me know in the comments.

    Update: In a welcome change this year, conference content is freely available from the ACM Digital Library (albeit via Author-Izer, so there’s a tedious countdown timer for each link). Here are the most relevant pages:

    Courses
    Technical Papers
    Talks
    Posters
    Emerging Technologies
    Studio

    The remaining links are to author-hosted presentations, project pages, videos and so on…

    Courses

    Advances in Real-Time Rendering
    Attention-Aware Rendering, Mobile Graphics, and Games
    Building an Empire: Asset Production in Ryse
    Character Heads Creation Pipeline and Rendering in Destiny
    Computational Cameras and Displays (via Naty Hoffman)
    Destiny Character-Animation System and Lessons Learned (starting to appear)
    Digital Ira and Beyond: Creating Photoreal Real-Time Digital Characters
    Introduction to WebGL Programming
    Mathematical Basics of Motion and Deformation in Computer Graphics (via Naty Hoffman)
    Navigation Meshes and Real-Time Dynamic Planning for Interactive Virtual Worlds
    Physically Based Shading in Theory and Practice (starting to appear)
    Recent Advances in Light Transport Simulation: Some Theory and a Lot of Practice
    Scattered Data Interpolation (direct link)
    Skinning: Real-time Shape Deformation
    Structure-Aware Shape Processing
    The Glass Class: Designing Wearable Interfaces
    Why Graphics Programmers Need to Know About DRAM

    Production Sessions

    Creating Content to Drive Destiny’s Investment Game: One Solution to Rule Them All

    Technical Papers

    See Ke-Sen Huang’s excellent papers list.

    Talks

    A Continuum Model for Simulating Crowd Turbulence
    A Fiber Scattering Model With Non-Separable Lobes
    A Zero-variance-based Sampling Scheme for Monte Carlo Subsurface Scattering
    Adaptive Rendering based on Weighted Local Regression
    ASTC: The Extra Dimension
    Dark Matter: A Tale of Virtual Production
    Dynamic On-Mesh Procedural Generation Control
    Efficient Rendering With Tile Local Storage
    Hierarchical Digital Differential Analyzer for Efficient Ray-Marching in OpenVDB
    High Level Saliency Prediction for Smart Game Balancing
    Implementing Efficient Virtual Shadow Maps for Many Lights
    Large-Scale Simulation and Surfacing of Water and Ice Effects in “How to Train Your Dragon 2”
    Measurement and Modeling of Microfacet Distributions under Deformation
    OpenVL: A Developer-Level Abstraction of Computer Vision
    Perceptually Based Parameter Adjustments for Video-Processing Operations
    Position-Based Elastic Rods
    Progressive Streaming of Compressed 3D Graphics in a Web Browser
    Rapid Avatar Capture and Simulation Using Commodity Depth Sensors
    Real-Time Geometry Caches
    Silencing the Noise on Elysium (abstract, code)
    Temporally Coherent Video De-Anaglyph
    Tuning Facial Animation in a Mocap Pipeline

    Posters

    An Icicle-Generation Model Based on SPH Method
    3D Dynamic Visualization of Swallowing From Multi-Slice Computed Tomography
    A Virtual 3D Photocopy System
    Augmented Reality Theater Experience
    BelliesWave: Color and Shape Changing Pixels Using Bilayer Rubber Membranes
    Cage-Based Deformation Transfer Using Mass Spring System
    Coded Lens: Using a Coded Aperture for Low-Cost and Versatile Imaging
    Context-Aware Material-Selective Rendering for Mobile Graphics
    Detection of Stereo Window Violation in 3D movies
    Directionality-Aware Rectilinear Texture-Warped Shadow Maps
    How Personal Video Navigation History can be Visualized
    Interactive Relighting of Arbitrary Rough Surfaces
    Material Parameter Editing System for Volumetric Simulation Models
    metamoCrochet: Augmenting Crocheting With Bi-Stable Color Changing Inks
    Moss-xels: Slow Changing Pixels Using the Shape of Racomitrium Canescens
    Music as an Interventional Design Tool for Urban Designers
    Ocean Wave Animation Using Boundary Integral Equations and Explicit Mesh Tracking (related SCA paper)
    Optimizing Infinite Homography for Bullet-Time Effect
    Parametric Stylized Highlight for Character Animation Based on 3D Scene Data
    Shading Approach for Artistic Stroke Thickness Using 2D Light Position
    Screen Space Cone Tracing for Glossy Reflections
    VisionGL: Towards an API for Integrating Vision and Graphics
    Waving Tentacles: A System and Method for Controlling a SMA Actuator
    Wearable Haptics and Hand Tracking via an RGB-D Camera for Immersive Tactile Experiences

    Emerging Techologies

    (In)visible Light Communication: Combining Illumination and Communication
    A Collaborative See-through Display Supporting On-demand Privacy
    A Compressive Light Field Projection System
    Birdly
    Cyberith Virtualizer
    Graffiti Fur: Turning Your Carpet Into a Computer Display
    HORN: The Hapt-Optic Reconstruction
    JANUS
    LumiConSense: A Transparent, Flexible, Scalable, and Disposable Image Sensor…
    MaD: Mapping by Demonstration for Continuous Sonification
    Physical Painting With a Digital Airbrush
    Pinlight Displays: Wide Field of View Augmented Reality Eyeglasses
    Pixie Dust: Graphical Levitation System
    Spheree: A 3D Perspective-Corrected Interactive Spherical Scalable Display (project, abstract, video)
    Tangible and Modular Input Device for Character Articulation
    Traxion: A Tactile Interaction Device With Virtual Force Sensation

    Birds of a Feather

    Carto
        - 3D Geospatial Visualization on the Web with Cesium (via Patrick Cozzi)
    OpenGL, OpenCL… (via Cyril Crassin)
    Teaching Computer Graphics Online
        - Teaching Intro and Advanced Graphics with WebGL, Patrick Cozzi
        - Teaching Graphics Online, Andrew Glassner
    Virtual Globes Using WebGL and Cesium (via Patrick Cozzi)
    WebGL

    Exhibitor Tech Talks

    Best of GTC, NVIDIA (via Christopher Sierigk)
    Intel Exhibitor Sessions
    The Foundry

    18 Aug 05:56

    Intel show off DirectX 12 performance advantage

    by Dave James

    Gamescom isn’t the only big conference going on at the moment, though, if you’re into Witcher 3 footage, Tomb Raider exclusivity rage and Snake slithering onto the PC, it’s probably the most important. Still, this week has seen SIGGRAPH 2014 taking place in Vancouver, the 41st international conference on computer graphics. Intel has been there showing off how good DirectX 12 is going to be for its processors.

    Using one of Microsoft’s new Surface Pro 3 tablets, rocking an Intel Core i5 CPU, they have been showing a neat little graphics demo that could have been ripped directly out of Elite: Dangerous.

    The demo shows an asteroid field made up of 50,000 unique lumps of space rock, all rendered on the HD 4400 processor graphics inside the CPU itself. At the flick of a switch (or more likely the tap of a key), Intel can show the difference between rendering with the DirectX 11 API and the upcoming DirectX 12 update.

    Intel are showing two different versions, each highlighting an alternate usage of the DX 12 API. The first is what we really care about: performance. In this demo the Surface Pro 3 is run as fast as possible by the renderer, operating at the limits of the thermal and power constraints of the wee Microsoft tablet.

    Under DirectX 11 the demo runs at just 19FPS – switching over to DirectX 12 that jumps up to 33FPS. That’s over 70% quicker on the exact same hardware, just operating with updated DirectX software.

    The dynamic trade off between CPU and GPU power is tantalising

    The interesting thing is how they’ve managed to do this and that’s shown by the little graph in the bottom right hand corner of the demo shot. The tablet is still operating within the same power constraints as with DirectX 11, but because DX12 is designed to reduce CPU overhead and improve multi-threaded rendering, it has dropped the power demands of the CPU and given that spare capacity over to the boosted GPU.

    The second demo covers power consumption, something that will be of interest to anyone out there with a gaming laptop that refuses to shift away from a plug socket for more than an hour.

    In the power test Intel lock the frame rate of the asteroid demo so that the hardware is doing the same amount of work under both APIs. When the Surface Pro 3 is switched over to DirectX 12 the amount of power that the CPU component is drawing drops by over half.

    The drop in CPU power bodes well for DX 12 mobile gaming

    The CPU is still doing the same amount of work but its now spread across all the cores available to the software. Because the load is being shared the individual cores don’t have to work so hard and don’t have to operate at such a high frequency.

    The upshot of this is that the temperature goes down and the battery life goes up.

    It’s an impressive technology demo, and shows the potential improvements that DirectX 12 will offer when it eventually does arrive. Still, I’ll be more impressed when Intel and Microsoft are able to show this sort of performance gain in an actual DirectX 12 coded game.

    The post Intel show off DirectX 12 performance advantage appeared first on PC Gamer.



    28 Jul 06:32

    Así son algunas de las reacciones que tiene el agua al toparse con un material hidrofóbico

    by Rodrigo Garrido

    Las aplicaciones de los materiales hidrofóbicos no son nada nuevas. Con el paso de los años científicos han buscado mejorar esta propiedad, que originalmente vieron en la naturaleza; principalmente en las hojas, telaraña, y las plumas de las aves, para así aplicarla en productos que usamos en nuestro día a día.

    Así que la noticia de hoy no trata sobre cómo funciona esta propiedad, sino de un video que encontró la gente de Sploid y en el que se muestran algunas de las reacciones que tiene el agua al toparse con un material hidrofóbico. Mi parte favorita es esa gota saltarina que aparece en el minuto 1:19; simplemente impresionante.

    -
    La noticia Así son algunas de las reacciones que tiene el agua al toparse con un material hidrofóbico fue publicada originalmente en Xatakaciencia por Rodrigo Garrido.

    28 Jul 05:48

    TorrenTV: streaming de torrents directamente a un Apple TV

    by Manu Mateos

    TorrenTV

    Una de las principales fuentes para muchos usuarios de Internet, a la hora de conseguir contenidos de vídeo, es la red BitTorrent (vamos a ser sinceros). Y Popcorn Time llevó a las masas una característica magnífica: poder hacer streaming de un torrent, aunque únicamente sea efectivo para archivos más o menos populares. El remate sería poder enviarlo directamente a un televisor.

    Precisamente es lo que hace TorrenTV: coger un torrent y enviar un stream con su vídeo, a través de AirPlay, a un Apple TV conectado a una pantalla de televisión. Para ello hace uso de las mismas librerías que Popcorn Time, aunque elimina la interfaz gráfica y todo el índice de contenido para centrarse en lo importante: arrastrar un torrent o un enlace magnet y que la aplicación se encargue de reproducir el vídeo en el Apple TV (y quien dice Apple TV dice, imagino, cualquier dispositivo que pueda recibir un stream AirPlay).

    De ese modo podremos utilizar nuestro propio torrent o enlace, con el contenido que nosotros queramos y sacándolo de donde queramos. La aplicación también permite enviar a un Apple TV un archivo de vídeo que tengamos almacenado en nuestro ordenador, que puede ejecutar OS X, Windows o Linux. El desarrollador declara, además, que está trabajando en el soporte para reproducir vídeos en Roku (del que pronto promete una beta) y en Chromecast.

    TorrenTV es una aplicación open source cuyo código, además, es consultable en su repositorio de GitHub. Y, al ser una mera herramienta que no ofrece contenido, dudo que las entidades de gestión de derechos de autor se metan con ella.

    Vía | TorrentFreak
    En Applesfera | TorrenTV hace que nuestro AppleTV sea mucho más interesante
    En Genbeta | Las claves para entender los enlaces magnet, el futuro del intercambio de archivos

    -
    La noticia TorrenTV: streaming de torrents directamente a un Apple TV fue publicada originalmente en Genbeta por Manu Mateos.


    28 Jul 05:45

    i enjoyed a lot

    by admin

    It’s being a while since last time I had time for making a mathematical image. I still don’t have the time nor I am able to make it. But I did found a few minutes to spare and took and old mathiamge (#4o in fact) and doodled on top of it, mainly with the geometry, the lighting and the colors. As usual, this runs/moves in realtime, and as usual too, the maths/code are available for few here: https://www.shadertoy.com/view/XdfXDB

    It loved getting distracted and letting mind and let it wander freely and randomly for a few minutes. It feelt really, really good. I enjoyed a lot.

    23 Jul 06:07

    Cómo de grande es el espacio (simulador)

    by noreply@blogger.com (Antonio Martínez Ron)

    Simulaciones del Sistema Solar hay un montón, pero ésta que han desarrollado los chicos de BBC Future me ha parecido especialmente simpática y entretenida. Se trata de salir de la Tierra con un cohete e ir encontrando objetos. La escala va cambiando porque si no puede que estuviéramos horas dándole al scrolll del ratón ;-)

    Enlace: How big is space (BBC Future)

    Entrada publicada en Fogonazos http://www.fogonazos.es/