Fork me on GitHub
Drew Verlee05:02:32

I would like to increase the terseness of my code, i would love for the biggest ROI for that to be the clojure.core lib, but often the business code is the biggest area where this can be imrpoved. But i like the symbol for reduce (see above picture), i might have to do that on emacs.


Obligatory reference to Notation as a Tool of Thought Worth reading even if one won't ever program in an APL. (And to make it somewhat more concrete, a solution to Dismal Arithmetic v/s

👍 1

APL has fascinated me ever since I encountered it in the early '80s. I did my industrial placement "sandwich" year from university at an insurance company that used APL heavily -- my final year Comp Sci project was to write an APL interpreter (in Pascal!). I think it's an amazing language.


Well, the arc of history is a strange arc... > And histories that have could have played out so much differently. In 1982, Bill Gates was doing a whirlwind tour of North America and swung by IP Sharp and Associates in Toronto. And there was a meeting between a few of the IP Sharp folks and Bill Gates. And Bill Gates was getting ready to make the PC amongst APLers and array programmers. There’s this anecdote of sort of Bill Gates for a long time was a big fan of APL and had an APL sort of handbook in his desk.


@U04V70XH6 APL is very much alive and kicking. People from Dyalog and from J Software have come every year to Functional Conf. This year, Aaron Hsu (Dyalog APL) is talking about "DSLs, Architecture, &amp; Structural Design in APL, 3 ways.", and Rodrigo S. (also from Dyalog) is talking about "Why APL is a language worth knowing"


Some years ago I tried porting the into Clojure (using Java2D), and then a few years later I ported it to a web app. It’s such a cool presentation, and I had fun This inspired me to I bought the APL programming manual a short while ago. I’ve been tempted to buy a Dyalog keyboard (not necessary, but cool)

lightsaber 1

I love that demo. I've re-watched it and re-typed it several times :) One of my personal mind-melting moments with APL happened after stumbling on the idea of the inverse of a function. A function f composed with the and high-minus one ¯1 , becomes the inverse of f.

c←f⍣¯1                  ⍝ c is Inverse of f.
I used it like this, to implement a solution to Dismal Arithmetic:
da ← 10⊥(⌈/10⊥⍣¯1⊢)
      da 169 248


J looks like line noise to me -- it loses the elegance of the original APL symbols etc. Dyalog looks interesting -- I didn't know about that. Fonts and keyboard mappings too. Mmm, I may have to install that and take it for a spin... but my APL is going to be really rusty after the best part of 40 years away from it! 🙂


Back to the Game of Life example, this page discusses how to extend it to other kinds of surfaces: The example in John Scholes's demo is a toroid, I believe. The page extends it to manifolds etc. (which I don't quite understand).


@U04V70XH6 Dyalog published this e-book: They also have an APL interpreter online: And a pretty active "APL Orchard" chat on stack exchange:


> my APL is going to be really rusty after the best part of 40 years away from it Now taking bets 10:1 odds against ;-)


I'll let you know how it goes -- it'll be a while, I suspect. My weekends are pretty busy right now and I have several long trips planned over the next few months 🙂


I'm using github desktop, I tried to rollback changes to a file and got this message: What has my recycle bin got to do with rolling back changes on a file ?


Probably because they use the bin for discarding changes, as the error suggests?

Martynas Maciulevičius13:02:42

Maybe they decided that it's an appropriate place as it's probably swapped correctly... Do they appear in there? 😄 Or maybe they're mocking you that you're using their client? Could that mean that they know what your project is about? Did you enable autopilot? 😄


Yes, I get that they probably do that. But If I'm discarding changes on a file, this is something that I would expect can't be undone anyway. SO why does it matter


Because it can be undone. :)


> Or maybe they're mocking you that you're using their client? What do you use, learning the whole command line ? I've tried git within VS and VSCode but since they changed to using Access TOkens from username / password, I constantly run into auth issues


Putting them in the trash seems absolutely mental.


If you want to be able to rollback changes a rollback, you can't empty your trash bin? WHAT!


ALthough this might explain why a while ago I had low disk space issues and there was like 35GB in the trash bin.

Martynas Maciulevičius13:02:11

> What do you use, learning the whole command line ? I use linux and I only use the command line. I never liked the IDE approach. I only use meld when I merge files. And I stage my changes using git add -i. I hope this helps. I think you could do something similar by using cygwin or something similar. But it won't be easy on windows. 😕


> since they changed to using Access TOkens from username / password, I constantly run into auth issues just use with github > learning the whole command line it's not that hard and it's a great way to learn how to use git (most of these UI tools abstract away essential information and that cripples your understanding of how version control works)


Yeah, 95% of all the Git functionality that you use every day is just a tiny handful of what it can do, and the corresponding CLI commands are trivial. It becomes especially trivial if you use


I’m curious if the people that complain about the Clojure stacktraces have ever seen the compiler output from TS…

😄 1
☝️ 1
Pavel Meledin15:02:36

why compare with something worst ?


Since worse is better?


In my day... (adopts Yorkshire accent)... we used to print out hex/character core dumps and read through them page by page translating opcodes in our head and essentially "decompiling" back to COBOL to find the bugs 🙂


Has the Scala compiler gotten any better in that area? Back when I last tried (2.9), the compiler errors from mismatched implicit type conversions in standard library calls on collections were just awful...


I know JS and Node.js aren't always loved by everyone but what I'm wondering about is, if you would sum up "Node.js, the good parts", what would be the replies? Answers in thread please.

Drew Verlee19:02:43

synergy with the javascript ecosystem.

Martynas Maciulevičius19:02:11

It has Typescript which is a type system. So specify... types. For specific type of people that like types. You type more and it doesn't prevent too much if you mistype things but it's better than no types at all. Also you can exit this type system if you want. Which means that it's flexible. So if you want types but you don't want types -- you're covered.


the original talk is pretty insightful the event loop vs threads for concurrency is the heart of it

🙏 1

It’s extensible, if needed, and that has led to modules like fs meaning that you can really do whatever you want with it. And it’s ridiculously fast.


Also having function as such a fundamental (and efficient) building block of the language has made it extremely easy to use JS as a target for other languages, like ClojureScript.


Despite all the horrible stuff.. There are also good things. JS has incredible reach. NodeJS is a good intro to async programming for those who are used to the luxuries of threads. Also JavaScript is super simple if you grab just the good parts and ignore the rest.


I already mentioned that you can build your own modules in C (which has security and safety issues), but more recently it comes with WASM support. This means that you can build safe modules in a variety of other languages. This framework provides extraordinary flexibility


1. huge ecosystem & commercial support. basically, if you're a webdev, there's a Node.js tool that does what you want 2. pretty good performance 3. first class fns, async i/o 4. dependency management has pros and cons but IMO local node_modules is way better than global envs like python, and the hacks required to get around it

👍 1

☝️:skin-tone-2: i typed that up a couple hours ago and forgot to send. some other people seem to have said the same 🙂


I like the async approach of Node (like, you can't even exit the async world) so it's kind of a cheap way to not block your main thread at all


Also, it's a dynamic language that it's more explicit than implicit (I'm looking at Ruby, and things that magically appear from nowhere) and it does have a good debugging support from devtools (so I'm not forced to use a specific editor)


I like that it’s flexible enough to support many different paradigms decently. For example I got really into FP through libraries like highland, rxjs, bacon, and ramda which is what lead me to seeking out a lang like Clojure. I also like its general hackability, there are so many options for so many different kinds of problems. It's a language that can grow with you. Just getting started? Imperative, top down coding is fine. Then there's the oop features when you're ready to see how far you can go, then FP when you decide maybe it's better not to use everything available all the time. It also hosts languages I enjoy like cljs and ReScript


JS • ES6+ ◦ Arrow functions ◦ async ... await (Promises) ◦ Generators (`redux-saga` brings CSP to the frontend) • Great tooling ◦ eslint, prettier, debuggers, profilers, ... • Dynamic Node • Huge community • 10 different libraries for every single problem you can think of and many of them still maintained • Good concurrency model (personally big fan of CSP but Node's model is far better than threads and they have worker threads that are a good answer to the trade offs of the single thread imo) • Performance • Code sharing with frontend


Context: I'm asking for #nbb which is a CLJS scripting env on Node.js. The goal is to have Clojure for scripting (interpreted via SCI, no JVM) and leverage the good parts of Node.js, I'm trying to get a better image of what those good parts are.


So far I've identified: • browser testing (Playwright) • lambda functions on cloud (AWS, Google) • TUI/CLI programs • large ecosystem


nbb looks really interesting. Have you tried it with yet? Could probably provide some really nice API for screenshotting websites or web scraping using this.


@U01DV4FGYJ0 it works well with puppeteer. At #nextjournal I've ported all their browser tests from compiled CLJS + Playwright to #nbb with Playwright and it needed minimal changes. Now they can just run, edit, run, without any additional tooling


There's both examples for puppeteer and playwright here:


That's great to hear! Used lumo + puppeteer to write an auto solver for the NYT spelling bee game


Ohh I misunderstood. This is interpreting a subset of CLJS within Node.js? 🤯 This is awesome! So this allows you to call CLJS from Node directly? Does it allow CLJS libraries that you can require from Node too?


@U01DV4FGYJ0 Yes, iff the library sticks to the subset of CLJS that the interpreter supports. E.g. it can load honeysql from source. But it also comes with a set of built-in libraries for which that restriction doesn't hold: it can be any lib, advanced compiled and then optionally loaded.


Also: it can load any JS lib that works with Node, no restrictions there


Try npx nbb :)

🙏 1

> • browser testing (Playwright) > • lambda functions on cloud (AWS, Google) > • TUI/CLI programs > • large ecosystem I foresee developing some applications with it using macchiato + nbb for web servers


Though I have not explored macchiato so if not that explicitly, then a small lib to make express more like ring would be cool


I haven't tried macchiato with nbb, but #sitefox is a web framework that explicitly supports #nbb


Cool, looks nice too


Poking around, does look solid but I really do like the composition of middleware functions that operate on plain request map and return a plain response map


I don’t know if this could go into #community-development, or #events, or somewhere else, but to be safe I’ll post it here. While we are still a long, long way from normal, we’re seeing a lot of things open up, and several conferences starting to have in-person attendance. I’m wondering about a future Clojure/conj. Has anyone heard what might be happening here? I know that this is not within your purview @alexmiller, but I also know that you speak to the people for whom it is, so maybe you’ve heard something?


Or anyone else other than Alex, for that matter

Alex Miller (Clojure team)20:02:44

I'm not sure when we will make a decision on in-person for 2022, so can't answer yet, sorry!

👍 1
Alex Miller (Clojure team)20:02:13

certainly, there is a desire to do some in-person events, not just Conj which would almost certainly be in Durham, but another Clojure/south in São Paulo


Normal time is winter for the conj right? (would absolutely love a trip to Såo Paulo)


Historically, end of November/beginning of December


i haven’t been to any since 2016 😞 managed an alex miller conference hat trick that year though. Seattle, strange loop, and austin in the winter since i could drive there


Alex often MCs the conj, but he is given a break from organizing for that conference (which he needs ❤️)


Oh, that sounds cool. Who wouldn’t want to attend a conference in Brazil? 🙂

👍 1

Oh man, I might need to get a new passport. I’ve been working on learning Brazilian Portuguese for over a year now (my husband speaks it).

brazil-parrot 2

Me, for example: I escaped the place 😄. (just kidding, I would travel for a Clojure Conj 🙂)

Alex Miller (Clojure team)21:02:37

I think we are at this point, unbound by "normal" :)

👍 2