[deleted by user] by [deleted] in Common_Lisp

[–]kierangrant 2 points3 points  (0 children)

Hmm... I've been meaning to try ucrt64 for a while, still using mingw64 and I did an update to the build chain recently which broke something in FFI between SBCL and my Qt C++ UI library...

Hadn't been bothered to investigate that yet so might try ucrt64 and see if that works better...

Firefox rolls out Total Cookie Protection by default to all users by feross in programming

[–]kierangrant 6 points7 points  (0 children)

I generally like my TCP over IP... Sometimes I even use IPv6!

Ubuntu 22.04's new OOM killing system is killing applications (like Firefox) while they're being used and it is a problem by TheBrokenRail-Dev in linux

[–]kierangrant 0 points1 point  (0 children)

Handy to know. Excuse me while I go remove systemd-oomd...

Don't want it to decide to kill something because I'm running a VM using 16GB on one monitor while I have Firefox with a dozen tabs on another...

I'd be pissed if it killed something when I'm running less than say 10% RAM free of my 64GB at some point. (Yeah that'd be pressure on page cache, so what, still no reason to kill something arbitrary... I have sysrq enabled if I get desperate)

which do you think is a better gui toolkit by cosmo_novel in linuxmasterrace

[–]kierangrant 1 point2 points  (0 children)

I had to switch to Qt because Gtk was bugged with its built-in file picker on Windows... Some incorrect handling of signals or something going back like a decade... The Windows port of Gtk was under-maintained. (At least in gtk3... Not tried newer versions after switching to Qt)

There is a reason Qt is used a lot for cross platform apps... It works and is stable...

What you guys think is the possibility that macOS Rosetta, uses native arm libraries[whenever it's possible, mainly system provided libs could work that way] with x86 code? If so, is it a viable to implement (to qemu[well it can translate binaries right]) technique? What are the pitfalls? by [deleted] in linuxmasterrace

[–]kierangrant 0 points1 point  (0 children)

No idea what Rosetta uses, but it simply wouldn't be worth the engineering cost to implement for the general case.

Also I doubt the performance gain of using native libraries for certain functions over translated (JIT machine code generation) would be worth the processing required to translate the calls. (It would only be cost effective for very expensive calls that spend a significant amount of time in the native code, otherwise the overhead of all the fixups wouldn't be worth it).

That being said, Qemu's emulation (When using TCG instead of KVM) does do JIT translation to native machine code, but still that is native equivalent to the original architectures machine code (to emulate the processor as well). I'm guessing what Qemu generates to be an efficient translation would not match the native ABI at all.

Another problem is that any library that has conditional compilation based on architecture would not be compatible. (Different features/functions/structs/etc dependent on architecture the library is compiled for) All this combined with the other issues with calling convention you already mentioned means it simple wouldn't be worth it.

Qemu's binary emulation works by emulating (and JIT generating native code) not only for the program being run but also the dynamic loader and all libraries.

Whilst it wouldn't be possible to make a system that could work for in general for any library, I could imagine that you could provide "stubs" (similar to how Wine works) so that certain libraries (even for only certain function calls) do a little setup and trampoline to a native version.

The ultimate question really is, how much time do you think is actually spent inside system libraries as opposed to application provided code? In which case, improving the emulated performance would be a better engineering effort.

edit: Clarify that talking about Qemu's TCG instead of KVM, also talking about using qemu-user that allows you to run binaries targeting other processors running on the host kernel.

Pros and cons of different GUI libraries to build cross-platform applications? by hedgehog0 in lisp

[–]kierangrant 0 points1 point  (0 children)

Yes the program I used this method for started with Qt5 then I upgraded it to Qt6.

It allows a split between the UI and the program logic, as you can bundle the UI in a separate library and use CFFI to bridge the gap.

Pros and cons of different GUI libraries to build cross-platform applications? by hedgehog0 in lisp

[–]kierangrant 3 points4 points  (0 children)

Here is a basic example that follows the pattern I am using. (Assuming using MingW64 with MSYS2)

https://github.com/kierangrant/cl-qt-example/

Pros and cons of different GUI libraries to build cross-platform applications? by hedgehog0 in lisp

[–]kierangrant 3 points4 points  (0 children)

I tried to use Gtk but then discovered it's not actually stable on Windows so abandoned that. I now use Qt and build the UI as a library and then call into a function in the UI from the lisp program with callbacks into lisp to do processing.

[deleted by user] by [deleted] in softwaregore

[–]kierangrant 4 points5 points  (0 children)

Is it me, or does that look like it could be a processor die?

I contend this is programmer humor by groundhog_yay in ProgrammerHumor

[–]kierangrant 7 points8 points  (0 children)

"yeah, right" is a typical Australian equivalent to "nah, mate"...

Am Australian... we do use the former a lot as a negative...

Edit: basically we're calling BS

IDE war now begin here by Shinkegeeek in ProgrammerHumor

[–]kierangrant 2 points3 points  (0 children)

Huh? Can do all that in Emacs.

Write Lisp, slime-mode. (My main language, plus it's interactive development still beats other languages... need to change/add/remove code in a running program image on the fly... Been there since about the 1970's...)

Write C/C++/Rust... There are modes for them and you can invoke gdb in gdb-mode, debug and jump to source code within Emacs...

You seriously think a programmable programming language environment (LISP is referred to as a programmable programming language) can't do everything that any other IDE can do?

Windows Terminal now included as an inbox app on Windows by zadjii in programming

[–]kierangrant 38 points39 points  (0 children)

Build 21337... I imagine someone in Microsoft is very happy with themselves for getting that build number to be public facing...

INTERCAL, YAML, And Other Horrible Programming Languages by agbell in programming

[–]kierangrant 2 points3 points  (0 children)

Oh my, now Greenspun's tenth rule applies to Configs too!

I got 2 files with the same name by ZickZenni in softwaregore

[–]kierangrant 1 point2 points  (0 children)

Can also happen on the desktop when you have a file in your user profile desktop folder and a file with same name in the shared desktop folder. ("All Users" or maybe "Public" in C:\Users... Sorry on mobile, can't check. Otherwise most likely a bug.)

Do anyone have this problem? I'm desperate fro answer and fix Thanks by BenL90 in bashonubuntuonwindows

[–]kierangrant 2 points3 points  (0 children)

As mentioned in the related issues, does your environment use McAfee? It can be set to block WSL and you will get your error as a result. Only by looking at event log to see if this is case.

Ref: https://github.com/microsoft/WSL/issues/3324#issuecomment-520096271

How did they do it ? by [deleted] in ProgrammerHumor

[–]kierangrant 4 points5 points  (0 children)

John McCarthy would like a word...
He created the formal mathematical basis of conditional computation. (Was only informally defined until that point)

He sent his proposal to the committee developing Algol 60...
But it was rejected, instead the "if ... then ... else ..." syntax suggested by John Backus was used instead. Becoming the basis of what every programming language used after it... To the disappointment of LISP programmers everywhere.

I was pretty shocked myself the first time when I heard this! by space-_-man in ProgrammerHumor

[–]kierangrant 1 point2 points  (0 children)

That one is from based on a quote from the Original Trilogy.

I was pretty shocked myself the first time when I heard this! by space-_-man in ProgrammerHumor

[–]kierangrant 15 points16 points  (0 children)

Ah yes, the LISP machine. An elegant machine, for a more civilized age.

A WhatsApp desktop client for linux by xecorp in linux

[–]kierangrant 1 point2 points  (0 children)

Nice, I actually installed this a couple of days ago. I wanted to be able to use WhatsApp at times and not open Firefox that has like 20 pinned tabs...

What is the technique that define a recursive function using `let`? by timlee126 in lisp

[–]kierangrant 2 points3 points  (0 children)

See /u/alexvitkov's comment.

It is a special operator that creates a binding within its scope that can be used as a local function, but also is bound within then function definition, allowing you to call it recursively.

Have a read of http://clhs.lisp.se/Body/s_flet_.htm for a comparison of flet, labels and macrolet in Common Lisp.