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-> hey all
<aw-> beneroth: i'm also suffer from pollen allergies haha
<Regenaxer> Hey aw-!
<aw-> in Japan i wear a mask outdoors when pollen levels are high, it actually works **really well** against that
<aw-> hey Regenaxer
alexshendi has quit [Ping timeout: 264 seconds]
rob_w has joined #picolisp
mtsd has joined #picolisp
<mtsd> Good morning
<Regenaxer> Good morning mtsd!
<mtsd> Hello Regenaxer :)
<Regenaxer> :)
<mtsd> Funny thing, I checked the Changelog and saw the new files, lib/pdfPage.l and misc/pdfPage.l
<Regenaxer> yes, indeed :)
<mtsd> I am working on pdf output right now :)
<Regenaxer> We had very long discussions here with Srini about the detail. He is studying the sources
<Regenaxer> Cool
<mtsd> Had some troubles generating multi page pdfs, this could be a good example
<Regenaxer> Multi-page is simpler. An example is in app/lib.l
<aw-> Regenaxer: quick question, if using (prin) i can provide 'any .. arguments.. any1, any2, any3 etc.. how do I do that when I have a list of arguments? (apply prin Lst) ?
<mtsd> To clarify: The problem is in no way related to picoLisp. Only to me not grasping what I am trying to do ;)
<Regenaxer> aw-, yes, 'apply'
<Regenaxer> mtsd, I see
<Regenaxer> I do a new <svg> frame per page
<mtsd> I'll keep experimenting. Things usually work out after some tries
<mtsd> Thanks! I will look at the example in app/lib.l and try new <svg> frame per page
<Regenaxer> In pil it is especially easy when you use a coroutine to generate the contents
<Regenaxer> so the main loop can do the <svg> structures
<Regenaxer> I'm doing a lot of rewriting old @lib/ps.l stuff to @lib/svg.l currently
<mtsd> Oh, you are?
<Regenaxer> The new @lib/pdfPage.l won't help here much
<Regenaxer> it is more about *editing* pages visually
<mtsd> Ok, checking the app/lib.l then
<Regenaxer> Pages separately
<Regenaxer> Yes, better
<mtsd> Great!
<mtsd> so, is @lib/ps.l about to be superseded by @lib/svg.l?
<Regenaxer> yes
<Regenaxer> it is similar but different
<Regenaxer> I made a pseudo code doc for my own use:
<Regenaxer> (pdf *A4-DX *A4-DY (tmp ,"Name" "-" (: nr) ".pdf")
<Regenaxer> (font (10 . "serif"))
<Regenaxer> (width "0.5")
<Regenaxer> (while
<Regenaxer> (page
<Regenaxer> (indent 60
<Regenaxer> (prHeader (=1 *Page))
<Regenaxer> (loop
<Regenaxer> (NIL (prItem)
<Regenaxer> (finish)
<Regenaxer> (prFooter 760)
<Regenaxer> NIL )
<Regenaxer> (T (>= *Pos 720)
<Regenaxer> (continue)
<Regenaxer> (prFooter 760)
<Regenaxer> T ) ) ) ) ) )
<Regenaxer> 'prItem' generates the next line, can be a coroutine in complicated cases
<mtsd> (finish) stops the loop, (continue) keeps printing items, over several pages if necessary?
<Regenaxer> No, (finish) does final printing, like total sums, taxes etc
<mtsd> Value of *Pos decides if we have reached the end os a page, right?
<Regenaxer> (continue) prints partial sums, "continues on next page" and so
<Regenaxer> yes, *Pos is the current vertical position in 1/72 inch
<Regenaxer> dots
<mtsd> I opened app/lib.l, checking..
<Regenaxer> app/lib.l is simpler, without coroutine
<Regenaxer> it is more like this version:
<Regenaxer> (pdf *A4-DX *A4-DY (tmp ,"Name" "-" (: nr) ".pdf")
<Regenaxer> (font (10 . "serif"))
<Regenaxer> (width "0.5")
<Regenaxer> (let (I 0 Lst (: pos))
<Regenaxer> (while
<Regenaxer> (page
<Regenaxer> (indent 60
<Regenaxer> (prHeader (=1 *Page))
<Regenaxer> (loop
<Regenaxer> (NIL Lst
<Regenaxer> (finish)
<Regenaxer> (prFooter 760)
<Regenaxer> NIL )
<Regenaxer> (prItem (inc 'I) (++ Lst))
<Regenaxer> (T (>= *Pos 720)
<Regenaxer> (continue)
<Regenaxer> (prFooter 760)
<Regenaxer> T ) ) ) ) ) )
<mtsd> I should look into coroutines etc more. I really should learn this better
<Regenaxer> i.e. it has a plain list to process, not a separate tree
<Regenaxer> A coroutine is an absolute must if you need to iterate two different trees
<Regenaxer> Here one tree is the SVG nested elements
<mtsd> My case loops over a list of lists, ((firstname1 lastname1) (firstname2 lastname2) ...)
<Regenaxer> and the other items in several 'for' loops for example
<Regenaxer> yes, exactly
<mtsd> Prints each name with (ps (pack (glue " " Lst)))
<Regenaxer> The coroutine is an independent generator then of things to print one after the other
<Regenaxer> The 'ps' function is also in svg.l, as you see
<Regenaxer> Also most other elements like 'window', 'rect' etc
<mtsd> First page is fine, but for some reason I can't make it continue on the next page.
<mtsd> My fault, no doubt, haha
<Regenaxer> This is tricky, yes
<Regenaxer> In postscript we don't have (nested) tags, so sequential printing is easier
<mtsd> Yes, I find it a bit difficult. But when I crack this, I will know next time
<Regenaxer> There is no "page break" possible in SVG
<mtsd> ok
<Regenaxer> needs a new frame for each page
<Regenaxer> But the above works very good
<Regenaxer> And is even easier in some way
<mtsd> I need to understand when to let my code genereate a new frame, I suppose
<Regenaxer> yes
<Regenaxer> This does the 'page' function above
<Regenaxer> in lib/svg.l
<mtsd> Well, it needs to generate a new one when (>= *Pos 720) of courxe ;)
<Regenaxer> produces a single (closed) page
<Regenaxer> exactly
<Regenaxer> so the loop stops
<mtsd> Thank you! I will keep experimenting today
<Regenaxer> Great
<mtsd> Can I send you this project when it is a bit more finished? I have some thoughts I would like to discuss, and I did some new GUI work on this one.
<mtsd> Learned a lot, again :)
<Regenaxer> Yes, sure
<mtsd> Thanks!
<tankf33der> Regenaxer:
<tankf33der> always 6827
<tankf33der> sometimes 6826 or 6825
<tankf33der> + - 1
<tankf33der> is it ok ?
<Regenaxer> I think so, it depends on when the "snapshot" is taken, while the other processes modify the data
<Regenaxer> I don't remember the exact meaning of the task though
<tankf33der> ok
<beneroth> hi all :)
<Regenaxer> I think this cannot 100% be avoided also if we (dbSync)
<Regenaxer> Hi beneroth!
<mtsd> Hello beneroth!
<Regenaxer> Hi beneroth!
<beneroth> Hi Regenaxer :) Hi mtsd, tankf33der, aw-
<beneroth> Regenaxer, so far it looks like a dark and wet day
<Regenaxer> here too
freemint has joined #picolisp
<freemint> good morning. i am alive and free again
<freemint> i just survived an oral exam in analysis. It went good.
<Regenaxer> Hi freemint
<Regenaxer> Congrats!
<beneroth> freemint, congrats! welcome back!
<freemint> Also i learned a lot of math.
<freemint> thanks
<beneroth> great. you can teach me some :)
<freemint> oh yeah i could.
<freemint> i am thinking 💭 about how to codify my knowledge in to Picolisp.
<freemint> but i am still not 😊 happy with my 💡 ideas
<freemint> Can you tell me a little about arie?
<Regenaxer> We don't know more than you I think
<freemint> ok
<freemint> and i have thought about away to implement matrices in picolisp.
<Regenaxer> There are many tasks in rosettacode with matrices
<beneroth> lists of lists usually, afaik. grid function.
<beneroth> tankf33der is the expert
<Regenaxer> yes
<beneroth> for productive code its probably usually better to do the number crunching in external C/C++ libraries, no? but its good to have picolisp code, makes the math more readable ^^
<beneroth> (and for pilOS!)
<freemint> I hate that matrices are represented as lists
<Regenaxer> Why??
<beneroth> well matrices are multi-dimensional vectors. and vectors are lists, basically.
<Regenaxer> yep
<Regenaxer> And unless you have hundreds of rows/colums, lists are quite efficient
<Regenaxer> Mostly iterated anyway
<Regenaxer> I like this one for matrix transposition:
<Regenaxer> (de matTrans (Mat)
<Regenaxer> (apply mapcar Mat list) )
<Regenaxer> cute! :)
<beneroth> T
<Regenaxer> Do that in C or Java!
<Regenaxer> Or even Common Lisp
<beneroth> C# is trying to get their 'switch' closer to your 'cond in the next language version - but it still can't do expressions xD
<beneroth> so still weaker than C++ switch
<freemint> matrices allow to represent many types of calculations efficiently but when you implement it with lists thinks like gaussian elimination just do not scale well
<Regenaxer> No expressions in the cases?
<beneroth> aye
<Regenaxer> freemint, why not?
<Regenaxer> There is no principial difference between arrays and lists
<Regenaxer> only efficiency for very large ones
<beneroth> well, to be fair it could also make a difference in I/O
<Regenaxer> And in some cases lists are even more efficient
<beneroth> T, for some actions are lists more flexible
<Regenaxer> I/O has other bottlenecks anyway
<beneroth> T
<Regenaxer> and efficient for inserts/deletes
<freemint> when matrices are sparse i guess you are right
<Regenaxer> this too
<freemint> inserts are a bad idea in matrices you just want to modify values
<Regenaxer> There is a strange kind of addiction of programmers to arrays
<Regenaxer> Just like to compilers
<beneroth> just like relational DBs
<Regenaxer> T
<freemint> well i see how it behaves.
<beneroth> similar to the addiction of 'mainstream' to windows OS
<Regenaxer> haha, yes
<beneroth> or PHP...
<beneroth> in all that cases its the first thing people learned about the specific topic, got told it's the best thing ever, they used it and it proved true (so far as they can judge it without having used anything else)
<Regenaxer> T
<freemint> i really like the pil numbers 🔢 the reason why i won't implement it in C
<beneroth> now weird people come and want to tell them that what they know and are used to is wrong, or not as good as they believed. but they don't want to believe in something bad, and changing believes takes a lot of effort, so they solve the kognitive dissonance by ignoring your arguments :)
<freemint> Regenaxer do you know the concept of multiple dispatch
<Regenaxer> Concerning OOP methods?
<freemint> yes
<Regenaxer> This does not apply to pil
<freemint> not just OOP but types in general
<Regenaxer> it is a compiler (static) issue
<freemint> I want to definitely use multiple dispatch for writing a matrix library
<Regenaxer> The interpreter has to look at the types at runtime anyway, so the programmer can do it easily herself
<Regenaxer> 'cond'
<freemint> The reason is that there are some large classes of special cases which have HUGE optimizations.
<Regenaxer> Only when compiled, right?
<freemint> No
<Regenaxer> Tomas Hlavaty once implemented multimethods in pil, but I don't have a link
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> oops
<Regenaxer> Did not make sense to me
<Regenaxer> Sometimes I hit ^D instead of D
<Regenaxer> I should disable ^D in the irc client
<beneroth> *wonder
<freemint> If you multiply a diagonal matrix (n x n) you do n*n, instead of n*n*n for any arbitrary matrix N
<freemint> if both are diagonal it is just n multiplications
<Regenaxer> and?
<Regenaxer> beneroth, good link!
<Regenaxer> I always think in pointers in C
<beneroth> I was searching for another SO question I saw recently, it was about "why are variables fixed size, and don't adapt depending on their value" - exactly what picolisp numbers (and strings) do!
<beneroth> but can't find that link anymore
<Regenaxer> ok, but true
<freemint> these optimizations are easy to implement with a type system
<beneroth> just for freemint: this is also a highly exotic and controversial thing, like with arrays, but it feels very natural with pil
<Regenaxer> and why does clang not support dynamic-size arrays?
<beneroth> fashion?
<Regenaxer> no idea
<freemint> @ multiple dispatch I do not like that idea 💡 of implementing it myself. Because that results in everybody having their own incompatible system.
<Regenaxer> As I said, technically it makes no sense in pil as far as I see it
<Regenaxer> multimethods
<beneroth> so..maybe stack optimization? doesn't make sense fully but...
<beneroth> what are multimethods?
<Regenaxer> Stack optimization is not the reason I think
<beneroth> Regenaxer, a C11 made the dynamic arrays optional. question now if the standard was changed before clang came up with their stubborn principle, or if they caused the change of the standard..
<Regenaxer> yeah
<Regenaxer> multimethods have several methods with the same name but dIfferent arg types
<beneroth> ah, so method overloading, basically
<Regenaxer> yes
<Regenaxer> but statically
<Regenaxer> Resolved at compile time
<beneroth> hm.. I would just use the pil OOP for this, I think. this is what OOP was originally all about, actually (sending messages)
<Regenaxer> T
<Regenaxer> And a single method can always dispatch at runtime depending on the arg type
<beneroth> yeah I liked the mechanism a lot when doing C++ OOP. I'm also one of the (apparently few) people who loves C++ template specialisations etc.
<Regenaxer> As pil does for all functions
<freemint> the idea that you matMUL which takes two objects. depending on whether you pass a number, a diagonal matrix or a arbitrary matrix they cause different behavior. multiple dispatch also allows for the order of the arguments to be arbitrary which picolisp fails to do(i think) not want to have massive code duplication
<beneroth> or one could create a DSL to do the dispatching. but I think using the OOP system would be much nicer.
<freemint> that would be ok
<beneroth> freemint, just make a new class for each of your types?
rob_w has quit [Quit: Leaving]
<beneroth> (class +MatMUL) (class +MatNumber +MatMUL) (class +DiagonalMatrix +MatMUL) (class +ArbitraryMatrix +MatMUL)
<beneroth> put a default implementation of your methods into +MatMUL, and overriding type-specific methods into the child classes
<freemint> yes but (*> Class1 Class2) can be equivalent to (*> Class2 Class1) and multiple dispatch allows that while must be oblivious to the fact
<beneroth> picolisp objects can change classes during runtime, so you could transform an +ArbitraryMatrix into a +DiagonalMatrix without copying all the values
<freemint> I would want to values in that case since a diagonal matrix can be thought of as an linear chain
<freemint> b
<freemint> i will use that type change
<beneroth> you can change the values, but no need to allocate the memory anew
<beneroth> allocating is the expensive thing :)
<beneroth> some overhead with all the pointers in pil, but that is inherent to pil and its flexibility
<freemint> not in picolisp.
<freemint> yeah i could recycle the diagonal too.
<freemint> and just leave the rest to GC
<beneroth> allocating is still expensive, especially if it causes a (gc) run and allocation of new memory. of course you can pre-allocate cells with (gc 'number)
<beneroth> the big advantage with pil is, you have so many places/hooks to replace/change some functionality without breaking the whole software architecture
<Regenaxer> T
<beneroth> comes with a cost, sure. but worthile in most cases. and in cases where it matters, I guess it's still worthwhile to do the initial development in picolisp, rewrite and adapt the program until it fits your needs and is well tested, and then you can optimize (implement parts in pil asm or C/C++, or move everything into another stack)
<beneroth> if there is already a good solution known beforehand, than chances are big that there is also an already usable library around for that case which you should use anyway instead of re-developing it anew
<freemint> Regenaxer have you thought about making picolisp Datatype (lists, numbers, maybe symbols) available in C?
<beneroth> else you probably need to try out and tweak a bit, and this can quickly cost a lot in most languages
<beneroth> freemint, they are.
<Regenaxer> yes, but not directly in 'native'
<Regenaxer> make no sense here
<Regenaxer> C in pil32 or asm in pil64 have access to the type
<freemint> ok that is not what i hoped for.
<beneroth> where is plio.c again?
<Regenaxer> lib/plio iir
<Regenaxer> freemint, what did you hope?
<beneroth> i find only lib/plio.js
<beneroth> I was sure there was a plio implementation for C around
<Regenaxer> C has no types in this sense
<freemint> it hasn't?
<beneroth> freemint, plio is the picolisp I/O binary format, as used e.g. to store values in the database
<Regenaxer> there is plio.c and plio.h
<Regenaxer> not in the distro?
<beneroth> I remember them. can't find them now.
<Regenaxer> ah, perhaps
<Regenaxer> not needed in the distro
<Regenaxer> software-lab.de/plio.tgz ?
<beneroth> T
<beneroth> yeah I downloaed it separately
<beneroth> found it on my disk now
<Regenaxer> :)
<Regenaxer> locate plio.c :)
<freemint> i thought it would be cool if you had a library which exposed/ reimplemented many functions on
<beneroth> I only use it after I'm convinced that I can't remember it to be where I think it should be :P
<freemint> picolisp datatype in C
<beneroth> freemint, well you have the C implemention of picolisp :P
<beneroth> have a look at software-lab.de/plio.tgz
<freemint> yeah... but that won't work with the more interesting pil64
<beneroth> it's not the runtime encoding of types, but you could use to talk from C to pil via a pipe (or shared file, or tcp connection or whatever)
<Regenaxer> You could make a lib.so and call it with 'native'
<beneroth> yes. use picolisp as the high level controlling language, which calls C/C++ stuff, not the other way around
<beneroth> brb
<freemint> i can call c from PIL but i want C to be able to call PIL.
<Regenaxer> you can
<Regenaxer> 'lisp'
<Regenaxer> limited to 5 args though
<freemint> and it can pass PIL structures (like lists and numbers?) and return the later?
<freemint> or does lisp only do C types
<Regenaxer> yes, up to 5 pointers
<Regenaxer> There *are* no C types
<Regenaxer> only the C compiler fakes them
<freemint> does lisp convert numbers to INTs?
<Regenaxer> internally are all just numbers
<Regenaxer> an INT is a number, no?
<Regenaxer> as a pointer is
<Regenaxer> or a char
<freemint> or do the stay (pil) numbers
<Regenaxer> a pil number is also just a pointea
<freemint> i got two pil numbers in C and want to multiply them and get the resulting pil number.
<freemint> does that work with lisp
<Regenaxer> Yes. Easy only with short numbers
<Regenaxer> 64-bit numbers in C
<Regenaxer> What would you do in C with Lisp bignums? Makes no sense
<freemint> and for longer numbers?
<Regenaxer> What would you want to do with them in C?
<freemint> Pass them to another function? Build a list?
<Regenaxer> Why? Use C as the main program?
<Regenaxer> This is tedious and not faster
<freemint> Ok
<Regenaxer> C makes sense on the low levels
<Regenaxer> E.g. do a special number function in C
<Regenaxer> C gets a pointer to the bignum
<Regenaxer> then can operate on it, check the tag bits etc.
<freemint> But that would allow to embedd pil a scripting language in to C programs?
<freemint> (not really needed rn for me)
<Regenaxer> Yes, but no sense in my view
<Regenaxer> yeah
<Regenaxer> But implementing a bignum operation in C is still not easy
<freemint> this would allow to write a love2d style game engine in LISP.
<Regenaxer> you need memory management
<freemint> i see
<freemint> picolisp
<Regenaxer> I think a separate process is easier
<Regenaxer> I do that a lot with Java bignums
<Regenaxer> on Android
<Regenaxer> via PLIO between pil and java
<Regenaxer> So could also be done with C
<freemint> I see some nice things that could result from picolisp being emedable.
<Regenaxer> In fact, in Android we have the situation that the "main" program is Java and PicoLisp is the slave
<Regenaxer> which calls Java intern
<Regenaxer> and then even callbacks from Java to pil again
<Regenaxer> in Interface implementations in Lisp
<Regenaxer> see @lib/android.l
<freemint> Is the performers 🐻able
<Regenaxer> What is after "Is the performers"? I see only garbage
<freemint> bearable
<Regenaxer> Very fast
mtsd has quit [Read error: Connection reset by peer]
<freemint> ok
<Regenaxer> even with pil32 on 32-bit Android
<Regenaxer> emu
<Regenaxer> In Android such calls are even inter-app with 'Intent's
<Regenaxer> eg taking a picture or qrcode
<freemint> On another (very hypothetical) note how would you feel if i were to copy your database system for another programming language?
<Regenaxer> feel?
<freemint> angry, indifferent, happy?
<Regenaxer> glad
<freemint> ok
orivej has quit [Ping timeout: 264 seconds]
<Regenaxer> Would make existing DBs be portable
<Regenaxer> good thing
mtsd has joined #picolisp
<freemint> i got another language i find very interesting. and i also have a huge project with a friend of mine. and if it comes down to Julia is the better choice for the project but i fell in love with beauty of pildb a little
<freemint> and pilDB makes for a great base on which you can implement more optimized schemes.
<freemint> How much of pilDB would work if it was ripped out of PicoLisp. Vs how much effort would it be to embed picolisp?
<freemint> what would be the better option?
<tankf33der> julia is ok
<tankf33der> just code.
<freemint> this is far away and the project warrants planning
<Regenaxer> The DB contains pil data, so they need to be converted in I/O
<freemint> I do not understand
<freemint> j
<Regenaxer> It is just PLIO
<freemint> ok, is +Idx and Co just PLIO or is that deeply tied with picolisp
<Regenaxer> +Idx etc are not in the DB
<freemint> aND if so it is easier to untie all dB stuff from PIL or to embedd pil
<freemint> But they are needed for the DB to be useful
<Regenaxer> '+Idx' is just a symbol, the logic from lib/db.l is not stored in the DB
<beneroth> finish some more manageable projects before starting many big projects, freemint. it's necessary to develop the taste and feeling (internalised knowledge) to be able to accurately judge such things. and it's easier to finish smaller projects (which can be pieces of a larger thing!). big plans have the tendency to getting nowhere.
<Regenaxer> Very wise, yes
<freemint> beneroth i know but that's how i am.
<Regenaxer> freemint, PLIO is basically this:
<Regenaxer> enum {NIX, BEG, DOT, END};
<Regenaxer> enum {NUMBER, INTERN, TRANSIENT, EXTERN};
<Regenaxer> That's the core of all :)
<Regenaxer> see plio.c
<beneroth> you are who you chose to be, enforced by daily habit.
<beneroth> the struggle is similar for everyone.
<freemint> I will do smaller projects first but when planning for this big one i want to start from the best assumptions i can start since the project is huge in scope and complexity beyond belief.
<freemint> beneroth T
<beneroth> successful people often just don't talk about how much it cost them to become what they (hopefully) wanted.
rob_w has joined #picolisp
<beneroth> freemint, problem is this: scope and complexity is changing all the time.
<freemint> so you are saying waterfall planning does not work?
<Regenaxer> I don't believe in it
<Regenaxer> Mostly do bottom-up
<beneroth> I long believed one can map the perfect way beforehand (C++ thinking), but now I believe it's more efficient to focus on flexibility, optimize for changes to be possible and easy, and then just start with an imperfect thing. better then planning the perfect thing but never making it real. ideas are worthless without implementation.
<freemint> i know
<beneroth> waterfal planning does not work at all. even the creator of it intended it differently then what it became ("should be iterated through at least twice")
<beneroth> that business IT stays in wrong believes and methods which are proven to not work for like 50 years is just the bigger tragedy.
<Regenaxer> yes, collect concepts top-down, then design bottom-up
<beneroth> get yourself a copy of "The mystical man-month" of Fred Brooks.
<beneroth> Regenaxer, T
<beneroth> and if you don't have enough data to complete 1, start with 2 directly. just go to one later and re-factor the stuff. this needs to be done anyway, or the stuff grows into a monster eventually. it always does.
<freemint> i heard that recommendation a few times
<beneroth> it's too simple to believe, and to hard to follow.
<beneroth> self-discipline.
<beneroth> good stuff is simple, but we instinctively believe they must be complex.
<freemint> beneroth this piece of code has to become a behemoth in the end.
<beneroth> stable complexity can only rise from simple elements.
<freemint> Due it's simplicity in the underlying question it posses
<beneroth> behemoth is negatively con-notated. use "monolith" :)
<freemint> you need a LHC to look at very stable parts of the world
<freemint> The project is sorta a 2 person LHC to come closer to the true core of computing.
<beneroth> that is an oxymoron.
<freemint> why?
<beneroth> hm, ok. granted, not really.
<beneroth> see, I'm on a similar road, trying to add a lot of functionality and complex structures to the pilDB to create a more flexible and powerful, easy to use flexible DB system.
<beneroth> the risks are high that it becomes a 70% finished behemoth instead of the elegant simple beauty I have in mind.
<beneroth> dunno if I can do it. but can't figure it out in my mind. I have to try to make it real. I must.
<freemint> rephrase: we are two person having a nice idea about computation based on put together parts of other people ideas. and we are trying to built an ugly monster of software to smash software together .
<freemint> and make everything neet after you run clever heuristics and statistics over it?
<freemint> anyway i like the LHC analogy
<freemint> got to eat something somewhen
<freemint> and is bene said. Talking not doing
<beneroth> yeah
<beneroth> time to eat :D have a good meal!
<Regenaxer> Me too, did not even have breakfast today
<beneroth> same
<Regenaxer> :)
<beneroth> have a good meal Regenaxer! greetings to your family :)
<Regenaxer> Thanks!
<beneroth> freemint, the problem with porting pilDB to other stacks is that it's heavily based on picolisps way of working. one of the fundamental parts of the pilDB is the pil IPC, which in turn is one of the pieces which are pretty hard to make run correctly, especially on another OS.
<beneroth> you kinda need to implement pil IPC before you can implement pilDB in another stack.
<beneroth> e.g. it's one of pieces which always gave problems to "emulate" on windows
<freemint> i 👍 so i wanted to know whether it is easier to embed/reimplement picolisp in general or esiaer to just embed the database specific part
<freemint> i know
<beneroth> the easiest path would be to implement an API (maybe even HTTP REST, or your own TCP protocol, could also be plio-based) in picolisp for the pilDB, and then use it with your program similar how you use traditional DBs
<freemint> i am tending towards. It is easier to do all than just a part
<freemint> also beneroth can you explain a few neat part of your DB project
<beneroth> basically: schema evolution. schema changes undo/redo. applying schema changes only to parts of your DB (not necessary all records). also (optional) logging of data changes (=> undo/redo).
<freemint> that sounds interesting for maintenance only.
<beneroth> I worked a lot with databases, and in my experience, schema changes (after the initial first version of the db) are one of the most regular pains.
<freemint> ok
<freemint> anything else you add?
<beneroth> I also believe its one part of big hype of document-databases in recent years (this, and great marketing by MongoDB. their tech was horrible, but good marketing).
<beneroth> webgui stuff :)
<beneroth> that's enough for the moment.
<beneroth> big enough project in itself.
<freemint> how do you reverse schema transformations?
<freemint> Do you have a dsl for those who allow for inversion?
<freemint> If you do transform A and then B can you undo A without having to redo B?
<tankf33der> next task
<beneroth> freemint, yep that are some of the questions :)
<beneroth> tankf33der, wow tricky
<freemint> Can you delete data from the schema but it still maintained in the background?
<beneroth> must be, to undo a deletion...
<freemint> Is a schema how it is stored or just a view of an underlying more complex computer generated thing?
<freemint> When to delete?
<beneroth> you mean in general, or in my concept?
<freemint> in your concept
<freemint> Are you trying to introduce Version control on databasesV
<freemint> if so take a look at pijul.
<beneroth> how it is stored. I'm not re-inventing https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model - that is too broken for queries. (I implemented such a system in pilDB first, actually)
<beneroth> freemint, thanks for the pointer to pijul! didn't knew it. will check it out! but I don't think I can use for the what I have in mind about databases. but maybe for others.
<freemint> pijul is patch based version control meaning it saves the changes you make and allows for rendering of changes through time
<beneroth> can it handle binary?
<freemint> git saves deltas and computes changes when needed (lossly)
<beneroth> I'm still looking for a good way to deduplicate binary blobs (for versioning blobs).
<freemint> not that i am aware. but they would be opne to you stealing their idea
<freemint> ZFS
<beneroth> T, ZFS
<freemint> do you want to sell it to people and support them
<freemint> or do want to provide a service?
<beneroth> eventually. currently I start with building (web) business apps with it, and sell those (or custom software)
<beneroth> haven't fully decided yet how it should be in the long-term, product or service company.
<freemint> so you can not really decide which software stack it will run on?
<beneroth> currently I'm having a service company.
<beneroth> I think I would prefer product business model, but service has the great advantage that you have more direct feedback
<beneroth> why should I not be able to decide the stack?
<freemint> Either you implement versioning yourself pijul style (which is ducking mighty) or you do it on ZFS + a little magic for redo applying changes.
<freemint> this is what i would atleast
<beneroth> if it fits my needs well, I'm happy to use any third party stuff already around
<beneroth> I try to minimize third party stuff because it's every time a dependency which needs maintenance, but I see no point in re-inventing something unless I really believe I can re-invent it better
<freemint> i thought about looking in to version control for picolisp code in the database before but the literature on tree riffing is abysmal.
<freemint> *diffing
<freemint> The other alternative i see is an ast editor which restricts you to tree transformations
<beneroth> currently only very few percents of my idea are already implemented. the data structure to maintain all the necessary metadata are largely in place, but the actual schema-edit-mechanisms are not implemented yet. too busy to build applications with what I already have to earn some money. also, I want to learn from real use cases and battletest the stuff while I'm developing it, so I don't build something only useful in my imagination.
<freemint> but that requires UX design to a degree that overwhelmed my competence
<beneroth> T
<beneroth> that is another of the big challenges ahead :)
<freemint> the cool thing about version controlled code in the dB would be you could have versions Webserver stuff with A/B testing
<freemint> and decide what to deliver.
<freemint> depending on cookies/ user preferences
<beneroth> I've built (and are building) some custom applications for business customers on my "framework" (the little which is already implemented). I'm already much more productive with this system than with common webapp development (I do this too, so I can compare) - but well, this you can already achieve mostly more easily by using Regenaxers framework :)
<freemint> what is this in this context?
<beneroth> you mean common webapp stack? .NET MVC / C# mostly (which is one of the technically weaker frameworks, granted).
<freemint> ?
<beneroth> I had my plan before I came to picolisp. spent like 2 years trying out languages and stacks, to find the one I want to build upon. ended here :)
<beneroth> most offer not the level of control I require.
<freemint> i see so you can do most on Regenaxer's stack
<freemint> but i doubt my can
<beneroth> aye, Regenaxers stack already offers a large part of what I have in mind. I was surprised to find it.
<freemint> i am not
<freemint> you both work in the same area of software it seems
<beneroth> T, but the area is very big
<freemint> all the more so
<beneroth> and pil is very different qualitatively, most stacks in this field are based on pretty similar concepts
<freemint> which makes sense
<freemint> i might lose connection afp
<freemint> *afb
<freemint> away from blackberry
freemint has quit [Ping timeout: 260 seconds]
<tankf33der> done
<beneroth> impressive. short and readable. your solution is more easy to understand than the task description :)
freemint has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
<mtsd> Thanks for the pointers earlier, Regenaxer. PDF creation works now
<beneroth> congrats mtsd :)
<beneroth> first time it's a pain :)
<mtsd> Thank you guys :)
<mtsd> Yes, first time is frustrating. But then you learn, and you know for next time
<beneroth> aye
<Regenaxer> ret
<Regenaxer> tankf33der, (for (I 0 (> 6 I))
<Regenaxer> Wouldn't (do 6 work?
<tankf33der> no, i want 6 results
<Regenaxer> mtsd, great
rob_w has quit [Remote host closed the connection]
<tankf33der> and do inc 'I when found next
<Regenaxer> ah
<Regenaxer> true
<Regenaxer> How about (for ((N . I) 0 (> 6 I)) then and (println (dec N) ... ?
<tankf33der> yea
<tankf33der> i know it, i decided not do it
<Regenaxer> A matter of taste?
orivej has joined #picolisp
<tankf33der> Regenaxer: yea
<Regenaxer> ok
<tankf33der> i will modify
<tankf33der> lets see
<Regenaxer> Not important
<tankf33der> leave as is, messy
<Regenaxer> really?
<Regenaxer> I thought it gets shorter
<Regenaxer> I see. Needs N three times
<Regenaxer> Current is best then
<tankf33der> yea
mtsd has quit [Remote host closed the connection]
<Regenaxer> Wow, PicoLisp on Termux is on 18.6.12
<Regenaxer> very up-to-date :)
<beneroth> smells like automation :)
<beneroth> I'm still working on material for the C# class I teach the next days
<Regenaxer> No, Fredrik Fornwall seems to do it manually, at least at different intervals
<Regenaxer> oh :)
<beneroth> man, this C# is getting a messier language with every version
<Regenaxer> Typical M$
<beneroth> they're also trying to put more lisp-like stuff into it.. but yeah, it becomes a big mud of different syntaxes and concepts
rob_w has joined #picolisp
<beneroth> sometimes I feel reminded of the old joke https://www-users.cs.york.ac.uk/susan/joke/cpp.htm
<beneroth> (the fake Stroustrup interview)
orivej has quit [Ping timeout: 264 seconds]
<sriram> Hi..I found it useful to add a couple of functions to my local canvas.js and canvas.l and was wondering if it would be useful in the distrib too
<sriram> one is quadraticCurveTo (similar to bezierCurveTo but with only one control point), and the other is to set the font i.e ctx.font = cmd[1]
<beneroth> sounds useful to me
<beneroth> convince Regenaxer and send him the code, and he adds it to the distribution. He can be pretty stubborn (most times completely rightly so!), though this changes sound like a meaningful feature extension, unless there is a simple workaround.
<beneroth> :)
<Regenaxer> beneroth, haha, didn't know (the fake Stroustrup interview)
<Regenaxer> sriram, hi!
<Regenaxer> Is the function big, and does it need additional libs?
<sriram> Regenaxer..hi...no...not at all...the quadratic one in canvas.js is just a dup of the bezier one, with X2,Y2 removed i.e 4 parameters. I added this to the end of my canvas.js to avoid renumbering
<sriram> the font one is also simple... case 36: // (csSetFont Str) ctx.font = cmd[1]; break;
<sriram> case 37: // (csQuadraticCurveTo CtlX CtlY EndX EndY) ctx.quadraticCurveTo(cmd[1], cmd[2], cmd[3], cmd[4]); break;
<sriram> while in canvas.l I just added the functions after csPost
<Regenaxer> I see. Renumbering should be no problem as we need to change .l anyway, right?
<sriram> ...(csPost) (csSetFont Str) (csQuadraticCurveTo X1 Y1 X Y)
<Regenaxer> So just adding two lines to .js and one to .l ?
<Regenaxer> I think near the bezier function is better
<sriram> i also thought so...then i realized I have to renumber 11 to 35 :)
<sriram> so did it the lazy way
<Regenaxer> ah, no problem with vip or vim
<Regenaxer> ^A
<sriram> nice!!
<sriram> do you mean two physical lines to .js
<Regenaxer> yes
<sriram> because its actually 3 for the font and 3 for the quadratic
<sriram> one for the case, one for the ctx..... and one for the break
<Regenaxer> Hard to read above, can you make a simple pastebin to be sure?
<sriram> and two lines added to .l after the csPost, one for each command
<Regenaxer> I would say it bocomse case 11
<sriram> ok i will try....never done that before so may take a bit of time
<sriram> alternately i could email
<Regenaxer> OK, that's best
<sriram> the two files
<Regenaxer> best only the added lines
<Regenaxer> I renumber meanwhile ;)
<Regenaxer> starting with 11
<sriram> sure...can do...
<sriram> bezier is case 10
<Regenaxer> done
<Regenaxer> I renumbered
<Regenaxer> just need ctx.quadraticCurveTo(cmd[1], cmd[2], cmd[3], cmd[4]);
<Regenaxer> right?
<Regenaxer> You don't need to send
<Regenaxer> I put this in 11
<Regenaxer> The confusion was only because your paste above is garbled
<Regenaxer> So I will pastebin and you can check before I release it, ok?
<Regenaxer> ok, done
<tankf33der> next
<sriram> yes...for case 11 it is ctx.quadraticCurveTo(cmd[1], cmd[2], cmd[3], cmd[4]);
<Regenaxer> canvas.js and canvas.l - these two?
<sriram> yes
<Regenaxer> I pastebin
<sriram> not sure where setFont should go
<Regenaxer> setFont?
<sriram> ctx.font = cmd[1]
<sriram> ah you may not have seen what i wrote above....two commands 1. quadratic 2. setfont
<Regenaxer> uh, your mail is garbled too
<Regenaxer> anyway I did already
<sriram> oh :( the indentation is not preserved
<Regenaxer> let me check fonts
<sriram> i added command setFont that simply does ctx.font=cmd[1]
<Regenaxer> There is no font until now?
<Regenaxer> How did I do it?
<sriram> there was no way to set font no
<sriram> you were doing it in svg
<Regenaxer> ah
<Regenaxer> ok, good
<sriram> so (csSetFont Font), with ctx.font = cmd[1] was what I did
<Regenaxer> csFont should be the first
<Regenaxer> ok
<sriram> or csFont
<Regenaxer> Just csFont ok?
<sriram> yes
<sriram> yes
<Regenaxer> like csFill etc
<Regenaxer> good
<Regenaxer> Moment
<sriram> yes...better .. I tend to use too long names :)
<Regenaxer> np
<Regenaxer> I'm looking for the best place
<Regenaxer> near csStroke?
<sriram> one sec looking
<Regenaxer> or just the first, before csFillText
<sriram> maybe just the first?
<sriram> as related to fill text
<Regenaxer> yeah, thats the best
<Regenaxer> T
<Regenaxer> I put it there
<sriram> thanks!....now I am experimenting on canvas thru pil simple canvas app, later I will take useful stuff from pdfPage.l
<Regenaxer> ok
<sriram> one problem i did face
<sriram> is that the canvas.js and canvas.l is unidirectional
<sriram> there is no way to get info from js
<sriram> e.g. ctx.measureText returns text metrics but no way to get that into the picolisp code?
<Regenaxer> you need to call lisp() to post it back
<Regenaxer> wait, first the changes
<sriram> ok
<Regenaxer> I send you the files per mail
<sriram> one sec, looking
<Regenaxer> can you check and test shortly before I release
<Regenaxer> I'll send now
<Regenaxer> a TGZs ok?
<sriram> sure///
<sriram> i mean sure...
<Regenaxer> ok :)
<beneroth> and this, ladies and gentlemen, is the picolisp development process :D
<beneroth> thanks you two :)
<Regenaxer> sent
<Regenaxer> beneroth, yeah! :)
<Regenaxer> Shooting from the hip
<sriram> :) ...testing now ...
<Regenaxer> Actually maintaining ChangeLog takes most of the time :)
<Regenaxer> good
<Regenaxer> I prepare the release
aw-1 has joined #picolisp
<beneroth> <Regenaxer> Actually maintaining ChangeLog takes most of the time :)
<beneroth> that's how it should be :)
<beneroth> metadata should be more than the code changes :D
<Regenaxer> T
<beneroth> properly checking what and where to change, and documenting it for the future, should be more effort than the act itself
aw-1 has quit [Remote host closed the connection]
<Regenaxer> sriram, you may have to force a reload in the browser, as the JS may be cached
<sriram> ah thats why!
<Regenaxer> I test too old apps
<sriram> how to reload? refreshing page does not work...delete cache?
<Regenaxer> Hmm, perhaps Shift + reload button of browser
<Regenaxer> Does not work here, and my cache should be clean
<Regenaxer> Did we forget something?
<sriram> no...all is good...works perfectly now
<sriram> just deleted cache
<Regenaxer> So it is my tablet?
<beneroth> Ctrl + F5 usually
<Regenaxer> I forgot if it ever worked here
<sriram> could be...by the way did you add test case for the new functions in your minimal app?
<sriram> i can send you my .l file
<Regenaxer> cache should be old
<Regenaxer> Works here too
<Regenaxer> I started on the server and connected the browser there
<sriram> it may be useful as uses more of the canvas.js calls
<Regenaxer> ok, but as you tested it should be good
<Regenaxer> I think I can release now
<Regenaxer> ok?
<sriram> yes...is goof
<sriram> is good
<Regenaxer> done
<sriram> I would like to try out ctx.measureText as its useful..var textMetrics = ctx.measureText("hello world");
<sriram> textMetrics.width tells me number of pixels (at the current font) occupied by the text, useful for centering in a rectangle
<Regenaxer> For exampl, @lib/gis.l sends metrics back to the server
<sriram> but that requires use of the lisp
<Regenaxer> via lisp()
<sriram> ah ..i will look at gis.l
<Regenaxer> I avoided this in canvas, as it will get too slow
<Regenaxer> Normally most of the strings in a page need to be measured then
<Regenaxer> Sorry, must answer a customer
<sriram> sure..
<sriram> perhaps there is a way for me to make a direct js call without going through canvas.js
<Regenaxer> probably, yes
<sriram> that will avoid embedding in canvas.js this perhaps not frequently used call
<sriram> (btw did not see any use of lisp() in gis.l)
<Regenaxer> no, it is JS
<Regenaxer> lisp(Map.form, "osmClick", ... calls osmClick in Lisp
<sriram> (maybe i have older version? but I got it not long ago..i think i have 18.6)
<sriram> ah its in gis.js
<Regenaxer> afp a little
<sriram> currently engaged in making a function that calls js (ctx.measureText)and returns a tuple (width, height)
<sriram> trying to avoid global variables to pass info between the callback function called from the js and the main function
orivej has joined #picolisp
<Regenaxer> ret
<sriram> also dont want to create a named callback function but to create a function on the fly, as well as a symbol (box?) and then assign the symbol to the function so that it can be passed to lisp
<Regenaxer> Sorry, phone
<sriram> this way..from the outside, the function takes a string, and returns the metrics of that string on the canvas, hiding all the internals (calling js, callback from js etc)
<Regenaxer> done
<Regenaxer> sorry :)
<Regenaxer> To use lisp() in JS I think you always need a *name* function in lisp
<Regenaxer> as it is used in a POSTed URL
<Regenaxer> And, this function must be 'allow'ed
<sriram> oh i see
<sriram> so cant create an anonymous function
<sriram> np :)
alexshendi has joined #picolisp
styx has joined #picolisp
<beneroth> woah
styx has quit [Quit: styx]
freemint has joined #picolisp
<freemint> back
<beneroth> wb freemint
<freemint> Do you want to discuss your new stack a little more?
rob_w has quit [Quit: Leaving]
alexshendi has quit [Ping timeout: 264 seconds]
<beneroth> not now, no time now, sorry
<freemint> thats fine
sriram has quit [Ping timeout: 260 seconds]
freemint has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 260 seconds]
freemint has joined #picolisp
freemint has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
orivej has joined #picolisp
<beneroth> tankf33der, about the Intel bug concerning leaking FPU registers: apparently for AES-NI (hardware AES) the keys are stored in the FPU registers during processing...
<tankf33der> yea
<beneroth> Intel has really fucked up their QA
<beneroth> but Intel processors are the preferred datacenter / cloud hardware somehow :)
<tankf33der> done
<tankf33der> sleep.
<beneroth> good night tankf33der
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp