freenode/#lisp - IRC Chatlog
Search
6:58:44
on_ion
something in here perhaps? https://stackoverflow.com/questions/1511981/how-to-examine-list-of-defined-functions-from-common-lisp-repl-prompt
7:17:16
beach
White_Flame: Set the *package* to the KEYWORD package. Then it always prints package prefixes.
7:17:48
beach
White_Flame: A new thread does not take the current thread-local values of special variables by default.
7:18:36
beach
I think SBCL has some extra arguments to the thread-creating function to bind special variables.
7:20:51
White_Flame
because it's threadpooling, the thread launch doesn't matter as much as my thread-local bindings that surround the context switch
7:21:56
White_Flame
each job registered to the pool starts off running with a particular set of dynamic bindings
7:22:07
White_Flame
and those are set for the duration of the task in that thread, not for the thread as a whole
7:22:17
beach
OK, but one thread can not normally influence the thread-local values of special variables in another thread.
7:26:39
White_Flame
beach: fundamentally, there's a read-from-string deep in code called within the threadpool, which is returning symbols from CL-USER instead of my project's package
7:27:18
White_Flame
and the code that launches inside the threadpool is surrounded by dynamic bindings for *PACKAGE*
7:31:54
engblom
I have several times been reading Lisp tutorials, and I have a very basic understanding of the language. Somehow I never really get time to study the tools in order to begin making real things and not single file stuff.
7:32:18
engblom
I wonder if there is any tutorial fulfilling these thoughts: https://pastebin.com/q8am8NGa
11:31:12
schweers
I have an operation which may fail due to a full disk, and would like to offer a restart, which simply tries again (i.e. give the user the possibility to clean up some space and then proceed). Is there a standard idiom for such a restart? I’m thinking of using a tagbody, but it feels icky to me.
11:45:40
schweers
_death: that looks quite reasonable, thanks for the hint. I’ve gone with a recursive call for now, but I’ll try to keep that macro in mind.
13:37:38
jackdaniel
because you know, hives have frames which have cells which are inhibited by bees ;-)
13:52:33
shka
jackdaniel: alternative was scary https://i.pinimg.com/originals/92/a0/ed/92a0edde4a34011860c753fdc1bba8e3.jpg
16:22:38
aeth
Controlling the printing of floating point seems like a mess. I've determined that (format t "~8,5F" number) seems to work best for a decent range of numbers, but obviously far from all of them. I guess I'll use that when (< some-number number 10) and use ~E for numbers where 5 decimal places wouldn't be enough or would be too much.
16:23:31
aeth
I could probably raise 8 so the good range is a bit more. 8 means "-", one digit, and "." can fit. What I'm trying to do is make them line up in columns.
16:28:12
shka
i already decided to argument-out-of-bounds in case of, well attempting to access element after end
16:30:47
aeth
I think this would work for printing floats in a column in general, but the decimal point won't line up if mixing scientific notation and regular. It also means 6-8 digits if in the range and 5 out of the range. (if (< -1000 number 1000) (format stream "~10,5F " number) (format stream "~10,4E " number))
16:36:26
aeth
Well technically it looks like http://www.lispworks.com/documentation/HyperSpec/Body/22_ccc.htm could fit with "~10,3G" or something (i.e. once at 10^3, use exponential) but then it looks like I don't have the ~F formatting options
16:52:18
aeth
I didn't write an nth/elt equivalent, though, so I didn't have to deal with that problem
16:54:39
shka
so i really need to have consistent behavior on all interfaces or otherwise i will spend eternity debugging
18:21:10
buoyantair_
Just wanted to know if Im ever going to use it again or not like I dont want to do that!
18:22:24
ZigPaw
Even if you might not use it in commercial settings it still will enchance your view on programming.
18:23:06
beach
buoyantair_: Are you looking for an answer in the form of a computer type, or an operating system?
18:24:05
aeth
buoyantair_: Some common uses for CL as mentioned on IRC are AI (the traditional place, but not as common these days), web programming, and games. It's also used in at least one tiling window manager (stumpwm).
18:24:47
pjb
buoyantair_: well, if you want to be hired in my startup, knowing CL will help put your resume on top of the stack…
18:24:55
beach
buoyantair_: Oh, Common Lisp is a general-purpose programming language. People here use it for various things, like writing compilers, editors, games, web sites, symbolic math programs, graphic user interfaces. You name it.
18:24:58
aeth
buoyantair_: One of the primary advantages of CL over the languages it most directly competes with (e.g. Python) is the performance of its most popular implementations (SBCL, CCL), which ahead-of-time compile to native code.
18:25:46
ZigPaw
in my startup most of the devs I hired had to implement a basic scheme interpreter/transpiler.
18:25:57
pjb
buoyantair_: but even if you are never hired to do CL programming, you can still learn it and continue using it as a secret weapon.
18:27:31
pjb
By putting a sexp-syntax on classic languages, you can then use CL to generate programs in those languages.
18:27:44
pjb
So instead of writing the code yourself, you can write programs (macros) to generate the code for you.