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
jibanes has quit [Ping timeout: 248 seconds]
jibanes has joined #picolisp
aw- has joined #picolisp
alexshendi has joined #picolisp
f8l has quit [Ping timeout: 252 seconds]
alexshendi has quit [Ping timeout: 256 seconds]
f8l has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
jibanes has quit [Ping timeout: 248 seconds]
jibanes has joined #picolisp
<m_mans> Hi all
<m_mans> Regenaxer: do your customers ask for 'modern' web GUIs? What do you do with such questions?
<cess11> Perhaps 'this is my rate for writing CSS'?
<Regenaxer> Yes, occasionally such questions come. But nobody found a better solution so far in terms of usability
<Regenaxer> The GUI has certain requirements
<Regenaxer> eg. how enabled/disabled states are visualized
<Regenaxer> This is difficult to make visible in all combinations
<aw-> hi all
<Regenaxer> Also, it is a space problem
<Regenaxer> hi aw-
<aw-> m_mans: what do you mean "modern" ?
<Regenaxer> Many "modern" designs take up much space
<Regenaxer> I have forms with 200 'gui' fields
<m_mans> Regenaxer: T
<m_mans> modern, I mean like modern CSS frameworks etc
<Regenaxer> yes, understand
<aw-> oh i see
<aw-> like twitter bootstrap?
<m_mans> mostly yes
<Regenaxer> If anybody tries, it would surely be interesting
<Regenaxer> s/tries/tried
<aw-> hmmm
<aw-> well.. i do have a "modern" UI built on top of http.l
<aw-> but nothing using the picolisp GUI
<Regenaxer> Did you make some CSS?
<aw-> i just used the default twitter bootstrap css
<Regenaxer> interesting!
<aw-> and created HTML pages with the Bootstrap classes etc
<Regenaxer> What would be needed to run eg. the demo in app/ ?
<aw-> just the bootstrap.css
<aw-> and then modify your html to use the proper classes
<Regenaxer> oh
<Regenaxer> right
<aw-> like <div class="row"> and <div class="container">
<aw-> the bootstrap.css applies styles to those classes
<Regenaxer> (<style> ...) and +Style ?
<aw-> You don't need (<style> ..) .. you can define those in another .css file loaded after bootstrap.css
<Regenaxer> Can you provide a app/ patch?
<Regenaxer> Practically I have code identical to app/ in all cases
<aw-> probably not.. I don't use app/ ... but I can't imagine it being very difficult
<Regenaxer> So you don't use 'form'?
<aw-> no
<m_mans> hehe, that is totally different case
<Regenaxer> ok, so this is not applicable
<aw-> haha sorry
<m_mans> I'm staying with form.l
<Regenaxer> static HTML is no problem
<Regenaxer> yes, form.l is the core of everything
<Regenaxer> the behavior, not the visual appearance
<m_mans> T
<aw-> but if the page loads the .css before the rest of the html, it should be styled automatically afterwards
<Regenaxer> not sure
<m_mans> bbl, lunch
<Regenaxer> What happens with buttons
<Regenaxer> cu!
<aw-> the buttons should inherit the styles
<Regenaxer> buttons and the visibility of tabs
<aw-> yes that too, that's the whole "cascading" part of CSS
<aw-> you use bootstrap at the top, and then it applies to everything unless you override the style with something else
<Regenaxer> yes, but buttons can be enabled or disabled, and this is extremely important to be recognizable
<Regenaxer> Try it
<Regenaxer> I think it will not be usable
<aw-> are the buttons disabled in JavaScript?
<aw-> or in CSS ?
<Regenaxer> in HTML
<Regenaxer> so JS modifies the DOM, yes, but it is in HTML
<aw-> ok ok
<aw-> well JS has nothing to do with bootstrap
<Regenaxer> For me it is a requirement that all works also without JS
<Regenaxer> ok
<Regenaxer> only CSS is perfect
<aw-> yes I use bootstrap on some sites, without JS
<Regenaxer> good to hear
<aw-> my browser disables JS by default haha so it's my personal requirement as well ;)
<Regenaxer> yeah, here too
<Regenaxer> only switched on for some sites
<Regenaxer> and my own ones
<aw-> exactly
<aw-> browsing is so much faster
<Regenaxer> yes, a lot for some pages
karswell_ has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
<Regenaxer> But Chrome on Android is strange here
<Regenaxer> I can't enable some sites
<aw-> are you using a plugin?
<Regenaxer> has to do with subdomains
<Regenaxer> no, just plain Chrome
<Regenaxer> After FF is sooooo slow
<Regenaxer> even in 58
<Regenaxer> But normal browsing I do in w3m anyway, so no worry
<Regenaxer> ie. text searches
<Regenaxer> what is what I do most of the time
<aw-> wow
<aw-> FF is memory hog as well
<Regenaxer> T
<aw-> Regenaxer: is there an easy way to see which commands are part of picolisp binary, and which are not?
<aw-> maybe just starting picolisp and running (all) ?
<Regenaxer> yes, and then (num? (getd S))
<Regenaxer> (filter '((S) (num? (getd S))) (all)) or so
<Regenaxer> This is not 100% accurate, may find also symbols which have an non-function-numeric value though
<aw-> hmmm
<aw-> when I use (all)
<aw-> it lists commands which don't exist
<Regenaxer> also, new symbols might be definde with the values of builtins
<aw-> like (chdir)
<Regenaxer> the symbol exists
<Regenaxer> not defined perhaps, but 'read' somewhere
<aw-> hmmm
<aw-> yeah i guess i'm missing something here
<Regenaxer> Does (lintAll) complain about undefined syms?
<aw-> maybe lib.l
<aw-> lintAll -- Undefined
<aw-> i literally just ran: ./picolisp
<Regenaxer> not in debug mode
<aw-> i want to know what exists in picolisp
<Regenaxer> 'chdir' is defined in @lib.l
<aw-> without loading anything else
<aw-> without @lib.l etc
<Regenaxer> only $ picolisp
<Regenaxer> then (all)
<aw-> yes but (all) displays chdir!
<aw-> even though it's not there
<Regenaxer> can't be!
<Regenaxer> $ picolisp
<Regenaxer> : (all)
<Regenaxer> -> ...
<aw-> yes try: (sort (chdir))
<aw-> chain char chdir chop...
<Regenaxer> haha
<Regenaxer> you *read* chdir!
<aw-> OHHHH
<aw-> ahahahaha
* aw- facepalms
<aw-> wait
<aw-> no no
<aw-> wait
<aw-> try (sort (all))
<aw-> it lists chdir
<aw-> oh wait
<Regenaxer> How about
<aw-> i see what you mean
<aw-> because I read chdir
<Regenaxer> $ picolisp -'println (all)' -bye |fgrep ...
<aw-> it created the symbol
<Regenaxer> right
<aw-> ok yes my mistake
* aw- facepalms again
<Regenaxer> np
<aw-> thanks
<aw-> i'm messing around with something..
<Regenaxer> good thing :)
<aw-> i have a Linux VM, but i replaced /sbin/init with picolisp
<aw-> it boots straight into picolisp
<Regenaxer> wow!
<aw-> and really fast
<Regenaxer> cool
rob_w has joined #picolisp
<aw-> i'm trying to see if I can make it load some linux kernel modules and maybe do a few other things to actually "boot" the system
<Regenaxer> I'm not sure what this would involve
<aw-> well.. (native) works
<Regenaxer> yes, is builtin
<aw-> so now I have picolisp as PID 1
<Regenaxer> sounds really cool
<Regenaxer> PilOS
<aw-> maybe different from pilos, since this still uses the Linux kernel
<Regenaxer> yes
<m_mans> cool
<m_mans> aw-: what was the whole idea?
<aw-> m_mans: i had the idea a long time ago, but recently it re-surfaced that "maybe I don't need a full Linux OS"
<m_mans> ok
<aw-> for some basic PicoLisp tasks/programs I want to run, i was curious if I could just boot straight into picolisp and run it there
<aw-> kinda of like a picolisp microkernel ;) ... if those are still in fashion nowadays
<aw-> err sorry.. picolisp unikernel
<Regenaxer> What are the drawbacks/problems?
<aw-> Regenaxer: so far, there's no device initialization whatsoever, so i can't access the disks, network adapter, etc
<Regenaxer> yeah
<aw-> but whatever is native so far seems to work fine
<aw-> whatever is the selling point for unikernels, is the same for this
<aw-> i was never sold on unikernel hype, but I can see the advantage for very specific use-cases
<aw-> Regenaxer: when I do (load "@lib.l") what is @ pointing to?
<Regenaxer> it points to nothing yet
<Regenaxer> The path for "@" is *set* by the first commandline arg to the 'picolisp' binary
<aw-> ahhhhh i see
<Regenaxer> which is lib.l typically, but does not have to be
<aw-> is there another way around that?
<Regenaxer> What do you want to do?
<aw-> tankfeeder: that article is kind of bullshit, particularly that it's not even written by a Japanese person
<aw-> Regenaxer: i want to run the picolisp binary, then manually load lib.l, ext.l, etc
<Regenaxer> you can do that, just @path is not defined then
<aw-> how do I define it?
<Regenaxer> I think it is not accessible afterwards
<Regenaxer> The 'Home' global in the kernel
<Regenaxer> glob.l::: Home word 0 # Home directory
<aw-> ok ok.. in that case i'll just use pil ;)
<Regenaxer> you can't pass an arg in init?
<aw-> yes i can
<aw-> but that ends up the same as running pil
<Regenaxer> Just that pil loads more stuff
<Regenaxer> might be needed anyway, right?
<aw-> yes it loads ext.l
<aw-> what does this mean: ${0%/*}
<aw-> ?
<aw-> i'm not familiar with that syntax
<Regenaxer> it substitutes the path with the one from arg zero
<Regenaxer> which is how 'pil' was invoked
<Regenaxer> eg. ../../pil or /foo/bar/pil etc
<Regenaxer> search for ${parameter%word}
<beneroth> aw-, great!
<beneroth> light picolisp server with linux kernel, wohoo
<Regenaxer> Hi beneroth
<aw-> Regenaxer: thanks, i'm trying to load it without bash though
<Regenaxer> right
<Regenaxer> but then you know the path
<Regenaxer> Like the one in /usr/bin/pil
<Regenaxer> #!/usr/bin/picolisp /usr/lib/picolisp/lib.l
<beneroth> hi Regenaxer :)
<beneroth> hi aw-, m_mans :)
<Regenaxer> :)
<aw-> ah ok
<aw-> hi beneroth
<Regenaxer> It is just the local pil which uses ${0%/*} to allow relative or absolute dynamic calls
<m_mans> hi beneroth!
<aw-> hmmm i think #!/usr/bin/picolisp doesn't work
<aw-> doesn't that need a shell?
<Regenaxer> yes
<Regenaxer> hashbang is shell syntax
<Regenaxer> no
<Regenaxer> it is built-in into kernel exec iirc
<Regenaxer> But perhaps /sbin/init must be a binary ELF executable?
<Regenaxer> In that case you need a stub written in C
<aw-> hmmm
<aw-> yes i think it needs to be a binary
<aw-> it works with picolisp but not with the #!/usr/bin/picolisp script
<Regenaxer> just execvp() the picolisp binary with args
<Regenaxer> or execl() better
<Regenaxer> as the args are constant and known
<aw-> oh wait
<aw-> no i have an easier way
<aw-> i can call picolisp binary with arguments
<Regenaxer> great
<aw-> ah... sorry i messed up earlier, the hashbang syntax DOES work with /sbin/init .. it doesn't need to be an ELF executable
<Regenaxer> Even better! :)
<aw-> yes, ok so it loads @lib.l by default, and i manually loaded @ext.l
<aw-> not sure what to do next, but this is pretty cool :D
<Regenaxer> T
<aw-> running pil + loads debug, and vi editor, and other things to handle tab/up/down arrows, etc
<aw-> how do I get those manually?
<Regenaxer> You can load @dbg.l, but it is not the "full" thing
<aw-> @lib/misc.l ?
<Regenaxer> because '+' is handled earlier, and maintains also other debug info
<Regenaxer> I mean things like source info of the built-ins
<aw-> i see..
<aw-> i don't need debug
<Regenaxer> '+' on the command line inits the kernel early on
<aw-> just want the key shortcuts
<Regenaxer> Won't work then, as the line editor needs debug iirc
<aw-> oh I see
<Regenaxer> Optimal would be if you could configure it
<Regenaxer> with or without +
<Regenaxer> Without for production mode
<aw-> yes I can do that
<Regenaxer> You could detect whether a console or terminal is connected
<aw-> i'll enable with + for now.. for testing :D
<Regenaxer> ok
<aw-> makes my life easier
<beneroth> aw-, try to get networking and DB running. then its a server box.
<aw-> yes
<aw-> i got e1000 module loaded
<aw-> nothing magic.. just called 'modprobe' from Busybox haha
* beneroth is excited
<aw-> ok i'm finished playing with this idea.. it works fine, but I don't have time to develop it further
<aw-> Regenaxer: thanks for your help
<Regenaxer> welcome :)
<beneroth> thanks for the poc aw-
<beneroth> nice idea
<aw-> Regenaxer: when using (native "@" .. how can i know which functions are available in "@" ?
<Regenaxer> With 'nm' on the library files iirc
<aw-> nm !
<aw-> i've been searching for that command forever
<aw-> but isn't "@" referring to the picolisp binary?
<beneroth> wow
<beneroth> nice command
<Regenaxer> yes, it is the binary itself
<aw-> right
<aw-> i run nm -a picolisp and it says no symbols
<beneroth> try object file
<Regenaxer> thrue, it is stripped
<beneroth> picolisp/src$ nm main.o
<beneroth> got results from that
<Regenaxer> main.o is not enough then, needs all *.o
<aw-> also 64bit
<beneroth> T
<Regenaxer> and aw is interested in the linked libs I suppose
<Regenaxer> stdio etc
<aw-> yep
<aw-> exactly
<aw-> well.. i guess if it's just libc.so etc... those are pretty easy to lookup
<aw-> so perhaps beneroth is right
<beneroth> anyway to find out what is linked? just look into the makefile or how?
<Regenaxer> another possibility is strings /usr/bin/picolisp
<Regenaxer> gives a lot of noise though
<f8l> How about ldd? Or was it lld?
<beneroth> ldd!
<aw-> ldd only says what's linked
<Regenaxer> yes, so then nm on the results
<beneroth> nice
<aw-> yep, thanks
<aw-> nm is what I wanted
<beneroth> ldd is also handy to find out library version
<Regenaxer> yeah, very useful
<beneroth> e.g. when checking for known vulnerabilities
* beneroth takes a note of this discussion
<aw-> yes, or sometimes you want to see distribute a binary but don't know what libs it needs
<aw-> i use it quite often
<beneroth> yes!
<beneroth> thanks for the link. noted.
<m_mans> The default build process for version 28-Jan-2018 generates ~9MB ISO image on 64-bit host machines, but you can make the ISO image even smaller (~8MB) if you exclude the default overlay bundles from the main .config file.
<aw-> i think i'll recompile my picolisp to #include <sys/mount.h")
<aw-> err #include <sys/mount.h>
<aw-> then I can do (native "@" "mount" ... to mount the /proc and disks
<m_mans> so, size of the such distribution could be very small
<beneroth> awesome
<Regenaxer> aw-, #include is for C, but native is pil64 (?)
<Regenaxer> m_mans, this is really nice!
<aw-> Regenaxer: src64/sysdefs.c
<Regenaxer> ok, but this triggers no linkage of that lib
<Regenaxer> better just call (native "theMountLib" ...
<aw-> m_mans: cool, but it's yet another busybox OS...
<Regenaxer> src64/sysdefs.c is just to define constants
<aw-> Regenaxer: oh i thought it included them
<beneroth> aw-, what is bad about busybox? (for an outsider)
<aw-> you're right, i would need mountlib
<beneroth> not usable for production?
<Regenaxer> The linker includes only what is really called somewhere
<aw-> beneroth: nothing, busybox is amazing i use it for everything haha
<aw-> beneroth: my picolisp os was aimed to work __without__ busybox
<m_mans> no, I mean that link not "as is" but one could replace busybox with pil there
<Regenaxer> right
<aw-> m_mans: ah yes! brilliant
<beneroth> aw-, alright. I can see & agree
<aw-> is the rest written in picolisp?
<aw-> oh... shell scripts
<aw-> it's all shell
<aw-> interesting project indeed
<aw-> looks a bit like TinyCore
<aw-> everyone here has such varied and useful knowledge, this channel is awesome
<aw-> thanks m_mans, beneroth, Regenaxer, f8l ..
<m_mans> aw-: it was just one minute googling, so there might be another more useful project
<m_mans> I didn't check more
<aw-> no problem
<beneroth> THIS <aw-> everyone here has such varied and useful knowledge, this channel is awesome
<m_mans> google linux minimal distro custom init
<m_mans> collective intellect is powerful :)
orivej has joined #picolisp
<joebo> hi all! reading through the backlog... regarding a "modern gui" on picolisp -- I created a little demo a few years back: https://github.com/joebo/pil-mithril-todo
<joebo> the 2nd link has a short video and a better writeup
<joebo> it worked reasonably well if I recall correctly
<joebo> I may actually have a production use for it coming up
<Regenaxer> Hi joebo!
<Regenaxer> Does it work with the form GUI?
<joebo> no - different gui :)
<joebo> one built off mithril.js
<Regenaxer> To a small extend Erik Gustavson made a new style for the form GUI in the wiki picolisp.com btw
<joebo> great
<Regenaxer> But there is not much form on the other hand ;)
<joebo> mine was more of a proof of concept. I haven't looked back at it in awhile to have a firm opinion of pros/cons
<joebo> more or less it was a learning experiment
<Regenaxer> oops, wrong spell. Correct is Erik Gustafson
aw- has quit [Quit: Leaving.]
rob_w has quit [Quit: Leaving]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
karswell_ has quit [Read error: Connection reset by peer]
karswell_ has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
<rick42> hi all!
<rick42> Regenaxer: you made me famous on the ML. lol!
<Regenaxer> It is a very good article!!
<rick42> how are you, Regenaxer? i hope well
<Regenaxer> Thanks! :) I hope you too!
<rick42> yes, ok (so far :)
<Regenaxer> hmm, that's life .. never perfect ;)
<rick42> was looking for work in sw in the area/city around my house, a few weeks back, but sooo many .NET positions
<rick42> very depressing :(
<Regenaxer> oh, understand :(
<Regenaxer> Found something nevertheless?
<rick42> no. or should i say, not yet
<Regenaxer> hmm, I wish you success
<rick42> the opportunities that are interesting are rarities.
<rick42> thanks!
<Regenaxer> right
<rick42> is your work going ok?
<Regenaxer> Family is OK?
<Regenaxer> good here
<rick42> yes thank you
<Regenaxer> I have interesting projects
<rick42> your family too? your daughter still playing music?
<Regenaxer> yeah
<rick42> very good
<Regenaxer> :)
<beneroth> yo rick42 o/
<beneroth> [IT news] Firefox <58.1 is vulnerable to a code execution vulnerability (visit of malicious website is enough) https://www.mozilla.org/en-US/security/advisories/mfsa2018-05/
* beneroth curses strongly
<rick42> beneroth: \o
<rick42> it's a good thing i'm on 58.0. lol jk
<rick42> browsers are terrible
<rick42> like phone OSes
<rick42> terrrrrible
<beneroth> I'm not. cannot stop using tab groups yet. I have ca. 1.6k tabs open.
<rick42> lol
<Regenaxer> I recommend w3m hahaha
<Regenaxer> (scnr)
<rick42> +1
<tankfeeder> beneroth: 1.6k tabs in firefox?
<beneroth> tankfeeder, yup
<tankfeeder> wow
<beneroth> was shocked to find out that this doesn't count as power-usage. apparently 20 tabs is power-usage.
<tankfeeder> is it your bookmarks?
<beneroth> no tabs. I read it and bookmark it then.
<tankfeeder> ok
<Regenaxer> I always wondered why you do this
<beneroth> and it remains open until I read it. or as long as I work on something it is related to.
<beneroth> xD
<Regenaxer> I close tabs as quickly as possible
<beneroth> I kinda use them like a special kind of bookmarks, granted.
<beneroth> I have to write an pil application to replace my browser and support my way of surfing
<Regenaxer> copy/paste URLs instead if needed later. Not even bookmarks
<Regenaxer> I paste them into a Vip window, that's all :)
<beneroth> step 1. go to hackernews / heise / any other interesting side - step 2. click on everything which could be interesting (open as tab) - step 3. read & close or bookmark/download
<Regenaxer> I never use bookmarks of the browser
<beneroth> problem is time gap between step 2 and 3. also step 2 produces more input than 3. can process in reasonable time.
<beneroth> I prolly have several thousands bookmarks.
<beneroth> use it as my personal search engine ;)
<rick42> ^^^ organize the bookmarks with org-mode :)
<yumaikas> The other thing you could do is spend a few days writing a outline-processing website or personal wiki
<yumaikas> (I recently did one in erlang)
<yumaikas> (Personal wiki, that is)
<beneroth> what do you mean by outline-processing?
<yumaikas> beneroth: A site that allows you to edit/view an arbitrarirly nested outline
<beneroth> define outline. you mean just a tree (DOM, web, Ontology, whatever...) or is there a tool named outline? couldn't find
<yumaikas> Tree
<yumaikas> beneroth: What org mode does, but with better ability to zoom in/out
<beneroth> oh ok
<beneroth> yeah that is what I kinda have in mind
<beneroth> thanks :)
<yumaikas> I've run acorss one site that does it well
<beneroth> send me links plz :)
<beneroth> will investigate
<yumaikas> (But it's paid)
<beneroth> oh competition to get inspiration from is also interesting!
<beneroth> will go afk now. feel free to text me anyway, will answer tomorrow :)
<beneroth> thanks
<beneroth> bye yumaikas, rick42
<yumaikas> beneroth: ^
<beneroth> yumaikas, thx!
<rick42> beneroth: bye!
groovy2shoes has quit [Ping timeout: 256 seconds]
<viaken> beneroth: I have similar issues with tabs. Not your level, as I lost my tab groups ages ago. Still...
groovy2shoes has joined #picolisp