freenode/#lisp - IRC Chatlog
Search
14:59:49
jackdaniel
interesting read about formally-specified user interfaces: https://www.hillelwayne.com/post/formally-specifying-uis/
16:38:32
_death
using statecharts for this is an interesting idea.. some months ago I started on a code generator in lisp to generate C++ code from statecharts.. I modeled a small application I wrote with it, but in the end I had other things to do ;) so the project is on hold.. the verification stuff, I don't care for
16:51:26
jackdaniel
oh, I thought I've posted it on #clim (I wouldn't post it here because it is not really related to lisp as such)
20:22:37
macbug
i tried to ask a question in #clnoobs but no answe, is it ok if i post eustion here?
20:23:55
macbug
hi, i'm trying to code a function with generates a random number, this random number should be between two given numbers.
20:25:11
Xach
macbug: if start and end are 10 and 20, what is the range? the range is what you want to give to random.
20:26:22
macbug
i have tried to give end the value of 100 and start a value of 1. The problem is that it always returns 45 or 93.
20:27:21
pjb
macbug: now newbies go to #clschool, because some people thought #clnoobs was demeaning to newbies.
20:28:35
pjb
macbug: in the same lisp image, the pseudo-random number generator will generate other values.
20:33:03
sjl_
that's what I would expect. You bind the random number to a variable, but the body of your LET is empty, so it just returns NIL.
20:33:29
sjl_
I don't see how it could be returning 45 or 93 or anything aside from NIL as it's currently written
20:33:43
pjb
(defun random-between (start end) (+ start (random (- end start)))) (loop repeat 10 collect (random-between 50 100)) #| --> (82 74 94 81 87 79 75 90 50 56) |#
20:33:49
Xach
sometimes when i have a problem like that it is because i have renamed something but forgotten to use the new name.
20:40:44
macbug
it will take me a while to understand this new funtion but atleast i can continue to work on my game, thx. I'll ask questions in #clschool from now.
20:47:09
pjb
macbug: there's nothing strange to understand here, but that when you add S to a number between A and B, you get an number between S+A and S+B.
20:47:52
pjb
macbug: so if you want start=S+A and end=S+B with and A=0, then start=S and end-start=B.
23:45:42
rpg
I know I should know this but... where is the iterate library hosted these days? the project page on common-lisp.net still points at a darcs repo
23:47:04
rpg
Xach: Thanks! I wish someone would fix the iterate project page, or if not just kill it.
23:47:39
aeth
rpg: you can find the source Xach uses here: https://github.com/quicklisp/quicklisp-projects/search?utf8=%E2%9C%93&q=iterate&type=
0:31:46
buffergn0me
rpg: You can email Erik Huelsmann to get added to the iterate group on c-l.net (and ask for an account if you don't have one already), and edit the page. I'm not in the group or else I would make the edits for you.
0:38:09
asarch
MarI/O - Machine Learning for Video Games: https://www.youtube.com/watch?v=qv6UVOQ0F44
0:59:42
asarch
Is this the programmer used for that? https://en.wikipedia.org/wiki/Artificial_neural_network
0:59:55
_death
looks like it compares the mario sprite against the other sprites (abs. diff. for each pixel)
1:03:21
_death
asarch: it has a population of neural networks that are optimized using a genetic algorithm
1:03:33
no-defun-allowed
ANNs are semi-magic things that wannabe data analysts throw at everything to solve problems
1:04:12
_death
asarch: their longer the game runs (i.e. the greater the frame number reached), the fitter the network
1:10:49
no-defun-allowed
tldr: do some matrix multiplication crap, pass it to some kind of scalar function, then to train it somehow do it backwards
1:26:48
aeth
Quite a few things on the computer can be summed up as "matrix multiplication crap" and quite a few more things can (and maybe should) be done with matrices.
1:27:15
aeth
The whole point of mathematical objects like matrices are to be abstract in a generally useful way.
1:30:41
aeth
It's a bit unfortunate that most of the time matrices are going to be CFFIed (and often then sent to the GPU) and thus have to be flat (and probably allocated via static-vectors). CL comes pretty close to basically just having matrices built in with its n-dimensional array system, only really lacking e.g. stuff like * and + working directly on them.
1:32:15
aeth
Although I guess technically you'd then want column vectors, not regular 1D arrays, and (make-array '(4 1)) probably isn't going to look nice.
1:40:11
aeth
If you want to do GPU computing from Common Lisp, you probably want to use an s-expression language that runs on the GPU, just like you probably want your SQL/HTML/CSS/JS/XML/etc. in a sexpy format, too. There are several, but I don't think any are complete (I could be wrong). I'd personally lean more toward a unique DSL than a compatible subset of CL, but people have attempted both.