freenode/#lisp - IRC Chatlog
Search
23:30:52
aeth
Shinmera: The problem is that you'll basically be forced to use multiple libraries that do essentially the same thing when it comes to something like JSON, since odds are one of your dependencies is using cl-json and another realized cl-json is stupid and is using one of the other 5
23:31:43
aeth
Compare this to something where there's one library (e.g. closer-mop, cl-ppcre, babel, trivial-features, trivial-gray-streams, bordeaux-threads, cffi, etc.) that dominates. Less likely to have a dependency explosion
23:31:53
Shinmera
Then that's an issue with the libraries at hand. It doesn't say anything at all about the support for JSON in and of itself.
23:32:42
Shinmera
And again, because there are different ways to do it, there's different libraries to do it. This is not the case with the other examples you mentioned (mostly) because there's very little to do differnetly.
23:34:13
Shinmera
mop, ppcre, encodings, ffi, features, threading, are all sets that are pretty well defined, and the way to implement a library for it is thus clear. The JSON mapping is not.
23:34:34
aeth
There's a different way to do babel... treat it like a portability library and e.g. use SBCL's much faster octets-to-string when on SBCL. There's many ways to do regular expressions. There's also probably many ways to do something like bt or cffi. There are different ways to handle what trivial-features does, one library I used to use used that alternative.
23:35:15
aeth
trivial-gray-streams is the only unambiguous basically-one-way-to-do-it library there that I know of. I don't know enough about closer-mop, but it might be the same way.
23:35:52
Shinmera
bt, ffi, etc. expose a min-max API and are thus also pretty clearly defined and couldn't well be done otherwise.
23:35:57
whoman
lisp libraries hmm could be treated a bit less as having an API and more of being a bunch of parts
23:38:09
aeth
Anyway, I do see it as a flaw in the CL ecosystem that there isn't a clearly correct (for most use cases) and popular JSON library... although, that might just be because a lot of people (like me) use s-expressions for data where other languages would use JSON, YAML, or XML. Still hurts interfacing with things written in other languages, though.
23:39:22
aeth
Most of the stuff at the top of this are clearly the correct library for the thing they're trying to solve, or at least correct enough to not be worth using an alternative. http://blog.quicklisp.org/2017/12/november-2017-quicklisp-download-stats.html
23:49:03
aeth
republican_devil: If you're talking about using Lisp instead of SQL where SQL would normally be used, then I think it's still technically NoSQL
23:49:06
Devon
republican_devil: I scoped out various CL JSON libs for a product I was developing, found one which was round-trip correct, IIRC I still had to hack it a bit to get it right.
23:50:39
aeth
Devon: Yes, round-trip correctness, that's the issue. It's related to also having reasonable encodings. Not having a separate '() and #f here hurts CL in a naive encoding if one wants to use lists instead of arrays.
23:51:04
aeth
jcowan_ pointed out some workarounds to JSON encoding issues in #scheme a few weeks ago, iirc
23:51:58
aeth
Devon: can you clarify? "semantic" sounds like it might be too much of a buzzword to search
23:53:33
aeth
republican_devil: I'm not aware of a portable CL-native database that has any real popularity. I wouldn't be surprised if LispWorks and/or Allegro have their own proprietary ones.
23:55:46
aeth
Some of the entity systems used by #lispgames might be seen as CL-native in-memory databases, but they would be built around being real-time, not around big data.
23:58:35
aeth
A portable database that's not in-memory would probably need some portability around mmap. Does this exist? It looks like the only name match in Quicklisp is trivial-mmap.
0:32:02
aeth
whoman: Thanks, your suggestion set me off in the right direction. I now store all the old values of the slot names in gensyms, and aref those gensyms instead of using the name directly.
0:36:36
whoman
aeth: ah cool! gensym leaves a taste in my mouth. i had been conditioned to feel that hygiene is a good thing (??) but suddenly i see that capturing variables is something i will really enjoy the taste of
0:38:17
whoman
some time last night i had two sdl2 bindings going, very unconventionally, so i am sure that was it =)
0:38:57
whoman
there she is =) --> (defmacro alambda (parms &body body) `(labels ((self ,parms ,@body)) #'self))
0:40:19
dmiles
Devon: and/or KM http://www.cs.utexas.edu/users/mfkb/km/ http://www.cs.utexas.edu/users/mfkb/km/km-overview.script
0:42:16
dmiles
ACTION is developing new Lisp to make integration of such programs Semantic Inference Engines easier with other Engine tools writtne in Prolog
0:57:20
aeth
dmiles: I think CL is small enough if you ignore CLOS and loop and use someone else's versions of those. Maybe a few other painful parts.
0:57:24
dmiles
i have two two versions one is cl-lib and the otehr https://github.com/larsbrinkhoff/emacs-cl
0:58:53
dmiles
aeth: yeah that is what i been finding (that it isnt that biug.. actualyl even clos as far as i can tell in not even as big as Epilog KM or any other lisp applicaiton
1:15:50
stylewarning
my lisp & quantum computing talk is online https://www.youtube.com/watch?v=f9vRcSAneiw
1:16:27
dmiles
of every sentence /me was actually paid once to write a neurolinguistic personal auditing program to detect souls whom do this
1:17:49
dmiles
since they may often be the most likely to do reprisal attacks against previous employers
1:36:21
dmiles
ashkenazi are a group of less 350 jews whom decendended from some italian women whom are now over 2 million people.. but prabably quite more.. since most do not know they came from this group
1:37:47
drmeister
Hey - does anyone use dtrace? I'm trying to use it on clasp and it's not cooperating.
2:20:07
drmeister
I figured out my problem. I'm profiling our own code (Clasp Common Lisp) and I needed to start and stop profiling for a particular function.
2:22:56
drmeister
It's pretty clear that I have been undercounting the amount of time that Clasp spends running LLVM
4:17:36
loke
hooman: The neat things about CLIM is its ability to mix graphical representations of objects with text.
4:21:16
hooman
loke: ah really? i was just clicking, because ive never debugged lisp before, and i was clicking into cons cells and arrows were pointing at stuff etc
4:23:06
hooman
but i am also having the issue with graphics , from common lisp to the screen, it is not a good time with SDL =)
4:23:07
loke
hooman: Then type an expression that returns a value, say (list 1 2 (cons 3 4) 5)) press RET and you should see the resulting list in red in the REPL. Then move the cursor to the result and press C-c C-v TAB
4:23:20
hooman
i will try to play around with clim-listener as well and see if it could animate some things
5:03:26
parjanya
hi! how can "print" a standard-char as a simple string? like (print #\a) returning just "a"?
5:26:28
myrkraverk
What is the simplest way to print carriage-return in Lisp? To make an auto-updating status in a terminal, thing.
9:01:34
shrdlu68
I need a really huge octet vector and using sbcl with --dynamic-space-size seems to use swap and gobble up so much memory the system becomes unresponsive.
9:05:58
|3b|
and do you need to be able to use normal CL vector ops on it? (guessing not if you can replace it with file ops)
9:08:47
schweers
that sounds like --dynamic-space-size and a regular vector or array should do the job
9:09:08
|3b|
by N x 40 bits you mean you need that many values with at least that many bits? or a n*40 bitvector?
9:10:50
shrdlu68
Perhaps the mistake I made was to create an n-size array of elements each an array of 40bits (5 octets) rather than just one octet vector.
9:12:02
|3b|
(on 64 bit lisp, the pointer pointing to it is probably 8 bytes by itself, not including the actual array headers etc)
9:14:12
|3b|
also, you are using types arrays for the octets, right? :element-type '(unsigned-byte 8)
9:24:41
|3b|
yeah, 309319296 x 5-element octet vectors uses ~12GB, (* 5 309319296) element octet vector uses ~1.6GB
9:28:15
beach
I set *COMPILER* to be either EVAL, COMPILE, or COMPILE-FILE. But I am not sure that's the best solution.
9:31:23
|3b|
for first case, looks like ~2.4GB is the 8-byte pointers in the big array, 9.9GB is the 5-element arrays, so about 32 bytes per 5-octet array (i'm guessing 24 bytes of header + 3 bytes of padding to round data up to a whole word of space)
9:37:53
beach
dmiles: It is not a Boolean expression. It has to do with calling or not calling EVAL at compile-time, and generating or not generating code to be run at load time.
9:40:55
dmiles
it does mean though if :eval :compile or :compile-file in your case are found in *COMPILER* then to treat the code as there
9:42:25
specbot
Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
9:43:50
beach
dmiles: When implementing a Common Lisp system, if you have a choice between doing it according to the Common Lisp HyperSpec and not doing it according to the Common Lisp HyperSpec, the first choice is always the best.
9:44:14
shrdlu68
|3b|: Didn't work, it was still gobling up memory for some reason, I've switched to CCL.
9:44:29
dmiles
i was reading eval-when and wasnt completely sure.. most of the time i match the examples
9:45:56
beach
The Common Lisp HyperSpec examples are not normative, though, and they sometimes contain errors.
9:47:03
dmiles
too bad http://www.lispworks.com/documentation/HyperSpec/Body/s_eval_w.htm#eval-when doesnt like the 3.2.3.1 section
9:52:56
pjb
shrdlu68: syscalls are way slower than function calls, which themselves are slower than inline native instructions to index an array.
9:57:23
dmiles
yep works for me to.. i was complaining that the eval-when page has great usefull links but everywhere but that page :P .. to have gotten there I would have had to stop at the top-level-forms glossary page first.. which then links to that page
10:03:18
schweers
dmiles: you’re implementing your own common lisp? for fun and education, or do you think you can do better than those implementations that are already out there?
10:06:36
dmiles
i mostly hope i can do as good as the top 40%.. i am writting it in Prolog for a few reasons.. one is to prove prolog is a general purpose programming language that makes things like creating lisp impls ultra easy. we already know it makes lisp interpretors in less lines than any other language.. but what i am interested in if it can do "as well"
10:08:48
dmiles
so the prolog sources can at the repl be evaluated or if its done in compile-file it can be compiled
10:09:42
dmiles
there are good and less developed prolog compilers for differnt platforms .. in several langauges
10:12:06
dmiles
source code shrdlu68 is at https://github.com/TeamSPoon/wam_common_lisp/tree/master/prolog/wam_cl
10:12:17
dmiles
this file https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp translated to this file: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl
10:13:35
dmiles
the lisp_compile_to_prolog(pkg,..) is there more informationally like: https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L44-L59
10:15:07
dmiles
and to get the symbols interned ( packaged ) so the prolog code at https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/sanity-test.lisp.trans.pl#L74-L88 can be understood
10:18:09
dmiles
to give an example of *normal* implementing of lisp in prolog, it looks like this: https://www.metalevel.at/lisprolog/lisprolog.pl
10:21:28
dmiles
so bonuses of the prolog system is it already has a decompiler, exe/dll maker, image load/save
10:22:34
dmiles
the drawbacks is the number developer that think implementing object systems on prolog as to be easy
10:24:40
dmiles
everyone that gets to or past phD level in computer science is forced into at least 2 miserable weeks of leanring proliog
10:26:41
schweers
jackdaniel: I imagine that to be the case, which is why I can see myself learning the language some day
10:26:44
jackdaniel
I suppose they are required to know at least some important programming paradigms
10:30:07
schweers
dmiles, jackdaniel: do you think free prolog implementations of today are usable or real world applications? Or is the language as it is today “only” useful to broaden the mind? Which would be totally fine if you ask me, that is still a very good reason to learn a language.
10:31:07
dmiles
definately very good for todays applications.. i think even more for future applications.. I have two applications that i would not even immagine using anthing other than prolog
10:31:22
schweers
on the other hand: if it were not, I guess you wouldn’t be writing a lisp implementation in it ;)
10:32:37
dmiles
so i immagine 95% of the world would use lisp for such apps and make a prolog interpretor but leverage the inteire lisp ecosystem
10:37:15
dmiles
those applicaitons: a general purpose problem solver/simulator that can learn and be taught
10:38:57
dmiles
and can make further applications for running on computers that are based on what it learns from the previous
10:40:19
dmiles
if one knew exactly how that was supposed to work.. lisp and prolog would be most natrual choices at that point
10:43:06
dmiles
neitehr languages are going to have what you need built.. what they offer is one the ability to design top down
10:49:55
dmiles
a huge project CYC made a prolog-like-system-in-lisp ... writting in their language has shown me incredicable ammounts of untility that prolog as a language is afraid to adopt
10:50:35
otwieracz
I've got some weird pthreads/bordeaux-threads/maybe-lparallel related issue https://gist.github.com/otwieracz/d88dfc0d8b726f2610dda310e2b1e406
10:51:33
otwieracz
TL;DR - I've got a case where binary build with both CCL and SBCL lacks mutex fairness on certain machines.
10:51:56
otwieracz
Like, CentOS 7 in Google Cloud Platform. But not Ubuntu on GCP or CentOS on proxmox on bare metal.
10:52:57
jackdaniel
lparallel and bt seem like a bad fit, since they build abstraction on top of threads provided by the implementation
10:53:10
jackdaniel
since problem bites both sbcl and ccl it is not these implementations problem either (most probably)
10:53:30
jackdaniel
so it is either something in pthread implementation on the machine, or Linux + Virtualization
10:54:11
otwieracz
Something weird happends and falls into uncommon case where due to virtualization CPU sharing something is being, maybe, optimized.
10:54:36
otwieracz
Still, I don't believe such bug will remain undetected if it won't be lisp-specific.
10:56:05
otwieracz
I am afraid I first have to prove that problem is on their side before I blame them.
10:56:08
jackdaniel
ACTION doesn't know google procedures for reporting bugs in their virtualization platforms
10:58:52
dmiles
schweers, so as varjag was saying (i think) is most out of the box supposed features people learn to do on a small scale (niave brute force search and inference) do not work on a large scale. but is very enjoyable on a toy levels. Though if a person uses prolog as a macro programming language instead of a structured query language it scales to every level - no problem
11:00:13
pjb
otwieracz: I don't see any problem: other thread is correctly printed after a unlocking message.
11:00:29
schweers
sounds a bit like the situation with lisp: yes, lists are kinda cool for some algorithms (espectially to transform code) but shouldn’t be used in the large
11:00:33
pjb
otwieracz: I would just add finish-output after each format to ensure more reliable output.
11:01:52
otwieracz
„Mutexes are used for controlling access to a shared resource. One thread is allowed to hold the mutex, others which attempt to take it will be made to wait until it's free. Threads are woken in the order that they go to sleep. ”
11:02:46
otwieracz
pjb: On others, correctly, just after thread started before it unlocked the lock.
11:04:28
otwieracz
„locking” message is printed just before any of looping threads goes to sleep. Correct?
11:11:35
otwieracz
pjb: updated & tested https://gist.github.com/otwieracz/d88dfc0d8b726f2610dda310e2b1e406
11:25:25
jackdaniel
if centos7 allows you to change kernel version, try newer Linux, that could narrow it even further