Email or username:

Password:

Forgot your password?
588 posts total
Andrew Tropin

Using electron app for notes feels like using microwave oven for a timer.

NiceMicro

@abcdw in the late 90's one of my friend's family microwave oven had a timer, and when he told me he'd time some game with the microwave oven, I was like "you'll put in some food just to time the game?", and he was like... "no, no, we can just use it as a timer"...

So yeah.

Andrew Tropin

There are a lot of benefits in mailing list based development, but there are so many ways to do something wrong: send a patch to a wrong message/thread, forget cover letter or In-Reply-To header, attach instead of inline and so on.

Technically all the tools are available, but it takes a tangible amount of time and practice to configure them and start doing everything properly.

Resources like git-send-email.io/ helps, but still doesn't solve the issue completely.

#emacs #git #email

Show previous comments
Colin

@abcdw So Codeberg or...?

I've heard that plenty of people love applying mail-based patches, but the PR/MR system seems less open to user error, as you've mentioned.

Vivien the Trumpeting Elephant

@abcdw I like the patch-over-mailing-list approach as a submitter. I do occasionally mess things up, but usually the reviewers will pardon me for sending a v2.

As for git send-email, I don’t like it much. The "mail user agent" function of git send-email is very unpleasant, because you can’t review what you did, it does not copy the email in your sent folder, you can’t apply filters. While claiming to be the only working MUA (the one you use daily being unworthy of that name).

🍒🌳 Hartmut Goebel

Totally agree. I ended up writing a script for submitting the patch series. And still it is cumbersome.
@abcdw

Andrew Tropin

Ouch, I can't use srfi-64 test-group inside asyncronous code, because it uses dynamic-wind and re-entering fiber's continuation messes up test-runner output:

git.savannah.gnu.org/cgit/guil

#scheme #lisp

Andrew Tropin

Another good idea is to make assertions outside of async code.

Ramin Honary

@abcdw You might be have to define your own SRFI-64 test runner object that captures test outputs to a buffer specific to that one test, and then dump the buffer to stdout when the test completes. That way you can re-enter the continuation as often as you like, the output will only go into the buffer for that test.

Andrew Tropin

Implementation of with-pipes function. It can be used for capturing i/o of threads or subprocesses for example.

Does it look like idiomatic Scheme code?

git.sr.ht/~abcdw/guile-nrepl/c

#sheme #lisp

Andrew Tropin

It should be call-with-pipes to fit the naming convention.

Ludovic Courtès

@abcdw ‘with-pipes’ won’t close pipes in cases of a non-local exit of ‘proc’.

To protect against that, you can wrap the call to ‘proc’ in ‘with-exception-handler’ or similar. (It’s tempting to use ‘dynamic-wind’ but then that would prevent ‘proc’ or its callees from capturing a delimited continuation that spans the ‘with-pipes’ call.)

Show previous comments
Ramin Honary

@abcdw As I read this documentation, my understand is that pipes are ordinary POSIX file descriptors, so you are probably responsible for closing them if you create them with the POSIX system calls.

However if you create a Scheme "port" object from a pipe, it seems like (from the manual) that the port object will automatically close the pipe when it is garbage collected:

>

> "A file descriptor can be extracted from a port and a new port can be created from a file descriptor. However a file descriptor is just an integer and the garbage collector doesn’t recognize it as a reference to the port. If all other references to the port were dropped, then it’s likely that the garbage collector would free the port, with the side-effect of closing the file descriptor prematurely.

> "To assist the programmer in avoiding this problem, each port has an associated revealed count which can be used to keep track of how many times the underlying file descriptor has been stored in other places. If a port’s revealed count is greater than zero, the file descriptor will not be closed when the port is garbage collected. A programmer can therefore ensure that the revealed count will be greater than zero if the file descriptor is needed elsewhere."

@abcdw As I read this documentation, my understand is that pipes are ordinary POSIX file descriptors, so you are probably responsible for closing them if you create them with the POSIX system calls.

However if you create a Scheme "port" object from a pipe, it seems like (from the manual) that the port object will automatically close the pipe when it is garbage collected:

Felix Lechner

@abcdw Hi, there seem to be exceptions. "Ports should be closed when they are not needed .... Any error that occurs while writing out that buffered data would also be raised promptly at the close-port, and not later when the port is closed by the garbage collector." gnu.org/software/guile/manual/ "Buffered writes defer error detection (and defer the side effects to the mutable store), perhaps indefinitely if the port type does not need to be closed at GC." gnu.org/software/guile/manual/

@abcdw Hi, there seem to be exceptions. "Ports should be closed when they are not needed .... Any error that occurs while writing out that buffered data would also be raised promptly at the close-port, and not later when the port is closed by the garbage collector." gnu.org/software/guile/manual/ "Buffered writes defer error detection (and defer the side effects to the mutable store), perhaps indefinitely if the port type does not need to be closed at GC."

yourWife

@abcdw simply use call-with-input-file and Guile will close for you like RAII style

Andrew Tropin

10 minutes talk on scientific workflow in Emacs:
- Obtaining new papers from arxiv or other site with rss using elfeed and org-ref.
- Adding it to bibliography.
- Taking notes with org-roam and citar.

youtu.be/5Q9435eIOVI

#emacs #research #academia

Andrew Tropin

PlantUML is sick, it grew up so much since the last time I used it and now it looks really good.

Mind maps, sequence diagrams, BNFs, JSONs, regexps and whatever you want:
plantuml.com/

Show previous comments
avp

@abcdw I regularly use PlantUML (plantuml.com/) to describe the architecture of my projects and recommend it to my students as the tool for creating diagrams in their graduation projects.

And since I'm an FSM (Finite-State Machines) devotee, I wrote a state machine compiler in Scheme that turns PlantUML state diagrams into working GNU Guile (Scheme) code:
github.com/artyom-poptsov/guil

Teknovis

@abcdw I use it all the time for sequence diagrams and control flow diagrams. Works perfectly for me.

Andrew Tropin

Starting the second stream on lightweight concurrency in Guile Scheme:
youtu.be/FH8IGYUyWVc

Chat and peertube is here:
trop.in/stream

#guile #scheme #fibers #concurrency #lisp

Andrew Tropin

The best way to get all available stuff from textual port I found so far is:
(define (read-all-chars-as-string port)
(let loop ((chars '()))
(if (char-ready? port)
(loop (cons (read-char port) chars))
(reverse-list->string chars))))

#scheme #guile #lisp

otterz

@abcdw neat! short and very readable. wouldn't "char-ready?" also return #f in cases other than EOF though?

Andrew Tropin

After reading and trying to grasp Parallel Concurrent ML paper for a couple of weeks I finally understood most of it and the fact that I probably need to read a book to find the answer to my question ><

people.cs.uchicago.edu/~jhr/pa

Andrew Tropin

I guess half of the people subscribing to me are academics or at least have a solid background in some subject from category and homotopy theories to biology, CS or some other fancy thing. Meanwhile, my H-index: −273.15 °C.

I wouldn't say I feel uncomfortable, but I think I finally need to start publishing papers and find a PhD position (:

lispwright

@abcdw While I didn't plan this out, for programming and systems I recommend seriously studying biology because of all the mechanisms and metaphors you'll learn.

So up to college level general biology, whatever is the equilivent of Helena Curtis nowadays, and molecular genetics is also lots of fun.

Andrew Tropin

Keep experimenting with fibers and for a good reason I need an operation, which waits until thread is exited.

paste.sr.ht/~abcdw/12b2547726c

I implemented it and it works, but obviously blows up the memory. I've not finished a "Parallel Concurrent ML" paper and have a very little clue what I do in block-fn, I'll appreaciate if someone can give me a quick solution for now.

#guile #scheme #lisp #fibers #concurrency

Bahman M.

@abcdw I'd say post this on #Lemmy too. Usually you can hope for decent no-nonsense answers.

lemmy.ml/c/programming & lemmy.ml/c/programming@program are good starting points IMO

Jeff Kreeftmeijer

@abcdw oh wow! I'm sorry, missed this completely. Thanks for packaging it, and great to hear you like it. :)

Andrew Tropin

@migalmoreno collected a number of real-world rde configurations: git.sr.ht/~abcdw/rde#people-s-

Check out those nice approaches for maintaining your home and system configs with guix and rde.

#rde #guix #guile #lisp #nix #nixos

Andrew Tropin

The explanation on what is happenning with #scheme language r7rs standard at the moment:
dpk.io/r7rswtf

The work on r7rs-large is tough, but I hope it will go through this hard times.

#guile #lisp #pl

Andrew Tropin

Found a nice talk on concurrency. It has a very brief comparison of different concurrency models, like Erlang's Actors, Hoare's CSP, Go's goroutines, Clojure's core.async, Concurrent ML (aka Fibers in Guile).

Primary focus on Concurrent ML (but examples are in Scheme with type annotations ><).

youtu.be/pf4VbP5q3P0

#go #golang #clojure #lisp #guile #scheme #ocaml #concurrency #erlang

Show previous comments
Detlev Zundel

@abcdw Ah, from Michael Sperber. I think I ran across his name for the first time in the vicinity of the scsh project - which I still cherish highly 😂

Thanks for the link - it is on my to view list now!

Michael Misamore

@abcdw Actors and CSP cover the first four of those. Not sure about ML.

Andrew Tropin

Some news on the R7RS-large:

John Cowan says that he is exhausted by the efforts to reach agreement among many players and can't serve as Chair of the project anymore.

IDK, how it will affect the R7RS, but I'm glad that he listens to his feelings and takes care of himself.

Many thanks to him for his great work. Take care.

groups.google.com/g/scheme-rep

#scheme #lisp

Andrew Tropin

During the following month I want to make a few pair programming sessions (one, maybe two per week) with different people.

1. To work more focused on particular tasks and projects.
2. To see how other people work and learn from peers.
3. To share some experience.
4. To cleanup and optimize inefficient workflows.
5. To talk with folks in person, not only via toots/emails.

Like 2 hours informal coding session.

Toot if you would like to hack with me on your task or mine! :)

Preferably #scheme.

During the following month I want to make a few pair programming sessions (one, maybe two per week) with different people.

1. To work more focused on particular tasks and projects.
2. To see how other people work and learn from peers.
3. To share some experience.
4. To cleanup and optimize inefficient workflows.
5. To talk with folks in person, not only via toots/emails.

Like 2 hours informal coding session.

Go Up