freenode/#lisp - IRC Chatlog
Search
9:14:38
hhdave
Hi phoe. I just saw your message from yesterday evening (I was afk). I guess posting the job ad page on the lisp reddit would be a good idea, do you think?
9:17:22
easye
A one-time, respectful post linking to your "recruitment pipeline" would be perfectly ok.
9:18:44
easye
There used to be a "Common Lisp jobs blog" sort of thing, but I don't think that has been active over the last couple years.
9:20:05
frodef
(defmaro m1 (v1) `(marolet ((m2 (v2) `(form v1 ,v2))))) How do I get v2 into my form?
9:20:42
easye
When you post to Reddit, invariably you will get a couple of the Twitter Lisperati to tweet the link.
9:24:27
easye
You might get a little slagging about aspects of the post and your company. For instance, Ravenpack's recent job offering was criticized for not posting a salary range.
9:25:01
easye
But have a thick skin, and let it ride. Those of us looking for Common Lisp jobs will appreciate it.
9:26:47
no-defun-allowed
On a bad day, I call ,', the "The Bird" operator, because nested quasiquotation is that tedious.
9:28:51
frodef
no-defun-allowed: thanks! I thought I'd tried that, but I guess my brain just bottomed out.
9:44:25
beach
Like I told the #sicl participants, if I were smarter than I am, I would have been able to simplify bootstrapping from the start, but I am what I am, so it is taking me several iterations. But I think it (i.e. the essence of what I need to do for bootstrapping to be understandable) finally makes sense to me.
10:07:43
flip214
luis: please provide some feedback. I'm adding JSON support to swank (instead of S-expressions).
10:08:53
flip214
First I send an S-expr to switch to JSON; but while that changes a slot in *emacs-connection*, the read loop (in another thread) already restarts DECODE-MESSAGE, so passing the "current" slot of *E-C* in doesn't work.
10:09:30
flip214
I can work around that by doing autodetection in READ-MESSAGE - #\( vs. #\[ use the right function.
10:17:35
flip214
Or I could define the decoder slot to be a list of decoders that's tried from the end... then I could append the json decoder, and the already-passed in list would become extended in READ-MESSAGE as well
10:22:34
Posterdati
phoe: I did a looping task tha occasionally could exit from loop and thus get executed
10:23:08
phoe
I don't know if lparallel provides an API for this kind of introspection; AFAIK usually you'd do that by trying to receive-result
10:24:00
Posterdati
phoe: if the task is still executing, does receive-result blocks the waiting task?
11:17:53
frodef
With CL-WHO, how can I emit HTML from a generated sexpr? Like (defun make-input (attributes) (w-h-o (s) (:input ,@attributes) ...)) ?
11:21:55
flip214
frodef: EVAL might help.... but yes, it's a compiler basically, so you'll need to build an (anonymous) function and call it to get the text
11:25:35
no-defun-allowed
The equation looks more like m times slower than n using your server concurrently, where m is your number of threads and n is your number of concurrent users.
12:12:24
frodef
just outputting some "standalone" html is easy, but like my example defun something that "slots in" with cl-who is perhaps less obvious.
12:59:22
jmercouris
I'm trying to understand some pseudocode on Wikipedia and having a bit of trouble with a particular operator
13:01:29
jmercouris
ah damn, I posted the whole file, sorry about that here is what I meant to post: http://dpaste.com/93B9DWF5A
13:17:36
jmercouris
so I guess the assumption is the Neighbors would typically include the node itself
13:48:25
pve
frodef: wasn't there some combination of htm, esc and str that made it work cleanly? Maybe I'm remembering it wrong..
13:59:13
frodef
the cl-who syntax even prevents evaluation where it expects a html keyword. The one reasonable solution i can see (in terms of extending cl-who) would be a magic attribute keyword that evaluates its argument form and inserts it into html.
14:34:10
frodef
jmercouris: how so? Seems to me FOR ... is a variable-clause, while WHILE ... is a main-clause ?
14:37:47
splittist
for-as includes for =. This may be one of the LOOP forms the MIT-derived LOOP's accept, but shouldn't. (And therefore may not in future.) (Do I mean MIT?)
14:39:14
_death
I messed up.. frodef is right.. at first it seemed fine to me, now it's obviously doesn't (looking at the grammar helped, but I doubt I wrote code like it)
14:40:33
jackdaniel
since frodef probably implemented loop from scratch for movitz things like that are very noticeable for him
14:42:16
jackdaniel
why perverse? it is a pita to remember the syntax, but when you have it memorized it is easy to use
14:43:12
phoe
(loop for loop being the source of everything that is wrong and horrible with common lisp do ...)
14:43:45
jackdaniel
someone very accurately pointed out, that lisp is a wonderful for writing dsls and this is a dsl
14:44:45
jackdaniel
loop has some flaws (i.e not extensible per standard specification, its syntax could be more grokkable etc)
14:45:20
jackdaniel
and it is complex enough to take thousands of line of code to implement (unlike do, which is fairly trivial)
15:07:46
Kabriel
frodef, _death is it a syntax error because of clause order, so (loop for item = (pop x) until (null x) do (print item))?
15:09:05
jackdaniel
say x = (1) , first you pop, so x = (), x is null now, so you do not get to the print clause
15:11:38
Kabriel
So is it non-conforming to have a variable-clause after a main-clause in any circumstance?
15:13:38
jackdaniel
it seems to me that way (mind, that your friendly neighborhood lisp implementation will most likely accept that though)
15:14:24
nij
Hello :) I'm reading Graham's /On lisp/. In section 3.4 he talks about functional programming, and some good practice. One of them is the following.
15:14:38
nij
"If a function must perform side-effects, try at least to give it a functional interface."
15:15:17
jackdaniel
it is described later in the book afair - he talks about making it referentially transparent
15:17:47
nij
It all sounds perfectly neat and natural. Haven't had development experience yet. Dunno what real obstacle I will run into in practice.
15:19:55
jackdaniel
pg's preference for functional-like programming seems to be more scheme-like than common-lisp-like
15:23:23
phoe
I like this kind of mostly-functional code style myself; it provides lots of benefits coming from the functional style and some benefits coming from imperativity
15:24:28
beach
nij: On Lisp has a lot about macros, and macro expanders are a good place for functional programming since 1. They are executed at compile time, so not a performance problem at run time and 2. Macro expanders should not have any side effects on the external environment (usually).
15:25:14
phoe
beach: I found point 2 to be more like "macroexpanders should be idempotent with their side effects"
15:26:32
phoe
beach: it's okay for macros to perform side effects as long as these effects are idempotent; interning symbols is the most obvious example
15:26:59
phoe
while doing stuff like creating files or sending network traffic is usually a big no-no because then you have no control over how many times those are performed
15:27:21
jackdaniel
nij: if onlisp is your first programming book (or even common lisp book), I'd rather recommend ansi common lisp, pcl or paip
15:27:27
phoe
due to the fact that macros can essentially be expanded at any time any number of times.
15:27:28
minion
nij: paip: Paradigms of Artificial Intelligence Programming. More about Common Lisp than Artificial Intelligence. Now freely available at https://github.com/norvig/paip-lisp
15:27:32
minion
nij: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
15:27:59
jackdaniel
by acl I mean paul graham book ansi common lisp (it has an excellent set of excercises after each chapter)
15:28:34
phoe
I enjoyed PG's ANSI CL book and I can recommend it as long as you disbelieve everything he says about CLOS
15:29:13
curiouscain
Make sure to have a go at writing some macros, not just reading about them. There's a step between reading and writing, where the understanding becomes clearer.
15:37:54
cl-arthur
structs are quicker in terms of access etc. because they're simpler and have very little expressive power and introspection
15:37:57
tychoish
you get different autogetnerated assessors by default and a more compact in memory layout for simple cases (?)
15:39:08
jmercouris
well, I can think of some very performant things in which I've chosen structs, but that is because of the way traversing them is handled
15:39:09
nij
I don't think I'd have problem understanding what macros are.. just have to go there slowly.
15:40:08
curiouscain
Do you have things you want to make, but can't be bothered? Or do you have no ideas?
15:40:25
tychoish
having a small enough project that's like "tractable for a single human," is often the hard part for me.
15:41:54
tychoish
I disagree with team tic tac toe because it feels like an interview question and it never feels worth the time.
15:43:50
jackdaniel
clos is not only defclass vs defstruct kind of excercise, it brings much more - most notably generic functions