Search found 127 matches

by wvxvw
Mon Sep 10, 2012 3:15 am
Forum: Common Lisp
Topic: Is there a direct calculation for gradient descent?
Replies: 5
Views: 9322

Re: Is there a direct calculation for gradient descent?

Thanks, yeah, the minimization is something that rings the bell to me. But what do you mean when you say "analytically solvable" - this must be my laps of technical language, I don't know what does it mean when applied to function, can you please explain or have a link to an article?
by wvxvw
Mon Sep 10, 2012 2:49 am
Forum: Common Lisp
Topic: Antireader macros
Replies: 14
Views: 25967

Re: Antireader macros

If they will be used simultaneously, how then the printer will choose which to use for printing? :/
by wvxvw
Mon Sep 10, 2012 2:30 am
Forum: Common Lisp
Topic: Is there a direct calculation for gradient descent?
Replies: 5
Views: 9322

Is there a direct calculation for gradient descent?

This question isn't strictly in CL's domain, if moderators find it a better place - please move it. So, the wiki article and many examples of gradient descent suggest that the way to calculate the function that is the fastest way to get to the local minimum is by iteratively approaching it in hopes ...
by wvxvw
Mon Sep 10, 2012 1:20 am
Forum: Common Lisp
Topic: Antireader macros
Replies: 14
Views: 25967

Re: Antireader macros

You really don't want that to happen for all lists because it will break too many other things potentially... This sounds like a rather peculiar task for some of your custom data / purpose. I'd just go with format'ing them with whatever style you like, else you might have to change too much of other...
by wvxvw
Fri Jul 27, 2012 4:00 am
Forum: Common Lisp
Topic: printing Struct
Replies: 5
Views: 8479

Re: printing Struct

http://psg.com/~dlamkins/sl/chapter06.html Looks like this should help you.
by wvxvw
Fri Jul 13, 2012 2:46 am
Forum: Common Lisp
Topic: global variable
Replies: 3
Views: 7185

Re: global variable

Generally, all variables are defined on package level; if that's global enough for you, then yes (they may be shared between different functions). http://www.lispworks.com/documentation/HyperSpec/Body/m_defpar.htm here's more info about it, but it is more common to call these dynamic variables , not...
by wvxvw
Fri Jun 29, 2012 4:00 am
Forum: Common Lisp
Topic: What it means ?
Replies: 3
Views: 5980

Re: What it means ?

Some times people use "?" in a function name to signal that the function will return a boolean or a generalized boolean value. But your variant looks more like a manga style smiley :) I didn't encounter this kind of naming before. On the same note, the below are also valid function names: ...
by wvxvw
Thu Jun 28, 2012 3:49 am
Forum: Common Lisp
Topic: Function as a parameter
Replies: 10
Views: 14421

Re: Function as a parameter

What you refer to is commonly known as binding. I.e. An identifier in environment (a term in the program code) which is bound (refers to) some value. E.g. in CL: (let ((foo 42)) (princ foo)) In the case above let creates an environment which inherits all bindings from the surrounding environments an...
by wvxvw
Wed Jun 27, 2012 1:58 pm
Forum: Common Lisp
Topic: Function as a parameter
Replies: 10
Views: 14421

Re: Function as a parameter

The parameter of the array? Sorry, that sounds confusing. Do you want to just print an array, or a member of array? If so: (princ #(1 2 3)) ; prints the array #(1 2 3) (princ (aref #(1 2 3) 1)) ; prints the second member of the array, i.e. 2 Note that this isn't very precise to call this an array, b...
by wvxvw
Wed Jun 27, 2012 2:42 am
Forum: Common Lisp
Topic: Function as a parameter
Replies: 10
Views: 14421

Re: Function as a parameter

Imagine that "a" (the parameter in foo function) is a function. Then what will happen ? Is it possible to send it like the above code ? My code? Won't compile, unless you have defined a + function that can take a function as an argument. This code is correct ? No, (#'_step ...) expression...