freenode/#lisp - IRC Chatlog
Search
4:09:12
csgator
hi all, I am a young programmer and I want to learn lisp as a hobby project because I read about it in paul graham's book hackers and painters. The way he describes lisp it seems to be the holy grail of languages , what do you guys think does learning lisp make you a better programmer ?
4:10:40
csgator
haha fair point. I just want to know as an outsider why you guys think lisp is so good ?
4:12:56
no-defun-allowed
learning lisp made my datefriend think about other languages weird, and they told me they couldn't stand C++ after. it likely will make you hate every other language on the planet but hey go for it.
4:13:02
beach
csgator: The condition system is also quite good. Much better than the exception feature of languages like Java.
4:13:47
csgator
so noob question here : let's say I want to build a REST API can I do it in lisp ? does it have enough libraries to do anything one would require in a normal application building ? what I am trying to ask maybe is can I use it to build stuff ? I am convinced that programming languages are increasingly becoming more lisp like
4:13:47
beach
Oh, sure, if you compare to a language without automatic memory management, Common Lisp looks even better. But most sane languages these days have that.
4:15:24
beach
csgator: Not my domain of expertise, but I am pretty sure there are libraries for that. Other languages won't become Common Lisp until they also look like it, and then they might as well *be* Common Lisp.
4:16:06
csgator
so what do you guys use lisp for ? just trying to gather info on where it is being used :)
4:16:08
beach
csgator: It is trues that for *almost* every feature of Common Lisp, you will find some language that has it. But you won't find a language other than Common Lisp that combines all those features.
4:16:31
no-defun-allowed
i use hunchentoot but caveman2 is also an option (if you can mind the god awful Python @tagging things)
4:17:06
beach
csgator: Here is a nice quotation from Kent Pitman: https://www.wisdomandwonder.com/link/1018/please-dont-assume-lisp-is
4:17:20
csgator
beach : that is exactly the point paul graham mentions in his book which made me wonder, why is the software world going backward and if so why even bother with a fancy new language every year, we could just use lisp for everything
4:18:35
beach
csgator: Because there are strong psychological forces at work. People are not rational and they are willing to waste arbitrary amounts of time not to learn Common Lisp.
4:18:58
beach
csgator: There is an entire domain now called "behavioral economics" that will explain such behavior.
4:19:43
beach
In the meantime, here is a short essay on the subject: http://metamodular.com/Essays/psychology.html
4:21:03
no-defun-allowed
still they don't quite get why we avoid SETF and friends when possible in lisps but they know a lot of CL and scheme
4:21:58
no-defun-allowed
i said it's easier to analyse since SETF can set whatever but they say understanding functional code is hard already
4:22:18
csgator
beach: got your point, thanks. I am going to spend the next few weeks learning lisp just for the fun of it and also because many smart people I know have suggested learning lisp. I'll be using this channel to get help when stuck
6:13:20
Shinmera
csgator: Just to get you started, the typical recommendation nowadays is https://portacle.github.io for the IDE and http://www.gigamonkeys.com/book/ for the introductory text.
6:16:47
Shinmera
csgator: As for REST APIs, of course you can do that with Lisp. There's plenty of websites and services, both hobby and professional, running Lisp on the web.
10:41:01
void_pointer
Out of SBCL, CCL, and ECL; which implementation is generally the strictest with requiring code to conform to the ANSI spec?
10:55:56
jackdaniel
I think that both CLISP and SBCL have a "strict ansi mode", but you'd have to verify that
10:56:57
Shinmera
Even if your code conforms to the ANSI spec doesn't mean it'll be portable for instance
10:57:52
Shinmera
Unless you eschew all parts that are defined as implementation dependant (pathnames, etc)
10:59:55
jackdaniel
it is a one tailed test, which may bring to your attention parts of code which could be improved (not always of course)
11:02:09
void_pointer
Well, my code won't be completely portable, but it tells me a bit of where to focus my testing activities since that would be where I would run into more of my ameteurish mistakes in writing valid common lisp code (things like assigning an incorrectly typed value to a slot)
11:04:14
void_pointer
I've caught quite a few mistakes by making (safety 3) in all my code, but I suspect I have a lot more just basic mistakes in writing common lisp, let alone all the bugs from just misuing things, misdone algorithms, and other sorts of bugs that of course would not be caught by such means
11:12:51
void_pointer
jackdaniel: just checked. Clisp does have such mode it looks like. SBCL doesn't appear to in the current version, though
11:13:26
void_pointer
sadly, I can't do testing in clisp due to issue with CFFI (same goes for abcl)
11:13:37
Shinmera
Clisp's mode is not really about checking your code as far as I understand, but rather about the implementation being ANSI compliant rather than doing its own (historical) divergences
11:27:19
void_pointer
I'm still rather new to common lisp. Only been doing it seriously since December or January (the little bit I did back in 2012 or 2013 doesn't really count)
11:29:43
LdBeth
void_pointer: do you intends to use CL on specific problems or as a general programming language?
11:30:53
void_pointer
Currently working on a project in one domain but hope to use CL for more general stuff later. But have ended up having to do more general stuff than originally planned hacking one of my project's dependencies as well as quicklisp itself
11:32:21
void_pointer
I will admit that CL isn't the ideal choice for the domain due to not having the widest range of library choices, but that is something I am OK with (have to spend more time writing various missing pieces or working around a choice that while possibly good isn't quite a perfect fit)
11:35:44
void_pointer
though mostly, my questions so far are not game programming specific for the most part (only had the one question with respect to SDL2 that one time)
11:41:00
LdBeth
how's the computer players' logic usually implemented? My specific interests is on how to make decisions in a typical game like "go fish". No needs to be detailed but plz give a general idea.
11:42:00
void_pointer
yes, though one has to be careful for some games or you can easily make in invincible AI
11:42:26
void_pointer
and for others, one has to think of a reasonable depth and use some heuristics like with chess
11:42:39
no-defun-allowed
If the amount of moves into some amount of time is relatively small (can fit into memory), minimax should work.
11:43:16
void_pointer
and for a weak AI, one can make one that just randomly chooses one of the available moves
11:43:54
jackdaniel
sjl had a very good presentation at ELS about heuristics used in games for AI (it was based on monte carlo I think)
11:43:55
void_pointer
I don't know them. My guess is that they probably reduce the parameter space considerably by primarily focusing only on tiles bordering a piece already
11:45:53
jackdaniel
here is a presentation: https://www.european-lisp-symposium.org/static/2017/losh.pdf
11:45:58
no-defun-allowed
beach: it's 9:45pm and my melatonin pills should be working now. My English gets increasingly horrid as t increases.
12:08:42
void_pointer
Oh, interesting thing that people might be interested in. I modified my version of quicklisp to actually check the md5sums of the package tarballs it downloads and well, if there is anyone between me and the quicklisp server that is diverting tarball requests, they are at least bothering to tamper them in a way that preserves both the filesize and the md5sum despite the latter not being checked yet.
12:12:48
void_pointer
Unfortunately, I realize that my modifications are really ugly and I haven't been able to get a SHA1 check in there yet
12:20:58
void_pointer
I remember hearing about that. Fundamentally for base level, the PGP signing and verification primarily has to be done for the client and dist updates as long as the dists themselves has sufficient hash information to verify the integrity of the downloads
12:21:35
void_pointer
Right now, the dists have file size, md5sum, and sha1 sum of the contents (it isn't the sha1sum of the tgz or the uncompressed tar but something else)
12:22:46
void_pointer
which, if checked, would be safe enough for now. Making a file with a desired sha1sum isn't yet known to be doable, but it isn't that far away. md5sum is trivial. But all three combined is a bit harder than any one of them individually
12:24:14
void_pointer
it is possible to generate two files with the same sha1 when one can modify both files as one sees fit
12:25:27
void_pointer
right now, I just go through quicklisp-projects and find the original source for each package I want and git clone (or download if they use something else) into local-packages
12:28:30
void_pointer
if the dists added sha3 of the tgz file, it would be pretty set (especially since there is some CL sha3 code with few dependencies out there)
12:29:36
Shinmera
cloning into local packages is not a very smart ideas since the projects might depend on specific versions between each other.
12:31:34
void_pointer
haven't run into that too much yet (it will get really ugly as soon as I need something that incidentally needs one xml package)
12:32:12
void_pointer
another alternative is just to just take the http links that quicklisp would download and then use wget or curl to download the https version
12:35:09
void_pointer
other reason I download the source code is to make it easier to tinker and be able to unwind changes if I screw up or submit PRs
13:05:34
Demosthenex
jackdaniel: you see that POC code to make a webserver return one script for a browser, and a malicious one for curl?
13:06:26
Demosthenex
apparently the pipe to bash causes blocking and timing that is readable by the remote
13:07:44
Demosthenex
jackdaniel: https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/
13:11:56
Demosthenex
oh, you had that cl-charms mcclim writeup. nice! i'm looking forward to your mcclim charms backend ;]
13:17:41
Demosthenex
i've been looking for a TUI library for simple things... i recall using turbovision ages ago and can't seem to find anything like it
13:18:10
Demosthenex
but something you said in that article about "making 1/10th of clim in text" rings true...
13:19:23
jackdaniel
" Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. "
13:19:46
Demosthenex
that's true, but it also highlights the different between having curses level control (ala charms), vs a real UI library with event loops, widgets, and screen controls.
13:20:51
Demosthenex
i find it uniquely weird that something as simple as an AS/400 style full screen form should have zero open libraries nowadays
13:21:25
jackdaniel
from other fun useless things I want to do is adding libcaca extension to that charming-clim backend
14:09:36
void_pointer
if for no other reason that to implement the second oldest language family in the oldest