freenode/#lisp - IRC Chatlog
Search
8:22:53
no-defun-allowed
Today I was greeted by "The value #<unbound> is not of type FIXNUM" in my test suite.
9:06:02
edgar-rft
Re: CLHS Glossary "object n. 1. any Lisp datum." - The Oxford Dictionary defines "datum" as "fact or piece of information" what means that Lisp objects are not restricted to Lisp data types.
9:22:23
edgar-rft
Okay, I agree that for USAian education standards Wikipedia would be more appropriate.
9:48:32
theothornhill
What is a good way to use own tools in common lisp? Right now I just use save-lisp-and-die, then alias that executable.
9:53:46
theothornhill
Seems a little slow to run small utilities that just produce some info, say like some weather info from an api etc
9:53:59
no-defun-allowed
What do you mean by tools though? Would you have any reasonable interface that isn't the shell?
9:57:12
theothornhill
By tools I mean the unixy I/O style small apps. The ones where you don't need a living image, when it is "done"
10:22:58
edgar-rft
theothornhill: I usually use Emacs Lisp for small-n-dirty shell programming gimmicks, Common Lisp always inculudes the entire compiler and lots of other stuff in its executables.
10:26:56
jackdaniel
not /always/, i.e in ecl libcmp.fas is loaded only after the compiler is invoked for the first time
10:29:07
edgar-rft
thanks for the info, and please built lots of money into ecl to that I can load it as an option :-)
10:29:59
jackdaniel
I don't think that anyone would tell you *not* to use ecl for small-n-dirty shell programming gimmics, but I don't know what is a nature of your job
10:31:36
edgar-rft
I first wanted to suggest using C instead of Lisp but I hadn't thought aboout the option that ecl uses C under the hood
10:39:32
theothornhill
Yeah, I've used elisp and c for that previously (and still do). Perhaps its not the best fit for cl anyways
10:49:11
edgar-rft
theothornhill: One of the reasons why Unix and its "small and simple" philosophy was created was to overcome the "monolithity" of programming environments like Lisp (at that time). So it's not really a surprise that Common Lisp and the Unix shell are not best friends. But ecl shows that there *are* people who care about the interoperability between C (Unix) and Lisp.
10:57:31
edgar-rft
According to Dennis Ritchie C is the most inappropriate language to write big programs in :-)
13:03:47
grewal
fwiw, for small tools like that I've had luck using a long running lisp image in the background and writing a tiny script that passes command line args through a pipe
13:05:05
grewal
If you have enough tools, you can turn it into a busybox-like sort of thing where the image contains all the tools and it dispatches based on the name used to invoke it
13:29:57
MichaelRaskin
Me, I just have a prebuilt image with the tools I want to invoke, and pass it '--eval'. Start-up overhead is quite low
15:15:10
paines
I am fiddeling around with a smaller project which uses SDL2 and now I am wondering why I cannot call a function which seem to be there, sdl-set-hint\
16:50:44
jcowan
beach: I don't think it's correct to say Python is not a general-purpose programming language. "Scripting language" is basically a way of saying "language I don't like"
16:52:19
jcowan
Indeed, that is not strong enough: there are, it seems, many C interpreters, so C is indeed a scripting language.
16:56:42
scymtym
maybe saying /cpython/ is a scripting /environment/ would be more accurate since it ticks several of the boxes: cannot make (afaik) standalone binaries, does not compile to native code, is effectively single-threaded and arguably executes slower than "non-scripting languages". but i agree that "scripting language" is not a very useful way to categorize languages or even implementations
16:58:58
jcowan
There's a number of tools that let you create Python standalone files. The CPython interpreter is bundled in with necessary .pyc and .so/.dll files, and everything just gets set up.
17:01:41
jcowan
Compiling into native code has the problem that it is neither portable nor stable. Larceny Scheme compiles into 32-bit x86, for which you have to load special libraries on Linux, and I expect support for them to rot over time (already WSL1 does not have it). Fortunately it also compiles to C in a version known as Petit Larceny.
17:14:54
p_l
jcowan: it's possible to make a stable binary on linux - it's the Glibc that doesn't want to cooperate
17:15:29
p_l
(Go for example makes binaries that depend only on kernel being above certain version when you use certain command line flags)
17:34:27
White_Flame
"scripting" tends to indicate that its primary behavior is to invoke behavior of other things outside the script
17:34:51
White_Flame
while "programming" tends to indicate defining the primary behavior in the code itself
17:35:28
White_Flame
while those definitions still exist on a gradient, I think that's likely the common intention of those terms
17:36:42
White_Flame
if what you're doing is managing calls to external C libraries, then probably yeah
17:37:31
White_Flame
while Lisp is kinda weak at scripting, because of its strong focus on its own image
17:37:42
p_l
Well, anything else can quickly hit performance limits that result in red-eyed sysadmin going all BOFH on you
17:42:41
jcowan
The last few jobs have involved programming in Python and occasionally scripting in bash.
18:00:26
beach
I was under the impression that the term was used by the creator of a language to mean "I hav no intention, or not enough knowledge, to make it fast enough for general use."
18:33:15
jasom
I agree that scripting is primarily about automating external tools. The bourne shell is the clasic example of a scripting language. This actually gells with beach's definition because if you spend 90+% of your time in external tools then there really isn't a point in making the language fast enough for general use.