it

NASA discovers Mars rock with ancient potential for life

A single 3.5 billion-year-old rock shows signs of all the conditions life needs to thrive.




it

Super-size it

Europa Clipper is a big spacecraft with big solar panels, all so it can perform a big mission. The galaxy is big too, and a Planetary Society member painted it that way.




it

Why the “habitable zone” doesn’t always mean habitable

The habitable zone is a useful concept in astrobiology, but it can sometimes paint an over-simplified picture of planetary habitability.




it

Explore the Cosmos with The Planetary Society and Lerner Publishing

The Planetary Society and Lerner Publishing Group have teamed up to bring young readers an engaging series of books that make space science fun and accessible.




it

Glitter and glow

This week we look forward to launches, gaze at glowing auroras, and get creative with glitter.




it

Europa Clipper launches on its journey to Jupiter’s icy moon

NASA’s Europa Clipper spacecraft launched today aboard a SpaceX Falcon Heavy rocket from NASA’s Kennedy Space Center in Cape Canaveral, Florida.




it

Uncharted Supply First Aid Kit




it

One of my favorite native flowers

Native wine-cups (aka purple poppy mallow) bookends. This is one of my favorite native flower, so particularly pleased with how nicely it shows up in bookends.




it

Hobbit Production Line

Here is Beorn in his full fury. He has been given a Matt varnish that really helped. This proved even more effective once his mouth, eyes and nose was given a coat of gloss varnish. This brought him to life and gave him a sparkle in his eye.

I ended up putting more and more greenstuff on him until he was completely covered. It's good to have him covered in thick, shaggy fur as he looks more wild and rugged.


The Eagles are coming! Eagles and White wolves get their various layers of flock.
A lovely new Reaper miniatures Dwarf joins the latest group of Dwarves. Reaper make great 'hero' figures to adorn any warband. They can be quite large sculpts so it can be a risky business ordering them, this one is perfect though.
Beorn's base has to be 24cm wide for the game I'm playing, so two side bases were made. These bring the base up to the right measurement and allow for more bear carnage.
Beorn with his slobbering maw but cute adorable shiny eyes.
More goblin wreckage. Wargs too have not escaped the Bears fury and lie amongst the fallen. A few goblins still cling to life.
It was fun to sculpt great claw wounds in the orcs clothes and equipment. Everything has been torn and crushed to pieces.
Beorn's base with some Bodyguard of Bolg behind him. I'm not sure I'll have time to finish this big orcs before the weekend.

Bard of Lake town with his new fixed banner. This banner was a bit too tall for the storage box and the spearpoint snapped off, twice!. So using my flattened brush bristle technique, he's got a new much tougher one. The plastic used for brush bristles make them fantastic for super glue!

As Bard needs to be free to roam around, another replacement base was needed. Here is Bard with a fellow command stand. Bard is another Reaper Miniatures figure and is slightly bigger than most. This is fine as he is a hero and it suits his manly character.

More carnage, this poor Warg has been disemboweled. This is pretty grim but I did have fun sculpting it. Facing a giant werebear was never going to end well. Again, a coat of gloss helps bring it to life 
Another shot of the basing production line.
Bard of Esgaroth.

 The blue theme really helped to tie these militia type troops together. I tested the new banner tip and it comes below the storage box height, hopefully it won't get crushed again.



  • lord Of The Rings
  • lord Of The Rings.

it

vindarel: Running my 4th Common Lisp script in production© - you can do it too

Last week I finished a new service written in Common Lisp. It now runs in production© every mornings, and it expands the set of services I offer to clients.

It’s the 4th service of this kind that I developed: - they are not big - but have to be done nonetheless, and the quicker the better (they each amount to 1k to 2k lines of Lisp code), - they are not part of a super advanced domain that requires Common Lisp superpowers - I am the one who benefits from CL during development, - I could have written them in Python - and conversely nothing prevented me from writing them in Common Lisp.

So here lies the goal of this post: illustrate that you don’t need to need a super difficult problem to use Common Lisp. This has been asked many times, directly to me or on social media :)

At the same time, I want to encourage you to write a little something about how you use Common Lisp in the real world. Sharing creates emulation. Do it! If you don’t have a blog you can simply write in a new GitHub repository or in a Gist and come share on /r/lisp. We don’t care. Thanks <3

We’ll briefly see what my scripts do, what libraries I use, how I deploy them, what I did along the way.

Needless to say that I dogfooded my CIEL (beta) meta-library and scripting tool for all those projects.

Table of Contents

Scripts n°4 and 2 - shaping and sending data - when you can write Lisp on the side

My latest script needs to read data from a DB, format what’s necessary according to specifications, and send the result by SFTP.

In this case I read a DB that I own, created by a software that I develop and host. So I could have developed this script in the software itself, right? I could have, but I would have been tied to the main project’s versioning scheme, quirks, and deployment. I rather had to write this script on the side. And since it can be done on the side, it can be done in Common Lisp.

I have to extract products and their data (price, VAT...), aggregate the numbers for each day, write this to a file, according to a specification.

To read the DB, I used cl-dbi. I didn’t format the SQL with SxQL this time like in my web apps (where I use the Mito light ORM), but I wrote SQL directly. I’m spoiled by the Django ORM (which has its idiosyncrasies and shortcomings), so I double checked the different kinds of JOINs and all went well.

I had to group rows by some properties, so it was a great time to use serapeum:assort. I left you an example here: https://dev.to/vindarel/common-lisps-group-by-is-serapeumassort-32ma

Dates have to be handled in different formats. I used local-time of course, and I still greatly appreciate its lispy formatter syntax:

(defun date-yymmddhhnnss (&optional date stream)
  (local-time:format-timestring stream
                                (or date (local-time:now))
                                :format
                                '((:year 4)
                                  (:month 2)
                                  (:day 2)
                                  (:hour 2)
                                  (:min 2)
                                  (:sec 2)
                                  )))

the 2 in (:month 2) is to ensure the month is written with 2 digits.

Once the file is written, I have to send it to a SFTP server, with the client’s codes.

I wrote a profile class to encapsulate the client’s data as well as some functions to read the credentials from either environment variables, the file system, or a lisp variable. I had a top-level profile object for ease of testing, but I made sure that my functions formatting or sending data required a profile parameter.

(defun send-stock (profile &key date) ...)
(defun write-stock (profile filename) ...)

Still nothing surprising, but it’s tempting to only use global parameters for a one-off script. Except the program grows and you pay the mess later.

SFTP

To send the result through SFTP, I had to make a choice. The SFTP command line doesn’t make it possible to give a password as argument (or via an environment variable, etc). So I use lftp (in Debian repositories) that allows to do that. In the end, we format a command like this:

lftp sftp://user:****@host  -e "CD I/; put local-file.name; bye"

You can format the command string and run it with uiop:run-program: no problem, but I took the opportunity to release another utility:

First, you create a profile object. This one-liner reads the credentials from a lispy file:

(defvar profile (make-profile-from-plist (uiop:read-file-form "CREDS.lisp-expr"))

then you define the commands you’ll want to run:

(defvar command (put :cd "I/" :local-filename "data.csv"))
;; #<PUT cd: "I/", filename: "data.csv" {1007153883}>

and finally you call the run method on a profile and a command. Tada.

Deploying

Build a binary the classic way (it’s all on the Cookbook), send it to your server, run it.

(during a testing phase I have deployed “as a script”, from sources, which is a bit quicker to pull changes and try again on the server)

Set up a CRON job.

No Python virtual env to activate in the CRON environment...

Add command line arguments the easy way or with the library of your choice (I like Clingon).

Script n°2 and simple FTP

My script #2 at the time was similar and simpler. I extract the same products but only take their quantities, and I assemble lines like

EXTRACTION STOCK DU 11/04/2008
....978202019116600010000001387
....978270730656200040000000991

For this service, we have to send the file to a simple FTP server.

We have a pure Lisp library for FTP (and not SFTP) which works very well, cl-ftp.

It’s a typical example of an old library that didn’t receive any update in years and so that looks abandoned, that has seldom documentation but whose usage is easy to infer, and that does its job as requested.

For example we do this to send a file:

(ftp:with-ftp-connection (conn :hostname hostname
                                   :username username
                                   :password password
                                   :passive-ftp-p t)
      (ftp:store-file conn local-filename filename))

I left you notes about cl-ftp and my SFTP wrapper here:

Scripts n°3 and n°1 - specialized web apps

A recent web app that I’m testing with a couple clients extends an existing stock management system.

This one also was done in order to avoid a Python monolith. I still needed additions in the Python main software, but this little app can be independent and grow on its own. The app maintains its state and communicates it with a REST API.

 

It gives a web interface to their clients (so my clients’ clients, but not all of them, only the institutional) so that they can:

  • search for products
  • add them in shopping carts
  • validate the cart, which sends the data to the main software and notifies the owner, who will work on them.

The peculiarities of this app are that:

  • there is no user login, we use unique URLs with UUIDs in the form: http://command.client.com/admin-E9DFOO82-R2D2-007/list?id=1
  • I need a bit of file persistence but I didn’t want the rigidity of a database so I am using the clache library. Here also, not a great activity, but it works©. I persist lists and hash-tables. Now that the needs grow and the original scope doesn’t cut it any more, I wonder how long I’ll survive without a DB. Only for its short SQL queries VS lisp code to filter data.

I deploy a self-contained binary: code + html templates in the same binary (+ the implementation, the web server, the debugger...), with Systemd.

I wrote more on how to ship a standalone binary with templates and static assets with Djula templates here:

I can connect to the running app with a Swank server to check and set parameters, which is super helpful and harmless.

It is possible to reload the whole app from within itself and I did it with no hiccups for a couple years, but it isn’t necessary the most reliable, easiest to set up and fastest method. You can do it, but nobody forces you to do this because you are running CL in production. You can use the industry’s boring and best practices too. Common Lisp doesn’t inforce a “big ball of mud” approach. Develop locally, use Git, use a CI, deploy a binary...

Every thing that I learned I documented it along the way in the Cookbook ;)

Another app that I’ll mention but about which I also wrote earlier is my first web app. This one is open-source. It still runs :)

 

In this project I had my friend and colleague contribute five lines of Lisp code to add a theme switcher in the backend that would help him do the frontend. He had never written a line of Lisp before. Of course, he did so by looking at my existing code to learn the existing functions at hand, and he could do it because the project was easy to install and run.

(defun get-template(template &optional (theme *theme*))
  "Loads template from the base templates directory or from the given theme templates directory if it exists."
  (if (and (str:non-blank-string-p theme)
           (probe-file (asdf:system-relative-pathname "abstock" (str:concat "src/templates/themes/" theme "/" template))))
      ;; then
      (str:concat "themes/" theme "/" template)
      ;; else :D
      template))

He had to annotate the if branches :] This passed the code review.

Lasting words

The 5th script/app is already on the way, and the next ones are awaiting that I open their .docx specification files. This one was a bit harder but the Lisp side was done sucessfully with the efficient collaboration of another freelance lisper (Kevin to not name him).

All those tasks (read a DB, transform data...) are very mundane.

They are everywhere. They don’t always need supercharged web framework or integrations.

You have plenty of opportunities to make yourself a favor, and use Common Lisp in the wild. Not counting the super-advanced domains where Lisp excels at ;)


Links

I have done some preliminary Common Lisp exploration prior to this course but had a lot of questions regarding practical use and development workflows. This course was amazing for this! I learned a lot of useful techniques for actually writing the code in Emacs, as well as conversational explanations of concepts that had previously confused me in text-heavy resources. Please keep up the good work and continue with this line of topics, it is well worth the price! [Preston, October of 2024]




it

Halcyon Afternoon and Why I Wrote It

.




This is a particularly pleasant time for me. To begin with, I'm at the World Fantasy Convention, where I'll see a lot of old friends and serve as toastmaster. And I have two new Mongolian Wizard stories coming out (I apologize for the delay), one today and one tomorrow at Reactor Magazine.

Today's story, "Halcyon Afternoon," is atypical for the series. It's not as violent as these stories tend to be. That's because I felt that after undergoing so much suffering and loss, Franz-Karl Ritter deserved at least one afternoon of contentment and bliss. Even his wolf, Freki, got the day off.

Of course... Ritter's luck being what it is, and all of Europe being entangled in a wizard war, the afternoon would not prove entirely blissful.

You can read the story here. Or you can find the entire series of Mongolian Wizard stories--ten so far--here. Or you can simply go to Reactor Magazine and wander about happily. It's full of great stories and terrific non-fiction.

And tomorrow . . .

Ritter's luck takes a downturn--along with everyone else's--in "Dragons of Paris." An old friend pops up, a relationship turns difficult, and a battle where victory seems certain goes sour.

(And now, I'm off to the convention!)


Above: Illustration by Dave Palumbo. It's not only beautiful but true to the story. I'm grateful for both of those.

*





it

Don 039 t mess with Acorns

Don 039 t mess with Acorns



View Comic!








it

Why Virat Kohli, Jasprit Bumrah were missing from Perth nets; India ramp up privacy amid Manchester United-like security - Hindustan Times

  1. Why Virat Kohli, Jasprit Bumrah were missing from Perth nets; India ramp up privacy amid Manchester United-like security  Hindustan Times
  2. Virat Kohli in focus: Intense net session begins for upcoming Test series against Australia  The Times of India
  3. Virat Kohli in Australia for BGT: A timeline  India Today
  4. Black veil of secrecy: India begin training in privacy in Perth  ESPNcricinfo
  5. India to play intra-squad warm-up match at WACA on Friday ahead of Australia Tests but BCCI denies public viewing  Hindustan Times





it

3 Children, 3 Women Missing After 10 Suspected Kuki Militants Killed In Encounter In Manipur's Jiribam - NDTV

  1. 3 Children, 3 Women Missing After 10 Suspected Kuki Militants Killed In Encounter In Manipur's Jiribam  NDTV
  2. Manipur on boil: 2 more bodies found, 6 missing  The Times of India
  3. Additional paramilitary forces rushed to Manipur amid spike in ethnic violence  Hindustan Times
  4. Letters to The Editor — November 13, 2024  The Hindu
  5. 2 men found dead, 6 of family missing day after militants killed in Manipur  India Today




it

fuck god dammit

Today on Married To The Sea: fuck god dammit


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

21 million bitcoins

Today on Married To The Sea: 21 million bitcoins


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

git on after

Today on Married To The Sea: git on after


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

u would hit me

Today on Married To The Sea: u would hit me


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

its actually fine

Today on Married To The Sea: its actually fine


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

twitter funny

Today on Married To The Sea: twitter funny


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!




it

aha so you admit

Today on Married To The Sea: aha so you admit


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!
















it

2024/11/06_SITE - Мой сайт временно не открывается из России

Мой сайт временно не открывается из России у большинства провайдеров (у меня из Питера открывается). И это нормально. Мы этого ждали, мы с вами к этому давно готовы. Но спешу успокоить: связано это вовсе не с моим скромным сайтом. Он не под запретом и не под санкциями. Связано это с тем, что он, как сотни тысяч других сайтов, проксируется через CloudFlare. CloudFlare — крупнейший мировой сервис (ему, например, принадлежит IP 1.1.1.1), который, скажем так, сильно помогает владельцу строить доступ к своему сайту. С недавнего времени там используется новая технология соединения под названием ECH (Encrypted Client Hello) на TLS версии 1.3, и вот ее Роскомнадзор принялся блокировать. Простыми словами: когда вы открываете ссылку https (вместо старого протокола http), то ваше соединение шифрованное. И Роскомнадзор не видит, что за данные вы читаете-передаете. Он просто видит, что идет обмен какими-то зашифрованными данными с сайтом по имени lleo.me Это Роскомнадзор сильно огорчает. https именно для этого и придумали ещё в прошлом веке. Но раньше Роскомнадзору было хотя бы видно имя сайта. В новом протоколе обмена имя сайта тоже не видно. Пользователь пошел куда-то и прочитал там три килобайта чего-то. Это совсем расстраивает Роскомнадзор. Поэтому пару дней назад он начал тупо блокировать протокол ECH, как минимум — для CloudFlare. Не блокируются только заходы с браузеров, которые не поддерживают TLS 1.3 (например, wget). Думаю, теоретически посетитель может отключить у себя в браузере TLS версии 1.3, но я не пробовал и вам категорически не советую — много чего может рухнуть. А советую раздобыть уже наконец VPN. Владельцы сайтов могут это поправить на своей стороне: в своих настройках на Сloudflare выключить ECH — но только если вы платный абонент CloudFlare. Зато бесплатные владельцы сайтов могут в настройках CloudFlare просто выключить TLS 1.3 в разделе «SSL/TLS» / «Edge Certificates» / «TLS 1.3», и будет тот же эффект. Однако я не побегу это делать сразу. Почему? У меня в ближайшие дни до 12 числа адова дохерища работы и все равно нет времени писать новые посты в дневник. Но и чисто из педагогических соображений спешить не следует. Во-первых, VPN должен стать таким же элементом личной гигиены как мыло в каждом доме. Каждая новая проблема, созданная Роскомнадзором, должна лишь напоминать об этом. Во-вторых, говноеды Роскомнадзора должны сперва вдоволь наесться говна. Ведь через CloudFlare завязан не какой-то там никчемный lleo.me, а сотни тысяч сайтов, в том числе критически важные: заводы, магазины, поликлиники, детские садики, билетные кассы, и всё это точно так же наебнулось. Так что теоретически даже есть мизерный шанс, что фраер сдаст назад. В общем, если у вас действительно проблемы с моим сайтом, просто советую недельку подождать и не заходить. Я постараюсь, чтобы до 13 ноября здесь не было ничего, достойного вашего внимания. А 13 ноября мы что-нибудь с этим придумаем, и я новый рассказ, например, выложу.





it

At Least It Matches!

I don't know which is better: the fact that building maintenance color-coordinated the tape with the soap, or that they neglected to put the soap back in the dispenser (it's in the bag in the corner).





it

It's Even Just as Environmentally Friendly!

Though it's considerably less sanitary.




it

Mad Science Monday: Never Visit The Dentist Again

I think the next logical step is a pulled-tooth via skydiving.

~NSHA





it

The Built-In Air Conditioning Just Wasn't Effective

Especially after someone put that giant wooden thing on top.





it

It Only Has Some of The Bells and Whistles

Along with the pink helmet and white basket, the bike gang had serious questions about granting him membership.

~NSHA





it

Untitled




it

One Item Doesn't Quite Fit Here

When I need to replace a swing on my swing set, I don't often come to the conclusion that a helicopter chassis would be better suited for the task, but hey, I'm not everybody I guess.