<abu[7]>
taleon: The problem with Vip on Mac is from shared libs?
rob_w has quit [Remote host closed the connection]
rob_w has joined #picolisp
<abu[7]>
So thanks tankf33der and taleon! I've put both Makefiles into the release
<tankf33der>
and ask users to test. I can imagine situations where macos version will fail
rob_w has quit [Ping timeout: 248 seconds]
<taleon>
abu[7]: I'll test it later on my "old" MacBook Air M1. I rarely use it and have to check. I think I had an error message saying that the dimensions/measurements couldn't be determined. More details later.
<abu[7]>
OK, great!
<abu[7]>
it it an ioctl() call iirc
<abu[7]>
'getTerm' in @lib/term.l
<abu[7]>
So it could be some wrong constant like TIOCGWINSZ
<taleon>
[/Users/cr/mystuff/src/pil21/bin/vip:9] Can't get terminal size
<taleon>
?
<abu[7]>
Yes, getSize -> getTerm
<abu[7]>
(%@ "ioctl" 'I 1 TIOCGWINSZ
<abu[7]>
TIOCGWINSZ is from sysdefs
<abu[7]>
Generated in the make process
<beneroth>
M-Sci, DHT? I guess you don't mean the androgen hormone?
<M-Sci>
W/Distributed_hash_table
<abu[7]>
Distributed Hash Tables?
<abu[7]>
I was too slow
<taleon>
Unfortunately, I am not familiar with macOS syscalls and would not know how to work around this issue. I avoid Apple whenever possible. :-)
<abu[7]>
It should build automatically, plled from includes
<abu[7]>
*pulled
<M-Sci>
I recently realized that Hash is such a general concept that DHT could be a linked list in an extreme case. Array, or more accurately Memory Region, is also a Linked List with 0 bit link field.
<M-Sci>
(** 256 size) is not far from malloc...
bjork1intosh has joined #picolisp
bjorkint0sh has quit [Ping timeout: 260 seconds]
rob_w has quit [Ping timeout: 244 seconds]
corecheckno has quit [Remote host closed the connection]
<taleon>
I have tried this code http://pb1n.de/?8c6c36 under macOS and it returns the following result: 80 25
<taleon>
ioctl() seems to work in principle.
<taleon>
tty_fd outputs 3
<abu[7]>
Cool, looks good
<taleon>
But in Vip I still get "Can't get terminal sizeâ".
<abu[7]>
oh
<abu[7]>
With pil @lib/term.l + and then (getSize)
<abu[7]>
same error?
<taleon>
~ pil @lib/term.l +
<taleon>
: (getSize)
<taleon>
Can't get terminal size
<taleon>
?
<abu[7]>
ok
<M-Sci>
Buffering? flush(2) perhaps?
<abu[7]>
Not needed for ioctl()
<M-Sci>
I remember there was some quirk with /dev/ttyUSB0 on Mailing List (some years ago).
<M-Sci>
Oh, sorry.
<M-Sci>
It was not resolved to my knowledge.
<abu[7]>
Yeah, here we look at stdin
<abu[7]>
(%@ "ioctl" 'I 1 TIOCSWINSZ ...
<abu[7]>
I think TIOCSWINSZ is wrong
<abu[7]>
can you print TIOCSWINSZ in your C program, taleon?
<abu[7]>
and then
<abu[7]>
: TIOCSWINSZ
<abu[7]>
On Android
<abu[7]>
: TIOCSWINSZ
<abu[7]>
-> 21524
<taleon>
: TIOCSWINSZ
<taleon>
-> 2148037735
<taleon>
I'm not sure how I'm spending this under C. It's not a variable or a number.
<abu[7]>
It is a #defined constant
<abu[7]>
printf("%d\n", TIOCSWINSZ);
<taleon>
1074295912
<abu[7]>
different!
<taleon>
aye
<abu[7]>
It is probably from #include <termios.h>
<abu[7]>
(vi "src/sysdefs.c")
<abu[7]>
Somethinm
<abu[7]>
y
<abu[7]>
g
<abu[7]>
must go wrong here
<taleon>
: (vi "src/sysdefs.c")
<taleon>
Can't get terminal size
<taleon>
:)
<abu[7]>
haha
<abu[7]>
-I in Makefile?
<taleon>
I use vim
<abu[7]>
good
<abu[7]>
The include used in building sysdefs must be different from the one used in your C build
<taleon>
#include <stdio.h>
<taleon>
#include <string.h> // strerror
<taleon>
#include <unis Type: int
<taleon>
#include <errn variable tty_fd
<taleon>
#include <fcnt
<taleon>
#include <sys/
<abu[7]>
you could grep for TIOCSWINSZ in "/usr/include/"
<taleon>
ioctl.h>
<abu[7]>
ok
<taleon>
Phew, I'll have to look for where that is under macOS first. :-)
<abu[7]>
Not in "/usr/include/" ?
<abu[7]>
Pretty Unix standard iirc
<M-Sci>
Ah the joys of Global Variables...
<abu[7]>
Not a variable
<abu[7]>
global include files :)
<abu[7]>
System calls *must* be global
<M-Sci>
`errno' seems to be a confused generalization (obstruction) of Status Register.
<abu[7]>
errno is a second return value
<abu[7]>
often '@@' in PicoLisp
<abu[7]>
In some kind return values are always global
<taleon>
Apparently there is no strace under macOS. I'll have to search the internet.
<abu[7]>
oh
<abu[7]>
Good I stopped Mac development 30 years ago
<taleon>
hehe
<taleon>
dtrace a.out
<taleon>
dtrace: system integrity protection is on, some features will not be available
<abu[7]>
How is the situation on normal BSD?
<abu[7]>
Is dtrace like strace?
<taleon>
On OpenBSD is ktrace
<abu[7]>
on Linux too
<abu[7]>
kernel trace
<abu[7]>
strace is system calls
<abu[7]>
not sure about the exact differences
<taleon>
To be honest, I have never used dtrace. macOS is not my favorite OS and I only use it very rarely and then only as a pure user.
<taleon>
I have to read up on it first.
<abu[7]>
sigh ;)
<taleon>
I'm not sure if this is any kind of meaningful output: http://pb1n.de/?eb9f18 Otherwise I'll have to see how it works with ktrace.
<abu[7]>
Looks good
<abu[7]>
: (hex "80086804")
<abu[7]>
-> 2148034564
* beneroth
looks forward to soon(TM) using PicoLisp on MacOs (M3) and FreeBSD (requires that a different build than OpenBSD? probably?)
<beneroth>
M-Sci, broad meaning of DHT: is it really so broadly defined but misused, inaccurate terminology (in service of bullshiting or real ignorance)? unfortunately, IT is full of it
<M-Sci>
beneroth: Not at all. AFAIK a trivial Hash Function, like always returning 1, will degenerate a Hash Table into a Linked List.
<taleon>
The last time I tested PicoLisp on FreeBSD, it was pretty straightforward. Here are my notes. However, back then I installed the code via git. http://pb1n.de/?8a8024
<beneroth>
M-Sci, you are right! Not DHT is broadly defined, "hash" is. Agreed!
<M-Sci>
taleon: [prin "^[[18t"] gives me result but IDK how to read it.
<beneroth>
taleon, thank you very much, appreciated. I will not come around to test this in next weeks, but its on my list. I plan to experiment with FreeBSD and Jails as an alternative to Proxmox (primarily to get more stable cli/admin UI then even debian has, and because I detest SystemD)
<M-Sci>
Oh yes, I'm not on BSD :) .
<M-Sci>
I hope it will be of some help.
<beneroth>
you're on MacOS, or what?
<taleon>
If you need help with FreeBSD, let me know. I've done quite a few things with FreeBSD, but I prefer OpenBSD because it's easy to use and requires little configuration. Otherwise there is also a nice German BSD community at www.bsdforen.de
<beneroth>
I also have a MacOS PicoLisp project coming up this summer, so I appreciate all the MacOS efforts by tankf33der, abu[7], taleon and everyone else - thank you all! <3
<beneroth>
taleon, thanks! Will come back to it. Bookmarking bsdforen.de :)
<beneroth>
M-Sci, taleon: and yes, I can set up a paste hosting if the need arises
<taleon>
I always document everything and still have a lot of notes here. Back then it was a dedicated server with FreeBSD at Hetzner with nginx, letsencrypt, mail server, matrix serverencrypted jails via zfs, postgresql, etc. zfs is very cool. Especially the snapshots etc. You can then simply roll back if something goes wrong. Even an update to a new FreeBSD version can be easily rolled back to the previous
<taleon>
I wanted to make it easy for myself with the translation and deepl betrayed me. :)
<beneroth>
I'm Swiss and speak german, so no issue :)
<beneroth>
deepl is great!
<taleon>
I have a pro version, but unfortunately I forgot that I'm currently using macOS and wasn't logged in there. :)
<beneroth>
I've worked with zfs on Solaris and Proxmox (and Proxmox Backup Server), only good experiences so far, but I haven't really dabbled in all the features besides setting up a proper mirror raid
<beneroth>
(and make replacement disks for old solaris hardware compliant with all the disk slicing bureaucracy)
<taleon>
A lot has happened since then.
<beneroth>
yeah, but still a loot old solaris boxes keep on running :D
<beneroth>
s/loot/lot
<taleon>
This stuff just works. :)
<taleon>
Old Sun computers are constantly being given away here. However, due to the electricity costs, they are no longer really interesting to me as a hobby.
<beneroth>
yeah
<beneroth>
that is also my main motivation for contemplating FreeBSD: just work and not forcing me to learn new network configuration syntax and other BS every few years become some NIH kid wanted to put their mark on Debian
<beneroth>
(but also that I probably can build a more optimized, flexible and more efficient system using FreeBSD/ZFS/Jails instead of Promox etc. Worth a try)
<beneroth>
(for client webhostings and hosting of my own stuff etc.)
<beneroth>
s/become/because
<taleon>
Yes, it's more than suitable for that. Jails allow you to physically separate customers from each other while still maintaining full performance without a separate VM layer.
<taleon>
I'm off now. Got to get up early tomorrow. :) Good night.
<M-Sci>
An example of getSize. Buffering and error handling is missing.
<beneroth>
that's pil code? why use so many square brackets [] instead of normal ones () ? I think closing square bracket ] closes all open brackets (back up to the top-level)
<DKordic>
I know I am difficult. But I bet You don't know what You are missing out on.
<DKordic>
Key point: Name one of the Parameters «return», «result» or «continue». Now from 0 to any number of Values can be returned in the same sense as they are... received! Isn't that neat?
<DKordic>
«if» has 2 such Continuations. MMIO is an excellent example clarifying Side-Effect.