@galdor@emacs.ch
@galdor@emacs.ch avatar

galdor

@galdor@emacs.ch

Contrarian software engineer. Hire me to solve your technical problems.

$argon2id$v=19$m=64,t=512,p=2$0rwNagYG9nw58bd3D5HBfw$ZDMVWlX+adPhtQKcnrqI5A

This profile is from a federated server and may be incomplete. Browse more on the original instance.

louis, to random
@louis@emacs.ch avatar

Compiling Clang on a single CPU machine is an impossible task 😠 It's over 15 hours now and counting...

galdor,
@galdor@emacs.ch avatar

@louis Most of it from LLVM right?

galdor,
@galdor@emacs.ch avatar

@louis LLVM is the perfect example of what happens when you ignore the law of diminishing returns. Yes, it is one of the best compiler/optimizer on the market. Yes it does crazy things. But I would be much happier with a compiler 80% as fast but 10x smaller and simpler.

louis, to random
@louis@emacs.ch avatar

So, when I aim for portable C code that works on all *nixes, is the "Single Unix Specification" now the authorative reference, instead of just POSIX?

I think I missed that train. Advice from experienced devs appreciated.

#unix #c

galdor,
@galdor@emacs.ch avatar

@louis I have not heard of anyone referring to SUS in any context for more than 10 years. POSIX 2018 (i.e. POSIX.1-2017, do not ask) is currently the theoretical reference to be portable on Unix-like systems.

Of course no one bothers getting POSIX certified nowadays, so as usual test and add workarounds as needed.

galdor, to random
@galdor@emacs.ch avatar

In #Go, you cannot call the String method on a literal URL struct ("cannot call pointer method String on url.URL") because the String method has a pointer receiver. String does not modify the object, but it uses a pointer receiver to avoid copying the object for each call.

This is what you get when 1/ you design a language with pointers (why would you do that in 2009?) and 2/ you do not have "const".

Just bad design.

galdor,
@galdor@emacs.ch avatar

@holgerschurig And yet I use C libraries just fine in Common Lisp, a language which does not use pointers as a language mechanism. No intermediate C. A pointer is just an address, as long as your language has integers and the necessary primitives to call C code, you can use C libraries directly. Ruby FFI does the same thing.

galdor, (edited )
@galdor@emacs.ch avatar

@holgerschurig You do realize that pointers are memory addresses, which are simply integers no matter what the language is, right?

galdor,
@galdor@emacs.ch avatar

@holgerschurig

Modern Common Lisp implementations also have typed foreign types, this is not the wild west ;) Pointers are not "emulated", I honestly have no idea what you imagine. There are a lot of issues with Common Lisp, and I'm the first one to complain about them, but working with C libraries has always been very comfortable compared to what it is in Ruby, Erlang, or even Go (well, CGo).

I do not frown on pointers in general (I wrote way too much C professionally for that), but they do not make sense in Go: there is a GC and pointer arithmetic is not available! There is nothing useful you can do with them, and they cause so many headaches.

galdor, to emacs
@galdor@emacs.ch avatar

While the LSP protocol is useful for completion or access to symbol definitions, some of its features are less appealing. In , you can instruct Eglot to ignore any feature you dislike.

E.g. (setq eglot-ignored-server-capabilities '(:inlayHintProvider)) to remove annoying hints mixed with the code in c-mode with clangd.

louis, (edited ) to stackoverflow
@louis@emacs.ch avatar

Because I deleted (not edited) some of my answers on Stack Overflow (7 in total) during the last two days, my account is now locked because I "defaced" the community.

They seem to be really desperate. But with their decision to sell their data to OpenAI, they sealed their own fate.

galdor,
@galdor@emacs.ch avatar

@louis Everyone knew what would happen after Stack Exchange was sold to a private equity conglomerate. Founders made their money (good for them!) and are out. At the end of day it is yet another company exploiting users for data. Nothing new and no real future.

galdor, (edited )
@galdor@emacs.ch avatar

@louis

> Can't quite get it why anyone would still volunteer their time as a moderator to this company, err, "community".

It's funny because reading the beginning of your message, this is what I immediately thought. Same thing with Reddit moderators. Companies have been doing a very good job at convincing people that they were providing free services out of the goodness of their heart. Hopefully users will learn from this.

louis, to random
@louis@emacs.ch avatar

Exciting news for SBCL users. A coroutine proof-of-concept was created during ELS after-hours in a pub :-) I for once hope, what happened in Vienna, doesn't stay in Vienna.

#sbcl #els2024 #commonlisp

galdor,
@galdor@emacs.ch avatar

@louis I hope it means green threads (let me dream).

galdor, (edited )
@galdor@emacs.ch avatar

@louis From a quick check in CCL documentation, it used to have cooperative userland multithreading and switched to OS threads in 0.14.

The thing is, naïve cooperative multithreading (i.e. Stackless Python or what some Scheme implementations do with continuations) is pretty much useless without a runtime able to deal with IO (global IO handler with epoll/kqueue, yield on all IO ops and resume on IO events), which is tricky because none of this is defined in the Common Lisp standard.

Also this is 2024, if your green threads cannot be dispatched on multiple cores (as in Go or Erlang), the benefits are more than limited.

Doing all of this really efficiently is a very hard problem, especially if you are a native compiler (now you have potentially millions of green threads, each with a tiny stack, then suddenly you make FFI calls and the C code is convinced you have your 4+MiB of stack…).

amoroso, to Lisp
@amoroso@fosstodon.org avatar

Are you going to European Lisp Symposium 2024?

I have a favor to ask you. Please tell the Lispers there if any of them writes a Common Lisp book I'll be more than happy to buy it, back a kickstarter, spread the voice, and support the author any way I can.

This is just one data point but my hunch is many Lispers are like me.

#els2024 #els #CommonLisp #lisp

galdor,
@galdor@emacs.ch avatar

@amoroso What would you like to see in a new Common Lisp book?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • modclub
  • DreamBathrooms
  • mdbf
  • Durango
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • InstantRegret
  • Youngstown
  • slotface
  • everett
  • kavyap
  • cisconetworking
  • JUstTest
  • ethstaker
  • tacticalgear
  • GTA5RPClips
  • osvaldo12
  • khanakhh
  • rosin
  • Leos
  • normalnudes
  • anitta
  • cubers
  • tester
  • provamag3
  • lostlight
  • All magazines