Skip to main content

the avatar of openSUSE News

Call for Papers Open for openSUSE Conference

The call for papers for the openSUSE Virtual Conference is open!

The call for papers is open until May 4. This leaves a little more than 60 days to submit a proposal. The dates of the conference are scheduled for June 18 - 20. Registration for the conference has also begun.

Presentations can be submitted for the following length of time:

  • Lightning Talks (15 mins)
  • Normal Talk (30 mins)
  • Long Talk (45 mins)
  • Workshop (1 hour)

The following tracks are listed for the conference:

  • Cloud and Containers
  • Community
  • Embedded Systems and Edge Computing
  • New Technologies
  • Open Source
  • openSUSE

The conference already has two sponsors with Fedora and SUSE. Companies interested in sponsoring the event can view the sponsorship prospectus on the project’s wiki page.

Volunteers who would like to help the Program Committee and/or the Organizing Team can email ddemaio@opensuse.org.

the avatar of Nathan Wolf

LCD Chalkboard Smart Sign, Raspberry Pi Powered

Whenever technology and art meet in a very useful product, I can’t help but get excited and think about the applications of where a thing can be used. Instructables, yet again provides another incredible idea for something you can build as a life enhancement. I find the notion of combining a chalk board and a … Continue reading LCD Chalkboard Smart Sign, Raspberry Pi Powered
a silhouette of a person's head and shoulders, used as a default avatar

Revisiting Html in Java

Some time ago I wrote a post about creating an embedded dsl for Html in Java. Sadly, it was based on an abuse of lambda name reflection that was later removed from Java.

I thought I should do a followup because a lot of people still visit the old article. While it’s no longer possible to use lambda parameter names in this way, we can still get fairly close. 

The following approach is slightly less concise. That said, it does have some benefits over the original:

a) You no longer need to have parameter name reflection enabled at compile time.

b) The compiler can check your attribute names are valid, and you can autocomplete them.

What does it look like? 

html(
   head(
       title("Hello Html World"),
       meta($ -> $.charset = "utf-8"),
       link($->{ $.rel=stylesheet; $.type=css; $.href="/my.css"; }),
       script($->{ $.type= javascript; $.src="//benjiweber.co.uk/some.js"; })
   ),
   body(
       div($-> $.cssClass = "article",
           a($-> $.href="https://benjiweber.com/",
               span($->$.cssClass="label", "Click Here"),
               img($->{$.src="//benjiweber.co.uk/htmldsl2.png"; $.width=px(25); $.height=px(25); })
           ),
           p(span("some text"), div("block"))
       )
   )
)

This generates the following html

 
   Hello Html World
   
   
   
 
 
   
Click Here

some text

block

You get nice autocompletion, and feedback if you specify inappropriate values:

You’ll also get a helping hand from the types to not put tags in inappropriate places:

Generating Code

As it’s Java you can easily mix other code to generate markup dynamically:

assertEquals(
       """
       
         
           
         
         
           

Paragraph one

Paragraph two

Paragraph three

""".trim(), html( head( meta($ -> $.charset = "utf-8") ), body( Stream.of("one","two","three") .map(number -> "Paragraph " + number) .map(content -> p(content)) ) ).formatted() );

And the code can help you avoid injection attacks by escaping literal values: 

assertEquals(
       """
       
         
           
         
         
           

<script src="attack.js"></script>

""".trim(), html( head( meta($-> $.charset = "utf-8") ), body( p("") ) ).formatted() );

How does it work?

There’s only one “trick” here that’s particularly useful for DSLs. Using the Parameter Objects pattern from my lambda type references post. 

The lambdas used for specifying the tag attributes are “aware” of their own types. And capable of instantiating the configuration they specify.

When we call 

meta($ -> $.charset="utf-8")

We make a call to 

default Meta meta(Parameters params, Tag... children) { … }

The lambda specifying the attribute config is structurally equivalent to the Parameters<Meta> type. This provides a get() function that instantiates an instance of Meta, and then passes the new instance to the lambda function to apply the config.

public interface Parameters extends NewableConsumer {
   default T get() {
       T t = newInstance();
       accept(t);
       return t;
   }
}

Under the hood the newInstance() method uses reflection to examine the SerializedLambda contents and find the type parameter (in this case “Meta”) before instantiating it.

You can follow the code or see the previous post which explains it in a bit more detail.

Add Mixins

It’s helpful to use interfaces as mixins to avoid having to have one enormous class with all the builder definitions. 

public interface HtmlDsl extends
   Html.Dsl,
   Head.Dsl,
   Title.Dsl,
   Meta.Dsl,
   Link.Dsl,
   Script.Dsl,
   Body.Dsl,
   Div.Dsl,
   Span.Dsl,
   A.Dsl,
   P.Dsl,
   Img.Dsl {}

Each tag definition then contains its own builder methods. We compose them together into a single HtmlDsl interface for convenience. This saves having to import hundreds of different methods. By implementing the Dsl interface a consumer gets access to all the builder methods.

Show me the code

It’s all on github. I’d start from the test examples. Bear in mind that it’s merely a port of the old proof of concept to a slightly different approach. I hope it helps illustrate the technique. It’s in no way attempting to be a complete implementation.

This approach can also be useful as an alternative to the builder pattern for passing a specification or configuration to a method. There’s another example on the type references article.

What else could you use this technique for?

The post Revisiting Html in Java appeared first on Benji's Blog.

a silhouette of a person's head and shoulders, used as a default avatar

Raspberry Pi で Bluetooth を使うには

openSUSE Leap 15.2 の Raspberry Pi では Bluetooth が使える状態になっていません。SLE の Raspberry Pi Quick Start に書かれている次のコマンドで初期化する必要があります。

https://documentation.suse.com/sles/15-SP1/pdf/art-rpiquick_color_en.pdf

hciattach /dev/ttyAMA1 bcm43xx 921600
hciconfig hci0 up

このコマンドを実行することでファームウェアが読み込まれ、Bluetooth が使えるようになります。

a silhouette of a person's head and shoulders, used as a default avatar

Guadec 2021 en línea se celebrará en julio

Como fue lo habitual durante el 2020 y lo sigue siendo a lo largo de este año, el gran evento comunitario del entorno de trabajo Gnome no se va a celebrar físicamente. De esta forma, la Comunidad Gnome acaba de anunciar que Guadec 2021 se celebrará en línea en julio. De esta forma evita, como ha hecho la Comunidad KDE con su Akademy, los actuales inconvenientes de la pandemia que está marcando nuestras vidas.

Guadec 2021 en línea se celebrará en julio

La rivalidad KDE-Gnome es algo que en realidad existe en la mente de los usuarios y en las bromas de los desarrolladores ya que a la hora de la verdad ambos proyectos se retroalimentan tanto en ideas como en funcionalidades.

Prueba de ello es la Linux App Summit (LAS) que se lleva celebrando desde hace unos años y la compatibilidad de aplicaciones en ambos entornos de trabajo.

No obstante en este blog la Comunidad Gnome ha tenido muy poca presencia pero no por animadversión sino por desconocimiento del que escribe estas líneas.

De esta forma, y a pesar de que el blog tiene ya casi 13 años, nunca he hablado de la GUADEC, el gran evento de la Comunidad GNOME que reúne simpatizantes, desarrolladores, diseñadores, usuarios, traductores, promotores de de este entorno de escritorio y les hace compartir una semana de charlas y talleres.

Y es por tanto hora de enmendar este error y promocionar evento ya que esta semana nos hemos enterado que Guadec 2021 en línea se celebrará en julio, concretamente del 21 al 25 de julio.

Abierto el call for papers GUADEC 2021

El tema elegido para GUADEC 2021 es «Future-Proofing FOSS». De esta forma se van a priorizar las ponencias o charlas en los que el tema se relaciona con la planificación y la construcción del futuro del software libre.

Evidentemente la variedad de temas es infinita pero si necesitas ideas para enviar tu propuesta los organizadores nos proponen las siguientes ideas:

Desarrollo de aplicaciones

Privacidad y seguridad

Creación de comunidades y equipos

Diseño de la experiencia del usuario y del desarrollador

Uso de las tecnologías de GNOME fuera del escritorio

Iniciativas para recién llegados

Planificación y gobierno de proyectos

Más información: GUADEC

the avatar of Klaas Freitag

Kraft Version 0.96

Ich freue mich, heute das Release Version 0.96 von Kraft herauszugeben. Die neue Version kann über die Homepage heruntergeladen werden.

Kraft 0.96 ist ein Bugfix Release, das einige kleine Fehler der Version 0.95 behebt. Insbesondere betrifft das das in 0.95 eingeführte neue PDF-Rendering mit Weasyprint.

Es gibt auch ein paar kleine neue Funktionen: Im Dokument Editor kann per Hinzufügen-Knopf nun auch eine neue Posten-Vorlage hinzugefügt werden. Außerdem werden in Folgedokumenten die im Vorgängerdokument eingetragenen Kopf- und Fußtexte kopiert, wenn die Standard-Texte für den neuen Dokumenttyp nicht gesetzt sind. Wichtig dabei: Kraft verwendet den Kopftext mit dem Namen „Standard“ als Standardtext, ebenso bei Fußtexten.

Weiterhin viel Erfolg mit Kraft!

the avatar of Nathan Wolf
a silhouette of a person's head and shoulders, used as a default avatar

#openSUSE Tumbleweed revisión de la semana 8 de 2021

Tumbleweed es una distribución “Rolling Release” de actualización contínua. Aquí puedes estar al tanto de las últimas novedades.

Tumbleweed

openSUSE Tumbleweed es la versión “rolling release” o de actualización continua de la distribución de GNU/Linux openSUSE.

Hagamos un repaso a las novedades que han llegado hasta los repositorios estas semanas.

El anuncio original lo puedes leer en el blog de Dominique Leuenberger, publicado bajo licencia CC-by-sa, en este enlace:

Esta semana con un poco de ayuda se han podido publicar 6 nuevas snapshots (0218, 0219, 0220, 0221, 0222 y 0223) que han traido muchas actualizaciones a openSUSE Tumbleweed

Los cambios más notables son:

  • Transactional-Updates 3.1.4
  • GNOME 3.38.4
  • binutils 2.36
  • util-linux 2..36.2
  • libguestfs 1.44.0
  • PostgreSQL 13.2
  • Mozilla Firefox 85.0.2
  • Dracut 052

Y entre los cambios que se están preparando, se puede destacar:

  • NetworkManager 1.30
  • Mozilla Firefox 86.0
  • KDE Plasma 5.21.1
  • podman 3.0.1
  • Dracut 053
  • Linux kernel 5.11.2
  • openssl 1.1.1i
  • GCC 11 como compilador predeterminado

Si quieres estar a la última con software actualizado y probado utiliza openSUSE Tumbleweed la opción rolling release de la distribución de GNU/Linux openSUSE.

Mantente actualizado y ya sabes: Have a lot of fun!!

Enlaces de interés

Geeko_ascii

——————————–

a silhouette of a person's head and shoulders, used as a default avatar
a silhouette of a person's head and shoulders, used as a default avatar

Día de los datos abiertos 2021, sábado 6 de marzo

Siguiendo la tendencia iniciada el 2020, evidentemente obligada por la pandemia mundial, os quiero invitar a asistir al Día de los datos abiertos 2021 que se celebrará en línea el próximo sábado 6 de marzo. Un evento que se me había pasado por alto pero que este año, por diversas razones aparece por primera vez en el blog… y espero que no sea la última.

Día de los datos abiertos 2021, sábado 6 de marzo

Día de los datos abiertos 2021, sábado 6 de marzo
Logo OpenData Day 2021

Para los que no lo sepan, entre los que me incluía yo en el 2020, el «Día de los Datos Abiertos» es una celebración anual de los datos abiertos alrededor del mundo.

Y es que los datos abiertos son mucho más importantes de lo que nos pueda parecer, según la Wikipedia, uno de lo estandartes de esta una filosofía y práctica que persigue que determinados tipos de datos estén disponibles de forma libre para todo el mundo, sin restricciones de derechos de autor, de patentes o de otros mecanismos de control.

Con esta se llega a la décima edición del evento, en la que grupos de todo el mundo crearán eventos locales que utilizarán datos abiertos en sus comunidades para crear aplicaciones, visualizaciones, liberar datos o publicar análisis.

Y es que la filosofía de este evento es promulgar la idea de que «todos los trabajos realizados son abiertos para usarse y re-usarse.», lo cual ayuda a compartir el conocimiento a todos los niveles.

En esta edición del Día de los Datos Abiertos 2021 se busca que la comunidad siga creciendo, y de esta forma se ha enfocado el evento en cuatro áreas clave, las cuales creemos que los datos abiertos pueden ayudar a resolver: Datos ambientales, Rastreo de flujos de dinero público, Mapeo abierto y Desarrollo equitativo.

Pero no penséis que este evento es pequeño, ya que este año se han organizado más de 150 eventos locales a lo largo y ancho del mundo, una muestra de la potencia de este evento.

Día de los datos abiertos 2021, sábado 6 de marzo

Así que busca tu evento, o eventos, y participa. Yo lo he hecho y lo haré, pero eso lo explicaré en otra entrada.

Más información: Open Data Day