freenode/#lisp - IRC Chatlog
Search
14:25:09
luis
p_l: are you using rpav's c2ffi? I'm very curious, in case you can't tell. Also, have you seen <https://github.com/KDE/smokeqt/tree/Qt5v2>?
14:28:26
p_l
I haven't seen c2ffi, and somehow I missed that smokeqt repo - smoke had been badly documented across KDE pages
14:29:40
luis
p_l: c2ffi uses libclang to extract definitions. cl-autowrap (and cffi/c2cffi) then use that to generate bindings.
14:30:05
p_l
sounds like good starting point, I wouldn't mind improving existing code instead of tooting my own horn
14:37:27
luis
p_l: so, my idea was to try and emulate what dragonffi is able to do: compile C/C++ snippets at runtime and then invoke them, maybe using something like parenscript for C++. My thinking there is that this would eliminate the need for generating bindings, or exhaustive bindings, anyway. You can just call random C/C++ code and the compiler will type-
14:37:28
luis
check it for you. You raise a good point about not depending on libclang upon delivery though. I don't have an answer for that yet.
14:38:23
p_l
ebrasca: domains in what sense? Web domains? I think it's something that can be handled in handler in Hunchentoot or Clack (match on `Host` header)
14:38:56
p_l
I usually handle matching services to domains at LB and don't handle Host header in services at all
14:40:38
phoe
ebrasca: I use haproxy as my internal router that handles HTTPS. It then routes internal HTTP traffic over to Lisp services.
14:45:07
ebrasca
I like Hunchentoot , is it hard to manage more than 1 web page with diferent domain names?
14:46:48
p_l
ebrasca: I'd recommend setting separate handlers for each "application" or "website", then using an external service (for example nginx in proxy mode) to handle the frontend
14:54:29
p_l
I haven't used LXC for years, to be quite honest. For this case I'd use something closer to Docker (though podman might be better as runtime, but that's details you might not need right now) + external load balancer
14:55:08
p_l
bit hard for me to recommend because I don't know the rest of your environment and I have preferences that lean on the high-end side that I usually deal with
14:55:45
p_l
(I host something like ~250 domain, with ~1000 mappings, on single IP address, for one of my clients)
14:58:08
ebrasca
p_l: I am starting , If I manage this correctly I am going to have my first client.
14:58:16
vsync
I wonder how much time this would have saved over the years, and how much of that was convolutions out of over-preciousness
14:59:40
p_l
ebrasca: for starters, setup nginx with proxy configs (there's a lot of tutorials, and you can subcontract for a starting config ;) ) + running the sites on separate ports, maybe even as separate services (using runit or systemd to start them)
15:00:32
p_l
ebrasca: you should also consider creating a way to "poke" the application to verify it's in usable state and hook that into nginx so it can redirect to an error page if for any reason you need to take an app down
15:01:12
lukego
I've enabled `slime-company' package but so far it's only offered me completions once...
15:10:35
p_l
ebrasca: I recommend separate instances for things that are logically separate, in case you need to do something weird with them
15:23:33
phoe
What should be printed when (print-unreadable-object (nil *standard-output* :type t :identity nil)) is evaluated?
15:23:50
lukego
I'm trying to `C-)' in paredit but all Emacs is getting is plain old 0. Maybe because I'm running Emacs over ssh in a terminal? Any workaround?
15:24:45
phoe
The CLHS says this: If type is true, the output from forms is preceded by a brief description of the object's type and a space character.
15:31:56
Xach
lukego: i've had similar trouble when running through screen, but it produces a sequence of control characters that come out wrong. so i bind those codes in my .emacs to make things work.
15:32:43
lukego
Yeah `M-x view-lossage' is only showing it as a plain 0. Maybe I will use this as an excuse to not learn paredit-mode today.
15:34:14
lukego
I'm using iTerm2 on macOS and talking to Emacs via ssh and tmux. (ugh.) I'm planning to switch to Linux desktop in a few weeks so maybe I'll kick the can until then.
15:39:59
vsync
if I decrease the fill pointer of an array, then increase it again, is there any risk the elements hidden in that interval will disappear?
15:40:50
Shinmera
if anything decreasing the fill pointer and not clearing out the elements can be a memory leak.
15:41:33
Fade
lukego: I've found inconsistent results using emacs/slime over ssh to a session suspended in a terminal multiplexer. does it still happen if you take tmux out of the stack?
15:43:36
lukego
Guess I'll revisit this when I'm "linux native." I might run Emacs locally instead of via ssh then.
15:44:19
davepdotorg
FWIW, macOS and iTerm2: if I emacs -nw locally and try C-0 I just get a self-insert command on 0, so that would seem to eliminate most things along that chain.
15:46:54
lukego
Shinmera: Thanks but I'm over the whole Mac thing and looking forward to putting it behind me.
16:26:40
phoe
https://gitlab.common-lisp.net/ansi-test/ansi-test/blob/master/printer/print-structure.lsp#L22
16:27:11
phoe
This is supposed to read in the form #S(print-struct-1 :foo 1 :bar 2) with standard IO syntax
19:01:07
Bike
the printing is done in the cl-user package, and without print-escape or print-readably so there should be no symbol prefix in the text
19:02:25
Bike
(defpackage "CL-TEST" (:use)) (write 'cl-test::foo :escape nil :readably nil) => FOO here
19:04:35
kpoeck
(with-standard-io-syntax (write-to-string foo :readably nil :case :upcase :escape nil))
19:09:32
Bike
(with-standard-io-syntax (write (list 'cl-test::foo (cl-test::make-foo)) :escape nil :readably nil :case :upcase)) prints (FOO #S(CL-TEST::FOO)) in my clasp
19:10:38
phoe
maybe let us start from the beginning - is the test testing what is mentioned in the spec
19:11:42
phoe
When the symbol is printed, if it is in the KEYWORD package, then it is printed with a preceding colon; otherwise, if it is accessible in the current package, it is printed without any package prefix; otherwise, it is printed with a package prefix.
19:11:49
Bike
clasp uses prin1 to print the class name, so it overrides the escape setting from outside
19:12:47
phoe
(write-to-string (cl-test::make-blah) :readably nil :case :upcase :escape nil) ;=> "#S(BLAH)"
19:14:44
Bike
i don't see anything saying it's printed abnormally, and if printed the same as everything else there shouldn't be a prefix.
19:14:59
phoe
once again: https://gitlab.common-lisp.net/ansi-test/ansi-test/blob/master/printer/print-structure.lsp#L22
19:15:19
Bike
well you said (write-to-string (cl-test::make-blah) :readably nil :case :upcase :escape nil) ;=> "#S(BLAH)"
19:15:32
Bike
that's not what i'm seeing on clasp or sbcl. presumably ccl's method doesn't prin1 in the same way
19:16:02
Bike
ccl doesn't seem to have a print-object method on structure-object, so i dunno where that would be defined
19:23:44
Bike
i guess? i'm not sure why the structure class name would be treated ddifferently, is all
19:26:08
phoe
because otherwise READ would read a symbol in the current package which is CL-USER which fails the test
19:26:43
Bike
listen. sbcl treats the structure class name specially. it uses prin1 to print it, so the outside readability and escape settings are discarded.
19:28:11
phoe
and I don't feel like forcing to let Paul dig up his memories from fifteen years ago again
19:29:32
phoe
22.1.3.3.1 says, When the symbol is printed, if it is in the KEYWORD package, then it is printed with a preceding colon; otherwise, if it is accessible in the current package, it is printed without any package prefix; otherwise, it is printed with a package prefix.
19:30:50
phoe
A symbol that is apparently uninterned is printed preceded by ``#:'' if *print-gensym* is true and printer escaping is enabled; if *print-gensym* is false or printer escaping is disabled, then the symbol is printed without a prefix, as if it were in the current package.
19:30:58
phoe
the part "if *print-gensym* is false or printer escaping is disabled, then the symbol is printed without a prefix, as if it were in the current package. "
19:31:13
phoe
does "the symbol" mean the symbol being printed, or that gensym that was just mentioned
19:32:29
phoe
since I think it means the gensym that was just mentioned, being on the same paragraph and all
19:33:47
Bike
none of that stuff should matter. the second sentence of 22.1.3.3 says the rest of the section doesn't apply unless printer escaping is enabled
19:34:31
phoe
why the hell does the test require that a symbol read with standard IO syntax be in CL-TEST package and not in CL-USER
19:36:35
Bike
like i said, i don't see anything saying the structure class name is necessarily printed with the prefix.
19:38:34
kpoeck
My last input: In 22.1.3.3 Printing Symbols it says ...The remainder of Section 22.1.3.3 applies only when printer escaping is enabled
19:40:16
Bike
well, i don't know, it might be ok to print the prefix for the structure class name, i just don't see anything saying it HAS to
19:41:53
kpoeck
so for me the solution is to change the test to: (assert (or (eq (car vals) 'print-struct-1) (eq (car vals) 'cl-user::'print-struct-1)))
19:43:12
kpoeck
(assert (or (eq (car vals) 'print-struct-1) (eq (car vals) 'cl-user::print-struct-1)))
19:58:44
kpoeck
(let ((symbol (car vals))) (assert (and (string-equal (symbol-name (car vals)) "print-struct-1") (or (eql (symbol-package symbol) (find-package :cl-user)) (eql (symbol-package symbol)(find-package :cl-test))))))