freenode/#lisp - IRC Chatlog
Search
0:19:56
defaultxr
has anyone got sly working? sly-connect seems to do nothing when i try to connect to a slynk server created with (slynk:create-server :port 4005 :style :spawn :dont-close t) . emacs just says "[sly] Connecting to Slynk on port 4005.." and nothing else happens. the sly-events buffer says (:emacs-rex (slynk:connection-info) nil t 1) .
0:22:14
defaultxr
slime-connect also worked nicely for me... never had any issues with it. figured i could swap out swank:create-server for slynk:create-server and be able to call sly-connect just like slime-connect
3:40:54
ober
is there a static representation of a hash that can be done like on some lisps (hash (a 1) (b 2) (c 3) (c 4))?
3:43:01
pjb
(com.informatimago.common-lisp.cesarum.utility:hashtable :test 'equal :elements '((a 1) (b 2) (c 3) (c 4))) #| --> #<hash-table :test equal size 3/60 #x302003DBE14D> |#
3:44:10
pjb
(com.informatimago.common-lisp.cesarum.utility:hashtable :size 3 :test 'eql :elements '((a 1) (b 2) (c 3) (c 4))) #| --> #<hash-table :test eql size 3/31 #x302003DFE33D> |#
3:49:51
White_Flame
alexandria has plist & alist to hashtable conversions, that you can use literally
3:59:51
no-defun-allowed
alternately: alexandria.0.dev:alist-to-hashtable or whatever its name is, I forgot
6:03:49
dmiles
do i have this correct? i should be able to translate a .java program using JNIL+ACL to Linj.. then once in Linj run the program is SBCL
7:06:39
jackdaniel
GoldRin: discussions about timezones has been seen (length '#1=(1 . #1#)) of times on all irc channels, they are pretty used ,)
7:09:39
jeosol
heed help braining a problem to get the best way to do it. SBCL has crashed on my a few times due to memory issues.
7:10:54
jeosol
So I have a large 3d array/cube, the dimensions can be high, e.g, 100x200x50. Some of the cells are inactive indicated by a 0 and active indicated by a 1. The external app I have to call takes data in compressed format
7:11:56
jeosol
and assuming a fixed way to traverse the grid. What I normally save for my application on the lisp side are just the indices that contain 1s but if I export, I will need to dump everything including the 0's and 1's
7:13:49
jeosol
Assuming the full vector is #(1 0 0 1 1 1 0 0 1 0): the compressed format is ("1" "2*0" "3*1" "2*1" "1" "0") with 2*0 meaning 0 appearning twice (i.e., 2 neighbor cells have 0's). What my app saves is the indices of this vector which will be
7:14:27
jeosol
indices where the elements are 1, i.e., (0 3 4 5 8) and I now the maximum possible number of elements
7:15:55
jeosol
that was an example. I actually save other properties for this array, they are actually CLOS objects
7:16:59
pjb
jeosol: if you have only bits in your array, you can (make-array '(100 200 50) :element-type 'bit :initial-element 0) Then it'll take (/ (* 100 200 50) 8) #| --> 125000 |# bytes of RAM (122 KB).
7:18:32
jeosol
pjb: thanks for that. I apologize if my comment meant large by size. I have fairly large array of objects. The other array describe is then used to index those objects for calculations only for the active cells.
7:20:53
jeosol
initially, all elements will be 0 or 1. Normally the app can read both compressed format and the case where you write each element. The file usually contains a lot of properties all on the same grid.
7:22:58
jeosol
saving all indices (either 1 or 0's) will be easier to compute i guess, match through the vector and accumulating count of similar value and reinitializing counter when there is a change from 0 to 1 or vice versa
7:23:57
LdBeth
jeosol: I cannot get your meaning, doesn’t 1 means an object and 0 means a nil entry?
7:25:28
jeosol
Apologies if is not clear. I had to look for something that could help https://www.tes.com/teaching-resource/why-do-rivers-bend-meanders-and-ox-bow-lakes-12078681
7:26:56
jeosol
the above link contains something that is analogous. assuming I am trying to model flow in the meandering river. The 3d grid will be the box but the path for the flow is only allow the river. So if we plotted the 1's,
7:33:49
jeosol
Ldbeth: technically, the solution will be the compressed format of shown above. I have code to read the compressed format and expand accordingly
7:35:41
jeosol
but I wanted to write that compressed format to a file if I only saved the indices with 1's
7:38:13
jeosol
I realized an error in my compressed format above: it should be from #(1 0 0 1 1 1 0 0 1 0) -> ("1" "2*0" "3*1" "2*0" "1" "0"). The solution should always alternative 0's and 1's
7:42:37
jeosol
Thanks pjb and LdBeth for your help. the code has elements and techniques I could use.
7:54:06
dmiles
since archive.org doesnt have much.. https://web.archive.org/web/20120111014708/http://common-lisp.net/webftp/pub/project/jnil/jnil_20060531.tar.gz
8:25:33
McParen
when I add another asd system file to the code, will this system automatically be visible to ql:quickload?
8:28:38
no-defun-allowed
Should do, but if it's a local project I usually register-local-projects anyway.
9:20:21
adlai
paule32: do now worry if you have problems with multiple inheritance; i assure you, mine are greater
9:26:24
adlai
other than some general confusion about the inheritance structure. I wouldn't have an element class inheriting from a group class
9:27:31
adlai
paule32: in line 15, you forgot the colon for the initarg. it's not necessary, you can use a non-keyword symbol as an initarg, but that's probably not what you're trying to do
9:35:18
paule32
(defvar pelement-o (make-instance 'pelement :zeichen "O" :name "Sauerstoff" :ordzahl 8
9:43:30
ck_
paule32: you seem a little confused. Do you want to use A) inheritance or B) have each element have their group as a slot? You're doing both. The problem in your pasted error has nothing to do with multiple (or single) inheritance though.
9:57:29
szmer
is there a XML library that has searching or specifying (partial) paths to kinds of nodes you want? like lxml or BeautifulSoup in python
10:47:55
ck_
paule32: what I'm asking you is why you have pelement inherit from pegruppe. You realize that your pelement class, right now, also has the 'nummer' slot in the way you have it set up?