freenode/#lisp - IRC Chatlog
Search
20:05:03
Bike
didi: i mean, you could avoid some consing, but probably the i/o will dominate the time
20:47:54
vtomole
How do you return a lists of lists all at once? (return-at-once '((1 apple) (2 orange) (3 pear))) => (1 apple) (2 orange) (3 pear)
20:52:00
vtomole
What if they are in a list? (values '((1 apple) (2 orange) (3 pear))) != (1 apple) (2 orange) (3 pear) Do I need to write a function that recusively returns values?
20:58:37
Bike
i'm a bit worried about the concept confusion behind "remove the outermost parentheses" is all.
20:59:39
Bike
there is a limit on the number of arguments to functions, but there's also a limit on the number of values you can return, and it's probably not any higher.
21:01:07
vtomole
There is a library that takes s-expr in order ( run (1 apple) (2 pear) (3 orange)) But I want to able to do (return-at-once '((1 apple) (2 orange) (3 pear))) to converit it what the run function wants
21:01:56
White_Flame
that looks like a macro. if it was a function it would be (run '(1 apple) '(2 pear) '(3 orange))
21:02:32
Bike
if it is a function, you can use the elements of a list as arguments to a function more easily
21:04:29
White_Flame
then if you want to generate parameters to call it, that generator needs to be a macro as well
22:03:32
iqubic
I know I should't be trying to compare CLOS to Java or C++, but this has been nagging me for a bit now.
22:08:47
_death
iqubic: http://www.gigamonkeys.com/book/object-reorientation-classes.html see footnote 12
22:12:21
iqubic
_death: What happens if a class inherits two, or more, different slot specifiers with the same name (One from each superclass)?
22:14:18
mfiano
structs do a couple things classes cannot, but moreso the other way around. Generally, stay away from structs unless you need arrays with named accessor functions for example
22:16:44
pjb
iqubic: the only standard way is to use (eval `(defclass ,new-name (,@new-superclasses) ,@new-slots))
22:40:29
emaczen
http://paste.lisp.org/display/358268 -- can anyone show me how to get a commonlisp array from *bytes*
22:43:26
emaczen
pillton: I've tried different combinations of forms before evaluating (cffi:foreign-array-to-lisp ...)
22:57:19
pillton
In all honesty, you are doing it the wrong way. Use IPC or implement some higher level C functions that save you from all of the defcstruct madness. You will go insane if you keep following this path.
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:10:07
emaczen
I was actually trying to use ABCL, java opencv bindings but I could never get it configured
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:59:30
jmercouris
sizur: elisp is missing a lot of things, you'll have better luck in #emacs for elisp specific questions
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"
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: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: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: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.
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".
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.
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.