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
orivej_ has quit [Ping timeout: 256 seconds]
cilz has quit [Read error: Connection reset by peer]
cilz has joined #picolisp
rob_w has joined #picolisp
C-Keen has joined #picolisp
C-Keen is now known as Guest11946
Guest11946 has quit [Changing host]
Guest11946 has joined #picolisp
Guest11946 is now known as C-Keen
mtsd has joined #picolisp
orivej has joined #picolisp
<Nistur> beneroth: "...legal protection in most cases suffice" <-- this is true, but it's always a case of cost vs reward. Specifically the cost of compromising the system vs what you can get out of it. Games is a good example because often games developers push the cost as high as possible, despite the objective reward being relatively low. People will always try to hack and mod games to either cheat at them, or
<Nistur> add in more functionality. But I believe for non-games software it's a lot simpler and the balance is weighted differently. If you limit the functionality of the software, and it is useful, the reward is higher, so people are more likely to do it, but if you do not limit the software at all, then it's less likely that people will tinker. However my point was that if you obfuscate and/or encrypt or
<Nistur> something like that, regardless of how easy it is to circumvent technically, it's a hurdle that needs to be overcome, so it will increase the cost of tinkering, so a lot of people that might have done so despite the legality, would not be bothered
<beneroth> T
<beneroth> heavily varies with the context
<beneroth> e.g. business software, where Regenaxer and I are active: it's usually all customer-specific applications. FOSS or proprietary does matter much less. Probably only matters if the client has their own programmers, then they want the source to keep some independence (and the source be written in their favoured language).
<Nistur> yup
<beneroth> if you sell software as a service (be it in cloud, or the more traditional on-site + support), the client doesn't bother much about the language nor DRM/proprietary/FOSS as long it works and they get a good service
<Nistur> depends WHO you sell it to, to be fair
<beneroth> T
<Nistur> if you're selling it to businesses, it's probably ok
<Nistur> but if you're selling the services to the public, you'll probably have some people trying to compromise the client or protocol to get services for free, or extra services, or...
<beneroth> that's about cheating protection, that's a different topic than DRM/IP protection I would say
<Nistur> I think it's all part of the same thing we were originally talking about, which is potentially protecting the code written in picolisp
<Nistur> the reasons behind doing it are difference perhaps
<beneroth> I don't think so. different reasons require different strategies.
<beneroth> if you have an offline application, why protect it from the user tampering with it? as long as you can "prove" that the client bricked it?
<beneroth> if you have online parts - it's security. never trust the client. obfuscating code will not help anything here.
<Nistur> as I said before, it's a balance of cost vs reward. I agree that security through obscurity is silly and you should never rely on that, but it DOES add an extra layer, and therefore cost to compromising a system. If that's your only line of defense, then nope it would be useless, but if it will take a potential attacker a week longer to make sense of what's going on in the system, there's a chance that
<Nistur> they'll lose interest, of that, depending on the software, you may have gone over the peak and further income drops off anyway (this is the case with games certainly)
<beneroth> yes with games. but not with kinda nearly all other kinds of software, I claim
<Nistur> fair enough. I could see it carrying over to other software, but my knowledge of that is relatively slim :P So *shrug*
<beneroth> only point for obfuscation I would see if you have some kind of super-duper secret sauce you want to obfuscate. but then you could also put it on a online server or in a sealed hardware where the customer has no access.
cilz has quit [Ping timeout: 260 seconds]
cilz has joined #picolisp
cilz has quit [Ping timeout: 240 seconds]
cilz has joined #picolisp
cilz has quit [Ping timeout: 256 seconds]
mtsd has quit [Quit: Leaving]
alexshendi has joined #picolisp
<beneroth> Regenaxer, is there a difference between (box) and (new) (both called without arguments) ?
<beneroth> Regenaxer, second question: why does an anonymous object pass as string, e.g. (str? (new)) ?
<Regenaxer> yes, 'box' does not try to invoke a T method
<beneroth> neither does (new) when it doesn't get any class name(s), or does it?
<Regenaxer> (2) it is not interned
<beneroth> (2) ah, so a string is kinda recognized by being neither an external symbol nor being interned?
<Regenaxer> But (box) may set a value
<Regenaxer> (2) yes
<beneroth> T
<Regenaxer> a symbol may be interned, but transient when not in the search order
<beneroth> so besser using (box) to create anonymous symbols without class(es).
<Regenaxer> yes, 'new' is for "objects"
<Regenaxer> 'new' does also do other special things
<Regenaxer> eg create something in the DB depending on its arg
<Regenaxer> (new T) vs. (box T)
<Regenaxer> or (box 1)
<beneroth> I have a use case where some input is parsed, and I want to return the parsed/interpreted data. the data might vary, and errors might occur which I like to communicate. currently I use a anonymous symbol/object for this, setting the data as properties on the symbol, and pushing strings (error messages) into the value of this symbol, then returning that symbol
<Regenaxer> This is good I think
<beneroth> ok. thanks :)
<Regenaxer> (box) is very lightweight, creates just a single cell, like 'cons'
<beneroth> point is to encapsulate the parsing part, so the calling code has not to worry about the input format, but has full freedom to do with the data and/or error messages whatever it likes
<beneroth> ah, nice
<beneroth> so basically a symbol without a name
<Regenaxer> yep
rob_w has quit [Quit: Leaving]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
sriram_ has joined #picolisp
alexshendi has quit [Ping timeout: 256 seconds]
<sriram_> Hi..was just wondering what ^ means in the context of a Pilog clause (as car). Could not find in doc, nor in pilog.l
<sriram_> i have a faint memory may have something to do with lisp to prolog or prolog to lisp
<Regenaxer> Hi sriram_!
<sriram_> Hi Alex!
<Regenaxer> yes, that's right
<Regenaxer> The rest of the clause is taken as a Lisp expression
<sriram_> ah i see...(looking back at the example to understand with that in mind :) )
<Regenaxer> (^ @X (* (-> @N) (-> @B))) uinifies @X with the product of @N and @B
<Regenaxer> :)
<sriram_> so the cadr should always be either @ or some Pilog variable...
<sriram_> and the cddr the lisp expression
<Regenaxer> Not only, the CADR can be anything
<Regenaxer> -> T
<Regenaxer> : (? (^ 12 (* 3 4)))
<Regenaxer> : (? (^ 11 (* 3 4)))
<Regenaxer> -> NIL
<sriram_> ah since it is unification...i understand
<Regenaxer> yeah
<sriram_> i was trying to understand the difference between pilog, goal, prove, solve etc....there is a nice thread on the mailing list that makes that very clear
<Regenaxer> ah, cool, good news
<Regenaxer> Perhaps there is also something in the wiki?
<sriram_> not in my opinion as clear...in the thread you show how the (solve?) returns a list of clauses while pilog is used for side effects etc
<Regenaxer> ok
<sriram_> so that was very helpful...by the way all this is context of understanding mindbgui, phone app, and minimal app programs
<Regenaxer> great
<Regenaxer> The old phone app is also available with a few changes as a PilBox demo
<Regenaxer> More useful here I think
<sriram_> i do have some points of confusion...if you dont mind i will try to get them clarified here...hoping I am not taking your time unnecessarily :)
<sriram_> whenever time permits for you
<Regenaxer> Sure, no problem
<Regenaxer> 2 mins, must put the bio garbage ton outside
<sriram_> In mindb gui I see <grid> "--." but I thought <grid> takes a number...tried looking at xhtml.l but could not understand the -
<sriram_> (and I will get a cup of tea :)
<sriram_> I think '.' means align, but the '-'?
<Regenaxer> ret
<Regenaxer> <grid> either takes a number, or a string, or a list
<Regenaxer> a string is interpreted as "-" means left- and "." means right-alignment
<Regenaxer> and a list is completely general, a list of CSS classes
<Regenaxer> (<grid> '("bold green" em30) ..
<sriram_> thanks Alex..back in a bit..
<Regenaxer> no hurry
fraya1 has joined #picolisp
fraya1 has left #picolisp [#picolisp]
fraya1 has joined #picolisp
<Nistur> Hmmm, does any ncurses stuff exist in picolisp?
<beneroth> afaik not
<Regenaxer> See @lib/vip.l
<Regenaxer> "libncurses.so"
<beneroth> a right vip (*blush* *hide*)
<Regenaxer> :)
<Nistur> ok :)
<Regenaxer> Hmm, but Nistur needs something for pil32 I'm afraid
<Nistur> nah, this was for something running on one of my machines which pil64 runs on :P I don't care about more awkward platforms for this
<Regenaxer> perfect :)
<Nistur> I had an idea for something, basically making a notification display on one of my monitors
<Nistur> which could then have 'windows' of different information, like the output of curl wttr.in/Coventry on one
<Nistur> a clock
<Nistur> and then I would make something so that I could ping notifications to it
<Nistur> emails, compilation success/failure etc
<Regenaxer> You could (call "tput" ..), easier than curses
<Nistur> I have a quickly thrown together bash script for some of this, it doesn't have a notification area, but it has clock and weather info, I tried using tput with that and it broke pretty much everything :( but that might be because I don't REALLY understand what tput is doing
<Nistur> but curses was something that was on my list of things to learn too :P So
<Nistur> I probably won't do so until I'm done with ImageMagick :P
<Nistur> just another one on the long list of things I'd like to do :P
<Regenaxer> OK, so you could look what Vip does. I found that curses is a terrible mess
<Nistur> I have also heard this
<Nistur> for now my bash script will do the job nicely :) But 'make it lispy and extend it' is definitely on the todo list :)
fraya1 has left #picolisp [#picolisp]
<sriram_> Hi Alex, for the <grid>, I understand the "--." specifies a - or a '.' for each column
<sriram_> but when it is a list, should it not be a list of lists, i.e one list per column, otherwise how can one associate style with each column
<sriram_> when it is a number or a string, <grid> can figure out the number of columns..but if the list is general, can that be done
<Regenaxer> Usually a list of class names, like (<grid> '("bold green" "em7" "em30") ...
<Regenaxer> <grid> cannot figure out the number of columsn, because the following elements are all "flat" in the following arguments
<Regenaxer> The number of colums is always deducted from the first arg
<Regenaxer> The number, the length of the string, or the length of the list
<Regenaxer> (<grid> 3 vs (<grid> "--." vs (<grid> '(NIL NIL align) ...
<Regenaxer> 'align' in this example is from @lib.css : .align {text-align: right}
<sriram_> ah i see, so one class name per column
<Regenaxer> yes, or NIL for "no special class"
<sriram_> so that was my meaning too that when the arg is a list, the length of the list specifies the number of columns and there is one item in the list for
<sriram_> each column
<Regenaxer> T
<sriram_> but i was thinking if you wanted two items for a given column for example then it would be a list of lists.
<Regenaxer> OK, so not the first arg
<Regenaxer> you
<sriram_> say color and alignment. But in that case it is better to define a class and then pass in a single arg
<Regenaxer> can do (prog (gui ..) (gui ..)) to get two components in one location
<Regenaxer> = table cell
<Regenaxer> ah
<Regenaxer> no, you do "red align"
<Regenaxer> or "bold red foo bar"
<sriram_> oh that is very nice...
<Regenaxer> See examples above
<Regenaxer> (<grid> '("bold green" "em7" "em30")
<sriram_> yes.. i missed that bold green
<sriram_> was two items passed as a single one using string ""
<Regenaxer> Or of course also (<grid> (list (and (xxx) "bold green") "em7" "em30")
<Regenaxer> right
<sriram_> is idform still used...i see it older examples, but not in newer ones?
<sriram_> (Many thanks for the <grid> explanation! )
<Regenaxer> 'idForm' is used almost always
<Regenaxer> only older programs do it explicitly with dialog, form and panel etc
<sriram_> oh..i was wondering since i did not see it in phone gui or mini gui
<sriram_> i mean minidb
<Regenaxer> This is special, idForm would not do
<Regenaxer> it does not have an ID form, but just a +QueryChart
<sriram_> i saw it in osm geo app
<Regenaxer> osm/nd.l also uses idForm
<Regenaxer> a typical example
<sriram_> yes was looking at way.l, nd.l is similar it seems
<Regenaxer> yes, exactly
<sriram_> if you do (when (app) (seed ...) ) is there a per-session seed then. perhaps this method can be followed for all per-session variables?
<sriram_> i was just wondering if the rand call in picolisp is reentrant...
<Regenaxer> Each session is also an independent process
<sriram_> each session has its own thread or process (as seen from a new : ). Does setting the seed
<Regenaxer> right
<sriram_> in each one mean that the subsequent rand calls will be independent
<Regenaxer> so variables are all private
<Regenaxer> but rand is a pseudo generator
<sriram_> ah ok ...nice...so must remember the (when (app) ... construct for initialising per-session variables
<Regenaxer> if seed is done in the parent, all children get the same sequence
<sriram_> but if seed is done in each child, then each child will have an independent stream?
<Regenaxer> yes
<Regenaxer> best is to use /dev/urandom in seed
<sriram_> very nice! (can be used to build rng with independent streams)
<sriram_> yes...the example uses /dev/urandom
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 260 seconds]
alexshendi has joined #picolisp
fraya has joined #picolisp
alexshendi has quit [Ping timeout: 276 seconds]
fraya has left #picolisp [#picolisp]