freenode/#lisp - IRC Chatlog
Search
14:31:15
jackdaniel
https://stackoverflow.com/questions/42398762/why-does-gtk-have-gint-gdouble-which-are-just-typedef
14:32:03
pfdietz
I think cffi could use some optimization. I made a change to it recently that sped up an application that uses it by about 10%.
14:38:18
pfdietz
EQL hash tables can be much faster than EQUAL hash tables. With the former, lookups on :uint32 were mostly hitting the hash table previous key cache.
14:39:47
pfdietz
I'm sure there are many other pieces of low hanging fruit. For example, it doesn't have to constantly be rechecking for typedef circularity.
14:41:20
_death
this kind of performance naiveté is not limited to cffi.. we're just Lisp programmers abiding by Perlis ;)
15:00:44
_death
there are a zillion testing libraries, but not a lot of benchmarking libraries.. asdf has a test-op but no benchmark-op..
15:16:23
jmercouris
when the system detects an errant transition, a guard not satisfied, etc, it signals an error
15:16:48
jmercouris
to elaborate, the slot called transitions will contain a list of transition objects
15:17:33
jmercouris
the really cool thing about this model is that it can be trained by observing a system under nominal conditions
15:17:52
jmercouris
therefore I do not have to program 'what' to look for, I only give it some signals, and these are modeled by the system and saved in the transition objects
15:18:19
jmercouris
it's not a terribly complex system, but my goal is not performance or anything, but adaptability/customizability
15:19:33
phoe
first you define a state machine that lists all transitions, so which states can go into which states
15:20:06
phoe
then you define what a given state does, and it has access to the info stored in a state machine information
15:20:36
phoe
and therefore a macroexpander for a given state can check if a transition is allowed in the state machine
15:20:49
phoe
if it's allowed, it can expand into proper code; if it's not, it can signal a macroexpansion-time error
15:23:07
phoe
no CLOS, no MOP, no method calls, no structs, no anything - just LET over BLOCK over TAGBODY that uses generated GO forms to jump across states
15:23:21
phoe
if I do it correctly, I'll also be able to test individual states rather than the whole state machine at once
15:28:55
phoe
and since each idempotent mostly-pure function is allowed to be a good macro function...
15:37:37
jmercouris
its the itch I had so often in other languages, I didn't even know what I was missing
15:38:10
jmercouris
sure there were mechanisms, kludges you could use, but sometimes a macro is invaluable
15:54:02
_death
the compiler provides a hook for ad hoc extensions.. you can write an extension which is a compiler itself
15:56:35
jmercouris
from Wikipedia "In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language)"
16:00:37
jackdaniel
Josh_2: if you serve a big file, then you should be vary, that hunchentoot first loads the file into memory and after that it sends it
16:01:47
Josh_2
the problem isn't just loading up videos and sending them jackdaniel, the problem is that safari has a very specific way you have to respond to certain headers
16:03:06
jmercouris
as you can see, /static will be handled by Nginx, anything else will proxy pass through
16:04:22
Josh_2
okay I can have a similar config however the way my site works right now is you have a html page and within it a single video, the video is chosed based on a get parameter
16:06:42
jmercouris
even IF the videos are dynamically generated, you could write the file stream to the static directory
16:07:23
Josh_2
how do I get nginx to select the correct file? because currently I am just doing (to-octets (random (length <my static dir))) and then serving that
16:10:30
jmercouris
I don't see what the problem is, your Lisp application just needs to know all of the content, which it can scan by itself using UIOP
16:11:01
Josh_2
I have a redirect button that randomizes a get parameter, the get parameter is a random position in a list of files (the content) then when the page is loaded the video in that position of the list is loaded
16:17:33
Josh_2
do I have to keep the extension on my files for nginx to determine the mime type? they are all mp4
16:32:01
Josh_2
I just need a neat way of adding new files and keeping them in line with the naming scheme and all should be hunky dory
17:09:23
Josh_2
is there a way I can move a file without having rewrite the file in a new directory?
17:26:08
contrapunctus
I happened to type `ecl` at a terminal and got this - http://paste.debian.net/1180220/ (typed and entered 1, but got the same prompt again and again; if I C-d all prompts, it segfaults.)
17:39:13
jeosol
Is anyone working on natural language processing with CL (open libs) and have recommendations. Looking at cliki, I see a few libraries langutils and elsewhere vseloved's cl-nlp. Haven't used any system in CL but family with python's spaCy
17:40:50
jeosol
Also, not an NLP expert, but my larger goal is to part some document, excel file and extract word tokens that my help me create rules (.e.g., crude decision tree)
17:42:37
fangyrn
jeosol: If you use ABCL you will be able to use Java NLP libraries really easily and those are quite well-renowned, like the stanford one
17:42:53
jeosol
I am just trying to get high-level recommendations from those who may have worked in this space.
17:44:04
jeosol
oh ok. Unfortunately, my base code is in SBCL and never used other implementations, but I guess if nothing, I can look at ABCL and I can try to investigate separately
17:54:09
ym
Hi. Trying to wrap CLX into CLOS, getting error "Asynchronous VALUE-ERROR in request 31 (last request was 38) Code 1.0 [CreateWindow] Value 0." Could somebody guess what the problem could be?
17:54:56
fangyrn
jeosol: yes. there is another one, openlp from googling right now. I just remember learning about
17:55:27
fangyrn
I just remember learning about corenlp. I thought it seemed like quite a good nlp library (it had a lot of cool papers, I don't know about documentation).
17:57:27
jackdaniel
while by default everything is a structure, you may easily change it with a flag, so instead of structure-class you have standard-class instances
18:03:47
ym
I use classes to encapsulate CLX parameters like window position, geometry, hierarchy etc and also to be able to create window with default parameters like just (make-instance 'x-window).
18:23:56
jackdaniel
apparently it is not the same code - maybe try to minimize it and trace xlib calls in the working and not working version to spot a difference
18:24:30
aeth
fiddlerwoaroof: To me, I have a different approach. Essentially, if it's designed to be used inline, then being short probably makes sense. So vec+ might make more sense than vector-+... and Scheme's various aref equivalents are fairly annoying, e.g. vector-ref vs aref.
18:24:56
aeth
But most things aren't really designed to be used on one line with many other things... basically just refs and arithmetic, most of the time.
18:26:36
aeth
jmercouris: Generally, for Unicode, if I know the implementation is OK, I'll use the implementation thing (so CODE-CHAR / CHAR-CODE in this case) and then for implementations I don't know, I'll have dependency, maybe even an optional dependency that's only loaded for those generic implementations, that guarantees the behavior.
18:27:24
aeth
jmercouris: e.g. an inline UNICODE-CODE-CHAR function that #+(or sbcl ccl ecl ...) uses CODE-CHAR and otherwise uses a portability library, just in case.
18:30:00
aeth
Something like this probably could be a library because it won't really cause any problems except if it makes something hit SBCL's inline expansion limit (which is to prevent accidental recursion of an inline function)
18:52:11
Josh_2
jmercouris: your version using nginx to serve content appears to be working just fine, thanks!
19:01:57
ym
Damn. How that comes that slime's restart-inferior-lisp doesn't actually restarts inferior lisp program?
19:03:29
scymtym
it doesn't (and can't) work if the connection was made with M-x slime-connect instead of M-x slime
19:29:07
fiddlerwoaroof
Does anyone have experience with traversing all of an ASDF system's components and those of its dependencies?
19:34:43
devon
Has anyone ever used TRIVIAL-MMAP? Examples don't compile, macroexpansion time file access, posix munmap called with wrong args, ... and that's just at first glance.
19:52:08
devon
Xach: In this case, to use mmap without crashes, memory leaks, re-inventing existing systems, ...
19:53:53
Bike
okay, so i mean, if shinmera's library works you can use mmap without crashes and so on, so there's your goal met. If what you want is for the first system you find to work for you that's a little different.
19:55:32
Xach
devon: right - so do you see the process as doing more than just compile, like try running tests for each project too?
19:59:56
devon
Xach: These particular broken examples are embedded in the doc and this particular broken system has no tests. However, I see a clue in (quicklisp-client:who-depends-on "trivial-mmap") => NIL and (quicklisp-client:who-depends-on "mmap") => ("3bz" "cl-maxminddb" "mmap-test" "pngload")
20:02:14
Bike
the tests would just be written by the library developer, right? doesn't seem like that would work to weed out poorly functioning libraries, they'd just have poorly functioning tests
20:12:57
devon
Xach: To help find good systems, perhasp QL:SYSTEM-APROPOS or similar should allow ranking by popularity, i.e., how many other authors use this as a component?
20:17:04
_death
recently a dataset has been made that contains the number of downloads for quicklisp projects
20:18:17
Xach
some time ago i came up with a plan to allow anyone to contribute "tests" to any project, to be run when building quicklisp dists.
20:29:01
Xach
devon: it sprung from a very specific situation and it might not solve a problem you have, though, sorry :~(
20:43:29
Josh_2
I have dumped my lisp image and it runs and executes as expected on my machine, but when I load it to my server I have the following problem https://plaster.tymoon.eu/view/2229#2229 now I don't understand why It's working fine on my machine but failing on my server
20:48:06
Josh_2
it is built with :build-operation "program-op" in my asd and I have a little makefile that loads the asd, quickloads the project then executes asdf:make
20:48:56
Josh_2
oh also I have (defmethod asdf:perform ((o asdf:image-op) (c asdf:system)) (uiop:dump-image (asdf:output-file o c) :executable t :compression t)) in my asd
20:50:53
_death
I would try checking how clack "handlers" work, that may have something to do with the failure
20:58:42
erronius
Now what? I've got things that are mandated of me that I've got to do something about but I'm not allowed to.
21:01:11
erronius
"Look at me, look at me, look at me!" But it's someone else saying that, but I'm the me, of them, that is who's being looked at?
21:45:15
Josh_2
I am trying to connect my remote image using slynk, I keep getting the following error https://plaster.tymoon.eu/view/2230#2230 the file it is looking for does exist
21:47:20
phoe
Josh_2: weird. (probe-file #p"/home/josh/quicklisp/dists/quicklisp/software/sly-20201220-git/slynk/slynk-backend.lisp")? `ls -alh /home/josh/quicklisp/dists/quicklisp/software/sly-20201220-git/slynk/slynk-backend.lisp`?
21:55:18
phoe
weird; now it's complaining about completion, previously it was complaining about backend
21:57:18
Josh_2
#P"/home/manage/.cache/common-lisp/sbcl-2.0.11-linux-x64/home/josh/quicklisp/dists/quicklisp/software/sly-20201220-git/slynk/slynk-completion.fasl" that is a big invalid pathname
22:01:00
Josh_2
slynk-backend-tmpA72A9OJZ.fasl slynk-completion-tmpD2D7RXIM.fasl slynk-source-path-parser-tmp47SOVWJ1.fasl slynk-tmp24BDVRKR.fasl those exist in the directory is it searching for