Search
Wednesday, 11th of October 2017, 23:04:18 UTC
23:04:18
emaczen
Or are you saying there is another conversion function to use
23:07:05
pillton
I'm saying that your current approach is very brittle because it relies on the layout of C structures which you are not in control of.
23:09:29
emaczen
pillton: what else am I suppposed to do?
23:10:07
emaczen
I was actually trying to use ABCL, java opencv bindings but I could never get it configured
23:29:08
emaczen
can CFFI use C++ functions?
23:39:31
emaczen
Bike: I've never programmed enough in C
23:39:46
emaczen
Bike: I'm already having a terrible amount of trouble as it is
23:42:39
emaczen
Bike: Why does Clasp have such intense requirements to build?
23:43:15
Bike
because we use a lot of newish llvm features.
23:43:24
Bike
though currently i think you can use a stock llvm as long as it's 5.0
23:45:22
sizur
Is there any command line tool to pretty-print sexpr files that is width aware?
23:45:40
sizur
either terminal width or width as a parameter
23:45:56
Bike
the lisp printer has print-right-margin
23:46:21
sizur
Bike: thanks. how do i invoke the lisp printer?
23:46:33
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_wr_pr.htm
23:46:55
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_wr_pr.htm
23:48:03
sizur
ok, looks like i need to learn lisp for that :P
23:55:32
sizur
jmercouris: i hold very high opinion of lispers
23:56:30
sizur
you guys can do everything easy, so i assumed there would be a simple cli command for that already :)
23:56:59
sizur
but i understand since it's probably easy to invode adhoc command for that, the cli tool was never needed
23:57:47
sizur
elisp's pp is not width aware :(
23:59:30
jmercouris
sizur: elisp is missing a lot of things, you'll have better luck in #emacs for elisp specific questions
0:00:22
sizur
i asked there too. but i thought sexp-related matches lisp more
1:00:15
jmercouris
I'm trying to run the example here: https://trac.clozure.com/ccl/wiki/CocoaBridge and instead of drawing a red window, I just get the following: https://imgur.com/a/64OxP
1:07:27
jmercouris
It's interesting because it updates the "Window" section of the menubar, but the window is NOT visible, even when using "Bring all to front"
1:48:35
jmercouris
I'm assuming this is due to changes in Cocoa
1:48:47
jmercouris
I guess I'll have to rewrite the example, and re-learn a lot of Cocoa
2:14:00
jmercouris
can anyone reccomend a good cffi tutorial?
2:16:14
jmercouris
I'm looking at it now, seems pretty good, but just wondering if there was something else, I like reading from multiple resources usually
2:16:36
_death
the source code is also very nice
2:16:59
jmercouris
interesting, I'll take a look thanks
2:25:47
shrdlu68
The documentation for the Holy Hand Grenade of Antioch is the best ever.
2:29:39
fouric
(non-code documentation i'm assuming)
2:29:52
shrdlu68
jmercouris: Sorry, unrelated.
2:39:23
emaczen
jmercouris: On OSX GUIs can only be drawn from the main thread
2:40:30
emaczen
There is some ccl function #'gui:execute-in-gui that should be called first
2:41:25
emaczen
Or sorry, you should pass the code you want called in the function argument to #'gui:execute-in-gui
2:42:34
emaczen
jmercouris: if you are looking at GUI work with commonlisp, ABCL is really easy to use Java's swing libraries
2:43:18
emaczen
I've just tinkered around with ABCL for other reasons but it is as easy as (setf frame (new 'Jframe))
2:43:33
emaczen
and then (#"setVisible" frame t)
2:48:52
jmercouris
emaczen: Thank you for the advice, but I already use EQL for gui, just toying around with cffi for some other ideas
2:51:47
jmercouris
EQL is a library for interfacing with QT it's really good
2:52:02
jmercouris
you can install it and check out the examples section: https://gitlab.com/eql/EQL5
2:52:31
iqubic
I thought it was a function to check if two symbols pointed to the same memory location.
2:52:46
jmercouris
it is that as well :P
3:42:21
turkja
Does anyone know any good examples of GUI apps written for ABCL? I mean some serious app, not just "hello java".
3:52:12
paule32
hello, and good morning
3:52:16
paule32
http://paste.lisp.org/display/358353
3:52:50
paule32
how can i create a list if numbers, by given string "12345", and print the list?
3:54:10
loke
paule32: a string is already a sequence of characters
3:54:37
paule32
yes, but i would like have a list of this char
3:55:10
loke
List of characters, or list of numbers?
3:57:39
loke
(map 'list #'sb-unicode:digit-value "3848374")
4:00:37
paule32
Package SB-UNICODE does not exist.
4:25:29
paule32
(setq listeA (loop for x from 1 to (- (length stringA) 1)
4:25:30
paule32
finally (return ns)))
4:25:49
paule32
now, i have 2 lists
4:26:06
paule32
(3 5 6 7 8 9 1 2 3)
4:27:11
paule32
how can i fill the first list with zeros: 0 , when list 2 is bigger than first
4:33:28
shrdlu68
I'm not sure I understand what you want, why not use #'fill?
4:33:34
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_fill.htm
4:34:23
paule32
i have 2 strings "12345" and "3568943423"
4:38:39
shrdlu68
In the loop above it looks you don't need the into and return keywords. i.e. (loop for x from 1 to (1- (length stringA)) collecting x) would suffice.
4:50:11
paule32
indeed, it is not neccessary
5:03:22
paule32
(fill (list listeA) '0 :start 4 :end 10)
5:03:46
paule32
(SB-INT:SEQUENCE-BOUNDING-INDICES-BAD-ERROR ((1 2 3 4 5)) 4 10)
5:20:41
shrdlu68
paule32: That's a very specific error, the same error you get when you try to read the 6th element from a vector of 2 elements.
5:23:44
beach
Good morning everyone!
5:29:28
compro`
good morning beach. What is your timezone?
5:30:59
beach
compro`: See this one, though: http://www.total-knowledge.com/~ilya/mips/ugt.html
10:35:19
flip214
hmmm, CFFI::FOREIGN-STRING-LENGTH is using 40% of the CPU time... ouch.
10:55:26
beach
Is there an appropriate existing error condition that could be signaled if an attempt is made to execute a form that had compilation errors.
10:55:41
specbot
http://www.lispworks.com/reference/HyperSpec/Body/e_progra.htm
10:56:00
phoe_
that's my first guess, but let's see if we can go more specific...
10:56:13
beach
Yeah, OK. That could work.
10:56:31
beach
I think of PROGRAM-ERROR as a compile-time type of condition.
10:56:41
phoe_
I think this is as good as you can get with the standard.
10:57:15
phoe_
beach: hey, compile-type type of condition, you say.
10:57:43
phoe_
"if an attempt is made toexecute a form that had compilation errors" - that's a compile-time of condition.
10:59:38
phoe_
and yes, (defun foo () (go 3)) gives me a condition which is a subtype of PROGRAM-ERROR on SBCL
11:04:10
beach
OK, good to know. Thanks.
Thursday, 12th of October 2017, 11:04:18 UTC