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
beneroth has quit [Quit: Verlassend]
orivej has quit [Ping timeout: 260 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
m_mans has joined #picolisp
<m_mans> hi all
<Regenaxer> Hi m_mans!
<m_mans> Regenaxer: you can just change two lines in misc.l:
<m_mans> - (out S (prinl "MAIL FROM:" (fin From) "^M"))
<m_mans> + (out S (prinl "MAIL FROM:<" (fin From) ">^M"))
<m_mans> - (out S (prinl "RCPT TO:" To "^M"))
<m_mans> + (out S (prinl "RCPT TO:<" To ">^M"))
<m_mans> tested with smtp.gmail.com
<Regenaxer> I see
<Regenaxer> are you sure it has no bad side effects?
<m_mans> what do you think?
<Regenaxer> What is if the address already has "<" and ">" ?
<m_mans> As I saw before, this should be OK by RFC
<m_mans> ah
<Regenaxer> I do not want to break anything
<m_mans> then we need to do additional parsing
<Regenaxer> (probably I don't have such a case)
<Regenaxer> Why is this only in gmail?
<m_mans> do you use also such addresses: "my name <addr@example.com>" ?
<Regenaxer> You found that adding "<" and ">" is demanded by the RFC?
<Regenaxer> No, usually I don't have such addresses
<m_mans> I suppose that google smtp follows RFC more strictly
<Regenaxer> OK
<Regenaxer> What is with "Reply-To:" then?
<m_mans> hm, I haven't tried Reply-To. Your have good questions
<m_mans> *you
<m_mans> let me try more
<Regenaxer> Perhaps also change then?
<m_mans> what do you think, should we try to parse such strings too: "my name <addr@example.com>" ?
<Regenaxer> No, this is not necessary I think
<Regenaxer> This should be done before calling 'mail'
<Regenaxer> Usually the addresses come from the DB or files
<m_mans> but then there is no way to insert such info into mail body
<Regenaxer> Where to insert?
<Regenaxer> The mail body is built in the 'Prg'
<m_mans> into To, From: fields
<Regenaxer> yeah
<m_mans> that is what end user sees in his mail software
<Regenaxer> right
<m_mans> it's used often
<Regenaxer> But I think this is not the place to build a full-blown mail system
<Regenaxer> I do not want to put a big function into the pil core
<Regenaxer> 'mail' got too big already now
<Regenaxer> It is intended for short automated messages
<Regenaxer> eg in cron jobs
<m_mans> ok, then I'm for adding just '<' and '>' and also check more "Reply-to" case
<Regenaxer> yes, good
<m_mans> I'll check it
<Regenaxer> I add to the 4 cases above now
<Regenaxer> 2
<m_mans> yes, just 2 lines changed
<Regenaxer> hmm, not all cases?
<m_mans> ?
<Regenaxer> Not for "From: "?
<Regenaxer> ok, no, understand
<m_mans> From: is just body
<m_mans> right?
<Regenaxer> yeah
<m_mans> sorry, must go to the meeting
<Regenaxer> So now I have
<Regenaxer> < # 11mar18abu
<Regenaxer> 479c479
<Regenaxer> > # 18apr18abu
<Regenaxer> ---
<Regenaxer> < (out S (prinl "MAIL FROM:" (fin From) "^M"))
<Regenaxer> ---
<Regenaxer> > (out S (prinl "MAIL FROM:<" (fin From) ">^M"))
<Regenaxer> 542c542
<Regenaxer> < (out S (prinl "RCPT TO:" To "^M"))
<Regenaxer> ---
<Regenaxer> > (out S (prinl "RCPT TO:<" To ">^M"))
<Regenaxer> Ok, I wait with releasing it
<Regenaxer> The question is whether HELO should be changed too
<m_mans> ret
<Regenaxer> good :)
<Regenaxer> I think HELO does not need to be changed
<Regenaxer> So only the two lines
<Regenaxer> Shall I release it? Will you test?
<m_mans> existing HELO worked fine with gmail
<Regenaxer> ok
<Regenaxer> So I release now
<m_mans> I see no need to change as we use only "addr@example.com" strings
<Regenaxer> yep
<Regenaxer> Released
<m_mans> ok
<Regenaxer> Can you test?
<m_mans> yes
<Regenaxer> Thanks!
<m_mans> Gmail works fine
<Regenaxer> Great!
<m_mans> thank you!
<Regenaxer> Thanks for finding this!
<m_mans> I hope your local mail servers are OK with this too :)
rob_w has joined #picolisp
<m_mans> I have no postfix or other servers at the moment
<Regenaxer> I tested here, yes
<Regenaxer> exim
<m_mans> good
<cess11_> Email is a bit like UDP.
<cess11_> But complicated.
arievw has joined #picolisp
mtsd has joined #picolisp
<mtsd> Hello everyone
<mtsd> Nistur, ordered my t-shirt yesterday :)
<Regenaxer> Hi mtsd!
m_mans has quit [Quit: Leaving.]
<Nistur> mtsd: woo!
mtsd has quit [Read error: Connection reset by peer]
mtsd has joined #picolisp
<Nistur> I've also finally put in my order.
mtsd has quit [Read error: Connection reset by peer]
mtsd has joined #picolisp
orivej has joined #picolisp
mtsd has quit [Read error: Connection reset by peer]
mtsd has joined #picolisp
mtsd has quit [Quit: Leaving]
<Regenaxer> Anybody here who tried PilBox? I have a customer with Samsung Xcover 4, and he gets an error "No such file or directory" for "bin/picolisp"
<Regenaxer> However, the same APK works on other devices
<Regenaxer> So how can "bin/picolisp" be missing?
<Regenaxer> I'll ask the same in twitter and the mailing list
cilz has joined #picolisp
<cilz> hi all
<cilz> regenaxer, pilbox works fine here on blackeberry keyone + termux
<Regenaxer> great, thanks!
<cilz> I'm using the package from the playstore which I updated this morning
<Regenaxer> ok, should be the version from the 16th
<Regenaxer> But this issue is not depending on the version I suspect
<Regenaxer> Must be a general problem with that device
<cilz> Regenaxer, yes version 20180416
<Regenaxer> ok
<cilz> The keyone is my first android device, hence I don't have experience on them. However for me PilBox works right out of the box!
<Regenaxer> Good news! So it is an arm64 device? Or did you need to install the arm32.zip plugin?
<cilz> the processor is a Qualcomm Snapdragon 625 with android 7.1.1. And I don't know for the arm32.zip plugin!
<cilz> I have F-droid installed too. I may have already installed some libs without me knowing everything.
<cilz> I also have Termux and have installed picolisp as a termux package, if that helps?
<Nistur> Regenaxer: maybe it's an OS version issue?
<Regenaxer> Perfect
<Regenaxer> Nistur, not sure
<Nistur> can you find out which version of Android they're using?
<Nistur> I have access to a few devices, not the one you specified, but I might find one with a matching OS version to try
<Regenaxer> I think the Xcover 4 is still Android 7.0
<Regenaxer> I have Android 7.1 here
<Regenaxer> It would be nice if you simply installed PilBox and see what happens
<Nistur> yep, I'll do that too :)
<Regenaxer> If it is a 32-bit device, it will complain
<Regenaxer> something with CPU=armv7 or so
<Regenaxer> Then you could fetch arm32.zip and it should work
<Regenaxer> but 64 is best of course
<Nistur> works on my S8
<Regenaxer> Samsung?
<Nistur> yup
<Regenaxer> Good
<Nistur> the Google Play version, do you want me to try one from f-droid?
<Regenaxer> I did not release on f-droid. Google is fine, or directly from software-lab.de/pilBox.apk, but they are 100% identical
<Regenaxer> Google play is fine and the easiest
<Regenaxer> especially as you get updates automatically
<Nistur> oh, I misread cilz' message
<Nistur> I thought they said they tried an f-droid version
<Regenaxer> ah, ok
<Nistur> my S8 is running Android 8.0.0
<Regenaxer> cool
<Nistur> I also have a HTC One (M7) here right now I can try with, but it's saying null CPU = armv7l
<Nistur> I assume that's the 32bit error you mentioned
<Regenaxer> yeah
<Regenaxer> Close the app completely
<Regenaxer> and get arm32.zip
<Nistur> where can I get that from?
<Regenaxer> Go with a browser on the device to htts://software-lab.de/arm32.zip
<Regenaxer> then immediately "open"
<Regenaxer> it should open PilBox or ask
<Nistur> so yep, HTC One M7 + Android 5.0.2 is fine too :P
<Regenaxer> Good news! :)
<Regenaxer> You could try some of the demo apps
<Nistur> I should be getting some more dev devices from work this afternoon, so I will test on those and report back
<Regenaxer> Very nice!
<Nistur> it would fail with (+ 1 2) if it cannot find bin/picolisp
<Regenaxer> Why (+ 1 2) ?
<Nistur> right now, that's the issue I'm trying to reproduce :P I can do more thorough tests afterwards
<Nistur> because it's quick to type, it's an actual computation, and it proves that the environment works
<Regenaxer> The error on the xcover is much earlier. The gui does not even start
<Regenaxer> yeah
<Regenaxer> On xcover it seems bin/picolisp is missing completely
<Regenaxer> which cannot be, as the APK is signed
<Regenaxer> But it cannot open it and thus does not start at all
<Nistur> Hmmm
<Nistur> maybe it's there
<Regenaxer> probably
<Nistur> but the OS doesn't allow executables apart from the java... intent?
<Nistur> java... something
<Regenaxer> no, it allows them
<Nistur> in this specific case I mean
<Nistur> it works on all other devices
<Regenaxer> it is a normal Linux in that regardd
<Regenaxer> right
<Nistur> but like you said, the APK has to have the file in it
<Regenaxer> I got a screenshot from the customer
<Regenaxer> the path etc. looks correct
<Regenaxer> yep
<Regenaxer> they tried on 2 xcover devices
<Regenaxer> and then also on another private device
<Regenaxer> and got the error in all of them
<Regenaxer> very strange
<Nistur> all the same OS?
<Regenaxer> Can it be that company's env?
<Nistur> it's not something I've heard of
<Regenaxer> I think the private is another version
<Nistur> Hmmm, Android is running SELinux, so it's possible the company has created a policy to deny that...? Maybe?
* Nistur doesn't really know a whole lot about SELinux so is guessing here
<Regenaxer> I think they did not change anything. They bought them for this project
<Regenaxer> no power users :)
<Regenaxer> Yeah, SELinux is a mystery to me too
<Nistur> well, ok, then I'm out of ideas right now :P Sorry... if I can reproduce it on a device I can get my hands on, I can try and do some digging for you
<Regenaxer> I had my device rooted for a while, and even as root could not do some things
<Regenaxer> Ok, no worry
<Regenaxer> I stay tuned too
<cilz> as soon as my son come back home I will on his device too
<Regenaxer> :)
<cess11_> I would guess https://en.wikipedia.org/wiki/Samsung_Knox is what is messing up that Xcover 4-device.
<cess11_> The person is using the work-profile but PilBox is installed in the other and shortcuts are the same in both or something like that.
<cess11_> It is similar to some GSuite-solutions that Alphabet is marketing to companies.
<Nistur> My S8 has knox
<cess11_> Then you could try to reproduce the issue by fiddling with the profiles.
<Regenaxer> Good hint cess11_!
<Nistur> knox is a pain in the neck to fiddle with
<Regenaxer> I had never heard of it before
<Nistur> if you trigger it incorrectly, it burns itself out, I think it actually burns a fuse on the board, and then it just doesn't work
<Regenaxer> wow
<Nistur> if you root the phone, it detects it and blows
<Regenaxer> horror
<Regenaxer> But the wikipedia page does not mention anything about executable files
<Regenaxer> Hmm, so it does not really look like Knox is the culprit
libertas has quit [Remote host closed the connection]
beneroth has joined #picolisp
<beneroth> hi all
<Regenaxer> Hi beneroth!
<beneroth> hi Regenaxer ! :)
<Regenaxer> :)
rob_w has quit [Quit: Leaving]
<beneroth> Regenaxer, strange problem with those Xcover 4
<beneroth> :(
<Regenaxer> yeah :(
<beneroth> sounds like access rights problem to me too
<beneroth> but not that I would have any knowledge about it
<Regenaxer> I tried chmod
<Regenaxer> gives different exception
<Regenaxer> Looks like really it cannot find bin/picolisp
<beneroth> oh
<Regenaxer> I ask them to send on of the devices to me
<Regenaxer> so I can debug directly
<beneroth> yeah good idea
<Regenaxer> After all, they are a transportation company, so sending something is their core business :D
<beneroth> good idea, Arie just posted on the ML: "Maybe there is restricted access higher up in the path?"
<beneroth> have you tried chmod on the folder containing the file (or not containing it) ?
<Regenaxer> yes, I just answered
<Regenaxer> No, it can't be. All accesses are relative to this home directory
<beneroth> I see
<Regenaxer> Access to higher levels is impossible in Android
<Regenaxer> >~ pwd
<Regenaxer> /data/data/com.termux/files/home
<Regenaxer> >~ ls /data/data
<Regenaxer> ls: cannot open directory '/data/data': Permission denied
<Regenaxer> Same in the REPL of PilBox
<Nistur> Regenaxer: I got a Samsung... Note 7... Note 8? I'll look it up in a sec (SM-950F)
<beneroth> do you have other samsung devices to compare? might be more related to a samsung customization than to general android
<Nistur> it works fine on that too
<Nistur> it's running 7.1.1
<Nistur> Note 8
<Regenaxer> beneroth, Nistur and cilz tried on several devices here before you came
<Regenaxer> Nistur, thanks!
<Regenaxer> I also tried just now on an old Samsung at BTG (via phone)
<Regenaxer> it needed arm32.zip but then worked
<Nistur> I will have a dig through the box o' devices here in a bit and see if I can find one to test quickly
<Regenaxer> Somehow I suspect they are doing something different at Nagel
<Nistur> but I should be working :P
<Regenaxer> You have awfully many devices of any kind! :D
<Nistur> I'm in my work's head office right now
<Nistur> and we're a mobile game dev studio
<Nistur> so :P
<Regenaxer> hehe, yeah
grp has joined #picolisp
<Regenaxer> arievw: Thanks for all your input!
<Regenaxer> (in the mailing list)
<arievw> OK. In a former life I've been a VM, VSE, CMS, CICs etc. systems programmer on S/360 and S/370. So I am used to search and try out a lot. However as I said before my knowledge of Linux and mobile OSes is limited :)
<Regenaxer> cool :)
<Regenaxer> But it is good that you keep on searching
<arievw> Knowing how hard and irritating it can be to learn about errors that seem impossible, I'd very much like to help out. In this case I really think Alex should get hold of such device (maybe from the user) to check it out. Otherwise you are in the blind ...
<Regenaxer> yep
<Regenaxer> (I am Alex btw ;)
<arievw> Ah! Better to start talking here then :)
<Regenaxer> The list is good too, as others might benefit
<Regenaxer> However here it is a lot easier
<arievw> True. But you can always update the list with the lessons learned when culprit is found eventually ...
<Regenaxer> yes, in the end. better
<Regenaxer> As I said above, I will ask them to send me one of the devices
<Regenaxer> Then I can easily debug
<arievw> One suggestion: could they remove any other apps they installed themselves. Even better, hard reset to system defaults, then install pilbox, then test?
<arievw> On 1 device :-)
<Regenaxer> yes, though the devices are new. Bought for this project
<arievw> Yes, but often people are very eager to fill them up quite fast.
<Regenaxer> true
<Regenaxer> Lets see how it turns out tomorrow
<Regenaxer> I'm sure we will eventually find the reason
<arievw> Of course. If I can come up with something useful I'll report.
<Regenaxer> Thanks!
<Regenaxer> I have some duties now. bbl
<joebo> Hi all - it's been awhile, but I thought termux can execute binaries in other paths
<joebo> just can't ls
<joebo> at least in older versions of android it seemed possible on a non-rooted device
<Regenaxer> joebo, you can access certain dirs
<Regenaxer> even if you can't access the ones above
<joebo> right, that's what I thought
<Regenaxer> ok, sorry, must go
<Regenaxer> afp
<joebo> the reason I bring it up ... as a fallback you may be able to ssh into their device
<joebo> and try things out
<joebo> for future reference
<cilz> Regenaxer, just try Pilbox from the playstore on my son's huawei P8 lite 2017 with android 7.0 and works ok right out of the box.
<joebo> including strace which may show if it's a dependency issue
<joebo> Regenaxer: cya!
<arievw> What does 'afp' mean?
<arievw> Don't find it here https://www.netlingo.com/dictionary/a.php
<joebo> away from penti
<joebo> the natural follow-up is... what is penti?
<joebo> it's a variation of afk
<arievw> Aaaah. Not obvious for me. But nice to know :)
<arievw> Well, I'll go afq then (away from QWERTY). Bye for now!
arievw has quit [Quit: Nettalk6 - www.ntalk.de]
<cilz> Regenaxer, the Xcover 4 is a hardened device with knox, Samsung own security platform, hence maybe Pilbox is prevented from running by knox? my 2 cts!
arievw has joined #picolisp
<cess11_> cilz: Either that or that files are handled as non-existant if belonging to another profile is my guess, but it is hard to figure it out without a device at hand.
<cess11_> arievw: If you use Android tablets Penti is well worth the time, it allows one-handed and ergonomically flexible control over it.
<cilz> cess11_: yes this is an other option to consider. I found that the Xcover 4 runs android 7.0. As I said above PilBox runs fine an Android 7.0 at least on my son 's device.
<cess11_> s/it/them
<tankf33der> Regenaxer: is catch-throw is expensive?
<cess11_> cilz: Yar, it runs fine on both my 6.0 and 7.0 devices. There was some trouble with a work unit I had last year where a Google hardening and corporate control software was used but I didn't explore further, just noticed I couldn't load and run the .zip:s I wanted.
<cilz> cess11_: yes, more security usually goes with less freedom!
<cess11_> If only it had delivered more security and not only irritation on my part.
<cess11_> Bad configuration, among other things.
<cilz> :(
<Regenaxer> ret
<Regenaxer> cilz: huawei P8, great!
<Regenaxer> cess11_
<Regenaxer> cilz
<Regenaxer> yes, the knox issue must be investigated
<cilz> T
<Regenaxer> tankf33der, it is a *little* expensive
<Regenaxer> But *very* little I would say
<Regenaxer> it is 'catch' which sets up an env, and cleans it up later
<tankf33der> ok
<Regenaxer> Similar to co / yield
<Regenaxer> hmm, but co is a lot more expensive
<Nistur> Regenaxer: I have my S8 which has knox on it that I can test things on if you want... I mean it's already working here, but if you have theories regarding certain settings etc... I _can_ try... I have not used any functionality which would benefit from knox working so I'm not _that_ worried about burning it out, but at the same time, I'd rather not so if I have the need of it later, it's still an option
<cess11_> tankf33der: About three times slower than '(if T).
<cess11_> According to my simple 'do.
<Regenaxer> Nistur, good. Let's see what I find out with the customer tomorrow
<Regenaxer> cess11_, good to know. I'd thought it is heavier
<cilz> Regenaxer: Xcover 4 has an Exynos 7570 processor which is a 64-bit quad-core CPU so it should runs fine PilBox 64.
<Nistur> I would be particularly surprised if the chipset caused an error like that
<Regenaxer> yes, this I saw from the behavior, because otherwise PilBox gives an earlier error about wrong CPU. It does not try to start bin/picolisp then
<Nistur> from memory, I think the Exynos chipsets DO have a few weirdnesses, I believe these are mostly with regards to the on chip graphics
<cess11_> Regenaxer: Would '(co 'coVar (yield T)) be OK for comparison?
<Nistur> but even if you did hit one of those, I cannot think of a reason why it'd cause bin/picolisp to not be visible/executable
<cess11_> If only certain software can be installed in the work-profile it might allow installation but also break them in weird ways when one tries to run them.
<cess11_> *installations
<Regenaxer> cess11_: Yes, but yield gets expensive if there are significant stack contents (variable bindings)
<cess11_> 0.578 sec.
<cess11_> So slightly slower than 'catch-throw at 0.490.
<Regenaxer> oops, must go once more
<Regenaxer> afp/bbl
<cess11_> About the same for the same amount of [ 1 drop ] in factor, which I think is compiled.
<cess11_> ~0.5 seconds, that is.
arievw has quit [Quit: Nettalk6 - www.ntalk.de]
<Regenaxer> ret
alexshendi has joined #picolisp
arievw has joined #picolisp
arievw has quit [Remote host closed the connection]
HoloIRCUser7 has joined #picolisp
HoloIRCUser7 has quit [Remote host closed the connection]
arievw has joined #picolisp
cilz has quit [Ping timeout: 260 seconds]
alexshendi has quit [Ping timeout: 256 seconds]
<grp> !ping Regenaxer
<Regenaxer> mom
<grp> anyway, here's the question: I have a class +Contact. I was thinking of subclassing it as +Owner which adds billing info relations, but I'd like that some optional fields in +Contact are now a must have (prefix with +Need). Should I define a relation of the same name or somehow change the inheritance of the instance's relation
<beneroth> define a relation of the same name - overshadows the one in the parent (I think)
<Regenaxer> Inheritance is fine, but note that it makes sense in pil mostly in terms of *behavior*, not data
<beneroth> what matters are the relation-specific methods, which are then changed if you have a relationship in the child
<Regenaxer> yep
<Regenaxer> Another note: Forget about +Need in the beginning
<beneroth> Regenaxer, what about (class +A +Entity) (rel foo (+String) (class +B +A) (rel foo (+Number)) ? :P
<Regenaxer> it must be used sparely and with care
<grp> I see, then should I enforce the input of those fields in the gui directly?
<beneroth> grp, important: +Need is in no way checked by the database, it is checked by the gui (form.l)
<Regenaxer> this would work, but is not a good idea
<Regenaxer> beneroth, right
<Regenaxer> I would expect the attributes in a superclass be of the same type
<Regenaxer> So you can use it in the same context
<beneroth> similar with +Key, the uniqueness is not tested in the database layer, has to be ensured on the gui layer (or wherever you edit the object). +Key is about the type of index, so multiple objects can have the same value in a +Key field, but only the last changed one will be in the index
<grp> I see, so adding +Need is gui specific. Then: why should it be used sparely? (just asking so I don't shoot myself in the foot, machine gun style)
<Regenaxer> If I look at some old projects, I see that I overdesigned some of them
<Regenaxer> in terms of class structure
<Regenaxer> It is in the way later
<cess11_> Things like billing might be better to put in separate classes and then use '(+List +Link) or perhaps just '+Link to point to the relevant customer objects.
<beneroth> Regenaxer, so changing the attribute type would work, but probably give some confusion with the code which processes the objects, right?
<Regenaxer> yep, mainly confusing
<beneroth> ok
<beneroth> its great to have the flexibility
<beneroth> but yes, one need to force oneself to keep it simple
<Regenaxer> +Need is tedious if you have new objects still empty
<Regenaxer> The places checking with 'mis>' (by default only GUI) complain
<cess11_> I've mainly used '+Need to make the GUI not produce a new object until certain fields are filled in to some extent, beyond that I think it isn't very useful, and it is probably better done with some sort of button.
<beneroth> maybe then use to separate classes, one for draft/work objects, and one for "real" correct objects, and switch classes using (set> '+Entity)
<Regenaxer> In the gui is the effect that you cannot enter anything
<beneroth> s/use to separate/use two separate
<Regenaxer> I use +Need only for attributes populated with default values in 'new' or 'T'
<Regenaxer> Then the user cannot empty them again
<grp> I see. So for now I'm better off avoiding it. Then once I have a working model try adding it if it's absolutely needed.
<Regenaxer> yes, good
<Regenaxer> And for subclassing I would also wait until things clear up
<Regenaxer> you can extend easily later
<Regenaxer> For example, in BTG I have a class +Person with 8 subclasses
<Regenaxer> It is a pain in the ass to search
<grp> (I was thinking in having +Contact with a phone number, maybe email, but once it's promoted to +Owner (subclass of +Contact), phone and email are an absolute must-have)
<Regenaxer> Now as I rewrite it I make a single class
<Regenaxer> and keep the type as a symbolic attribute which can be queried
<cess11_> This you want to solve in a message or function rather than the object structure.
<grp> (so that an +Owner can still be used as +Contact for other purposes)
<Regenaxer> ok, this makes sense
<Regenaxer> another typical case is that an attribute is indexed in one class but not in another
<Regenaxer> in case it is archived for example and searched differently
<cess11_> It is a nice way to cut down on resource consumption when there are many objects of different categories.
<Regenaxer> exactly
<Nistur> (chdir "..") doesn't appear to do what I want it to
<Nistur> (if *Dbg (setq im:debug_println 'println) (de im:debug_println()))
<Nistur> that way I can either run my script normally and it's silent, apart from what output I think is necessary for the user, or I can run it in debug and spew logs for me to see what's going on :D
<Nistur> I'm silly... chdir only changes for the scope of that
grp has quit [Quit: box shutting down...]
<Nistur> ok, that's working, and it's simplified my code a LOT
<Nistur> now, I just need to figure out how to sort the output of (dir)
<beneroth> (sort (dir)) to sort by name
<Nistur> ok, thanks :)
<beneroth> else use (by '((Element) <here your code which returns the thing of the element according to which it should be sorted>) sort (dir))
<beneroth> the first argument to (by) is an anonymous function in this case. the second argument is (sort), and the last is a list
<Nistur> I need to change my test data from being named Test-1.png etc to being Test-01.png so it sorts properly
f8l has quit [Read error: Connection reset by peer]
<beneroth> it sorts the strings, so yeah, its textual comparison
stultulo has joined #picolisp
<Nistur> yup
stultulo is now known as f8l
<beneroth> you could do (by '((F) (use (@Stuff @Num) (when (match '(@Stuff "-" @Num ~(chop ".png")) (chop F)) @Num))) sort (dir))
<beneroth> (not tested, just written here)
<Nistur> beneroth: thanks :) works perfectly now
<beneroth> cool :)
<Nistur> I'll leave it as-is for now :P
<Nistur> maybe I'll have to change it to that later
<Nistur> but for now I'm going for a KISS approach where possible :P
<beneroth> yeah, Yagni !
<Nistur> alright, that'll do me for now, I think
<Nistur> my next task is to start actually using imagemagick to draw things
<beneroth> :)
<beneroth> yeah I need to go to bed now
<beneroth> good night o/