ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
aw- has joined #picolisp
_whitelogger has joined #picolisp
aw- has quit [Quit: Leaving.]
<m_mans> Hi all
<m_mans> beneroth: I've found the cause of bug
aw- has joined #picolisp
Regenaxer has joined #picolisp
<m_mans> Regenaxer: hi!
<Regenaxer> Hi m_mans!
<m_mans> so, I've found the cause of error
<Regenaxer> great!
<Regenaxer> what was it?
<m_mans> httpGate doesn't set parent env to PicoLisp processes (yes, it's not a bug), then rsvg-convert can't handle non-ascii filenames
<m_mans> now I simply set LANG in main.l
<Regenaxer> oh
<Regenaxer> We must remember that
<m_mans> yes, we should be aware about that
<Regenaxer> yeah
<aw-> hey Regenaxer I saw (bytes) looks great!
<Regenaxer> Hi aw- :)
<m_mans> I think it would be good to add a pair of words in httpGate docs
<Regenaxer> m_mans, why does it work here?
<m_mans> with ascii filenames it's OK
<Regenaxer> is LANG inherited from nowhere? As the 'root' env is not active?
<m_mans> moment
<Regenaxer> yes, perhaps I used only ASCII names
<Regenaxer> Is there no other way than in main.l?
<Regenaxer> more globally?
<m_mans> see execve(np->av[0], np->av, np->ev) in httpGate
<Regenaxer> yes, but this does not know eg. en_US.UTF-8
<m_mans> and lines from 88
<Regenaxer> yes, I know that it sets
<Regenaxer> would en_US.UTF-8 make sense? Or is there eg. ru_US.UTF-8 ?
<m_mans> I don't know exactly, but maybe you could add also parent env
<Regenaxer> haha
<Regenaxer> ru_RU_UTF-8
<Regenaxer> There is no parent env probably
<Regenaxer> in init.d or /etc/rc.local
<m_mans> UTF-8 make sense, I see that even en_US.UTF-8 helps
<m_mans> moment, I need to search what I sent yesterday
<Regenaxer> I don'w want to extend the config file format
<Regenaxer> not for each line
<m_mans> OLDPWD=/PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binLANG=en_US.UTF-8PWD=/home/app
<Regenaxer> But perhaps some env on the top?
<m_mans> so, LANG is here, in parent env
<Regenaxer> ok
<Regenaxer> makes sense to add perhaps
<Regenaxer> "parent env" means "current env of httpGate", right?
<m_mans> yes, I mean not to change config file, but to copy parent env in httpGate.c, what do think?
<Regenaxer> I think this is a good idea
<m_mans> yeah, just current env
<Regenaxer> I will do that
<Regenaxer> great
<m_mans> good, thanks! I hope this will help to some non-English users in future
<Regenaxer> right
<m_mans> httpGate will be a little more complicated ;)
<Regenaxer> Not at all I think
<Regenaxer> simply set some more variables before starting the application
<m_mans> You can't use static size array then
<m_mans> I mean in struct definition
<Regenaxer> yes
<Regenaxer> now it is simply 4
<Regenaxer> I must investigate
<Regenaxer> also how to find the whole env in C
<Regenaxer> Not now, have some duties today
<Regenaxer> Or, we just add a single one, LANG
<Regenaxer> I think most are not needed or even overwritten anyway
<m_mans> yeah, we can just add LANG. Simplest way
<Regenaxer> right
<m_mans> otherwise we need much more work to copy all curent env pointers
<Regenaxer> Yep
<Regenaxer> Most are never needed
<Regenaxer> Cool, that's easy
<Regenaxer> Will do it soon
<Regenaxer> OK, did it
<Regenaxer> Can't test on my production server now, it is too busy
<Regenaxer> m_mans: Can you test easily?
<m_mans> yes, I can
<Regenaxer> :)
<Regenaxer> The change was simple, not much that can go wrong I presume
<Regenaxer> In any case a very useful improvement! Saves work in the application
<Regenaxer> Thanks for investigating this, m_mans!!
<m_mans> np! Give me some time, I'll test it
<Regenaxer> No hurry
<Regenaxer> any time
<m_mans> Regenaxer: I think getenv() returns only value part
<Regenaxer> oh!!! Right
<m_mans> not tested
<Regenaxer> oops :)
<Regenaxer> Moment
<m_mans> np
<Regenaxer> (not good doing too many things at the same time ;)
<m_mans> nowadays I'm diving into C things, I mean also that libaio :)
orivej has quit [Ping timeout: 268 seconds]
<cess11> Good morning.
rob_w has joined #picolisp
rob_w has quit [Changing host]
rob_w has joined #picolisp
<Regenaxer> Good morning cess11
<Regenaxer> m_mans: Next version is out. Can you take a look again?
<m_mans> moment
<m_mans> nice, it works!
<m_mans> thanks again!
<Regenaxer> Cool!
<Regenaxer> Thant to you for finding it!
<aw-> hmmm
<aw-> i don't think you should add LANG
<Regenaxer> oops
<Regenaxer> why not?
<aw-> every OS defines it on their own
<Regenaxer> yes
<aw-> if you do that, you will possibly break something
<Regenaxer> thats what we do
alexshendi has quit [Ping timeout: 248 seconds]
<Regenaxer> We inherit it
<Regenaxer> Until now (sys "LANG") was NIL
<Regenaxer> now it is inherited from the env of httpGate
<aw-> no
<aw-> $ pil
<aw-> : (sys "LANG")
<aw-> -> "C"
<aw-> :
<aw-> oh... in httpGate?
<Regenaxer> We are talking only about httpGate
<aw-> haha sorry, looks like i skipped that part ;)
<Regenaxer> changed only src/httpGate.c
<Regenaxer> np :)
<Regenaxer> In an application started by httpGate it was NIL
<aw-> because missing env..
<Regenaxer> env was there, but no LANG
<aw-> what will you set it to?
<Regenaxer> To whatever it is currently
<aw-> oh ok
<aw-> good
<Regenaxer> Not sure where it comes from, eg. init.d or root
<aw-> maybe /init or /sbin/init
<aw-> or whatever comes after that
<aw-> usually it's quite early
<Regenaxer> T
<aw-> and then possibly in $HOME/.profile or who knows
<Regenaxer> I start httpGate usually in /etc/rc.local
<aw-> haha i don't know why my LANG="C"
<aw-> that's so stupid
<Regenaxer> you need some jp_JP..?
<aw-> no, en / UTF-8 is fine
<Regenaxer> ok
<Regenaxer> Locale stuff is a mess in *nix
<aw-> yeah
<aw-> i don't fully understand it either
<Regenaxer> me too
<Regenaxer> even worse is terminal stuff
<aw-> oh yeah, i guess LANG="C" is a default basic value for Linux
<Regenaxer> all that mess with termcap and terminfo
<Regenaxer> nobody needs any longer
<aw-> agreed
<Regenaxer> optimized for slow screen and cursor updates
<Regenaxer> In vip I ignore it mostly and simply update all every time ;)
f8l has quit [Ping timeout: 264 seconds]
<beneroth> Good morning Regenaxer, aw- , m_mans
<beneroth> wow, impressing find, m_mans
<beneroth> good improvement
<Regenaxer> Hi beneroth
<tankfeeder> does anyone use vim+syntax highlight for picolisp ?
<tankfeeder> buildin is ugly.
<tankfeeder> not usable.
<Regenaxer> I use only very minimal
<Regenaxer> only comments iirc
<cess11> 'pp and standard Debian grey in my case.
<cess11> Not sure what would be nice with picolisp code.
<tankfeeder> i want try create new i would like myself.
<cess11> Sounds good, I'll try it if you do.
f8l has joined #picolisp
<Regenaxer> I think that highlighting symbols is nonsense in Lisp
<Regenaxer> There are no "keywords"
<Regenaxer> Meaning depends on context
<tankfeeder> yea, i know.
<cess11> Yeah, I'm also unsure if and what would work.
<Regenaxer> I don't use vim for Pil code anyway - what is in the builtin?
<cess11> Perhaps changing from line to line to make them more easily discernible or making parentheses more colourful might be OK.
<beneroth> I made once a syntax highlighting for nano editor, found it helpful. yellow for parens, blue for builtins, violet for classes.
<beneroth> the emacs picolisp-mode has syntax highlighting, but it doesn't know some of the builtins :)
<beneroth> I don't think it is about differing builtins from user functions, but with syntax highlight you have a quickly indicator if you made a stupid little typo
<beneroth> bbl
<Regenaxer> In Vip I highlight comments cyan
<Regenaxer> and control chars red
<Regenaxer> and I underline transients
<Regenaxer> The latter is useful to detect non-terminated strings
<Regenaxer> (happens often if \" is in strings)
<cess11> T
<cess11> My most common mistake in the REPL, forgetting closing ".
<Regenaxer> In the REPL you can (load "@lib/tsm.l") to get a similar underlining
<aw-> syntax eh
<cess11> Regenaxer: I'll take a look, thanks.
<Regenaxer> Yep. Lisp has almost no syntax :)
<aw-> here's mine
<aw-> it's not perfect, but it works fine for me
<aw-> recently switched to Dark, was Light for the last couple years
<Regenaxer> BTW, PilBox now works on Arm32!
<Regenaxer> I will write something up now
<Regenaxer> (uses emu though)
<aw-> Regenaxer: great! do you publish a changelog for PilBox?
<aw-> i'm still using the one from initial release
<Regenaxer> At the moment I have no change log
<Regenaxer> only the release texts on google play
<Regenaxer> I commented each release there
<Regenaxer> So the last two say "Architecture Plugin support"
<Regenaxer> Could also support other arch like x86-64 or ppc64 in the future
<aw-> but the old comments disappear after new release
<Regenaxer> They are still there in the play console, not sure if findable in the store
<aw-> perhaps you can keep the old comments?
<Regenaxer> Probably not
<aw-> no they are not
<aw-> unless it's mirrored by a site like apkmirror, there's no way to retrieve older versions
karswell has joined #picolisp
<Regenaxer> So right, we need a ChangeLog in the future
<aw-> would be useful, many apps just retain the old changes in the "What's New" section, one line per version
<aw-> if that's easier for you
<aw-> or something similar to http://software-lab.de/doc/ChangeLog
<Regenaxer> I'll go like in pil
<Regenaxer> yes, exactly
<aw-> i prefer that ;) i don't even have google play store on my phone
<aw-> thanks
<Regenaxer> yeah
<Regenaxer> and the changes are more fine-grained. File level
<aw-> ^5
<m_mans> aw-: nice picture!
<m_mans> I still have no strict preference about editor for lisp. I use mostly notepadqq, vim sometimes
<m_mans> aw-: what about pilIndent in Sublime? Is it possible?
<aw-> m_mans: no clue, i think i created this a while back.. just used an existing syntax Lisp highlighter and modified for PicoLisp
<aw-> ah yes, it was called 'Lisp'
<aw-> never heard of pilIndent
<cess11> http://picolisp.com/wiki/-A263.html?*Menu=+0&*Tab=+1&*ID=&*ID=$login
<Regenaxer> Better this link: http://picolisp.com/wiki/?prettyprint :)
<cess11> Agreed, didn't look at the URL until I pasted it, bad habit.
<cess11> beneroth: If you haven't seen it https://www.youtube.com/watch?v=G_eYTctGZw8 might be of some use for you.
<cess11> Lecture on 'Production Prolog' from Strange Loop.
<aw-> ok for pilIndent.. it can probably be used in Sublime Text, but I wouldn't know how
<tankfeeder> nasty
<tankfeeder> i should remove Nth element on every loop
<tankfeeder> sieve-like way doesnt work.
<anjaa> lo
<Regenaxer> Working with (make (for (L Lst L (nth L <n>)) (link (car L)))) ?
<m_mans> I would be happy to have more such video, but from Regenaxer :))
<m_mans> about PicoLisp in production
<m_mans> sadly I can't pay for it because of exchange rate (RUB -> EUR) :)
<Regenaxer> hmm, I'm very bad at making videos. Tried for TermuxPentiPicolisp but gave up
<m_mans> you just need an operator with smartphone
<m_mans> then you could delegate to someone task of combining raw video with screencast
aw- has quit [Quit: Leaving.]
<tankfeeder> i need nth version which counts on non-NILs
<Regenaxer> Hmm, 'seek' or 'for' (probably 'for')
<Regenaxer> or seek?
<Regenaxer> (seek '((L) (when (car L) (=0 (dec 'Cnt)))) Lst)
<tankfeeder> checking
<tankfeeder> works.
<Regenaxer> cool
<tankfeeder> core of task is ready
<tankfeeder> rest are nasty too
<Regenaxer> Looks very good
freeemint_ has joined #picolisp
<freeemint_> hello
<Regenaxer> Hi freeemint_
<freeemint_> I got a decentish vm now
<freeemint_> and lot's of ideas
<freeemint_> what would you think about a 'server equivalent for text based interfaces?
<Regenaxer> The current gui works perfectly in text browsers (w3m, lynx, links2 etc.)
<Regenaxer> So I would not care
<freeemint_> ok
<Regenaxer> Take a look at @lib/scape.l
<Regenaxer> you can interface a non-browser user client with thaw
<Regenaxer> that
<Regenaxer> There is a Wiki article about scape iirc
<freeemint_> no search results
<freeemint_> oh i did misstype
<Regenaxer> my fault, I wrote "scape"
<freeemint_> but i had the source in front of me
<Regenaxer> I meant "scrape"
<freeemint_> well shared blame is half the blame
<Regenaxer> :)
<freeemint_> i am a little rebelious my life is full of gui that i want to develop pure tty-interfaces recently
<Regenaxer> good!
<freeemint_> Another question: Is there any interest in an LDAP interface for (a subset of) the picolisp DB?
<Regenaxer> I think I wrote one once many years ago. LDAP has an API, was very simple if I don't mix up some memories
<Regenaxer> It was at least 20 years ago
<freeemint_> We have an LDAP client but an LDAP server
<freeemint_> oh so you are talking about something else
<Regenaxer> you mean client or server?
<Regenaxer> It was server here
<freeemint_> ah i thought you refered the rosetacode ldap picolisp cline
<freeemint_> I am thinking about writing a server
<Regenaxer> ah, no, I forgot that there is something in rosetta
<freeemint_> so much code
<Regenaxer> in rosetta it is a client
<Regenaxer> just a native call
<freeemint_> i know
<freeemint_> so much code was a general statement.
<Regenaxer> true
<freeemint_> it is hard to have an overview over all of that.
<freeemint_> Maybe a Karteikartenlernsystem would help to remember :D "Learn picolisp 15 minutes a day"
<Regenaxer> hihi
<tankfeeder> LDAP client
<Regenaxer> T
<freeemint_> No seriously. You could sell a "Learn Picolisp" set. which contains Karteikarten to learn any function, a few hundered pages of intro, a few tasks and a few sample solutions.
<freeemint_> Oh and a cd with a binaries for picolisp. :D
<Regenaxer> No, nobody wants to *learn* PicoLisp (or any other thing), so nobody would buy
<Regenaxer> People dont want to learn anything
<beneroth> I do
<Regenaxer> Just click somewhere
<Regenaxer> sure
<freeemint_> Oh then i am not a people.
<Regenaxer> right
<freeemint_> tankfeeder: Would yoube interested in digital or physicall flashcard to learn
<tankfeeder> nope
<tankfeeder> i have my own way
<freeemint_> imporve your picolisp by knowing more functions?
<freeemint_> ok
<freeemint_> how does htat way work?
<tankfeeder> i just coding everyday
<freeemint_> a question about scrape.l
<freeemint_> it calls a function called 'client.
<freeemint_> Where can i learn more about it
<beneroth> (show 'client)
<Regenaxer> (vi 'client)
<beneroth> then you see where it is defined
<Regenaxer> beneroth :)
<Regenaxer> Or first (pp 'client)
<Regenaxer> Well, you must start with @lib/http.l for that
<freeemint_> scrape does not load anything but client is not in doc
<freeemint_> ahhh
<Regenaxer> My standard start is
<Regenaxer> exec /data/data/com.termux/files/home/pico/pil @lib/http.l @lib/xhtml.l @lib/form.l @lib/too.l @env.l "$@" +
<Regenaxer> it is a script in ~/bin/p
<Regenaxer> So I always only do $ p
<freeemint_> that saved you some letters
<Regenaxer> yep :)
<Regenaxer> Of course /data/data/com.termux/files/home/pico/pil is different for you
<Regenaxer> just 'pil' is fine
<Regenaxer> env.l is private, loads @lib/vip.l
<freeemint_> Regenaxer: Are you somewhat curious about the centriq 2XX0 server processor series by qualcom?
<Regenaxer> Not at all
<freeemint_> why not?
<Regenaxer> Why should I?
<freeemint_> arm64 server cpus
<freeemint_> as powerfull target for pil-arm64-linux
<Regenaxer> I rent my server by a hoster, an no hoster I saw offered Arm servers
<Regenaxer> Yes, would be nice, but not mission critical
<Regenaxer> If I had the choice, I would use them
<freeemint_> the centriq server are started getting to shipped to selected customers in half a year they may be available for normal custoers
<freeemint_> these cpus host up to 48 cores with up to 3/4 of a TB of RAM.
<freeemint_> One cpu 40,44 or 48 cores
<freeemint_> around 2 GHZ sustained clock
<freeemint_> ofcourse pil does not need that much RAM.
<Regenaxer> T, and I also have no customer currently needing that
<freeemint_> (or to put in other terms i would like to see a picolisp server which uses that much RAM productivly)
<Regenaxer> yes :)
<freeemint_> just imagine what insane stuff you could do inside that much RAM
<freeemint_> hundered thousands of self modifying actors with a GB of code.
<freeemint_> i have a hard time grapsing that
<freeemint_> having a VM host with all PilOS (with network driver) running on it would be interesting too.
<freeemint_> anyhow i am kinda exited about the first real arm64 server family
<freeemint_> back to coding
<Regenaxer> ok :)
<cess11> If you have a machine for testing you could write a small class and a few messages/methods for passing around numbers or text, then do things like 'need on it to see what large amounts of objects will work like in your environment.
<cess11> Another way is writing a CSV import and use some large, free dataset and write some routines for checking and passing around values.
<cess11> ACLED or whatever.
<freeemint_> cess11: Can you be a little more detailed
<freeemint_> (with the small classes thing)
<cess11> I was thinking something like a '(dm T that sets some pseudorandom dummy values in a few fields, maybe one for creation time and one for last 'check> and a couple for relations to other objects, perhaps 'up/'down or 'bigger/'smaller.
<freeemint_> ah ok
<freeemint_> i am not quiet there yet
<cess11> Then have a 'check> method that first looks at values in 'This, then compares to values in some other object and the result sets some relation.
<cess11> Something like that, perhaps a more compact model with just one field, and the result would be a db that sorts itself sort of.
<Regenaxer> I think (+List +Link) should be (+List +Joint) ?
<cess11> Yeah, probably, now that I think of it.
rob_w has quit [Quit: Leaving]
<freeemint_> Regenaxer: What are the limits to UPD so you do not get an UDP overflow
<Regenaxer> It uses a buffer or 4096 bytes
<Regenaxer> bigger pieces give an error
<Regenaxer> (equ UDPMAX 4096) # UDP buffer size
<Regenaxer> src64/defs.l
<freeemint_> i can put over 1407 short numbers does that make sense?
<Regenaxer> yes
<freeemint_> Do i need to recompile to get a bigget buffer?
<Regenaxer> yes
<freeemint_> That is not very picolispy
<Regenaxer> true
<freeemint_> actually that is an problem stemming from array (for some defintion of array)
<Regenaxer> ?
<freeemint_> buffer <=> array
<freeemint_> Why did you decide not implement unlimited udp buffer?
<freeemint_> (jus curious)
<Regenaxer> I think it is not necessary
<Regenaxer> udp is for short packets
<Regenaxer> Makes no sense to send lots of data, as it is unreliable
<Regenaxer> IIRC the UDP packets have a max size too
<Regenaxer> Perhaps 32768
<freeemint_> than that would be a good limit. I change it
<Regenaxer> or BUFSIZ, or 4096?
<Regenaxer> First find out
<freeemint_> ok
<Regenaxer> for your system
<Regenaxer> I don't remember the details
<Regenaxer> Why don't you use TCP?
<freeemint_> 65507
<freeemint_> well i wanted to try out udp
<Regenaxer> ok
<freeemint_> Also there is no tcp function but an udp function
<Regenaxer> you use 'listen' and 'connect'
<freeemint_> would you i have to modify the server buffer size too?
<Regenaxer> Which server?
<freeemint_> picolisp's (upd (port T 8888))
<Regenaxer> It is the same function
<freeemint_> they use the same buffer?
<freeemint_> *buffer size
<Regenaxer> of course - how else?
<Regenaxer> as it is the same :)
<freeemint_> Have you tested how 'udp reacts when it get's an packet longer than it's buffer?
<Regenaxer> not tested, but it is cut off as the receiving function takes a size arg
<Regenaxer> cc recv(E S UDPMAX 0) # Receive message
<Regenaxer> So all pil instances should be built with the same size
<freeemint_> would the buffer overflow into something important?
<Regenaxer> yes
<Regenaxer> you get truncated data
<Regenaxer> If sender and receiver use the same size, it can't happen
<freeemint_> so if you have an open 'udp port any malicously crafted packet can make an buffer overflow possibly leading to remote code execution?
<Regenaxer> Better send many small packets than a large one
<Regenaxer> no
<freeemint_> good why not?
<Regenaxer> no buffer overflow
<Regenaxer> cc recv(E S UDPMAX 0) # Receive message
<freeemint_> would the buffer overflow into something important? yes
<Regenaxer> no!
<freeemint_> that is what you wrote. but i get you
<beneroth> the yes belongs to the "So all pil instances..."
<Regenaxer> unless 'recv()' is badly implemented
<Regenaxer> no
<beneroth> T
<Regenaxer> it truncates
<Regenaxer> freeemint_, think what it does!
<freeemint_> that is a nice word. cut an ignore the rest would sound more honest
<freeemint_> *truncanate is a nice word
<beneroth> it is an english word
<Regenaxer> not same meaning4
<Regenaxer> ?
<freeemint_> ok
<Regenaxer> cut = truncate
<freeemint_> i think i get what you want to say
<Regenaxer> ignore is the result
<freeemint_> no need to debate about words
<Regenaxer> What is not received, must be ignored :)
<Regenaxer> ignorare = unknowing
<freeemint_> What is not recieved that is not.
<freeemint_> To recieve or not to be.
<Regenaxer> yep
<freeemint_> *to be recieved or not to be
<freeemint_> How does UDP serialize lists?
<Regenaxer> PLIO
<Regenaxer> 'udp' speaks *only* PLIO
<freeemint_> ah
<freeemint_> PLIO does do cyclic structures?
<Regenaxer> yep
<freeemint_> cool
<freeemint_> so you could serialize the complete graph of cells of one process and send it another machines?
<Regenaxer> yep
<freeemint_> (file descriptors would cause problems though)
<Regenaxer> including DB objects
<Regenaxer> right
<Regenaxer> they have no meaning on other machines
<Regenaxer> Still, I use TCP for that
<freeemint_> I understand why
<freeemint_> the network here is very reliable
<Regenaxer> perhaps, but other processes might not be ready
<freeemint_> ah
<Regenaxer> I'd use udp only for single-shot messages
<Regenaxer> no reply, no matter when lost
<freeemint_> ok. i see
<freeemint_> that is why there are no udp file descriptors?
<Regenaxer> like a status broadcast
<Regenaxer> yes, no persistence
<freeemint_> *file descriptors for upd ports
<freeemint_> ok
<Regenaxer> fire and forget
<freeemint_> How do i plio into a file descriptor?
<Regenaxer> Or you build some protocol on top of UDP
<Regenaxer> but then you get TCP
<Regenaxer> A TCP socket?
<freeemint_> Nah you could not care about inoder delivery
<freeemint_> guarranted delivery but order is irrelevant
<freeemint_> you can do that with udp but not with tcp
<Regenaxer> I use sse/replica for such things
<cess11> Most likely you'd write to '(out FD or something like that.
<Regenaxer> eg mobile App -> server
<Regenaxer> yes
<Regenaxer> (out Socket (pr Lst))
<freeemint_> ah
<Regenaxer> but bin/ssl has the advantage of queuing
<Regenaxer> if the connection is offline
<Regenaxer> or the server down
<freeemint_> you could do that too
<freeemint_> anyhow udp exist for a reason
<Regenaxer> efficiency
<freeemint_> and tcp exists for simplicity
<Regenaxer> But with a protocol you lose that
<Regenaxer> no
<cess11> Reliability.
<Regenaxer> TCP has overhead
<Regenaxer> yes
<Regenaxer> handshaking
<Regenaxer> takes time
<freeemint_> simplicty for the programmer
<freeemint_> TCP exist to abstract
<Regenaxer> UDP is there if you do NOT need that
<Regenaxer> single-shots
<cess11> Depends which is simpler in a particular use case.
<freeemint_> T
<Regenaxer> In pil, both are at the same difficulty
<Regenaxer> 'udp' is simpler, as it is eg. 'connect' plus '(out (pr ..'
<freeemint_> T
<cess11> I played some with UDP in pil earlier but quickly got bored, it's usually more convenient to just do TCP sockets or use external tools instead (in my case usually 'w3m or 'wget).
<cess11> Once you have communication up with UDP you probably want more than it can handle easily.
<beneroth> there are some udp-based protocolls in game dev, but yeah that just ends up simulating TCP on top of UDP. some think it is faster than real TCP, most benchmarks I saw said something different.
<Regenaxer> or Voip
<cess11> Security is NIL so broadcasting status information or something would be feasible but I have a hard time finding more involved UDP use cases.
<beneroth> voip yes, but with voip and video you don't care about some lost messages in between.
<Regenaxer> doesn't matter if voip pieces are lost
<Regenaxer> T
<freeemint_> What makes TCP interesting for game dev is not higher speed but lower latency
<beneroth> you mean UDP
<beneroth> and latency is a part of the speed limit
<freeemint_> *UDP , yes
<cess11> I think Wireguard applies UDP instead of TCP for this reason.
<cess11> But I just skimmed through the whitepaper the other day.
<freeemint_> for multiplayer it is very important that the server works with all information he could have without having to wait for a lost packet.
<freeemint_> (as he would have to in TCP)
<cess11> Depends on whether correct information is crucial to the players.
<cess11> And what kind of world is simulated and how.
<beneroth> in theory. in practice most game servers are much worse implemented than expected.
<cess11> But typically, yes.
<beneroth> T
<cess11> Hardware is generally cheap today so throughput can be bought if the system is somewhat contained.
<beneroth> T
<cess11> For WoW applications there wouldn't be possible though, they need to optimise protocols and predictions, I think.
<cess11> *that
<freeemint_> i would not call it cheap quiet yet but it is cheaper than it was in the past
<cess11> Usually cheaper than programmer hours.
<cess11> But you're right, it isn't always the case.
<freeemint_> I would call it cheap if a 10 year old could rent a server farm to host a multiplayer game from a years saving a year long.
<cess11> No problem, I'd say. A year of VPS rental is about a hundred euros for a couple of cores and some GB RAM.
<cess11> So eight euros a month or something like that would suffice.
<freeemint_> Kids these days have 8€ a month when they are 10?
<cess11> Not sure if this is a common allowance level though.
<freeemint_> let me look it up
<cess11> Don't know, but I don't think it's common for ten year olds to run MMORPG:s or the like either. Perhaps Minecraft.
<cess11> Didn't write a tiny this week. If you guys have ideas for some I'd be happy if you shared them.
<freeemint_> T but if he could we would be at a point where i would call it cheap
<freeemint_> also the german recomendation for 10 y.o. is 16€
<freeemint_> but i was not talking about german children but children in general. (including development countires)
<cess11> Then our hypothetical kid could run both a botnet C&C and a MMORPG server and have some extra.
<freeemint_> or german child
<cess11> Right. Still, it would be about five-ten hours of programmer time per year, renting this hundred euro machine.
<cess11> Not much work done, unless it is fairly easy to do.
<freeemint_> well in south africa its 12€
<freeemint_> it can not find data for other countries
<freeemint_> stoping to search
<cess11> More Prolog that looks good: http://www.ida.liu.se/~ulfni/lpp/
<cess11> It uses formal logic notation, if that makes a difference.
<freeemint_> the problems are visualized nicely too
<joebo> cess11: thanks for the link to the strangeloop video
<joebo> I'm watching it now
<freeemint_> joebo: which strange loop?
<freeemint_> video
<cess11> freeemint_: 'Production Prolog', I think. Can fetch the link, have it somewhere.
<joebo> freeemint_: 05:38<cess11>
<joebo> Show YouTube video beneroth: If you haven't seen it https://www.youtube.com/watch?v=G_eYTctGZw8 might be of some use for you.
<joebo> that pasted strangely sorry
<cess11> The URL looks good, the rest doesn't matter much.
<joebo> I recently had to use google or-tools ... somewhat related
<joebo> for a linear programming task at work
<joebo> it could probably be restated as a prolog / logic programming task... but would likely be slower to solve
<joebo> picat is a neat language I've tinkered with too
<cess11> Both look interesting, thanks.
<freeemint_> That looks very interesting.
<cess11> Seems like https://developers.google.com/optimization/introduction/using is a pretty good writeup on this kind of problem solving.
<cess11> And the Picat book looks nice too.
<freeemint_> question about http.l 'server (loop (setq *Sock (listen P)) (NIL (fork) (close P)) (close *Sock)) Why is the socket closed by the parent process every time a connection is opened?
<freeemint_> Is it because the parent process is not supposed to run out file descriptors and that way the child s control in the of the connection witht he user?
<cess11> Because the other process is now talking to the client, I'd guess.
<freeemint_> ok
<freeemint_> so it as i thought
<cess11> pr
<cess11> Wrong window, apparently.
<Regenaxer> :)
<beneroth> thanks cess11 and joebo
<beneroth> for the links
freeemint_ has quit [Ping timeout: 260 seconds]
<cess11> There are some useful tips in http://www.dai.ed.ac.uk/groups/ssp/bookpages/quickprolog/quickprolog.html too, don't know if it's been shared here yet.
<beneroth> I think it hasn't. thanks.
orivej has joined #picolisp
rgrau has joined #picolisp
freeemint_ has joined #picolisp
<freeemint_> right or wrong: with 'tell i can execute any code in a child process
<freeemint_> (of which i know the PID)
<Regenaxer> right
<freeemint_> i plan to do some funky stuff
<Regenaxer> as always ;)
<freeemint_> I want to overwrite an old file descriptor with a new file descriptor which is younger than the child process itself. Does that work?
<Regenaxer> What is "overwrite a file descriptor"?
<cess11> I think you could just 'setq the new to the symbol you're using.
<freeemint_> T
<Regenaxer> an fd is a number
<freeemint_> yes
<cess11> But I'm also unsure what you mean.
<cess11> You could use a global variable to hold a list of cons pairs that are transient symbols and PID:s.
<freeemint_> Create child process with fd 1. wait . create fd2 in the parent process and pass it to the child process. Does the child process know what fd2 means?
<Regenaxer> no, I don't think so
<freeemint_> ok i will try it out
<Regenaxer> it does not have this file open
<freeemint_> ok i will not try it
<Regenaxer> fd 2 may be another file in that process
<freeemint_> damn
<Regenaxer> the number is just an index into file structures for that process in the kernel
<Regenaxer> What do you want to do?
<freeemint_> and the child process has it's own (copy of the) data structure
<cess11> Perhaps 'pwd is what you're after.
<freeemint_> It is not.
<Regenaxer> not the child, the kernel
<Regenaxer> the child has just the number
<freeemint_> The kernel had another data strutre for the child process?
<freeemint_> *has
<Regenaxer> open files are *inherited* to children
<Regenaxer> yes
<freeemint_> but new files are not synced
<Regenaxer> process table or so
<Regenaxer> synced?
<freeemint_> parent aquires a new file -> same fd gets set to the same file in the child process to
<Regenaxer> not aquires
<Regenaxer> opens
<freeemint_> *opens
<Regenaxer> The child may it open too
<freeemint_> the file is a sicket descriptor
<freeemint_> *socket
<freeemint_> The idea is that the when the user looses connection but would be able to reconnect before the socket expires he should get the same session and child porcess he worked with before
<Regenaxer> Hmm, looses connection you say. Then the socket is useless
<cess11> What does lose connection mean?
<freeemint_> The users opens a new connection while the old socket is still active an he gets reconnected to the old socket he used before
<cess11> Usually this entails reauthentication, or an open socket anyone could connect to and be authenticated.
<freeemint_> yes it does
<freeemint_> cess11: I thought about that to and i am impressed you realized the security problem so quickly
<tankfeeder> downloading picat book from libgen.io
<freeemint_> hehe
<freeemint_> Regenaxer: Do you have any idea
<freeemint_> afk for 5 min
<cess11> tankfeeder: It's also on the web page, I think, or maybe you found another one.
<cess11> I meant this one, show off the language against lots of puzzles and problems.
<Regenaxer> sorry freeemint_, no idea
<tankfeeder> cess11: ok
<Regenaxer> Sounds like you think about a solution before we know the problem
<Regenaxer> I recommend Steven's book
<cess11> Which one is that?
<Regenaxer> Advanced programming in the Unix environment
<Regenaxer> the standard Unix bible
<Regenaxer> Richard W. Stevens iirc
<cess11> freeemint_: Why would you want to use IPC for handling the same file with separate processes? If there isn't a third non-pil process also using the file it seems overly complicated.
freeemint_ has quit [Ping timeout: 260 seconds]
<cess11> :)
<Regenaxer> oops
<cess11> Regenaxer: Ah, thanks.
<Regenaxer> :)
<Regenaxer> I'm not sure about the exact title, I have it downstairs
freeeimt__ has joined #picolisp
<freeeimt__> sorry had to do something "right now"
<cess11> freeeimt__: It's OK.
<cess11> Why would you want to use IPC for handling the same file with separate processes? If there isn't a third non-pil process also using the file it seems overly complicated.
<freeeimt__> oh and if my sokcet was implemented i would be able to appear as freeemint_ even though i disconnected the internet
<cess11> There's mosh.
<freeeimt__> because they are not files but sockets
<cess11> But you want a tricky authentication for that kind of session persistence, it will be hard to do or FFI probably.
<cess11> I would just use the browser, it is specialised on these kinds of things.
<freeeimt__> it is not tricky
<freeeimt__> The other possibility is to dump all process state in to the database and spin up a new process with that state but that is even more ugly
<freeeimt__> other idea i keep the old process running and pipe all stuff regarding filedescriptor in to the older process can lead to long, long chains of piping processes
<cess11> The process should keep db objects anyway, so you get to keep what you need for a new or restarted session that way.
<freeeimt__> how do i keep sockets?
<cess11> You really, really don't want to do classic file I/O for this, much more convenient with the pil db.
<cess11> Don't, renegotiate authentication instead.
<freeeimt__> how do i dump the complete internal state of the process?
<cess11> Not sure if there is a mechanism for that, don't think so.
<freeeimt__> There is none
<cess11> You would rather use objects and 'be. '
<cess11> *,
<cess11> *.
<freeeimt__> that might be feasible
<cess11> But you could do something like the state dumps of some other lisps if you wanted to, the built-ins will be around in a new process and the rest could be saved in objects or files.
<cess11> You would have to design it yourself, though, unless I've missed some function for this.
<freeeimt__> that would require that the application does only intercat with the databank and no other files
<cess11> Why?
<cess11> You could keep a 'tmp somewhere with what you need to start over in case of a crash or lost connection.
<cess11> Authentication will still be the hard part.
<freeeimt__> these files are better kept in the database
<freeeimt__> nah just login again
<freeeimt__> prompt user there is an old session still running and let him choose
<cess11> I think you want something like a +Session class besides the +User and some other things from @lib/adm.l.
<cess11> Might even be included there, I
<freeeimt__> it is as hard as to authenticate an user
<cess11> 'm not sure.
<freeeimt__> Why are you unsure?
<cess11> Haven't used it much yet.
<cess11> Just copied the uses in the demo and family apps, basically.
<cess11> You could hook up 'new! to the login procedure and keep track of it that way, just inherit or define a suitable class for it and start working out the details.
<freeeimt__> that actually worls
<cess11> Most likely.
<freeeimt__> i do not like how my code would look then
<Regenaxer> Too complicated
<freeeimt__> What is to complicated
<Regenaxer> your code?
<freeeimt__> there is no code yet
<Regenaxer> Conjunctive: "how my code would look then"
<freeeimt__> ah
<freeeimt__> then my code is empty
<Regenaxer> thats best
<Regenaxer> empty code is error-free
<freeeimt__> and do behave as specified
<cess11> Solving a problem without writing new code is always preferable.
<Regenaxer> T
<freeeimt__> I would really enjoy to have persistent sessions without having to acces every var by ':
<cess11> But compared to using regular files pil classes are quite a bit more powerful and convenient, though it might be clumsy. Perhaps keeping it in 'be logic would be more elegant but then persistence needs to be solved separately or rely on the process staying alive.
<freeeimt__> I do not want to write my application in pilog
<cess11> I don't think you'll need any.
<freeeimt__> You said 'be logic
<cess11> Well, I mentioned it.
<freeeimt__> ok
<cess11> My suggestion is classes, though you could probably do what you want in other ways.
<cess11> You could have several session classes, representing different session states. Say one that is used for lost connections, one for active, one for closed and one for administrating something specific.
<cess11> Maybe your central parent process checks childrens connectivities regularly, then it could change what class the active session object belongs to in the child.
<freeeimt__> I am afraid of losing control of the order of execution which is a natural consequence of the object system
<Regenaxer> I would not fear so
<Regenaxer> (lose control over order of execution
<Regenaxer> )
<Regenaxer> This is not a problem of objects, but of asyncronous events, which every non~trivial system has
<cess11> Yeah, was about to write that this happens whenever remote, autonomous users enter the picture.
<Regenaxer> T
<cess11> And they are already there if you want to build a system for session persistence over lost TCP connections.
<Regenaxer> I deal with unreliable connections all the time, in my Apps
<Regenaxer> mobile devices seldom have stable connections
<Regenaxer> As I said ssl -> replica is the key
<Regenaxer> I use custom-versions of the bin/replica script as functions on the server
<freeeimt__> in my prefered model the execution is seperated and they act on a shared database sccording to their own internal state which is private
<Regenaxer> and the mobiles send query requests for the other direction
<cess11> As in local symbols?
<freeeimt__> yes
<cess11> Sure. It will work fine.
<freeeimt__> But i can not redirect new connections in to old processes
<Regenaxer> it works
<cess11> Sure you can.
<Regenaxer> new connections are new
<Regenaxer> I do that all the time
<Regenaxer> all asynchronously
<freeeimt__> How?
<Regenaxer> ssl -> replica to mirror the DB on the device to the central db
<freeeimt__> We came to the conclusion that i can not pass new sockets in to old processes
<Regenaxer> The main process on the central db queries those mirror dbs (read-only)
<cess11> But you can tell a new connection to connect to another port and resume what it was doing there.
<Regenaxer> Changes are put in a queue as rpc commands in the hub
<Regenaxer> and the mobiles fetch from this queues
<Regenaxer> so you have a circular flow
<Regenaxer> no conflicts or race conditions
<freeeimt__> You mean that the parsing of the input of the user does not happen in the user associated process but an central process which then hands information to the processes?
<cess11> Authentication will be the problem with reusing ports and processes.
<freeeimt__> *central process -> hub
<cess11> So either you do it centrally or on a child process on its own port that handles re-login.
<freeeimt__> different ports? that is ugly.
<cess11> Why?
<freeeimt__> Because a service should be available under one port
<cess11> So? Proxy it.
<cess11> It's what httpGate is for.
<cess11> Or nginx or
<Regenaxer> right
<freeeimt__> I can not proxy a raw socket
<freeeimt__> or can i?
<Regenaxer> I recommend you study first what is there already
<Regenaxer> I think all your problems are solved since years in PicoLisp
<freeeimt__> httpGate requires client supplied information
<cess11> You'll have security troubles, but sure you can. Your machine knows it so your proxy can know it and proxy to it.
Regenaxer has left #picolisp [#picolisp]
<cess11> Though I think you should try to extend the demo app that comes with the picoLisp.tgz, it's quite a bit easier than trying to reinvent it.
Regenaxer has joined #picolisp
<Regenaxer> oops
<Regenaxer> I wanted to say:
<cess11> The dangers of Penti.
<Regenaxer> httpGate is designed to handle tenthousands of DB applications
<Regenaxer> each with its own port
<Regenaxer> ces
<Regenaxer> cess11, yes, exactly
<Regenaxer> The 'D' in DB
<freeeimt__> Does httpGate rely on client supplied information?
<Regenaxer> I hit Cntrl insted of Shift
<cess11> All to familiar to me now, all the involuntary ^C and ^Z.
<Regenaxer> What is client supplied information
<freeeimt__> cookies ...
<Regenaxer> yeah ;)
<Regenaxer> I never use cookies
<cess11> Cookies are for wusses and crooks.
<Regenaxer> And httpGate is not on that level
<cess11> Too easy to fake.
<freeeimt__> How does httpGate know which packet goes where?
<Regenaxer> cookies are between application and client
<Regenaxer> httpGate is just proxying
<Regenaxer> by the port
<Regenaxer> Please read the article
<freeeimt__> ah each socket is relayed in to a new port
<Regenaxer> doc/httpGateSomething
<Regenaxer> not sockets
<Regenaxer> thx cess11
<cess11> This is good reading, but you won't need it until you want SSL or several applications on the same server.
<Regenaxer> PicoLisp applications allocate a session-port
<Regenaxer> this is relayed by httpGate
<Regenaxer> server.com/123456/foo.l
<freeeimt__> i just did want to complain that http://picolisp.com/wiki/?httpgate is quiet useless
<Regenaxer> 123456 is actually a port
<cess11> Worked for me the other day when I set it up properly for the first time. What is missing from that document that should be in it?
<Regenaxer> The wiki article is not helpful, yes
<freeeimt__> oh i do want the user to need a client which implements no protocol but a raw tcp socket. So http based a few layers to high for me
<cess11> Ah, I see, wasn't the same.
<cess11> Sounds like you want a non-pil client?
<Regenaxer> I see, raw protocol wont work
<Regenaxer> httpGate only supports GET and POST
<Regenaxer> I tunnel everything through it
<Regenaxer> Also binary stuff
<Regenaxer> file downloads, RPC commands, DB replication
<freeeimt__> !stuff ?
<Regenaxer> yes, exactly
<Regenaxer> call !foo
<Regenaxer> The overhead for the HTTP header is very small
<Regenaxer> only 5 short lines iirc
<freeeimt__> ok i want to rebuild httpGate and 'server for raw TCP
<Regenaxer> What is raw TCP?
<freeeimt__> no http in between
<Regenaxer> httpGate just handles the connection of processes
<freeeimt__> for http
<cess11> Should be other proxies you could use. Doesn
<Regenaxer> does not matter what is sent
<cess11> 't nginx do what you want to?
<Regenaxer> httpGate also takes care to start processes
<Regenaxer> The firemen app is planned for 10000 DBs
<Regenaxer> each has its own port
<Regenaxer> and a mobile device somewhere
<Regenaxer> not all devices are active at one moment
<freeeimt__> httpGate is great but i still think that it works for http an not arbitrary TCP
<Regenaxer> so the DB processes are not running
<freeeimt__> sounds cool
<Regenaxer> HTTP is only to *establish* the connection
<Regenaxer> and start the DB process if not running
<cess11> If you just want some PLIO to get across httpGate will handle it too.
<Regenaxer> yes, it is all plio usually
<freeeimt__> "oh i do want the user to need no client which implements any protocol "
<freeeimt__> HTTP for *establishing* is still a protocol
<freeeimt__> i got an idea
<cess11> Either you're going for a single client or writing your own proxy, I think.
<cess11> TCP is a protocol as well.
<freeeimt__> writing your own proxy
<freeeimt__> T
<cess11> Yeah, sounds like you want some custom type of connection.
<Regenaxer> yes, a protocol to tell which port to relay to, which process to start, and which resoure (URI) to call
<Regenaxer> you need such thing
<freeeimt__> That would be a prompt to ask for a login
<cess11> The prompt would be delivered by your protocol and proxy.
<cess11> Or straight to a client connecting to a port.
<freeeimt__> straight over TCP via Telnet for example
<cess11> But then your authentication starts after you've already negotiated a fair bit, which isn't a particularly good idea.
<freeeimt__> or anyother (secured ) chat baed protocol
<freeeimt__> cess11: It should no that
<cess11> TCP isn't secure, you'll need SSL.
<cess11> Or some other TLS.
<freeeimt__> Thanks your parental guidance
<freeeimt__> *Thanks for your parental guidance
<cess11> If it isn't one-way httpGate is a good start, it's easy to define how it will handle domain.stuff/application URL:s and force self signed key pairs.
<freeeimt__> I want multiple user to connect to the same port and get their seperated connections processed in seperated processes. In case a connection is lost i want that users can re-join their last session.
<cess11> Sure.
<freeeimt__> Oh and i want not to have the number of processes grow with the number of failed connections
<freeeimt__> Any idea how to do that?
<cess11> Already handled, idle connections will be pruned.
<cess11> Your problem is defining what in the session needs to be persistent.
<freeeimt__> Everything and including opened files and web connection outwards
<cess11> (rel openfiles (+List +String)) will probably do, as will something like cons pairs with IP/domain and port in a similar construct.
<cess11> *'(
<freeeimt__> ah and i want time to be preserved
<cess11> Typing is up to you, you're free to tag everything with epoch seconds.
<freeeimt__> if i do something every 12 seconds it should happen 5 times in a minute even if the user is disconnected
<cess11> Sure. Surveillance on the user, have 'co or a particular process work like some cron analog.
<freeeimt__> or 18000 times in an hour if that is still with in the time limit
<cess11> Someone will have to pay for the CPU cycles, but there's no limit in pil stopping you.
<freeeimt__> Let me repeat what your solution requires me to do.
<freeeimt__> i need to develop a representation of any external state my picolisp programm has. I need to write an simulation of my programm which behaves as if the user process would be running timing wise. I would need to assure that user processes stay seperated.
<freeeimt__> right?
rgrau has quit [Ping timeout: 260 seconds]
<cess11> At the least you need to codify what is important in a session at any given time.
<freeeimt__> That would make it harder on me later
<cess11> Compared to what?
<cess11> A bulk save of sessions will be similar, just that you figure out more things to keep track of.
<freeeimt__> If i need to codify what is important for the system to work the developer needs to be aware of all the important parts in any project that builds in the future.
<cess11> There is no self awareness or state redundancy in TCP if that's something you expect.
<freeeimt__> In short i need to reimplement the good part of an OS just to have a something that acts like a process get access to a emulation of a file descriptor a process normally would not.
<freeeimt__> *that a normal process would not have access to
<cess11> Why would you even use files for this?
<cess11> What is the third party program that only talks regular files and must succumb to the limitations of file I/O?
<cess11> Why isn't pil db, REDIS or whatever good enough for your client program or whatever it is that needs files?
<freeeimt__> some sort of dumb pipe throwing text at the user and getting text in return
<freeeimt__> My programm is some sort of dumb pipe ....
<freeeimt__> like telnet, a shell, a chat client
<cess11> That's at least two pipes.
<cess11> But you were going to use network authentication, right?
freeemint_ has joined #picolisp
<cess11> This needs to be kept track of by your application and files will not do, since they can be easily faked or need to use quite tough encryption.
<freeemint_> why two pipes?
<cess11> In and out.
<freeemint_> a pipe goes in both directions
<cess11> Right.
<Regenaxer> No, only one. You need two pipes normally
<Regenaxer> Named pipes work in two directions, but not duplex
<Regenaxer> Normal Unix kernel pipes are always 2 fds
freeeimt__ has quit [Ping timeout: 260 seconds]
<freeemint_> oh that is the solution
<cess11> Ah, so I remembered it right.
<freeemint_> i have a named pipe per user.
<cess11> But probably not the naming.
<Regenaxer> yes, for -> user
<Regenaxer> for all users to hub a single pipe is ok
<Regenaxer> if users identify in some way
<Regenaxer> otherwise a pipe *from* each user with a dedicated 'task' listening
<freeemint_> user is identified and the socket is directed into the per-user pipe
<Regenaxer> yes
<cess11> Why is details in the session state so important? Is this some financial or military application?
<freeemint_> the user may get's a server copy of the last n lines
<cess11> *are
<freeemint_> Because i can
<cess11> OK.
<freeemint_> oh adn because it is challenging
<freeemint_> *and
<cess11> I would start with listing all the things I know I will need to keep track of. Files open, buffers that should be written to files, login name, user ID, state ID, IP and MAC, and so on. Then start to break it down into groups of values and try to make an efficient separation of concerns and partial models.
<freeemint_> I do not like it that i have an additional pipe in between but it is way better than a growing chain of processes
<Regenaxer> Are not sockets better than pipes? They scale better, and processes don't need to be on the same machine
<freeemint_> sockets are better but i think i can not move sockets between processes.
<cess11> So sort them by port and host?
<Regenaxer> sockets are not relevant. process identifiers are, I use ports for that
<Regenaxer> in fact not even ports directly, but names
<Regenaxer> the httpGate config table
<Regenaxer> the names give the port, and are also the DB directory
<freeemint_> sockets are not persistent named pipes are. To get persistence i need to be able to have the authentification module give a socket to a choosen process which is identified with an user session
<freeemint_> or i could use a message queue system
<Regenaxer> as I told above
<Regenaxer> I think the whole machinery is there, you don't need to re-invent the weel
<freeemint_> But i need to realize what i am looking for
<Regenaxer> sure
alexshendi has joined #picolisp
<Regenaxer> Though you did not tell us what it is
<freeemint_> message queue systems like 0MQ
<Regenaxer> only *how* you want to do it, not *what*
<cess11> I think someone wrote bindings for ZeroMQ, should you need it rather than pil methods.
<cess11> But you don't unless you want to interface with some foreign software.
<freeemint_> I know some wrote a binding
<cess11> OK, good.
<freeemint_> I want many users to connect to one port and get authentificated and have them choose what they want and then connect them to process which does just that.
<cess11> Sure. You can extend the demo app to do this.
<freeemint_> I want a 'server for text based interfaces and i challanged myself to write/design it in a way so it is accessed as pure human readable text
<Regenaxer> afp
<cess11> But not SSH, plain text? Like a classic MUD?
<freeemint_> picolisp already has an good enough® web("html") interface i want it to speak in a new/old way
<freeemint_> like a classic MUD
<freeemint_> or a shell
<freeemint_> (which then can be set as login shell for an ssh-only-user so i get ssh security)
<freeemint_> Yes i also want to write a MUD in it later.
<freeemint_> cess11: Why are you so silent?
<cess11> I would begin with the MUD engine rather than connecting to it.
<cess11> I just got a tattoo in a classic MUD.
<cess11> As did my AFK wife, who's also my in-game wife.
<anjaa> because I rule
<cess11> T
<freeemint_> you are married?
<cess11> Yep.
<freeemint_> That is interesting
<anjaa> interesting?
<freeemint_> interesting!
<freeemint_> Is their anything more romantic than a couple visiting the same IRCs
<cess11> MUD:s are usually more of the fire and forget style rather than SSL.
<freeemint_> probably ther is
<cess11> Most likely.
<freeemint_> anyhow i find it cool
<cess11> We've got the same haircut too.
<anjaa> and a matching outfit
<cess11> Have you read the mini-MUD tutorial on lisperati.com?
<freeemint_> There are these jokes between nerdy boys. "That girl likes Star Wars - marry her" "She visits the same IRCs" just tops that
<cess11> I think it could be ported to pil quite easily and then extended for object persistence and so on.
<freeemint_> No
<freeemint_> i have not read that
<cess11> It's a bit silly and you probably already know the language constructs but it's a nice way to use symbols and relations for world development.
<anjaa> we took the same class at uni one year ago, we were feared by the other students and some of the teachers
<cess11> Wrap it in a set of classes and messages and your game is ago.
<cess11> Not sure if a-go works in english, but it's not my language so I don't care much. It's bad pidgin anyway.
<anjaa> the proudest moment in my entire life was then a friend from that course introduced us to one of her friends as 'the couple that makes people cry in class'
<cess11> Unless you already know some proper MUD code bases you could take a look at the cre introduction files on discworld.atuin.net.
<freeemint_> I am interested in writing a MUD but i would want to do that after i have my 'server for pure text running
<cess11> It won't be pure text, you'll need more on the 'inside'.
<cess11> The text is just what you write to the 'out channel or something like that.
<freeemint_> Yes naturally
<freeemint_> but 'server is what allows functions to run as webserver
<freeemint_> and i want a 'server which allows function to run as shell like thing
<cess11> It will be hard to do since you won't be able to control how it looks unless you start involving ncurses or use some protocol tiered towards MUD:s and the like.
<freeemint_> T
<freeemint_> But on the other hand i could always have web-server running which renders maps for users
<cess11> Unless a line by line interface is enough, but then your users won't be able to select earlier commands and so on.
<freeemint_> He will not be able via telnet but he will via ssh
<cess11> Yeah, but that is just a wrapper around TCP or something.
<freeemint_> which puts you in a shell and the shell can do backward ...
<cess11> You'll need to re-render the text shown in the client, which will be a fair bit of work with keeping track of what should and shouldn't be sent that usually is solved in the protocol with MUD:s.
<freeemint_> You know how htm.l makes things easier for the web designer?
<freeemint_> (in picolisp)
<cess11> Not really, I mostly do stuff in the REPL but also some development with adm.l and 'gui.
<freeemint_> Ok there are things which abstract things away.
<freeemint_> You can do the same thing for text interfaces is my claim
<cess11> Sure, but it will require some work.
<freeemint_> T
<freeemint_> But i do not think it would be much
<cess11> I'd bet ncurses or a regular MUD client with module support of some kind are the way to go.
<cess11> 'vip uses ncurses, no?
<freeemint_> i think so
<freeemint_> If my goal was to build a MUD you would be right
<cess11> The trouble is that the client needs to be prepared to show stuff in structured and elegant ways, which isn't easy once you leave markup and templating.
<freeemint_> Is it trouble?
<cess11> In my opinion, yes.
<cess11> It will take some effort and testing and patching.
<cess11> I think ncurses and the like are hard, I prefer one-line interfaces or web GUI.
<cess11> Well, sort of one-line at a time rather than ncurses and the like.
<freeemint_> If my project would be a complete success (and i won't drop it early) you will have one liner which produce nice looking ncurse
<cess11> I meant like the pil REPL rather than 'vip or vim or something.
<cess11> If it's just a few pages I look at it in the REPL, if it's more I use a pager or serve it up as web GUI.
<freeemint_> Why is that?
<cess11> Laziness.
<freeemint_> Would you consider doing it if it took the same effort?
<freeemint_> do you mean a "pager" physical thing sending sms predecesors
<cess11> I think ncurses needs more information than markup like HTML and CSS to work.
<cess11> No, like 'more' or 'w3m'.
<cess11> 'less', probably others.
<freeemint_> A frame buffer needs more information than html and css
<cess11> HTML and CSS will use defaults and try to work if you miss putting a value in an attribute, ncurses will throw an exception in a similar situation, I think.
<cess11> But I'm unsure, I try not to have to learn UI-systems.
<cess11> Hence I like the web GUI, I can just write some Lisp and pass the results, values, whatever, to 'ht:Prin or 'gui and it will show as I expect it to.
<freeemint_> Ncurse = frame buffer , comparing html and css to ncurse i like saying. A frame buffer will be empty if you draw your with no color but tex has presets
<freeemint_> I hope you in a few years someone will say: I can just write some Lisp and pass the results, values, whatever, to 'tx:Prin or 'tui and it will show as I expect it to.
<cess11> If it was easy to produce a templating system for frame buffer UI systems I think it would be created and quite popular already.
<cess11> And it might be, I don't know.
<freeemint_> hmlt is quiet popular for frame buffer markup
<freeemint_> *html
<freeemint_> isn't it?
<cess11> Well then, if it is, I don't see why 'html and other pil functions can't be used as interface to some ncurses FFI stuffs.
<freeemint_> I do think `(whatever 'ncurse is) has no standardized language because writing your own solution is way more trivial than for gui.
<viaken> I don't know that I've even seen html as a template for CLI stuff.
<viaken> "framebuffer" is an altogether different thing, and is just a way to slap pixels on the screen. It's not typically got any templating or anything.
<freeemint_> cess11: That is roughly what my project will do. It will allow you to use (like) 'html stuff to put out a text interface
<cess11> Ah, right, that's then the terminal show images.
<cess11> *when
<freeemint_> a web browser writes
<freeemint_> in a frame buffer
<cess11> I think I just prefer to do it line by line with perhaps a 'read at the bottom, or go with the GUI.
<freeemint_> ok
<freeemint_> it will start out as "on the bottom" stuff like a shell
<freeemint_> but maybe i will add some "animation and picture" support which uses ncurse
<cess11> But it should be possible to do it like you and Regenaxer described it the other way, as an SSH-authenticated shell.
<freeemint_> sorry the one who talked about ssh authinticated shells was me
<cess11> You both did as I remember.
<freeemint_> Yes i should be possible to do it as ssh authenticated shell
<cess11> Still, for prototyping I think it would be easier to go with a POST-based gui because it takes so little time to set up and allows work on other, more fundamental, parts of the game faster.
<freeemint_> first i want to write a 'server for a command line interface
<freeemint_> then i want to build a 'server for TUI (for example ncurse)
<freeemint_> Then i may write an application which show there potential
<freeemint_> if my goal was to write a MUD you would be right. Writing it using html and (app) would be easier.
<freeemint_> but i might not do that in picolisp in the end
karswell_ has joined #picolisp
karswell has quit [Ping timeout: 240 seconds]
<cess11> Switch IRC for telnet in https://picolisp.com/wiki/?ircclient and work along from there?
<freeemint_> would work too
<cess11> Because I'm pretty sure the game engine in your demo app will take more time than exposing it over a network.
<cess11> To develop, that is.
<freeemint_> ven if things would go faster if i write the game engine first. I have no time pressure.
<freeemint_> *Even
<cess11> How and what you'll communicate to the client won't be decided until it is done, so either a general solution or a hackish one.
<freeemint_> i try to aim for a general thing
<freeemint_> a 'server for .....
<freeemint_> a thing which you give a port and a function and what the user sees is a service he can interface
<cess11> In what client software? Something you write or something that is already abound?
<freeemint_> ssh, telnet or irc
<freeemint_> maybe jabber too
<freeemint_> have your picolisp code run a server which is accesable by standard software
<cess11> Well, IRC is done, maybe someone wrote something for telnet already.
<freeemint_> irc is not done.
<cess11> You could adapt that script, it's a pretty nice client.
<freeemint_> client!!!!!
<cess11> Yes, but it's the same on the server side, the rest is up to you.
<cess11> It can send and recieve text, and it's general.
<freeemint_> futhermore you would program an irc server. But for the TUI to be usuable you yourself asked for a language on a similar level of abstraction as html which is also not done
<freeemint_> Also the irc surely handles disconnects ungracefully
<cess11> Yep. It's just a start.
<freeemint_> a start which is just a good as telnet
<freeemint_> which is a good start too
orivej has quit [Ping timeout: 248 seconds]
<freeemint_> only that telnet is installed on more machines
orivej has joined #picolisp
<cess11> Yeah, so go with IRC until you've managed to handle that amount.
<freeemint_> Why do you recommend me "go with IRC" over "go with what you think is right"?
<freeemint_> Nobody uses IRC where i am going to deploy that software for the first time
<cess11> Aren't you using IRC?
<cess11> Aren't you going to be the primary alpha tester?
<freeemint_> I am using IRC.
<freeemint_> in the context of talking with people involved with pil
<cess11> Aren't you?
<freeemint_> but i will deploy and develop it on server owned by a hacker space where i am the one using IRC
<cess11> Sounds great.
<freeemint_> so it makes no sense to use a custom IRC client as basis to develop a server for rendering text interfaces on different clients
<cess11> It's just a plain, text interface, right?
<Regenaxer> ret
<freeemint_> Yes it is
<freeemint_> and an irc is more than that
<cess11> It's got some functions for the local as well as remote side, right?
<freeemint_> no function on the local site
<freeemint_> (other than the term rendering text)
<freeemint_> (or colors)
<cess11> Regenaxer: Welcome back.
<freeemint_> Oh wb
<Regenaxer> hi
<freeemint_> hi
<cess11> Rendering colored text sounds good to me. What else could one need?
<freeemint_> strange glyphs which when combined draw windows
<freeemint_> that is all i can do without a custom client
<freeemint_> it will look like a debian text mode installer at best
<freeemint_> but maybe less aggressive colors
<cess11> It already looks leaner, more suckless than such an installer.
<freeemint_> what do you mean?
<cess11> That script opens a socket interface that is lean and doesn't suck,
<freeemint_> it is based on the same technology as the debian installer i think
<cess11> Most likely.
<cess11> But it has no blue backgrounds and the like.
<cess11> Instead good old computer black background.
<freeemint_> that was a feature back then
<freeemint_> T
<freeemint_> or a nice white background
<cess11> I'd prefer not to.
<freeemint_> on e_inks and smartphones it works better
<cess11> A dim, small screen, perhaps. Sometimes.
<cess11> I prefer white, red, green and so on, on black.
<cess11> Preferably just white, so I'm sure my brain interprets it like text.
<freeemint_> on the outside black background is nearly not readable
<cess11> But syntax highlighting can be nice too, if it is simple to add and understand.
<cess11> I use black Termux outdoors all the time.
<cess11> White text.
<cess11> If it is very bright I can't see what's in the tmux field at the bottom, but white text usually works.
<Regenaxer> mee too. I switched to black background primarily because it uses less energy
<cess11> Same, now I'm sort of stuck.
<cess11> I find it harder to think carefully in front of bright screens.
<freeemint_> hi
<freeemint_> ah i thought i lost connection
<Regenaxer> I use differently colored status lines in tmux on each server
<Regenaxer> brightness control via Penti
<freeemint_> why then are most user interfaces mostly white?
<cess11> To sell more.
<Regenaxer> good question
<Regenaxer> I used white background for 20 years
<Regenaxer> switched to black only for the energy reasons
<Regenaxer> also on my notebook
<Regenaxer> took some time to get used to
<cess11> It is associated with cleanliness, purity and so on.
<Regenaxer> Initially I found it was more strein to the eyes
<cess11> It seems innocent and not there.
<Regenaxer> (black)
<Regenaxer> yes
<Regenaxer> maybe
<freeemint_> does not sound very solid
<cess11> It is why I used it before smartphones.
<cess11> But I wanted it somewhat dim and not bright.
<Regenaxer> T
<cess11> White backgrounds, that is.
<Regenaxer> ok
<cess11> I think I find it easier to temporarily leave the screen when the background is black.
<cess11> With the eyes, not like I walk away.
<freeemint_> Optimal legibility requires black text on white background (so-called positive text). White text on a black background (negative text) is almost as good. Although the contrast ratio is the same as for positive text, the inverted color scheme throws people off a little and slows their reading slightly.
<cess11> Maximal isn't always optimal.
<cess11> sc
<freeemint_> Benefits of dark background According to all the points mentioned above, we can sum up that dark background applied in user interfaces can provide essential benefits, among which: - style and elegance - feel of mystery - luxury and prestigious look - broad field of using contrast - support of visual hierarchy - depth in reflection of presented content - visual appeal
<freeemint_> both from the same source
<cess11> Yeah, the feel of mystery is really important.
<freeemint_> you are entiteled to your own opinion. I was just searching for some research on that topic
<freeemint_> good night guys and girls
<cess11> Good night.
<Regenaxer> bye!
<Regenaxer> afp
anjaa has quit [Ping timeout: 268 seconds]
cess11 has quit [Ping timeout: 264 seconds]
freeemint_ has quit [Ping timeout: 260 seconds]
rgrau has joined #picolisp