Preskoči na glavno vsebino

Objave

Prikaz objav, dodanih na julij, 2022

Amazon's AWS Simple Email Service integration - Rye

If you are working on IT solutions in this day and age, there is a big chance you will get to use at least some of Amazon's AWS services . They are best known for their elastic compute cloud (EC2) and simple storage service (S3), but they offer more than 30 other services, from email, notifications, queues, archiving, machine learning and various databases. Their simple email service (SES) is one of the most battle tested and cost effective solutions for sending email messages out there. To me, the most important feature is that they offer bounce and complaint parsing and notifications, that you can, through their another service (SNS) connect back to your app. SES doesn't allow creation of emails with attachments directly through their API. In case of an attachment, you needed to generate raw email payload on your end. This looses a lot of benefits of an API, because you are back to various arcane encodings, mime parts and similar problems. If you live in a country that nee...

Experimenting with bindings

I decided at the start that the hunt is open for all language features with Rye, but until above Rye 1.0, I won't be touching modules in any way. In Rebol they called it programming in the small vs. programming in the large. You want your language to function well in both. If possible modules should come from the basic features of the language itself, so until those are in place it makes no sense to build on top of them. It's like making an elaborate plan on how to cross the river, when you have not seen the river yet. And the path to the river is as or even more challenging and important than the river crossing itself. Currently, Rye has a very basic way of adding builtin functions / bindings / integrations to it. You compile them into a single binary . I think I saw something like that in Lua years ago. This is not as bad as it seems. We use Go build's flags, so you can define, at compile time, what functionalities you want your Rye binary to have. go build -flags "...

Decimal type added, Go 1.18 is now supported

In a goal of making Rye more complete I've added a Decimal type. Rye shell you can now turn off and on display of results. Also Rye now is Go 1.18 compatible and now uses Go modules. I will update the compilation instructions on Github page .  

Ryk: filtering and special prints

This is the third post about Ryk. Please visit previous two for more about it. They say run, while you still have momentum, so I keep on running ... Awk can filter lines with regex expressions, and has a lots of predefined variables, that are quite practical. I try to avoid the overload of second, but few are just really too practical not to add. Like the line number (n) and length of current line in fields (l). I added the filter functionality. After you process values with Ryk you might also pass them down the pipe or save them in a specific line-oriented format, so I added print-csv , print-ssv and print-json for this. So you can also do filtering, selection and conversion easily. Two images this time, first shows each new feature separately: And the second combines them together: So let there be Ryk! Our Github docs will get a section about Ryk soon.

CSV-s, begin and end with Ryk - Awk inspired tool

If you haven't yet please read the previous post . Ryk now got CSV and TSV support, begin and end callbacks, Rye itself got some new functions like min, max, avg . Ryk now also preloads a local file .ryk-preload if it's there, so you can define your custom Rye functions that can be called in Ryk commands. Rye had this experimental collect idea, which seems to function quite well in this scenario. The collected block is injected in the --end code block then. You can follow Rye and Ryk development on github .

Started on Ryk, an Awk inspired tool

I love Linux shell. I love command composition via pipes, which was also an inspiration for Rye. So it's not unusual that I love Awk. It's really THE multi-tool for many awkward ad-hoc problems. One of first modes with Rye was Awk-like mode, where you pipe in the lines and Rye can process them. Yesterday I needed to process some custom access logs and I used is as an excuse to make few steps forward with this in Rye. It's called Ryk. I used fish shell here, so I got some colors in :) Follow Rye and Ryk development on github .