freenode/#lisp - IRC Chatlog
Search
18:14:52
emaczen
fe[nl]ix: I was getting strange integers and am pretty sure I didn't do it correctly then
18:28:28
emaczen
phoe_: I don't like the idea of writing to a file and then reading from it, but maybe it is fast enough
18:42:46
emaczen
_death: is the idea that I can still write code in terms of files but it will still use RAM?
18:44:55
_death
that's not shared memory, but you can also do that using a tmpfs mount (e.g., /tmp or /var/tmp on some distributions)
19:08:56
phoe_
tell hunchentoot to output whatever proper HTTP headers it should output, give me the socket stream, and just (loop for jpeg in jpegs do (print-sequence jpeg stream))
20:57:32
jmercouris
can someone explain to me the message in the topic: the #1=(programmable . #1#) programming language
20:59:40
pjb
#1=(programmable . #1#) === #1=(programmable . (programmable . #1#)) === (programmable programmable . #1#) === (programmable programmable programmable . #1#)…
20:59:51
phoe_
in (#1=(a . b) (a . b) #1#), the result is an alist that looks like ((a . b) (a . b) (a . b))
21:02:30
jmercouris
So the joke is that lisp is the #1 programmable language because it can be programmed?
21:03:09
jmercouris
phoe_: sure, GNUS is also not a joke, but it's kinda a joke, you know what I mean?
21:03:28
phoe_
you can program the language and then you can program the programming of the language
21:03:57
Shinmera
I feel like explaining the topic is kind of ruining the beauty of it. It was a genuinely nice surprise when I realised what it meant on my own as I learned lisp.
21:04:26
jmercouris
Shinmera: I still think it's pretty cool, I just didn't know that syntax, didn't really ruin anything for me
21:05:10
pjb
Rather, try: (loop with *print-circle* = nil for *print-length* from 1 to 10 do (print '#1=(programmable . #1#)))
21:05:42
pjb
_death: *print-length* is useless in your case if you have *print-circle* true! (which you should have in your rc file by default).
21:06:28
_death
pjb: no, I keep it at nil, because I don't usually want #n# shown for simple shared structure
21:07:25
_death
on the other hand, a moderate bound on print-length may be a good idea (I thought about it before, but didn't get a chance to try)
21:10:10
jmercouris
Shinmera: with so many projects, how do you keep them clear in your head? how do you remember what you were working on last in a given project?
21:10:58
Shinmera
jmercouris: Usually I don't, because I finish them so I don't have to work on them any more aside from bug fixes.
21:20:23
Shinmera
For those that are too large to finish quickly I just organise code very clearly and keep ideas recorded in issues or on my trello.
21:22:21
jmercouris
There's so many configuration possibilities, and you can infinitely tweak your config, but actually is not a good way to start imo
21:24:30
jasom
someone tell me what I'm doing wrong: (extern-alien "write" (function long (* void) long))
21:36:53
Cthulhux
libnotify seems to be the consensus about how to display notification toasts on linux
21:38:30
Shinmera
Sure, and you can't display toasts on a WM without a notification handler (even more common)
21:39:37
Shinmera
You could do your own thingy to display notifications with simple frameless windows.
21:40:25
Shinmera
If you're using Qtools, QUI has that ready for you :) https://github.com/Shinmera/qtools-ui/blob/master/notification.lisp
21:41:49
Shinmera
Haha, yeah. Won't get low deps with Qt. At least deployment is handled for you and mostly "just works" from my own tests.
23:10:14
pjb
emaczen: errno is not a variable. It may be a macro expanding to some complex expression, like, accessing some thread specific attribute.
0:51:59
jasom
ultra fast "yes" implementation in under 140 characters: https://www.reddit.com/r/lisp/comments/75wla9/writing_a_fast_yes_program_that_can_fit_in_a_tweet/doa6gut/
2:37:15
pillton
jmercouris: Be aware that the standard requires logical pathnames to be all uppercase.
2:37:23
specbot
Syntax of Logical Pathname Namestrings: http://www.lispworks.com/reference/HyperSpec/Body/19_ca.htm
2:59:49
jmercouris
pillton: I found it such an obtuse syntax, but I didn't want to change the code that was using it
3:04:53
pillton
It is my understanding that it was defined at a time when there where no clear "winners" in terms of pathname syntax or file system functionality.
3:22:52
jmercouris
iqubic: I was having trouble just extending the path, the syntax totally threw me off, that's all
4:19:29
aeth
There is one disadvantage to C-w. Now that emacs is integrated with the system clipboard, using C-w as delete will pollute the clipboard
4:46:00
jmercouris
aeth: Is it now? I still have a sort of "manual" integration with OSX: https://github.com/jmercouris/configuration/blob/master/.emacs.d/osx.el
4:55:07
jmercouris
astronavt[m]: yeah, I just detailed the basics in the beginning in case you would like to customize the location of the cocoa files
4:56:03
jmercouris
astronavt[m]: I will publish the directions online in a more consumable format than the repository I linked you to, but Paul Krueger has done a really good job
4:56:38
jmercouris
I remember many times where I was the only person in the room who actually likes objective-c
4:58:44
jmercouris
If all of the things I've read about it are true, then yeah, it seems like a very nice integration
4:59:54
emaczen
jmercouris: it uses the MOP, so you can use a slight variant to CLOS (which is the point of the MOP)
5:05:40
emaczen
by default in commonlisp class objects defined by you are instances of standard-object
5:08:23
sjl
jmercouris: https://mitpress.mit.edu/books/art-metaobject-protocol is a really good book to work through if you want to wrap your brain around the metaobject stuff
5:10:25
sjl
jmercouris: you can get it for around $25 if you don't mind buying used: https://www.amazon.com/gp/offer-listing/0262610744/ref=tmm_pap_used_olp_sr?ie=UTF8&condition=used&qid=&sr=
5:11:54
sjl
it's a good, mind-bendy book. I don't touch the metaobject stuff almost ever, but it was good to read anyway
5:12:30
jmercouris
Yeah, it is certainly nice to understand kind of what is going on behind the scenes
5:13:37
beach
jmercouris: Warning, though: Even as an experienced Lisper, I had to start reading it three times. The first two times, I was completely lost, so I had to put it down.
5:14:21
beach
jmercouris: So, what I am saying is that, even if you are lost, don't give up. You might have to try again.
5:15:05
beach
And people here in #lisp would probably be very happy to give some explanations. For you and for others who might be interested.
5:16:01
jmercouris
One thing that I've really liked about the lisp community is that it seems much smaller and friendlier than the others
5:17:08
beach
Sure, but we draw the line when we have to correct indentation and spacing for the umpteenth time, as would be required for some people who come here.
5:17:35
aeth
jmercouris: Most Lisp programmers use Emacs, but (afaik) most Emacs users don't program in Lisp, beyond perhaps some basic configuration elisp stuff.
5:19:58
jmercouris
I think that makes sense, part of being respectful of the time of other people is making sure that you have the basics down, and that you aren't wasting their time
5:20:37
jmercouris
Especially if you are asking on a public forum, whether it be stack overflow or otherwise, you should really focus on reducing the mental burden of the other person to understand your problem and help
5:21:06
beach
Right. Especially since #lisp is not, as some people think, a "Lisp support channel". Newbie questions are tolerated as long as there is some indication that progress is being made.
5:36:03
loke
Right. So what you need is some memory for the structure allocated. There are two ways of doing so: Either on the heap using basically malloc, or on the stack which has dynamic scope.
5:38:40
loke
Then, you can simply set fields in the stuct using (setf (cffi:foreign-slot-value FOO '(:struct NAME-OF-STRUCT) 'FIELD-NAME) THE-NEW-VALUE)
5:39:46
loke
emaczen: yes. But then you have to make sure you free the memory properly later. Sometimes you can use TRIVIAL-GARBAGE to create a weak pointer so that you can free as paert of garbage collection. It depends a bit on circumstances.