freenode/lisp - IRC Chatlog
Search
1:14:56
randyjohnson86
perhaps a controversial question, but how long would one normally say to become familiar with the general lisp syntax?
1:18:12
wavemode
once you start using it to make small projects you will pick it up like any other language's syntax
1:18:55
randyjohnson86
yes, I'm slowly working my way through 'a gentle introduction to symbolic computation' by touretzky
1:19:44
randyjohnson86
it's rather quite fascinating, but I still find myself making little things in python rather than practicing my lispcraft
1:21:23
Xach
I use lisp for small things because of the nicer support for interactive ongoing development and debugging.
1:24:31
no-defun-allowed
you can use lisp on the boat, on the house, on the pets, in the kitchen, there's nothing you can't do with lisp
1:30:58
randyjohnson86
I think it will take some more time to get into the rhythm of it, it's a lot to undertake in a few settings
2:38:00
aeth
I think fixnum might be one of the few where of-type is optional, but it's better just to be uniform and always have of-type there imo
2:38:26
aeth
You have to be careful for testing it because SBCL and CCL will accept more than the spec, e.g. single-float and double-float, which will fail under CLISP
2:40:14
aeth
interestingly, I just tested that in CLISP and I only get a warning, so I guess it only fails sometimes (since it's not like CLISP has gotten a new version recently)
2:40:15
mfiano
Kind of like (declare (type fixnum ...)) vs (declare (fixnum ...)) for simple/complex forms.
2:41:43
White_Flame
if LOOP demanded keywords for its ... keywords, then it would look like actual lambda args
2:42:20
aeth
I always use keywords for LOOP keywords because then they're syntax highlighted like keywords and stand out
2:42:26
White_Flame
although the ordering demands between the key/value pairs still extends what lambda args support
2:43:58
aeth
With very minimal changes (mostly just adding some extra parens) you could have basically LOOP, but with plists. e.g. (loop :for x :of-type fixnum :below 1000000000) vs. (do-loop (:for x :of-type fixnum :below 1000000000))
2:44:36
aeth
It'd probably be hard to implement, but easier than LOOP, since you could just do destructuring-bind with &key
2:44:50
mfiano
Probably also worth mentioning you can destructure types when using loop variable destructuring.
9:36:31
decent-username
hey I'm trying to run slime and I get the following error: https://paste.gnome.org/pt8dbzbnx
11:11:46
schweers
I find setting them is a mess. I don’t think I should have to use an ancient shell to set these variables.
11:12:03
schweers
Although I do see why they are used. Kind of like special variables for processes.
11:12:25
pjb
The only thing to understand, is that environment variables are set by a process, and inherited (transmited to) its children.
11:13:12
pjb
For example, on macOS, applications are not forked from a shell, even if you launch them from the Terminal (with open), but by a launcher process.
11:14:47
schweers
pjb: what if one launches a long lived command line tool? For instance calling rsync on a large dataset and/or a slow connection?
11:15:27
pjb
So you can see that you can, even on a "unix" system, configure environment variables WITHOUT having to use an old shell.
11:16:26
pjb
schweers: again, it's irrelevant what you launch or how you launch it. What matter, is WHO launches it, because it's the parent process that transmits the environment variables IT has set, to its children.
11:16:43
schweers
Ah, so there is an extra process in between, which sets all the environment variables for the child process?
11:17:33
pjb
But you can also fork the application executable directly from a shell just like any unix program.
11:19:10
pjb
Now, yes, kind of special variables for processes. Also, usually programs don't clear out the environment. At most, they may add or change a couple of variables. So grand-children will get the environment as set by their grand-parent. Which can be useful.
11:19:50
pjb
On the other hand, this may also be a security concern. Hence the env -i command, and programs cleaning their environment upon entry. It may be harder to use those programs…
11:20:25
pjb
Notably, there are (or were) some nice bugs in bash regarding the handling of some environment variable.
11:20:54
schweers
Maybe a more standard way of setting initial variables would be sufficient to address my complaints.
11:21:40
schweers
And setting them for already existing processes. If I decide I want to change a variable, already existing processes won’t be affected by this change.
11:22:05
pjb
What more do you want? https://pubs.opengroup.org/onlinepubs/9699919799/utilities/env.html
11:23:32
schweers
Maybe my real problem is with this whole zoo of files which get processes by various shells in various circumstances. Which may or may not set environment variables. I think my complaint was poorly thought out and I hereby retract it until I have thought about it some more.
11:27:26
pjb
schweers: usual shell let you specific an environment file. So you would do BASHENV=$HOME/yourenv.sh in .bashrc for example, and something equivalent in the rc of the other shells, using the same $HOME/yourenv.sh so you can edit a single file.
11:28:39
schweers
but as I said, I guess I need to think more about what my actual problem is before I voice my compaints.
11:28:53
pjb
Otherwise, you can always write the code to parse the xml environment.plist file to define the environment variables!
11:31:59
schweers
shka__: no, but the result is still that we have multiple languages claiming to be a lisp.
11:34:06
no-defun-allowed
schweers: don't you know clojure is the modern incarnation of lisp and the only one will scale to potatoes, (jvm-running) quantum computers, space probes, CAD software, etc, etc
11:35:18
schweers
I know that clojure is a modern incarnation of ... something lisp like? I think it has some nice ideas which are unrelated to lisp itself. I’m not sure I’d want to use it for real work though.
11:36:35
no-defun-allowed
a lot of the clojure "magic" sounds only that useful for embarrasingly parallel stuff, in which case you can just lparallel:pmapcar and get better speed
11:38:25
schweers
It mostly smells of jvm, but I guess you can never truly hide the abomination that java the “language” is.
11:40:18
no-defun-allowed
maybe the less braindead but still awkward ABCL users write in camelCase even
11:40:55
schweers
abcl does seem to be a nice tool if one has to interact with a jvm for some reason.
11:40:56
no-defun-allowed
and (cons 1 2) also doesn't work but anyways, discussing actual lisps on #lisp hurts my head less
11:44:47
no-defun-allowed
i thought the moral of "CONS Considered Slightly Harmful" was to make binary trees of some form for efficient parallel processing, not pretend you have conses which actually aren't conses but i don't have any work experience like rich hickney and i've been spoonfed useless propaganda by BDFL-less programming language theory researchers
11:47:32
no-defun-allowed
basically this image sums up my feelings towards clojure and i shall speak no more of it tonight: https://i.redd.it/ffne9jvbeer21.jpg
11:48:16
no-defun-allowed
(psst, phoe: in Clojure family languages arithmetic is basically allowed to do whatever the host platform finds least annoying, like having everything as floats in ClojureScript)
11:55:19
jackdaniel
also I would expect that having too big bignum would exceed the heap and signal a condition, so it could be interpreted as an overflow
11:56:52
no-defun-allowed
hopefully that overflow is a bit bigger than a fixnum, else your bignum is not very big
11:57:04
no-defun-allowed
https://www.jwz.org/blog/2008/03/most-positive-bignum/ may be relevant in a way?
11:57:58
phoe
as for heap exhaustion, it'll be either a storage-condition or a game over screen I guess
11:58:59
specbot
Conformance Statement: http://www.lispworks.com/reference/HyperSpec/Body/01_eae.htm
12:00:22
jackdaniel
i.e on machines we have today it is impossible to represent arbitrary numbers (be it floats or bignums), so it is a platform limitation
12:03:40
xristos
jackdaniel: CL not forcing me to expend mental energy to worry about how to handle integer promotion/overflow is pretty close to a silver bullet
12:04:42
no-defun-allowed
The universe and our computing time are both finite, but bignums (and ratios) are less annoyingly finite.
12:06:57
jackdaniel
instead of debating how pitiful are clojure programmers we should catch up to them in at least a few fields we lack (as CL community and ecosystem) -- it is really a difference between reassuring yourself you are the best and trying to improve yourself