This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-20
Channels
- # announcements (26)
- # babashka (25)
- # beginners (16)
- # biff (12)
- # calva (36)
- # clj-commons (4)
- # clj-kondo (3)
- # clojars (1)
- # clojure-art (1)
- # clojure-dev (1)
- # clojure-europe (10)
- # clojure-gamedev (1)
- # clojurescript (7)
- # clr (10)
- # fulcro (10)
- # helix (6)
- # introduce-yourself (2)
- # malli (7)
- # matrix (203)
- # off-topic (12)
- # pedestal (4)
- # practicalli (2)
- # reagent (5)
- # specter (1)
- # sql (8)
- # vim (1)
- # xtdb (5)
Hi, everybody: Pulsar Editor got a significant improvement on syntax highlighting - we just published (on the rolling release channel) a version where we basically redesigned tree-sitter! The new version is closer to other editor's and we now have Clojure being highlighted via tree-sitter (previously we only used TextMate for Clojure)! You can grab at https://pulsar-edit.dev - currently, we need to toggle the modern version because we don't want to break anything.
This is actually quite huge for me, at least, because this new implementation makes it possible do differentiate between function calls and lists; it is also possible (but still not implemented) to support both #_
and comment
, highlighting it correctly to a code comment (but also allow the user to decide if that's desirable); and finally, because it opens the doors to newest Electron versions!
Aí sim, papai!!
This is sick! Good job y’all
Hi everybody, I'm happy to announce a new major release of *promesa* library: 11.0.664
.
The most relevant change behind this version is:
In this version, one of the problems that existed since the birth of this library has been
corrected, related to the fact that the default implementation of js/Promise
makes it
impossible to nest promises . This fact has caused the library in the first place to have
had a divergence with its counterpart in CLJ/JVM and, secondly, to the fact that
mapcat-type operators could not be correctly implemented, making them practically
useless on CLJS until now.
With this version, the problem is fixed and while it cannot technically be considered a
backwards compatibility break, some operators with promises will not function
identically. Basically the magical auto-unwrapping of promises is gone in some operators.
Function docstrings have already been explicit about what they are expected to return, so
if you've been relying on the js/Promise implementation detail in CLJS, it's possible that
some pieces of code are broken, because now several operators already work the same way in
CLJ and CLJS.
Other relevant changes:
• CSP: add first class support for errors on channels
• Promise: add introspection support on CLJS (pending? done?, deref, ...)
• Exec: many improvements and fixes on vthreads support (already available in 10.x)
You can see a complete changelog here: https://github.com/funcool/promesa/blob/master/CHANGELOG.md#version-110664
@U06B73YQJ curious as to how much overhead is introduced compared to using js/Promise
directly and what the effect on performance is
Interesting question, in our nonscientific tests the performance is analogous, but this is something that I still in my TODO list for measure it ...
it has a lightweight overhead over native promise, but still looks reasonable for correctness
In JS you can't "wait" for a promise unless you use async/await (which is just syntactic sugar for .then basically). What then is the semantics of deref of a promise in JS?
this measures only native Promise impl vs promesa builtin promise impl (without all promesa abstractions, just underlying impl)
would it be an idea to have a mode in which the promesa macros just compile to regular "bare" js/Promise
without the extra baggage? I don't think I've ever wanted to reach for anything that wasn't possible with js/Promise
alone, just that the macros offer a convenience
yes, it is possible, but this will imply to have different versions of macros for clj and cljs, and the main reason for internally use protocols, is to have the same macro impl for CLJ and CLJS
you can't block in JS. what does deref do when the value isn't available? => returns nil
this is why you have the state introspection predicates... you need to explicit check but yes, throwing may be an option
nesting and CSP error state are making my code simpler!
for deref/extract of cljs promise values i don't mind if the 1-arity throws on unfulfilled promises, as long as there is a 2-arity which lets you specify a distinguished unfulfilled value