Fork me on GitHub
#off-topic
<
2019-11-02
>
didibus05:11:54

Just did some perl today

didibus05:11:10

Quite a nifty little language for scripting

❤️ 8
seancorfield05:11:54

I had to maintain a 1,000 line Perl script back at Macromedia in the early 2000's... I do not have pleasant memories of that...

☝️ 4
didibus05:11:16

Haha, I can see that, mine was like 20 line lol

didibus05:11:42

Its neat though how it exposes all these direct OS apis

didibus05:11:11

And string interpolation and here doc is pretty awesome for scripts

didibus05:11:19

At least it was for the one I wrote today

sogaiu05:11:35

which version of perl are you using?

didibus05:11:47

Like its standard set of functions is really nice for scripting https://perldoc.perl.org/index-functions.html

didibus05:11:52

I think it was perl 5

sogaiu05:11:25

that was the last series i used

didibus05:11:03

Normally I've been using joker for my scripts

didibus05:11:29

But the ubiquity of perl, and the amount of nice scripting commands it has lured me to it today for a particular use case

sogaiu05:11:47

there is just so much stuff on cpan -- though i don't know how well-maintained it is these days

sogaiu05:11:00

have you given babashka a try?

didibus05:11:14

Stuff like this: > getlogin - return who logged in at this tty

didibus05:11:24

That's golden

sogaiu05:11:43

don't think i ever used that 🙂

didibus05:11:51

Haven't tried babashka yet

sogaiu05:11:20

i used it to coordinate start up of shadow-cljs and an electron app -- was nice 🙂

sogaiu05:11:08

i remember parsing and manipulating pdf with perl -- that was fun

didibus05:11:23

I think what I like about joker is that, it's really focusing 100% on scripting. So same way I like how perl has all these weird commands. Joker standard library is full of what you'd need for scripting, like make quick http call, exec processes, create a dir, navigate the filesystem, etc

sogaiu05:11:20

that's nice -- i should take a look.

didibus05:11:38

I think maybe babashka has similar goals, but haven't tried it yet

sogaiu05:11:51

it's nice to have a fair bit of core.async

didibus05:11:05

Its neat, trying to be a better bash

sogaiu05:11:32

yeah -- looking forward to better native-image support on windows

sogaiu05:11:45

then it can possibly work well for multiplatform

sogaiu05:11:36

i'm not sure how i feel about it, but the impression i get is that powershell core may end up being a decent multiplatform shell

didibus05:11:17

Hum, I guess native image isn't yet cross platform

didibus05:11:31

Joler works across osx, linux and windows just as well

sogaiu06:11:33

native-image is sort of cross platform -- there are some rough edges. hopefully they'll be fixed before too long. it does seem atm that joker is a more solid cross-platform option.

borkdude07:11:54

One of the ideas is that you can use Clojure in a bash script for tiny expressions and that it plays well with the rest of your bash.

👍 4
borkdude08:11:17

This is an example posted by plexus yesterday:

curl  | bb -o '(for [[[group art] counts] *in*] (str (reduce + (vals counts))  " " group "/" art))' | sort -rn | less

borkdude08:11:31

For scripting on Windows: WSL?

lepistane08:11:15

hi my room mate had this situation at work recently. They are working on a project for Spanish government and they had multiple e-mail exchanges where different members of our room mate's team spoke to different members of Spanish team. All members of room mate's team have email footer with personal picture and company logo. Few of room mate's colleagues are woman which are dressed appropriately for work (no cleavage, subtle makeup, no flashy jewelry). Well few days ago room mate's team received complaint how one of the Spanish team members is feeling offended because he had email exchange about the project from one of room mate's female colleagues. The reason? She isn't wearing hijab where you can see only eyes. What are your thoughts about this culture difference? What would you do in this situation? Say to female coworker 'hey listen you can't send emails anymore' isn't that even more discriminatory?

Alexander Heldt08:11:55

Tell your room mate to start living in the modern age

Alexander Heldt08:11:49

If he expects people to accept his culture and beliefs then he should do the same

dmarjenburgh14:11:28

Did they make this part purposely annoying to read? 😆

😂 4
mauricio.szabo16:11:36

I was hoping that they would pretty-print keywords or symbols, so I could expose somekind of "clojure compatible Socket REPL" 😐

dominicm23:11:35

> A game among UNIX users, either to test the depth of an Emacs user's understanding of the editor or to poke fun at the complexity of Emacs, involved predicting what would happen if a user held down a modifier key (such as Ctrl or Alt) and typed their own name. This game humor originated with[39] users of the older TECO editor, which was the implementation basis, via macros, of the original Emacs.

slipset16:11:20

I seem to remember having this game with ls, where you typed your name as options to it. ls -erik