Communick News

86 readers
4 users here now

Communick is a professional, privacy-focused service provider who supports open source and the indieweb. We support back the fediverse and the developers by pledging 20% of our yearly profits to the main development teams.

All users from this instance are expected to follow the Code of Conduct.

At the moment, only the admins can create communities. We are still figuring out what type of content we would like to provide here, but the general guideline is that we want to build a home of good discussion about culture, sports, and anything that can inspire and elevate our spirits.

Communick also provides managed hosting for Lemmy instances if you want to run your own.

For further questions, try our support.

founded 2 years ago
ADMINS
201
 
 

Is anyone know where to start taking shortcuts

202
203
 
 

Hi all, I thought I was being very clever by creating a virtual machine build environment so I didn't have to litter my main computer with 100s of packages to build emacs. So I built it in a gnomebox and set the prefix to $home/.local/opt/emacs as I saw someone do. It runs fine in the virtual machine

The issue is now, I'd like to move the install or the built files to my host machine and run it, but it won't run. If I just try to move the $home/.local/opt/emacs folder to my own computer, and run it I get the following:

./emacs-29.1.90: error while loading shared libraries: libgpm.so.2: cannot open shared object file: No such file or directory

When I try to move the whole directory (source code and the build directories inside there) out of the virtual machine into the Host and try to run make install (this is after make and compilation completed) it says

make install
if [ -x ./config.status ]; then	\
     ./config.status --recheck;	\
else				\
     ../configure --cache-file=/dev/null; \
fi
/bin/sh: line 4: ../configure: Permission denied
make: *** [Makefile:573: config.status] Error 126

I have tried to chown -R : ./ to the whole directory but it still gives me the permission denied.

Any ideas how I might accomplish this task?

Thanks!

204
 
 

I wrote a few functions to improve my research workflow and easily add ArXiv papers to my library, hopefully you'll find it useful. I am aware of `arxiv-citation`, I couldn't get it to work, perhaps I did something wrong. I also added a few extra options.

https://gist.github.com/ndrwnaguib/fe7245ca5b2e8ba21b05a44679fc6148

https://i.redd.it/jgmfkyve9s2c1.gif

205
206
 
 

Hey,

i tried Google but theres no real results because its to vague of a question asked, can the 4 Extra Fields for " Your homepage, pronouns, age, anything you want. " be increased to more in the Code without using Glitch.Soc?

Thanks.

207
 
 

Hi all, I'm moving towards Emacs as an old vim user, with the goal of giving up my heathen C ways in favor of Lisp.

Attempting to use slime on a fresh install gives the error: Eager macro-expansion failure: (wrong-number-of-arguments (3 . 4) 2)

wth is this? ):

208
 
 

Hello fellow Emacs enthusiasts,

I'm reaching out to see if there's anyone here who's successfully integrated a modern development environment within Emacs for Python programming. Specifically, I'm interested in a setup that incorporates eglot, tree-sitter and company.

I've encountered a significant issue: whenever I enable python-ts-mode, Emacs consumes all my system's memory and crashes. While I've managed to use a more basic setup that limits tree-sitter to syntax highlighting only, I can't shake the feeling that I'm missing out on some great functionality.

To help with investigation:

  • I am running on a Mac
  • The bare minimum to reproduce this problem is on the following gist: https://gist.github.com/hnarayanan/a6397d6723fce19e2802d4305071e611
  • I happen to use Emacs from MacPorts, but to double-check, I also attempted to download it from https://emacsformacosx.com and it crashed in the same way
  • This seems to happen independent of the language server used in the backend. I intend on using python-lsp-server, but it fails even if I don't have it installed.

Has anyone faced a similar problem and found a solution? Perhaps I am doing something very wrong with my config? I'm eager to learn from your experiences and would greatly appreciate any advice or tips you can offer.

Thank you!

209
210
211
212
 
 

Calc'c elisp functions (imho) all have the prefix calcFunc-. So in order to use a calc function like vlen in an org table lisp formula, one could use calcFunc-vlen. That's nice.

What bothers me is the lack of "on-line" documentation (i.e. usable with eldoc or completion frameworks).

All calc functions are nicely documented here: https://www.gnu.org/software/emacs/manual/html_mono/calc.html , thats good.

It is possible to modify a elisp's function documentation. e.g. like so:

(put 'calcFunc-vlen 'function-documentation
     "Computes the length of a vector.
The length of a non-vector is considered to be zero.
Note that matrices are just vectors of vectors for the purposes of this command.")

Now calcFunc-vlen would have a nice "on-line" documentation, usable with C-h f, autocompletion and eldoc.

Has anyone already bothered to gather some of those strings from the manual, in a more machine processable form? So I could save some work to create "on-line" documentation of the calc functions?

213
 
 

Hi all,

I am using native Emacs build for Android.

Is there a way to send notification from my Emacs app to Android using some package?

Has anyone found a way or a workaround?

214
215
 
 

Im looking at the org babel WORG webpage on running shell code and it says there that we can run shell command asynchronously. However, when I try some of the examples in my machine, the async is completely ignored. Am I supposed to install something else?

216
217
 
 

I talked to someone about the extensibility of emacs, but the person I was speaking to assumed that any IDE is just as extensible by using Plug Ins.

Without turning the conversation into a university style lecture, what is one or two simple actions I can do in emacs to show someone what separates it from other IDES.

218
 
 

Hi,

I am not sure if many people are using alerts for the appointments, I do, I like the behavior where it brings Emacs to the front and shows a message in the mini buffer. However, when I am quickly writing in another application I sometimes end up writing in the active buffer. I am contemplating creating a function which puts the buffer in read only mode before showing switching to Emacs, if it was not already Read Only, and restores it when the reminder disappears. That should be enough to avoid accidental writing.

Before I embark in that task I would like to know if anybody has done anything like that, or any other creative ideas to avoid contaminating the current buffer.

Thanks!

219
 
 

Someone asked me recently, what was the motivation behind LispE. Here is an example of the kind of functionalities that LispE proposes.

Adventures games were very popular at the beginning of the PC revolution back at the beginning of the 80s. Implementing a game is not very difficult in itself, but it is far from being a trivial task.

However, function programming concepts such as data types and pattern matching can prove incredibly handy to implement such a game.

For instance, you can transform each of your different actions into a Data Type:

(data Command   
   [Move atom_]
   [Break atom_ atom_]
   [Open atom_ atom_]
   [Kill atom_ atom_]
   [Pick atom_ atom_]
   [Take atom_]
   [Drop atom_]
)

(Note that [..] are equivalent to (..), we can freely choose one or the other for more code clarity)

A Data Type provides some very interesting way of controlling how your input is handled in your code. For instance, in each of these definitions, we define the number of arguments and their basic type. In this case, each should be an atom.

However, a data type should not be confused with a struct as in languages such as C++ or Java. It does not record any data structures in memory. Functional Programming tries to keep away from side-effect, while struct in imperative languages wouldn't care less.

If we take the following C struct:

struct {
   int i;
   char c;
} foo;

foo.i = 10;
foo.c = 'a';

Nothing prevents us from modifying the internal values of that struct, which of course might provoke some side-effect.

So what's the point?

These structures shine when used in collaboration with pattern functions.

(defpat action ( [Pick 'up x] ) ...)
(defpat action ( [Take x] ) ...)
(defpat action ( [Drop x] ... )
(defpat action ( [Move direction] ...)

The function action in this context is polymorphic and can be triggered with different data types.

(action [Move 'left])
(action [Pick 'up 'stone])

Each of these actions will then be matched against the corresponding function definitions above.

If you have a look on: minizork_en.lisp, you'll see that we take a string as input and then apply a few transformations:

(setq dialog "GET THE STONE")

; car and cdr have also been repurposed for strings
; GET THE STONE is transformed into: Get the stone

(setq dialog (+ (upper . car dialog) . lower . cdr dialog))

; We replace synonyms with their official value: Get --> Take
; We transform each of our strings into atoms. 
; Note that select returns the first non null value
; We remove stopwords (replaced with "~")
; We eventually obtain: (Take stone)

(setq commands 
  (filterlist '(neq '~) ; we remove stopwords
     (maplist ; we replace words with their synonyms or remove stopwords
         (λ(x) (atom . select (key filterwords x) x)) 
         (split dialog " "))))

Once this transformation has been completed, we can try our new command:

(maybe
   (action command) ; (action [Take stone])
   (println "Wrong command")
)

Basically, if there is an error, we catch it and execute the last line.

The use of pattern functions with data types simplify quite a lot the whole code.

220
221
222
 
 
223
 
 

Hi. Need help with creating the 'for' macro. It must take a parameter, an initial value, an end value, and a loop step. Macro must return amount of iteration. Various operations should take place inside it. It should be designed without leaks.The preliminary version looks like this:

(defmacro for ((param-name start-value end-value &optional (step1 1)) &body body)
  (let* ((func-name (gensym))
(start (gensym))
(param-name (gensym))
(comparison (if (< step1 0) '< '>))
(end (gensym))
(step (gensym))
(k (gensym)))
'(labels ((,func-name (,param-name ,start ,end ,step ,k)
(let ((new-exprs (progn ,@body))
(newK (+ 1 ,k)))
(if (,comparison ,end ,param-name)
(,func-name (+ ,param-name ,step) ,start ,end ,step newK)
newK))))
(,func-name ,param-name ,start-value ,end-value ,step1 0))))

I understand that it looks terrible. I don't understand how you can access the parameter without violating the rule about leaks.

224
225
 
 

Must come round every couple of days and say Once more round the sun belongs in the cannon,

in that sense this post cannot be off topic, categorically speaking.

It's food for thought.

view more: ‹ prev next ›