freenode/#lisp - IRC Chatlog
Search
9:39:48
beach
pyc: You use CAR when you are manipulating CONS cells and FIRST when you are manipulating lists.
9:40:28
beach
Like for instance in an alist, the elements are not lists, they are CONS cells with key and value.
9:41:37
susam
pyc: Check this: http://www.lispworks.com/documentation/HyperSpec/Body/f_rest.htm - "rest is often preferred stylistically over cdr when the argument is to being subjectively viewed as a list rather than as a cons."
10:01:58
pve
It's good that the NIL-rule was brought up. I wasn't aware that it (or that hyperspec page) existed. I knew people sometimes used '(), but always assumed it was for reasons related to personal taste.
11:11:05
warweasle
For some reason (or ... Will return all the values of the first argument, but only the first value of the rest. Is that expected behavior?
11:16:33
scymtym
it is the other way around: only the first value of all forms but the final one and all values of the final one. it is specified like that in http://www.lispworks.com/documentation/HyperSpec/Body/m_or.htm
13:05:35
flip214
ebrasca: well, perhaps it would be easiest to just pass an RTP socket on to ffmpeg or so...
14:02:56
jackdaniel
hunchentoot serves files, it is a web server. you may either serve a static file (i.e webm like here http://turtleware.eu/static/paste/9736edb5-eduardo.webm), embed the link ink html, or write some fancy javascript program that performs actual streaming
14:03:40
jackdaniel
in other words hunchentoot does not concern itself with anything beyond http(s) protocol, hunchensocket adds websockets to the mix - you could use that if you had wanted to implement streaming
14:24:18
warweasle
I made one of the classic blunders: I forgot to define my problem before I started coding.
14:26:05
Josh_2
warweasle: It's okay to not define your problem because I bet you run into lots of them when you start xD
14:58:20
Josh_2
when using the sha256 digest in ironclad it returns a byte array, then this byte array is converted to a string using ironclad:byte-array-to-hex-string
14:58:57
Josh_2
I tried using babel:octets-to-string but it signals an condition about illegal characters
15:00:34
Josh_2
right, however I'm trying to compare the output of the ironclad implementation to the implementation I am calling with FFI
15:07:07
pyc
I know we discussed 'first' vs. 'car' usage today. One is used when we are thinking of lists and the other when we are thinking of cons cells even though they are equivalent. But I am confuesd about this. To select the last item in a list, should I use (first (last '(1 2 3))) or (car (last '(1 2 3)))?
15:08:13
pyc
even though I think I am working with lists here, I get the feeling that 'car' is more appropriate than 'first' because 'last' works on a list and returns a cons cell, so now that we are thinking "cons cell", 'car' becomes more appropriate than 'first'.
15:08:30
Josh_2
Bike: yes It's the library called 'base64' https://github.com/massung/base64 I'm using s-base64 now
15:10:18
Bike
you can encode text into other text? i thought the point of base64 was for transmitting arbitrary data over text over channels
15:44:31
Josh_2
Xach: can I ask for someone else's code to go into quicklisp? borodust created bindings for me that are on his github and I don't see the point in using my fork as the version in quicklisp
16:45:40
Josh_2
https://github.com/K1D77A/cl-megolm well after a couple of weeks I think I'm finally done! This was a struggle and a half
16:46:31
borodust
Josh_2: the most important point that my repo is unmaintained on birth and also linux-only :) i'm not planning to keep an eye on that codebase
16:49:46
pyc
are the parentheses useful to the programmer? I see some of lines have 5-6 trailing parentheses and sometimes even more than that. I find it hard to keep track of which one pairs with what manually. Emacs matches them up for me and that is the only way I am able to make sense of them.
16:50:08
pyc
is this how you guys deal with parentheses too? or are experienced Lisp programmers able to make sense of the parentheses manually too?
16:50:37
gabc
I see the indentation, and if it's weird I feel that there's a problem in the structure
16:51:22
pyc
borodust: thanks! I am using Emacs4CL that setup paredit and rainbow-delimiters for me. I am using both.
16:53:10
pyc
gabc: I did not find rainbow-delimiters distracting. but I didn't find it helpful either. It just makes the parentheses darker in color and they appear to fade away.
16:53:58
pyc
see the Emacs4CL screenshot here: https://github.com/susam/emacs4cl - I never understood how rainbow-delimiters are helpful. all the parentheses look gray. do you also feel so? or am I the only one unable to appreciate rainbow delimiters in the screenshot?
16:55:48
pyc
I do see some difference in color of the parentheses. I don't know if it is my eyesight that is poor or if the difference between the colors is very negligible. I have to stare at them hard to be able to see any difference in colors by rainbow-delimiters.
16:57:01
pyc
glad to know it is not just me. if they all look grey indeed what is the value that rainbow-delimiters offer?
16:57:05
Josh_2
If I want to add a library that depends on a foreign library how does Xach test if it builds?
16:58:03
Bike
pyc: https://ericscrivner.me/2015/06/better-emacs-rainbow-delimiters-color-scheme/ i haven't used rainbow delimiters, but here's someone agreeing with you and fixing it by making the colors a little wackier
17:00:11
pyc
Bike: thanks for that link. I never bothered to dig into rainbow-delimiters earlier to realize that the colors are configurable. of course it must be due to the nature of Emacs. but never bothered about it because my priority was to learn common lisp. will try the config in this post tonight.
17:04:37
Demosthenex
pyc: here's some rainbow generated i found somewhere once which i use in my init. https://dpaste.org/ohQw
17:54:34
phantomics
Hey, a question: in CL implementations supporting Unicode, does (char-code) always give the Unicode code point for a character?
18:03:48
pyc
what do you normally do for unicode support? do you code for a specific CL implementation? or is there a portability layer available for it too?
18:07:04
phantomics
I looked at cl-unicode but it doesn't seem to have a function that gets the code point for a given character
18:08:03
phantomics
The lowercase-mapping and uppercase-mapping functions can get a char's code point, but letters have their case changed; there's no function I can see that just gets the code point
18:18:25
aeth
other interpretations of what char-code and characters are in an implementation with Unicode wouldn't really be standards-compliant afaik.
18:18:40
aeth
I guess unless they wanted to randomly shuffle which char-code corresponds to which thing in unicode for no reason
18:19:41
aeth
So I think the main risk with char-code/code-char is that the implementation is using something other than Unicode.
18:22:04
aeth
I think the main issue is that sb-unicode has a bunch of useful things that no portable library has. cl-unicode gets you only some of it, with a much worse API (and probably much slower performance on SBCL, too)
18:25:37
aeth
So my Scheme will only handle Unicode 100% correctly on SBCL until someone resolves this issue. I set out to make a Scheme, not a huge Unicode library.
18:29:21
aeth
That is, I use babel (for UTF8<->strings) and cl-unicode outside of SBCL, and I use SBCL's libraries for SBCL. Some things only work fully conforming on SBCL if cl-unicode doesn't have a clear alternative to a thing in sb-unicode. And technically you can always use babel for the part that babel does, but that'll just hurt you on benchmarks since SBCL's internal octet conversion is faster.
18:29:57
aeth
It's annoying, but it's only temporary. It will be resolved by someone later on. We had to work around floating point for a long time before float-features was released.
18:30:38
aeth
(Now there's a bunch of libraries that are still only efficient with floating point in SBCL when they should be moving to float-features:with-float-traps-masked instead.)