freenode/#lisp - IRC Chatlog
Search
16:13:39
nij
jdz: Oh I gave that page cuz it happens to be very similar if not the same as in a newer version: http://sbcl.org/manual/index.html
16:30:09
pjb
nij: the interface between programs and terminals is implemented using pairs of pty/tty devices. Not using sockets.
16:31:06
pjb
nij: otherwise, I have https://github.com/informatimago/lisp/tree/master/common-lisp/telnet
16:32:40
nij
I just had the impression that using a UNIX domain socket is more secure than communicating over localnet.
16:34:46
pjb
You have people who are already root, to be able to use tcpdump on lo0 on your workstation and you'd want to protect against them??? They can patch the kernel and see whatever they want!
16:35:18
nij
If the root opens a lisp repl, and runs (create-server ..) in it, then iirc anyone on the localhost can link to that repl. This effectively owns the root.
16:36:11
nij
(I have to admit I'm also pretty new in networking, so I might be talking silly. But I'm willing to learn.)
16:37:22
nij
The root just have to create a server over a unix socket, whose property the root can configure.
16:40:05
nij
Great! So I might not even have to work on it? Anyway I will take a look. It'd be nice if someone could summarize.
16:41:56
nij
E.g. sbcl's socket doesn't support tls/ssl iirc.. at least i didn't see it in its manual.
16:57:34
loskutak
Hi, what should I do to the foo string, to make it comparable with :foo? I have code like (case "foo" (:foo "good") (:bar "baz"))
17:01:07
pjb
loskutak: but really, (cdr (assoc "foo" '(("foo" . "good") ("bar" . "baz")) :test (function string=))) #| --> "good" |#
17:03:34
loskutak
and if I had 'foo, 'bar instead of :foo, :bar? I would like to have nice interface with either 'foo or :foo, but I need to supply string "foo" outside the function with the (case ...)
17:03:37
jdz
loskutak: You can also use FIND-SYMBOL instead of INTERN (and remember to use the right case for the symbol name).
17:05:02
loskutak
jdz: that probably doesn't matter, but the code is more complicated than just returning strings
17:08:04
loskutak
other option would be to prepend : or ' to the "foo" string and read that. Is there no other option to convert a string to 'foo or :foo (without the |bars|)
17:09:16
nij
Eww sounds like implementing TLS for CL is pretty scary. How does that relate to DLL hell?
17:10:45
loskutak
jdz: oh, I was stuck at getting |foo| - didn't realize the upcase is important. Thanks for help!
17:11:25
jdz
loskutak: You should know what you're doing. It's perfectly possible to have lower-case or mixed-case symbols. Even symbols with spaces in them.
17:14:55
flip214
Is there a standard function to convert a bit-array into an integer, or the other way around?
17:47:31
nij
pjb: It seems pretty much like what I want. But again, I'm new to networking (and computers in general), so I might have missed something.
18:05:49
Xach
nij: this may be an interesting exercise in learning but you do not have to care about it and it will not help you in any short-term goal.
18:07:36
nij
Xach: Thanks, I'm aware that this is something that's much harder comparing to my ability/experience. I will treat that as a learning experience. No hurry indeed.
18:09:10
nij
On the other hand (and again I might be naive), it doesn't seem too far to get tls working in CL. It's not native, but if that repo works.. it works, at least for sbcl.
18:09:47
nij
It's ~360 lines so I don't expect it to be terribly hard for other implementations either.
18:09:50
Xach
it is not too hard to get it working on one implementation on one operating system distribution. it is much harder to make it work across many implementations and operating system distributions.
19:18:37
jackdaniel
it is not bad (nor good); you'll have some fun when you'll learn that you can redefine functions in a fly
19:23:06
jackdaniel
common lisp ecosystem is smaller; alas community support and documentation resources (compared to "popular" web dev frameworks in other languages)
19:24:57
frgo
Actually I am currently also evaluating alternatives for web app development. I would love to find someting like elixir phoenix liveview in Lisp. Is there sth like this out there and I am just too dumb to find it?
19:26:07
nature
haha yes, it may come as a weird question because I am learning common lisp and liking it a lot so far, but after having (been forced to) worked professionally with rails for years, I swore to myself to never do web with anything else than Go
19:27:23
nature
Like you can't believe how shameful I feel when I see those app struggling to server 2 req/s running with a full cpu core at its disposal....
19:29:35
nature
jackdaniel: spent weeks investiguating those perf issue, conclusion => template rendering is slow af...
19:31:22
nature
So yes, serving hello world surely goes well with rails, but when you start to have complex templates and using the full MVC crap it kills your cpu
19:38:43
nature
Thanks, yeah I'll probably try hunchentoot then, I am more scared of those 2 req/s eating 100% cpu than getting 30k req/s vs 9999k req/s
19:39:07
Josh_2
I took a stab at writing my own basic HTTP server, seems to me its quite hard to make them fast
19:40:26
Josh_2
well when you use something like spinneret, you don't write any HTML, you write normal CL and its converted into html
19:44:47
Josh_2
nature: here is an example project where I heavily lean on CLOS to generate HTML and CSS https://github.com/K1D77A/cl-bloggy/tree/master/src
19:56:47
Josh_2
Well it would be to connect to a running Slynk server and just update the source in the image
20:10:02
scymtym
flip214: if you do deterministic profiling, you must specify the functions or packages to instrument. for example, (clim.flamegraph.examples.recording:with-recording (:specifications '("ALEXANDRIA.0.DEV")) (sleep 10)) will trace all alexandria functions in all threads for 10 seconds
20:11:48
frgo
Josh_2: Actually, well - thanks for the pointers. We *do* have something, well, vaguely similar in Lisp.
20:15:13
scymtym
flip214: and in WITH-RECORDING change the SAMPLE-RATE to 1 if you don't want to skip any calls
20:44:14
mister_m
hi - if I have a function A that returns multiple things through hte use of ``(values 1 2)'', and another function B that takes two arguments, is there a shortcut way to call function B with the results of A without using a ``multiple-value-bind'' to bind the results of A and then call B?
20:47:40
markasoftware
Multiple-value-call will help. Multiple-value-compose from Alexandria will make it even better.
22:12:25
kagevf
CL-ASHOK: maybe C-c C-y ... it will call the current defun in the repl and allow you to enter any parameters ...
23:54:23
slyrus
it's been a long time since I've looked under these rocks... is there anything like https://rstudio.github.io/reticulate/ for lisp? I think xof's stuff goes the other way and allows for SLIME to talk to R. I want R to talk to a lisp -- possibly via SWANK. Anything like that out there?