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
nonlinear has joined #picolisp
aw- has joined #picolisp
Regenaxer has quit [Ping timeout: 248 seconds]
rob_w has joined #picolisp
aw-1 has joined #picolisp
aw- has quit [Ping timeout: 268 seconds]
aw-1 is now known as aw-
orivej has quit [Ping timeout: 240 seconds]
mtsd has joined #picolisp
aw- has quit [Quit: Leaving.]
Regenaxer has joined #picolisp
<Regenaxer> oops, seems my connection was lost
<mtsd> Hello Regenaxer, good to see you return :)
<tankfeeder> hi all
<mtsd> Hi tankfeeder
<Regenaxer> Hi mtsd, tankfeeder!
<tankfeeder> task works on small inputs
<tankfeeder> core works.
<tankfeeder> problem in subsets on huge range
<tankfeeder> where were a version of subsets on recursion on place...
<Regenaxer> yes, subset is expensive
<Regenaxer> only on permutations I think
<Regenaxer> Is there no other algo?
<Regenaxer> How do others solve it?
<tankfeeder> i need a version of (subset (range 1 4096) 3)
<Regenaxer> No need to generate the list of the subset
<Regenaxer> Can't 'samples' help?
<Regenaxer> or simply generate randoms and check if they were there already?
<Regenaxer> idx or member
<tankfeeder> as you see i have a list of all primes before 4096
<tankfeeder> and if 3 i should find sum = 4096
<tankfeeder> so i need check of tripes or pairs or four element
<tankfeeder> partition 2017 with 24 primes.
<tankfeeder> even list of 24 items
<Regenaxer> and 'samples'?
<Regenaxer> instead of subset?
<tankfeeder> i dont understand now what it returns.
<Regenaxer> I also don't remember well
mtsd has quit [Ping timeout: 248 seconds]
mtsd has joined #picolisp
<tankfeeder> maybe this one is cheaper ?
<Regenaxer> not sure
orivej has joined #picolisp
<tankfeeder> do you remember light version of subsets?
<tankfeeder> you called it recursion on place
<Regenaxer> It was 'permute' I think
<Regenaxer> Permuting in-place
aw- has joined #picolisp
<aw-> hi all
<Regenaxer> Hi aw-
<aw-> Regenaxer: i noticed something interesting recently.. but maybe it's been an issue for a while
<aw-> from picoLisp 3.1.8 (debian jessie default), we can't use it to compile picoLisp 17.x
<Regenaxer> yes
<aw-> missing some functions
<Regenaxer> flood, right?
<aw-> yes
<Regenaxer> old issue
<aw-> ok that's what i thought
<Regenaxer> It was my mistake to use 'flood' there
<aw-> so i did a regular 32-bit install, and then used it to compile 64
<Regenaxer> yes, but better take the pre-built .s files then
<aw-> no need, just uninstall default picoLisp 3.1.8, then cd src; make; cd ../src64; make
<Regenaxer> right, perfect
<aw-> switched my default dev/work OS to Linux, from MacOS
<Regenaxer> Good! :)
<aw-> but i'm debating if I want to try working from an ARM64 machine
<Regenaxer> Now Linux/x86?
cess11_ has quit [Ping timeout: 240 seconds]
anjaa has quit [Ping timeout: 268 seconds]
<aw-> linux x86/64
<Regenaxer> I also prefer Arm, but in fact it does not make much difference unless you go down to the asm level
<Regenaxer> Not sure if speed differences are measurable
<aw-> not sure.. i just want an excuse to buy an arm64 machine
<Regenaxer> :)
anjaa has joined #picolisp
aw- has quit [Quit: Leaving.]
cess11 has joined #picolisp
aw- has joined #picolisp
aw- has quit [Quit: Leaving.]
alexshendi has joined #picolisp
alexshendi has quit [Ping timeout: 240 seconds]
<tankfeeder> i found this can be solved by dynamic programming
orivej has quit [Ping timeout: 250 seconds]
orivej has joined #picolisp
mtsd has quit [Ping timeout: 268 seconds]
aw- has joined #picolisp
mtsd has joined #picolisp
freeemint_ has joined #picolisp
aw- has quit [Quit: Leaving.]
<Regenaxer> Dynamic?
<freeemint_> HI
<Regenaxer> Hi
<freeemint_> I had picolisp crash when it tried to print a very big number.
<freeemint_> Regenaxer: The number was (** 2 (apply '* (range 1 11))) . Any idea why picolisp crashed printing that number?
<Regenaxer> Never saw that
<Regenaxer> Did it crash? I think it takes so long to print
<freeemint_> Sorry got my mistake wrong
<freeemint_> The error was something else:
<Regenaxer> BTW, the quote before the asterisk is not needed. Just for the records
<freeemint_> : (bench (nil (setq NN (** 2 (apply '* (range 1 11)))))) 3594.978 sec -> NIL : (num? NN) -> Speicherzugriffsfehler
<Regenaxer> yep, too big to fit into memory :)
<freeemint_> It fits in to memory quiet well
<freeemint_> it is only around 1,1% of 2 GB
<Regenaxer> yes, but stack space
<freeemint_> Why did it crash on num?
<Regenaxer> did you set to unlimited?
<Regenaxer> ulimit -s unlimited
<freeemint_> no why would i need to?
<Regenaxer> cause it needs lots of stack
<Regenaxer> The number must be converted to decimal somewhere
<Regenaxer> from binary
<freeemint_> ah
<freeemint_> I see
<Regenaxer> Stack is most efficient for that
<Regenaxer> Diy you try to set ulimit -s unlimited ?
<Regenaxer> Should work then
<freeemint_> waiting another 50 minutes for it to generate
<Regenaxer> hehe
<freeemint_> Do numbers need to be parsed when they are put in to the database?
<Regenaxer> Parsed?
<Regenaxer> you mean converted?
<Regenaxer> Anyway, no
<freeemint_> good
<Regenaxer> Why?
<freeemint_> Because i might want keep that number :D
<freeemint_> (one i have it)
<Regenaxer> ok, but then you don't need a DB
<freeemint_> I want to store it
<Regenaxer> just (out "myNum" (pr (** 2 (apply * (range 1 11)))))
<Regenaxer> then (in "myNum" (rd))
<freeemint_> How is that better than using the db?
<Regenaxer> You don't need a DB just for a single number
<freeemint_> I would have a set of those
<Regenaxer> But note that (in "myNum" (rd)) will be fast, but then it is printed to the console and will take long again
<freeemint_> (nil)
<Regenaxer> ie the conversion
<Regenaxer> ?
<Regenaxer> The function 'nil' ?
<freeemint_> (nil (setq NN (in "myNum" (rd))))
<Regenaxer> ah, yes
<Regenaxer> I usually do
<Regenaxer> : (setq NN (in "myNum" (rd))) T
<Regenaxer> -> T
<freeemint_> works too
<Regenaxer> less to type :)
<freeemint_> How "efficient" is pilio?
<freeemint_> space wise
<Regenaxer> I little more compact than s-exprs
<freeemint_> ok
<freeemint_> what are the limits on pilio?
<Regenaxer> it is called PLIO
<freeemint_> Sorry
cess11_ has joined #picolisp
<Regenaxer> Limits? It does not store comments
anjaa_ has joined #picolisp
<Regenaxer> and no read-macros
<freeemint_> On number of cells?
anjaa has quit [Ping timeout: 255 seconds]
cess11 has quit [Ping timeout: 268 seconds]
<Regenaxer> What limit should be on the number of cells?
<freeemint_> 2^48?
<freeemint_> no idea that is why i am asking
<Regenaxer> indeed
<freeemint_> no idea or 2^48?
<Regenaxer> Please think a little more. I don't have so much time to answer such questions
<freeemint_> ok
mtsd has quit [Quit: Leaving]
rob_w has quit [Ping timeout: 260 seconds]
miskatonic has joined #picolisp
orivej has quit [Remote host closed the connection]
orivej has joined #picolisp
orivej_ has joined #picolisp
<m_mans> Hi all!
orivej has quit [Ping timeout: 248 seconds]
<m_mans> Regenaxer: have you ever needed more complex access control system than you have in demo ERP system?
<Regenaxer> hi m_mans
<Regenaxer> Until now the user/role/permission system was fine
<Regenaxer> I use the same everywhere, e.g.also in the wiki
<m_mans> No multiple roles for the same user?
<m_mans> My chief (product manager) ask me to make some too complex system (I suppose) :)
<Regenaxer> What should that be good for?
<Regenaxer> The role of a user can be changed any time (by someone who has permission ti do that ;)
<m_mans> I don't know if complex system will be more comfort, until now I was happy with current access control implementation :)
<m_mans> Concerning multiple roles for the same user, maybe it can help when users have several roles in organization
<m_mans> of course, the question is not "how to implement this or that", but "how much tasks we could solve not adding too many new concepts"
<Regenaxer> Yes, but only one role is active at a time
<m_mans> ok, then we just need to save allowed list of user's roles somewhere
<Regenaxer> yes, makes sense
<m_mans> "only one role is active at a time" - I didn't think about it, nice idea
<m_mans> I suppose you had systems with *a lot* of permissions?
<Regenaxer> Max I had is 26 I think
<m_mans> did you display them as plain list of checkboxes without any grouping?
<m_mans> just to know
alexshendi has joined #picolisp
<Regenaxer> yes, exactly as in the demos
orivej_ has quit [Quit: orivej_]
orivej has joined #picolisp
<m_mans> thanks, Regenaxer! See you!
<Regenaxer> :)
<freeemint_> I need some help debugging a program doing relativly boring list stuff (but some recursion). Anyody willing to take a look i can not find the mistake that causes -- Symbol expected.
<Regenaxer> OK
alexshendi has quit [Read error: Connection reset by peer]
<freeemint_> (pper (1 2) ) causes the error
<freeemint_> Also thanks
<Regenaxer> (pper (1 2))
<Regenaxer> !? (method (car "X") (cdr "X"))
<Regenaxer> 1 -- Symbol expected
<Regenaxer> ? (bt)
<Regenaxer> (pp L (dec C) ..) "X" (1 2)
<Regenaxer> C 1
<Regenaxer> *Dbg NIL
<Regenaxer> ...
<Regenaxer> (method 'msg 'obj) -> fun
<Regenaxer> Clear?
<Regenaxer> I would change 'ifn' to 'unless'
<Regenaxer> The NIL is not needed in both cases
<freeemint_> i used 'pp instead of 'pper
<freeemint_> let me see if it works as expected now
<freeemint_> thanks
<freeemint_> I am not yet concerned with performance
<Regenaxer> Good
<Regenaxer> The NIL is not relevant for performance
<Regenaxer> Just redundant
<freeemint_> My programm is wrong anyhow, it produces the wrong number of results
<Regenaxer> I have not looked at the meaning
<Regenaxer> I'm sure you find it :)
<Regenaxer> I recomend to single-step
<Regenaxer> then you quickly find what's wrong
<Regenaxer> (debug 'pper)
<freeemint_> Oh it produces to few results, not to many
anjaa_ is now known as anjaa
<freeemint_> My programm should produce the following list {order is not relevant} for (pper (1 2)) = {{(1 . 1) (2 . 2)} {(1 . 2) (2 . 1)} {( 1 . 1)} {( 2 . 2)} {(1 . 2)} {( 2 . 1)} {()}}}
<freeemint_> (just talking to myself)
alexshendi has joined #picolisp
<freeemint_> oh an there is a } ti many
<Regenaxer> ? Pil uses {} for external symbols only
<freeemint_> denotes {} order not relevant in the output
<freeemint_> the second part of the pair is element of the input the first part is from (range 1 (length input))
<freeemint_> afk
freeemint_ has quit [Ping timeout: 260 seconds]
miskatonic has quit [Quit: WeeChat 1.0.1]
miskatonic has joined #picolisp
orivej has quit [Ping timeout: 248 seconds]
nonlinear has quit [Remote host closed the connection]
yumaikas is now known as cmiller
cmiller is now known as yumaikas
orivej has joined #picolisp
miskatonic has quit [Read error: Connection reset by peer]
miskatonic has joined #picolisp
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]