beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
razzy has quit [Ping timeout: 252 seconds]
mtsd has joined #picolisp
rob_w has joined #picolisp
rob_w has quit [Remote host closed the connection]
rob_w has joined #picolisp
rowanthorpe has joined #picolisp
rowanthorpe1 has joined #picolisp
rowanthorpe has quit [Ping timeout: 250 seconds]
rowanthorpe1 is now known as rowanthorpe
razzy has joined #picolisp
mtsd has quit [Ping timeout: 250 seconds]
razzy has quit [Remote host closed the connection]
razzy_ has joined #picolisp
mtsd has joined #picolisp
<razzy_> hmm,.. I have nested list and when i do function i do not get same result. https://wepaste.es/append I expected (NIL ("A" ... "B"))
<razzy_> if i want to (set (caar Pool) '(1 2 3)) it also do not work.
<razzy_> NIL is protected. i get the meaning that empty list does not exists :D
<Regenaxer> Hi razzy_
<Regenaxer> (caar Pool) is NIL
<Regenaxer> so the result is correct
<Regenaxer> Appending NIL and a list gives that list
<Regenaxer> (append NIL (1 2 3)) gives (1 2 3)
<Regenaxer> And because (caar Pool) is NIL, you cannot set it
<Regenaxer> (car Pool) is (NIL ("A" ..))
<Regenaxer> so you can set *that*
<Regenaxer> (set (car Pool) 7)
<Regenaxer> then Pool should be ((7 ("A" ...
<razzy_> it was suppose to look (()("A" "B"))
<Regenaxer> yes, same
<Regenaxer> () is NIL
<Regenaxer> Think how Lisp works
<Regenaxer> The arguments are evaluated
<Regenaxer> so (set (caar Pool) 7) is (set NIL 7)
<Regenaxer> or (set (car Pool) 7) is (set '(NIL ("A" ..)) 7)
mtsd has quit [Ping timeout: 252 seconds]
mtsd has joined #picolisp
stultulo has joined #picolisp
f8l has quit [Ping timeout: 252 seconds]
cess11 has quit [Ping timeout: 252 seconds]
cess11 has joined #picolisp
<razzy_> Regenaxer: weird. how would you do (7 (NIL ("A"...)) (NIL ("A"...)) )
<razzy_> if not (set (car Pool))
<Regenaxer> 'cons'
<razzy_> ah, omg, i have soo much biases
<Regenaxer> No worries! :)
<Regenaxer> Try to draw the box diagrams perhaps?
<Regenaxer> I think this helps a lot
razzy_ has quit [Ping timeout: 240 seconds]
<cess11> hunar seems to have left but in case they read the weblogs, i would probably go for racket if i had to build for people running windows
<cess11> it's pretty much a lisp and plops out a nice binary
<cess11> wsl is a hassle, people need to install it and sometimes it breaks in mysterious ways or they chose the wrong version or dist
<Regenaxer> I see
<cess11> shipping a binary, possibly one with nice looking cross platform gui, is much easier
<cess11> if the application could run on a server picolisp would be a nice option since any device with a browser can connect and interact
mtsd has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
mtsd has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
mtsd has quit [Ping timeout: 250 seconds]
mtsd has joined #picolisp
mtsd has quit [Client Quit]
<razzy> I want non mutably change third of A and save it into B. Can I (set B (set (nth 3 (copy A)) 30)) ? is there better way?
<Regenaxer> yes, 'replace'
<Regenaxer> To do it manually, use standard functions:
<Regenaxer> : (setq A (1 2 3 4 5))
<Regenaxer> -> (1 2 3 4 5)
<Regenaxer> : (setq B (append (head 2 A) (cons 999 (cddr A))))
<Regenaxer> -> (1 2 999 3 4 5)
<Regenaxer> or even more basic:
<Regenaxer> : (setq B (cons (car A) (cadr A) 9999 (cddr A]
<Regenaxer> -> (1 2 9999 3 4 5)
<Regenaxer> Sorry, 'replace' was wrong of course
<Regenaxer> I meant 'place'
<Regenaxer> : (place 3 A 9999)
<Regenaxer> -> (1 2 9999 4 5)
<Regenaxer> btw, append above is a bit waste. Better conc
<Regenaxer> : (conc (head 2 A) (cons 999 (cddr A))))
<Regenaxer> because 'head' gives a fresh list
<razzy> Regenaxer: yop, replace is wrong. is place non mutable?
<Regenaxer> sure
<razzy> thx. that is what i want.
<razzy> in ref is is called non-destructive which is weak condition.
<Regenaxer> Usually the ref only says if something is destructive, non-destructive is implicit then
<Regenaxer> But "place" *sounds* destructive perhaps ;)
<razzy> subjective ;). i would like "immutate" flag.
<Regenaxer> "immutable" is used by Clojure. In Lisp the term is "(non-)destructive" I think.
<razzy> well, from what i hear, destructive and non-destructive seem not direct opposites. which seems wrong.
cyborg_ar has quit [Ping timeout: 258 seconds]
cyborg_ar has joined #picolisp
<Regenaxer> and "mutable" is not the direct opposite of "immutable"? ;)
mabi has quit [*.net *.split]
Nistur has quit [*.net *.split]
v88m has quit [Ping timeout: 250 seconds]
Nistur has joined #picolisp
mabi has joined #picolisp
v88m has joined #picolisp
<razzy> Regenaxer: I think they are direct opposites.
v88m has quit [Ping timeout: 250 seconds]
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
rob_w has quit [Quit: Leaving]
hunar1997 has joined #picolisp
hunar has joined #picolisp
hunar1997 has quit [Client Quit]
teddydd has joined #picolisp
<hunar> Hello cess11 :D, I first used racket, but there was a big problem for me, the native gui wasn't supporting some important structures that i wanted (a table-like structure to put database viewer in), then a bigger problem arrived, it turns out that gui also doesn't support unicode :( i'm Kurdish and my language is all unicode.. i tried to use something like GTK or QT in racket but i didn't like the method/syntax of the examples
<hunar> I asked for help for those two problems here if anyone wanted to look :D
<hunar> I tried logging in to this chat from work but for some reason all the IRC channels banned the network that i'm on :/ i'm pretty sure nobody uses irc in my city
<Regenaxer> hi hunar!
<hunar> Hello Regenaxer :D
<Regenaxer> :)
razzy has quit [Ping timeout: 248 seconds]
razzy has joined #picolisp
<cess11> hunar: ah, right, i thought they had sorted out the unicode problems
<cess11> don't remember the details now and that computer is tucked away but last year i did a small thing with a gui that had cols and rows of data in one window
<cess11> if you need access to a shell in europe or elsewhere for a persistent irc client reachable over ssh i'm sure someone here might have one
<hunar> I also found an example but didn't figure out (or maybe was impossible) to make the cells editable, they only contained labels.. i had to manually make my own structure connecting everything in a grid :(
<hunar> I then tried gtk in Common Lisp and that was a nightmare (the table part)
<hunar> Tried qtools but the resulting executable in windows wasn't working, and shinmera (the creator of qtools) doesn't have time to debug it, i created an issue months ago
<Regenaxer> Tedious indeed
<cess11> i might go looking for my old code
<Regenaxer> That's why I decided 20 years to use only browser gui for everything
<Regenaxer> even local apps
<Regenaxer> *20 years ago
<cess11> drracket 7.9 seems to be able to handle unicode in the repl at least, https://imgur.com/a/wdPqwzG
<cess11> in general desktop gui is a nightmare, but i thought the message passing oop in racket/gui was nicer than the most i've had to endure
<cess11> though it seems likely you might have to write your own cell, to get the exact logic you want in who can edit what and when, and how save and error handling is actually done
<hunar> Yes, but GTK and QT already have those and i was lazy :D, i'll try racket now to see if unicode support changed
<cess11> racket/gui doesn't make assumptions about how things should work, which takes some effort but allows for a lot of customisation that would be hairier in other similar libraries
razzy has quit [Ping timeout: 250 seconds]
<hunar> Thats a good point :D if unicode support existed then I will go back to racket, or at least make web based gui with racket since the langauge itself doesn't have a problem with unicode, only the gui does
<cess11> there was an issue on some racket github about unicode support, that i can reproduce, i think it's thai or some other southeast asian script, but the kurdish i've tried this far works fine
<cess11> racket or picolisp on the server is mostly about whether you want to build around continuations or not
razzy has joined #picolisp
rowanthorpe has quit [Ping timeout: 250 seconds]
<razzy> Regenaxer: if I want to (place) end of list somewhere. how to do it
<razzy> (place 2 A NIL) seems not to work
<Regenaxer> You can use 'con' to cut off destructively
<Regenaxer> Or 'head' non-destructively
<Regenaxer> (con (cdr A) NIL)
<razzy> Regenaxer: so cannot work with place?
<Regenaxer> right
<Regenaxer> To cut off a list you need to modify the CDR of a cell
<Regenaxer> 'place' sets some new CAR
<Regenaxer> Again, draw the cell diagrams :)
<razzy> i was thinking there was NIL in last car. my bad
<Regenaxer> no problem
<Regenaxer> So 'con' modifies the CDR of a cell
<Regenaxer> Just as 'set' modifies the CAR
<razzy> hmm,.. i think i am learning something huge :]. i need to draw some diagrams :D
<Regenaxer> Yeah :)
<hunar> Sorry to interrupt the conversation.. I tried the latest version of racket, the problem wasn't solved. But I mis-remembered the problem sorry :/ the GUI DOES support unicode when used as label, but when the user enters text into an editable field, the letters don't join and are reversed, same text (if pre-generated in code) doesnt have the problem .. and i cant right-align the text field which I REALLY need
razzy has quit [Ping timeout: 248 seconds]
<Regenaxer> hunar, no worry! No continuous conversation here:)
razzy has joined #picolisp
<hunar> Today I had one more try at compiling Pil under windows :D i found this from (Jan 2007) http://www.software-lab.de/cygwin.README
<Regenaxer> Uh, hmm, this is very old
<Regenaxer> And cygin never worked fully
<Regenaxer> There were always problems with (fork) and select system calls
<Regenaxer> no, not select
<Regenaxer> it was fcntl()
<hunar> That person successfully built it under windows using cygwin, i tried msys2 since cygwin was acting weird.. It did compile but the last linking step that generates the final executable had errors
<Regenaxer> i.e. file record locking needed by the DB
<Regenaxer> Is there LLVM available for Cygwin?
<Regenaxer> Pil21 depends on LLVM
<hunar> I did read that too :D he said (I solve it by disabling the lock), i looked at fcntl library and it was already disabled
<hunar> Yes, llvm exists
<Regenaxer> ah, yeah, ok (disabled)
<hunar> here is the error https://pastebin.com/cKiSJHnj
<Regenaxer> No idea where collect2 comes from
<hunar> it looks like libreadline errors, but the -lreadline works (it gets rid of other errors that reappear if i removed -lreadline)
<Regenaxer> hunar, if you want Pil on a consumer machine, you could try PilBox on Android
razzy has quit [Ping timeout: 250 seconds]
<Regenaxer> No need to install anything then
<Regenaxer> (just the app)
<Regenaxer> in fact the easiest way to get PicoLisp
<hunar> I first found picolisp using the app :D it was great and a tiny apk :) (in common lisp eql5-android made 100MB apps) but what if the consumer was on pc :(
<Regenaxer> ok :)
<Regenaxer> I never addressed the issue of user on pc. Always browser based applications
<Regenaxer> Makes everything a lot easier anyway
<hunar> You're right :D neither racket nor common lisp support android as much as Pil :)
v88m has joined #picolisp
<Regenaxer> I understand that there are apulications noy suitable as web apps
<cess11> to run picolisp under contemporary windows it's best to use wsl
<hunar> If anyone found the cause of the linking above, please contact me :D, if for some reason I forgot this channel here is an email :D hunarrashid97@gmail.com
<Regenaxer> It complains about `WinMain'
razzy has joined #picolisp
<Regenaxer> I think old pil32 had a patched main() function for that
<Regenaxer> to interface with Cygxin
<cess11> remind me to look into racket more in a few days or next week, i can load up a small app in racket/gui and experiment a bit
<Regenaxer> Cygwin
<hunar> cess11, I agree, but the user needs to download a huge linux os for even a simple app :(
<cess11> yeah, that's a problem
<Regenaxer> right
<cess11> could you describe the application you're trying to build?
<Regenaxer> Could be scaled (stripped) down a lot
<cess11> might be easier to make good recommendations if i know the use case better
<cess11> though i kind of suck at native gui stuff, even curses is too cumbersome for me
<Regenaxer> curses is a nightmare
<Regenaxer> I used it for Vip initially
<Regenaxer> but then threw it out :)
<hunar> Currently I have a goal :D whenever i describe it to others, they make a weird face.. There are aloooot of "database" projects, basically simple softwares that company's accountants use to know how much somebody bought and owes us, and they sell stupid buggy softwares for high prices, my goal is to make an open source version that is easier and (maybe) better than all of them for free, to make people make stuff good enough to pay for
<cess11> ah, so an erp and accounting software
<cess11> i would definitely do that as a client-server architecture
<Regenaxer> right, for multi-user access
<hunar> yeah, something like gnucash but with inventory management but without double entry (i have a custom method that is neither single entry or double entry, it might fail though)
<hunar> not necessarily, most of them are used by a single computer.. but local access through browsers would be nice :D
<cess11> double entry has the perk that it'll be fairly easy to output something that external accountants and tax collectors accept
<Regenaxer> Yes, we output DATEV here in Germany
<cess11> in small companies single computer system is probably enough but medium and bigger probably have several people accessing and modifying the same data
<cess11> you don't have to expose it as double entry to the user though, could just abstract some of it away and do the shuffling on the account plan under the hood
<hunar> My country is not very advanced yet, I myself work in a trading company that imports electrical home appliances from china, as an accountant and they use a software which has so many features but they don't use %90 of it, nearly half of the companies use notebooks :/ they get the job done around here
<Regenaxer> I earned my living during the last 30 years mainly with ERP systems
<Regenaxer> well, logistics too
<cess11> it's similar also in sweden, small companies have just started moving from pen and paper to digital accounting and warehousing
<cess11> small engineering industry companies commonly use paper because erp:s are too expensive if they are CE-compliant
<hunar> And sometimes i use both :( some customers don't understand the pdf's that i send to them, those customers have a separate copy of everything on a notebook, so much manual work (that could be solved if i could edit the source code of the software)
<cess11> my paycheck comes from erp in service industry, home cleaning services mostly, we don't do accounting exactly but invoicing, accounting integrations, that kind of thing
<cess11> yeah, so client-server, that will allow both handhelds and desktop computers to interface with the same system
<hunar> I hope one day all softwares get a good opensource alternative
<Regenaxer> T
<cess11> there are lots of open source in this area but every industry sector is different so the generic solutions always require a lot of customisation anyway
<hunar> The idea in my head is very flexible :D I think my software will have a good chance at becoming popular :)
razzy has quit [Ping timeout: 240 seconds]
<hunar> Do you think Pil is the choice for me :D.. since every company will need some hours to learn the software, i'm sure they will have time to install WSL too
<Regenaxer> For me there is no question ;)
<Regenaxer> But I'm too biased
<cess11> if you know it well, sure
<Regenaxer> T
<hunar> How many years did you uses Pil :D
<Regenaxer> hunar, we could discuss tfnat next PilCon
<cess11> more or less daily for five years or so
<cess11> i mostly use it for scripting purposes and data exploration
<hunar> Ooo there is PilCon too :D I thought Pil had a small community
<Regenaxer> it is very small
<cess11> it's a video conference done regularly
<Regenaxer> PilCon is less than 10 participants usually
<cess11> until the travel bans are lifted, i suppose, i'm still hoping we'll do a meetup eventually
<Regenaxer> yeah
<hunar> cess11, that's great :D you guys are giving me hope to stop searching and stay with Pil :D
<Regenaxer> this was the initial plan in 2020
<hunar> Are they uploaded to youtube?
<Regenaxer> Unfortunately not
<Regenaxer> We never recorded them
<cess11> not sure how easy it is to record a jitsi meeting
<hunar> :(
<hunar> I never heard of jitsi, let me google it
<Regenaxer> We thought about it, but there was no easy way
<Regenaxer> Jitsi Meet
<Regenaxer> mobile and desktop
<hunar> Is it better than Zoom? zoom is very easy to record
<cess11> it's easy to self host, low degree of corporate influence on the application
<Regenaxer> Jitsi is free, and with less security issues perhaps
<Regenaxer> One member here (beneroth) operates the server
<hunar> Maybe one member can record jitsi using OBS :D
<Regenaxer> Should be possible, I think the issue was the perspective
<Regenaxer> *who* records his view
<Regenaxer> We should reconsider this
<hunar> There isn't a grid of all the users like the other programs?
<Regenaxer> there is
<Regenaxer> and we share screens
<Regenaxer> so each user can select what he sees at a given moment
<hunar> That's great :D but the youtube upload must be your next priority :( youtube results barely show results when i type picolisp
<Regenaxer> T
<Regenaxer> It is on the 10th and 20th each month
<Regenaxer> announcement in the mailing list
<Regenaxer> but the schedule is fixed
<hunar> I would never be able to attend the meeting since i work 10 hours a day and become very tired when i come home :/
<Regenaxer> oh :)
<hunar> Each month :D that's great
<Regenaxer> 10th is early (8 UTC)
<cess11> i have a similar problem, work, then the kid and chickens and gardening
<Regenaxer> 20th is 16 UTC
<cess11> but i managed to attend one earlier this spring
<Regenaxer> Finding a common schedule was hard
<Regenaxer> so the fixed date causes the weekday to change
<cess11> i think the current solution is good
<Regenaxer> so everyone should have a chance
<Regenaxer> T
<Regenaxer> e.g. Sat or Sun
<hunar> I'm UTC+3, so 10th is a busy hour at work, and 20th is dinner :(
<Regenaxer> no, 10th of September is next
<Regenaxer> at 8 UTC
<Regenaxer> so 11 ?
<hunar> Yes
<Regenaxer> yeah, busy
<Regenaxer> I'm UTC+2
<Regenaxer> in winter UTC+1
<cess11> same
<Regenaxer> so 1:
<Regenaxer> so 17:00 in winter here
<cess11> can't make it on 10 september, have the weekly meeting with my developer colleagues at that time on fridays, only good meeting of the week
<Regenaxer> ok
<cess11> 20th might work though, listen in while we eat
<Regenaxer> a Monday
<hunar> Oh, I didn't consider checking the day of week :|
<cess11> 10th of november is a sunday, that might work for you
<hunar> 10th September for me is Friday :D which is the holiday here
<Regenaxer> cool
<hunar> This chat was very helpful :D I think every small community is a great community (look at youtube comments of a large vs small channel) I'll go now :D Good Night everyone
<Regenaxer> Good night hunar!
<cess11> good night!
hunar has quit [Quit: Leaving]
teddydd has quit [Remote host closed the connection]
razzy has joined #picolisp
mario-go` is now known as mario-goulart
mario-goulart has quit [Changing host]
mario-goulart has joined #picolisp