freenode/#lisp - IRC Chatlog
Search
16:05:09
aeth
lotuseater: someone needs to start a Common Lisp Engineer certification project where you can pay to take a multi-hour multiple choice test.
16:06:56
lotuseater
i learn the most out of (special) interests and i think the most people here also do
16:07:08
jmercouris
you know those issues raise a really good question, how do you support justice in the CL community?
16:07:14
iarebatman
well, you know - the demand for lisp developers is so high right now. This certification would allow employers to sift through the applicants for the quality picks...
16:09:14
aeth
but maybe the demand's 0 just because it's so difficult to find someone who's a certified expert.
16:10:13
lotuseater
last week i wrote an email to Clozure Associates to ask how to become part of it. became an answer with "no job offers right now"
16:15:25
jmercouris
phoe: I am thinking about this, and I think also about how pjb's libraries are also excluded, I wonder, is this the way?
16:16:00
jmercouris
pjb has been excluded from the official Quicklisp dist by Zach for political reasons
16:16:53
phoe
AFAIK there's always the possibility to create new ones; quicklisp-dist is free software
16:17:42
jmercouris
so my question here is, how does removing his software further the goal of insulating the common lisp community from his abuse?
16:22:10
phoe
for me, it is to make a very clear cut that this kind of behavior, especially lasting for years, is not acceptable whatsoever and under any circumstances; in theory free software is free software, especially under unlicense, but I think that uprooting hexstream altogether, his abusive behavior along with the "merit" which he has produced, will provide a much cleaner picture afterwards since there'll be nothing
16:22:16
phoe
remaining that could still make the connections between the lisp community over here and hex.
16:22:23
phoe
if you know what I mean, and if I am explaining myself clearly - sorry, sleep deprivation
16:23:40
jmercouris
well, would you like me to mention details about my business in this channel :-D?
16:23:53
jmercouris
I think you will quickly find we stray away from discussion about programming, and more about business
16:24:35
jmercouris
I am happy to talk about it, just trying to avoid provoking some users who get annoyed by off-topic chat
16:24:46
edgar-rft
aeth: because business means you're enslaved to money, and this is *free*-node :-)
16:24:58
cl-arthur
lotuseater: "how to become a non-self-proclaimed CL expert?" - by analogy with http://www.catb.org/~esr/faqs/hacker-howto.html, get a CL Expert to call you a CL Expert :)
16:25:23
lotuseater
i think there is much potential for nearly every domain or niches and getting out of the mess
16:25:57
phoe
the resulting picture is just much cleaner if there is nothing to remind us of the shit that he used to do; when he's gone, period, set to nil, altogether, along with all of the libraries that have exactly 0 dependents on Quicklisp
16:26:22
phoe
that's how I perceive it - less chances for any accidental mixups or whatever that may happen otherwise
16:27:23
jmercouris
so if there is no dependence or usage of any of his libraries, then nobody in the Common Lisp space will need to communicate with him
16:27:35
phoe
due to the *years* of abuse that have happened, I think that in this case the line must be clear clear and separates a person as a whole, due to their contributions than a whole. I find the approach of "this is fine so it'll stay, but this is nuh-uh" to be dirty and not suitable for holes as big as this
16:28:02
phoe
I don't know how to explain, it's just that a real broad stroke seems much more appropriate in this case than a thin zigzag.
16:28:46
jmercouris
these topics are always sensitive and nuanced, and therefore difficult to conceptualize/explain
16:30:08
phoe
can you support me with this and glue what I've posted above and reformat it slightly?
16:30:57
phoe
I'm simply exhausted, it's been 48 hours of a hexstream-ensnaring marathon where I slept only the first night of it
16:42:34
cl-arthur
jmercouris: business field for context, what lispy features you've leveraged in particular to solve the problems, and whether you've had any customer reactions to using lisp (if customers notice) :)
16:43:10
jmercouris
cl-arthur: these days we are only now working on a consumer product, which you may have heard of (Nyxt)
16:43:32
jmercouris
cl-arthur: in which case Lisp is a direct selling point OF the product, in that it is highly customizable, at run-time
16:46:29
pfdietz
I don't use arrow macros, but I do sometimes use nest. The forms are in reverse order though.
16:49:07
aeth
if you're feeling really uncreative, I think you can do this: (let* ((foo ...) (foo ...) (foo ...)) (... foo))
16:49:38
aeth
someone mentioned a similar example with $ iirc, but that makes it look a lot more intentional, while in reality, there might be 12 different names, and it just happens that foo shows up twice or thrice in a row
16:51:36
lotuseater
jmercouris and one day wipe javascript and make CL the native browser language :D
17:09:09
Fade
congratulations on your book, phoe. I've ordered my copy, and look forward to reading it over christmas.
17:44:02
mfiano
jmercouris and I have used it in a commercial project. Other than that, probably not
17:45:19
gendl
The CLF has a rudimentary payments webapp where we have our own half-assed stripe interface intertwined into it (only for single transactions).
17:46:14
mfiano
Yes, it was developed at a time when I needed such a thing for a commercial project, and didn't document it because of time concerns. I have not used it since, but it was used successfully in a large commerical application.
17:46:24
gendl
Now we want to add subscription capability and i'm ready to rip out our half-baked stripe interface code and try to use your :stripe package... I'm also open to adding to the README.md
17:47:37
gendl
would you consider coaching me through getting started? I can show you what we are doing currently which will probably give you a good laugh as well (hopefully not nightmares)
17:48:59
mfiano
Sadly, I think all that knowledge has slipped my mind. But if jmercouris approves, I could publicize snippets of proprietery code, as that project dissolved.
17:50:51
gendl
so you were using it to do subscriptions, right? I see subscription.lisp and subscription-item.lisp.
17:51:46
mfiano
as far as i remember the stripe library covered the entire api at the time i wrote it
17:58:10
mfiano
gendl: here, i wrote an example without any of our business logic: https://gist.github.com/mfiano/aa526ecfe4987b7b60ecbb18190ba5db
18:03:46
exit70[m]
hi, lisp newbie, looking for a native cl on apple m1. so far I found sbcl and ccl needs porting. ecl looks kinda portable but i got error at configure stage. clisp requires porting in libsigsegv.
18:05:22
shka_
exit70[m]: perhaps you can take a look at the ABCL? It runs on the JVM so it is bound to work (I HOPE!)
18:06:29
shka_
ECL should work, but i have no idea what you need to do to actually run it on the OSX
18:07:42
exit70[m]
openjdk does not work on m1 mac right away yet. give me a second to post the ecl configure log
18:08:20
astronavt
does anyone have experience here using CFFI to write bindings to libraries that depend on GLib? i've worked through the CFFI tutorial that uses curl to download a URL, but i'm not sure how to proceed in this more-complicated case
18:11:00
astronavt
im not sure honestly. the docs for libnotify file:///usr/share/gtk-doc/html/libnotify/libnotify-notify.html show that it uses types like gboolean
18:13:45
astronavt
so i'd just use defctype or define-foreign-type on the few specific glib things i need, and then go from there making bindings to libnotify?
18:16:32
fiddlerwoaroof
You have to use the zulu openjdk, which is the only arm64 JDK I can find atm
18:17:10
fiddlerwoaroof
https://jp.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk
18:18:42
exit70[m]
I see. Thanks! I think most people simply use rosetta homebrew for now but I'm just curious about how many packages would not work natively.
18:19:15
fiddlerwoaroof
I did manage to do a bunch of the porting work, I'm just stuck on an error with mmap
18:19:39
fiddlerwoaroof
(and I'm sure there's more subtle issues too, haven't gotten something that even gets to a REPL yet)
18:20:09
fiddlerwoaroof
If anyone wants to try to go further, my changes are here: https://gitlab.com/fiddlerwoaroof/sbcl/-/snippets/2041970
18:29:33
exit70[m]
haha I was like that too. the arm64 devices are kinda nice though as they are fanless. and they run x86 applications like a real celeron (or slower)
18:37:26
fiddlerwoaroof
Apple's arm64 devices blow even relatively high-end x86 computers out of the water.
18:39:28
iarebatman
lol this is super frustrating.. I'm pretty sure I need to compile a CL environment within msys2 to get things going. I've tried sbcl, ccl, and ecl. All fail to compile with various issues.
18:44:43
iarebatman
I figured at least one of those 3 popular implementations would 'just work' - but no.
18:46:57
fiddlerwoaroof
My general impression is that implementation developers don't really use it as their primary platform
18:47:26
iarebatman
I'm probably just asking for trouble by even attempting to use it for actual business use-cases and should just do something else.
18:48:16
iarebatman
Well here's the thing TBH.. I can download sbcl binaries and they work fine on windows.. I can get the development environment setup just fine..
18:49:24
iarebatman
they assume gcc is setup like it is on linux and I've got libs & headers ready for it to do some stuff with.
18:50:51
iarebatman
I just didn't like the startup times involved mainly. I know that's a sort of shallow reason, but it bugs me lol.
18:51:25
fiddlerwoaroof
Maybe also Corman Lisp? That is/was a windows-first implementation that has been revived recently
18:56:07
jmercouris
mfiano: feel free to publish any snippets as long as you remove identifying information
18:58:05
jmercouris
fiddlerwoaroof: I don't think Corman Lisp is a sound reccomendation, I would still suggest SBCL on Windows
18:59:06
fiddlerwoaroof
I still think that, if you have to connect to something like Oracle or Kafka, ABCL or LispWorks is your best choice
19:05:43
iarebatman
Yeah that's unfortunate for me. I'm in a position where it'd probably be frowned upon to require the developer to use linux in order to get things done here.
19:06:07
exit70[m]
so Corman Lisp could be built use msvc? let me try if it builds cleanly for arm64 ...
19:06:11
iarebatman
I did just manage to get sbcl to compile inside msys2 finally - via roswell. Not sure if that'll magically solve my problems or not yet.
19:09:58
iarebatman
I've already got too many side projects lol, but I've definitely thought, 'gah! why doesn't this exist yet?'
19:11:33
iarebatman
lol scratch that 'sbcl builds on msys2 via roswell' comment. It builds, sort of. segfault immediately upon launching sbcl
19:12:06
astronavt
do quicklisp and/or asdf permit creating "environments" local to a project? like how python has venv, and ruby & nodejs/npm by default install packages to an isolated project-specific location
19:12:10
iarebatman
I have to do some other work, I'll revisit this later I guess. maybe look at wsl2 or possibly abcl. *sigh*
19:12:58
fiddlerwoaroof
But, I've never felt a need for that, the libraries generally maintain backwards-compatibility pretty nicely
19:14:05
fiddlerwoaroof
Yeah, the issue I have with version pinning is that, if you pin versions, they slowly get out of date
19:14:24
fiddlerwoaroof
And, eventually rather than relatively small version updates, you have a three-week+ project
19:15:01
astronavt
yeah, usually i dont pin specific versions. it's moreso that i'd like to keep libraries for one project separated from other projects
19:15:43
astronavt
i am also starting to learn about / read about ASDF and i'm a bit confused - does it expect me to put all of my lisp source code in a few specific places?
19:17:10
fiddlerwoaroof
One issue with venvs in lisp is that I don't normally restart my lisp when I switch projects
19:17:57
astronavt
again maybe this is very un-lisp of me, but i definitely want to do a clean restart and re-run from scratch now and then
19:18:40
fiddlerwoaroof
I used to do that all the time, these days I rely on CI to make sure that my systems can be reloaded from scratch
19:18:48
astronavt
ive just had too many bad experiences in jupyter notebooks with losing track of what i defined and encountering subtle bugs as a result
19:27:45
shka_
astronavt: CL with slime is actually really nice for things you would typically use jupyter for
21:23:52
jeosol
When working with macros, is it a 'code smell' to be use 'eval' (albeit sparingly) or its ok
21:24:25
phoe
there are very few specific use cases where eval might be required, such as with constantp values
21:25:15
jeosol
phoe: I have been using lots of macros to reduce and typing. Definitely provides more clarity with lots of the calculation happening behind the scenes in the automatically generated functions.
21:26:15
jeosol
when getting the value of a variable that's constructed from a string, I used eval there ....?
21:29:24
jeosol
phoe: no, it's fairly involved, but the section is messy as I am still debugging it. I can share that part with code
21:39:43
fiddlerwoaroof
jeosol: I've found it's useful to generate a form that gets the value rather than to try to actually get a value
21:39:58
fiddlerwoaroof
I've found that, in general, stateful macros end up being defficult to maintain
21:40:42
jeosol
fiddlerwoaroof: oh men ....; I am doing a refactor to automate a lot of things I do by hand.
21:42:28
jeosol
fiddle: btw, what I mean was, say I create variable from a string name (interned, etc) and assigned a value to it. To retrieve the value I did (eval (get-parameter-name name))
21:44:04
fiddlerwoaroof
My early macros used eval, but as I've used lisp I've found ways around most of those use-cases
21:44:36
fiddlerwoaroof
I think there are a couple of exceptions for some advanced CLOS stuff: but, even there, (compile nil `(lambda ()...)) is often better
22:03:22
fiddlerwoaroof
So, this is a case where your macro that wants the value of *test-property* should probably just expand to *test-property*
22:04:45
jeosol
Basically, I am going to use *test-property* as an argument to a function. So now I do (some-function (eval (make-property-name "test")))
22:56:14
fiddlerwoaroof
jeosol: why not have your macro expand to `(some-function ,(make-property-name "test"))?
22:58:04
fiddlerwoaroof
When that code eventually gets evaluated, some-function will get the right value of *test-property*
23:10:37
jeosol
fiddlerwoaroof: I forget to mention that the evaluation I am trying to do is inside another macro -- i get your point about this being nasty
23:18:51
White_Flame
jeosol: if you want the value at compile-time, then that's likely wrong, unless you're absolutely certain that the property has been set before compiletime
23:20:30
White_Flame
if you want the value at runtime, as above you're still macroexpanding to the symbol to allow that to be evaluated at runtime, so nothing changes if it's 1 macro, a macro that uses another macro in its output, or a macro that needs another macro's expansion at compile-time
23:26:50
jeosol
White_Flame: no, it's not compile time. I think symbol-value did the trick - I wanted to understand how to do it for one case. It's one macro per se but I am trying to paste the correct variable values during the macroexpanding.
23:33:27
phantomics
Like I have a function used within a macro to generate code, and that function can take a pathname as one of its parameters
23:34:28
phantomics
But it could either be a literal pathname, like #P"/tmp/stuff.txt" or a pathname generated by code like (pathname (format nil "~a/stuff.txt" "/tmp"))
23:35:02
phantomics
The function used within the macro will just receive '(pathname (format nil "~a/stuff.txt" "/tmp")) if that's what gets passed to the macro
23:35:45
jeosol
fiddlerwoaroof, White_Flame: my chrome crapped up, not sure last message got through, but thanks for your brainstorming
23:35:53
White_Flame
of course, if it receives (pathname (format nil "~a/stuff.txt" my-dir)) with my-dir as a lexical variable,it wouldn't work
23:37:10
phantomics
Yeah, that's a shortcoming, so literals are always preferred in a case like that
23:38:01
Xach
phantomics: one common option is to put the code that produces the value you want into the expansion, rather than trying to compute the result at macroexpansion time, defer it to runtime.
23:38:27
White_Flame
but if you're generating code from that .txt file, then you'd just be deferring the EVAL until later
23:38:45
White_Flame
either EVAL the filename, or EVAL the expansion of the contents; the former is probably safer
23:38:46
jeosol
I was saying I was doing have two-levels of the indirection (creating the variable from string and using the value from that variable again ...)
23:38:48
phantomics
Yeah, this is for the April APL compiler, the contents of the file would be the code it's going to compile
23:39:24
jeosol
maybe mine is a bad design, I am trying to construct and paste variable names in the macro and when its run, those variables will have values
23:41:00
White_Flame
and the fun thing that most people have to have an "aha!" moment with is that the value usually doesn't even _exist_ when the macroexpansion code is run ;)
23:41:21
jeosol
The refactoring I did has simplified the interface greatly and pushing a lot of the functionality later.
1:19:44
save-lisp-or-die
there's a cool use for when you want to stack allocate a value http://www.sbcl.org/manual/#Dynamic_002dextent-allocation for efficiency reasons.
1:23:52
save-lisp-or-die
So if you're consing a tonne of memory in a hot loop that the garbage collector is hiccuping to free, stack allocation might be useful there.
1:31:16
no-defun-allowed
Well, allocation with a moving GC is almost comparable to stack allocation. It's sometimes useful, but I don't bother with dynamic-extent.
1:32:54
save-lisp-or-die
does ECL respect it? I could see maybe on resource constrained devices it might be useful.
1:35:08
no-defun-allowed
I am not sure if ECL is the right implementation with small resources; don't you either need a C99 compiler or bytecode interpreting?
1:37:52
no-defun-allowed
Also, see "Garbage collection can be faster than stack allocation" <ftp://ftp.cs.princeton.edu/reports/1986/045.pdf>. That should be read with heavy emphasis on "can".
1:37:59
mfiano
Additionally, implementations need only to honor NOTINLINE, and SPECIAL declarations, and conform to the safety rules for OPTIMIZE
1:39:16
no-defun-allowed
If you can free enough in one GC cycle, it eventually becomes faster to not un-bump the stack pointer.
1:40:08
no-defun-allowed
But really, the memory overhead for that to happen is ridiculous. The moral of the story is everthing is a time-space-sanity tradeoff.
1:40:57
no-defun-allowed
(And Firefox crashed after sending that. I'm not one for conspiracy theories though.)
1:41:52
no-defun-allowed
The SPECIAL declaration means that variable will use dynamic binding, instead of lexical (like you usually expect, and is default in Common Lisp). I usually prefer to write (defvar *foo*) to make *foo* a special variable though.
1:44:59
no-defun-allowed
Usually people write a program like this to demonstrate: (let ((x 3)) (defun g () x)) (defun f () (let ((x 2)) (g)))
1:45:21
no-defun-allowed
If X is lexically bound, then (F) returns 3. If X is dynamically bound, it returns 2.
1:49:09
no-defun-allowed
Dynamic binding will give you the last value bound, no matter where it's bound; and lexical binding will give you the last binding you can see where the variable is used.
1:50:18
no-defun-allowed
For example, *standard-output* is a special variable. If I evaluate (with-output-to-string (*standard-output*) (room)), it will be bound to the string output stream WITH-OUTPUT-TO-STRING makes, and ROOM will write to that.
1:52:30
lotuseater
or if you do something like (let ((*print-base* 16)) ...) or (let ((*gensym-counter* 1)) ...)