Re: where are the values of CAR and CDR stored?
Hi Alex, As you observed, a cell is defined as a structure of two pointers. This is just to keep the C compiler happy. In truth, the CAR and the CDR contain either a pointer to another cell, or a plain binary value. this is what i was after. thank you. cheers, /e -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Subscribe
Hello Vijay Mathew vijay.the.sche...@gmail.com :-) You are now subscribed -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: Floating point arithmetic
Hi Vijay, How can I do floating point arithmetic in PicoLisp? Is there an example of fixed-point division? As your question seems to correctly presume, there is no real floating point arithmetic in PicoLisp. Fixed point numbers are actually scaled integer numbers. So a division always requires a multiplication with the scale _before_ actually dividing the numbers, and a multiplication needs a division by the scale _after_ multiplying the arguments. In both cases, the '*/' function (muldiv) is normally used. In addition to being faster than separate calls to '*' and '/', '*/' also rounds the result. For example: : (scl 6) # Use a scale of 100 - 6 # Division : (*/ 17.0 1.0 3.0) # Divide 17 by 3 - 567 : (format @ *Scl) # See it as fixpoint - 5.67 # Multiplication : (*/ 12.345 0.99 1.0) # Multiply 12.345 with 0.99 - 12221550 : (format @ *Scl) - 12.221550 As you see, the scale (100) can be specified conveniently as 1.0. Does this help? Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: Floating point arithmetic
Hello Alex, Thanks for the detailed answer and thanks for PicoLisp! -- Vijay On Wed, Aug 25, 2010 at 5:34 PM, Alexander Burger a...@software-lab.de wro= te: Hi Vijay, How can I do floating point arithmetic in PicoLisp? Is there an example of fixed-point division? As your question seems to correctly presume, there is no real floating point arithmetic in PicoLisp. Fixed point numbers are actually scaled integer numbers. So a division always requires a multiplication with the scale _before_ actually dividing the numbers, and a multiplication needs a division by the scale _after_ multiplying the arguments. In both cases, the '*/' function (muldiv) is normally used. In addition to being faster than separate calls to '*' and '/', '*/' also rounds the result. For example: : (scl 6) =A0# Use a scale of 100 - 6 # Division : (*/ 17.0 1.0 3.0) =A0# Divide 17 by 3 - 567 : (format @ *Scl) =A0# See it as fixpoint - 5.67 # Multiplication : (*/ 12.345 0.99 1.0) =A0# Multiply 12.345 with 0.99 - 12221550 : (format @ *Scl) - 12.221550 As you see, the scale (100) can be specified conveniently as 1.0. Does this help? Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
httpGate redux
Hi list, using the dev version, i was able to install and run the wiki with httpGate successfully. i can log in and do things fine. *but* i am redirected to a different port (http://192.168.1.253:34205/523083596357234...@start?*menu=+3*Tab=+1*ID=*Evt=+1*Got=_+2_+1) after logging in. how can i just make it stick with port 80? thanks much /e -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: httpGate redux
Hi Edwin, *but* i am redirected to a different port (http://192.168.1.253:34205/523083596357234...@start?*menu=+3*Tab=+1*ID=*Evt=+1*Got=_+2_+1) after logging in. how can i just make it stick with port 80? This is because as soon as a user logs in, a session (in its own child process) is started. Each child listens at its own port. Changing this policy is not easy, at least not without a complete rewrite of the xhtml/form framework. In fact, I wouldn't even know how to do this (though I must confess I never seriously considered alternatives ;). What kind of problems do you see with this port allocation and redirection? Sticking with port 80 is usually handled by 'httpGate'. To the outside world, there will always only port 80 (or 443) be visible. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe