freenode/#lisp - IRC Chatlog
Search
5:43:52
no-defun-allowed
i used a lambda once with map cause [.. for x in ...] is too long for me and that led somewhere apparently
5:44:41
no-defun-allowed
he does physics and maths so i might suggest ML to him, i know enough of it. he's seen lisp and he can't quite parse it yet
5:46:27
beach
It is interesting to me that mathematicians and scientists, who are "perfection oriented" in their domains, are often "performance oriented' (or have a "closed mindset, as Carol Dweck says) when it comes to their computing tools.
5:47:10
no-defun-allowed
i'll be honest, sometimes what he knows is scary. for example, he knows tag bits are a thing
5:48:46
no-defun-allowed
well, not hardware stuff. not sure how cpython does it but sometimes (especially on x86_64) you put it in the pointer and it's okay cause of address space and alignment trickery
5:50:11
JuanDaugherty
right in this time of the overwhelming predominance of commodity architectures there are no real machines with tag bits
5:55:21
aeth
People want a fun little toy program that they can write and see immediate results in and Lisp doesn't really have those frameworks yet. Work on helping one of those get mature.
5:55:52
aeth
(Well, I mean, I can name half a dozen of them, but not ones I'd show to a stranger without spending a few weeks contributing documentation to first)
5:56:17
no-defun-allowed
if i do, he'll lose faith in python and there'll be 25 more newbies asking me crap though
5:58:32
no-defun-allowed
i already get enough "hey no-defun-allowed, please check my code" questions so for me, the selfish weenie, that's not convenient
7:17:01
jackdaniel
you may modify various flags in c-toolchain from cffi (which is what groveller use)
7:17:54
jackdaniel
afair when cffi adds its own flags it preserves ones already specified in dynamic variable
11:48:24
mrottenkolber
For some reason I can’t get postmodern to print its timestamps in SQL statements anymore
11:54:28
mrottenkolber
Shinmera: while I am here, do I remember correctly that you have a lib for html sanitization I could use instead of sanitize?
11:55:29
Shinmera
You are correct in the sense that my HTML parser is lenient and will chug anything. It will always produce valid HTML or XML when serialising its dom, so you can use it to sanitise.
11:55:59
Shinmera
Note however that Plump does not follow the HTML5 spec on parsing invalidly formatted content, so the results might be slightly different from how a browser would interpret it.
11:56:27
figurelisp
Pardon my ignorance but where can i find how a function is internally implemented in Common lisp for ex let's say implementation of set-difference
11:58:19
phoe
figurelisp: basically, if the function is from package COMMON-LISP, then it's implemented internally in CL.
11:59:24
phoe
I also grep the sources. For SBCL, for example, https://github.com/sbcl/sbcl/search?q=%22defun+set-difference%22&unscoped_q=%22defun+set-difference%22
11:59:39
phoe
This gives me https://github.com/sbcl/sbcl/blob/aa8ddb5469ac3499d8a1bc6fd7a0555525046e6c/src/code/list.lisp#L1055
11:59:47
figurelisp
yes i used M- and it says (set-difference list1 list2 &key (test #'eql) test-not)
12:00:25
phoe
in non-emacs notation, move your point over the symbol in question, press alt, then hit period, release alt
12:00:27
figurelisp
although i don't understand, is this how the code of set-difference is written in implementation of common lisp?
12:03:50
mrottenkolber
Shinmera: amazing, thanks! might be able to drop the cl-xml2 dependency this way
12:08:25
figurelisp
phoe: TBH i don't remember. I followed some guide online which told to download sbcl and slime
12:09:59
Shinmera
You may also be interested in https://portacle.github.io/ . It includes a reference page for keyboard shortcuts and Emacs explanations.
12:11:39
figurelisp
Shinmera: I looked into portacle but i wanted to install sbcl and slime by my own so I tried
12:12:27
xificurC
phoe: minor nitpick, don't suggest which but `command -v`, the latter is faster and, more importantly, correct
12:16:31
Shinmera
xificurC: Note that handler-case by necessity unwinds, and thus the original stack trace is lost.
12:16:32
xificurC
figurelisp: no, there's a command called command :) Don't use `which sbcl` but `command -v sbcl`
12:17:36
xificurC
this isn't a spot where I care too much if the stack unwinds, I just need to do something before resignaling
12:18:37
phoe
and then the handler will decline to handle the condition, at which point the execution will continue
12:20:23
Shinmera
handler-bind and handler-case will have different semantics for the call to bar though
12:21:18
xificurC
you mean by unwinding the stack e.g. specials might have changed? right now bar is just (format *error-output* ...)
12:21:21
Shinmera
This can be important if BAR for instance assumes that cleanup or other actions have taken place that would happen during unwind.
12:22:30
phoe
handler-bind is a construct useful when you need to execute code when a condition is signaled
12:22:39
phoe
handler-case is a construct useful when you need to get the hell outta there when a condition is signaled
12:23:25
phoe
in yet other words, handler-case always transfers control outside of the signaling form, where handler-bind doesn't necessarily do that
12:23:39
trittweiler
Be aware that declining handling it means that another handler higher up the stack will be tried next. If you don't want that you need a continue or a muffle-condition restart and invoke that from the handler
12:24:14
xificurC
in other words handler-case is for those who only know exceptions from other languages and handler-bind is for the brave :)
12:24:51
Shinmera
phoe: The important part is that handler-bind executes /on top of the stack/, while handler-case /unwinds the stack/
12:25:29
phoe
handler-case is analogous to try-catch if all of your conditions are signaled via #'ERROR
12:26:15
phoe
if you only use #'ERROR and HANDLER-CASE, then you have a dumb exception system like the one in Java or C++
13:10:34
scymtym
well, you cannot do something like try {} catch ((error and (not runtime_error)) e) {} in Java or C++
16:54:17
quipa
"The Logo Programming Language, a dialect of Lisp" http://el.media.mit.edu/logo-foundation/what_is_logo/history.html
16:55:25
quipa
I noticed the first implementation of Logo for Apple II was written by Hal Abelson one of the authors of SICP
16:57:25
quipa
Brian Harvey wrote both the three volume Computer Science Logo Style and Simply Scheme (a "prequel" for SICP)
16:58:17
aeth
The command followed by a number with ; as a comment makes it look a bit like Lisp, but it also makes it look a bit like ASM.
16:58:36
Bike
http://web.sonoma.edu/users/l/luvisi/logo/logo.memos.html but ftp is down. they're probably around somewhere.
16:58:38
quipa
I noticed he seems to he used a similar structure in the first volume of CSLS and Simply Scheme
17:05:35
quipa
"[Misky] developed, with Seymour Papert, the first Logo "turtle". Minsky also built, in 1951, the first randomly wired neural network learning machine, SNARC. "
17:06:20
quipa
hehe funny not coming from a CS background and knowing enough CS history I find these relationships really interesting
17:14:03
quipa
hehe yeah I wouldn't either, NetLogo on web is more a proof of concept then anything else I think