freenode/lisp - IRC Chatlog
Search
15:06:34
phoe
main-clause::= unconditional | accumulation | conditional | termination-test | initial-final
15:06:51
phoe
so COLLECT which is an accumulation clause can happen before UNTIL which is a conditional clause.
15:08:36
dim
here's an example in the same vein, albeit with other clauses https://github.com/dimitri/pgloader/commit/7f55b21044047469413ab0e6b905a0e07f26ba9a
15:09:23
drmeister
Yes, I think I want for in the first two lines. Each strand is an instance of a class that has a 'p5-end' slot and a 'p3-end' slot. They describe the first and last (inclusive) nodes in a doubly linked list.
15:09:53
drmeister
The nodes in between are accessed using (forward-node cur) starting from the p5-end and stopping when you hit the p3-end.
15:15:03
drmeister
What I needed to know was the main-clause::= unconditional | accumulation | conditional | termination-test | initial-final
15:22:22
drmeister
Please don't - I was showing a colleague that he can ask questions in #lisp and I'm explaining that you should do your homework first and look things up in the CLHS.
15:22:39
drmeister
I explained that by asking a stupid question that I had kicked a bees nest and now I need to apologize.
16:02:45
didi
Funny thought: I am computing the number of days between 2 dates by subtracting their universal-time and returning the quotient of it divided by 86400. But, with enough leap seconds, it will start to drift away. (as my unit measurement is a day, some leap second won't mess with calculations)
16:39:00
dim
in particular the parts where the history takes an important play into how to best implement the internal time representation
16:41:45
_death
there is also a book on my wishlist, Calendrical Calculations, by Edward Reingold, who also wrote the Emacs calendar package
16:56:19
jasom
didi: unix times to not include leap-seconds, GPS time does. At one point Android's clocks were 25s off for this reason.
16:58:16
pjb
A very interesting subject, notably if you plan to program a time-machine navigation software.
16:58:48
pjb
It's probably the reason why we don't see more time travellers: it's not that they don't exist, it's that they're lost in time!
16:59:17
jasom
pjb: and depending how inertia works when changing time, they could easily be lost in space too
17:00:46
pjb
jasom: yep. Since fundamentally, you will have to get the absolute positions and movement relative to the whole universe (which is hard to determine because of the light cone).
17:16:32
aeth
They try to go back to ancient Rome but wind up going back to that time, but the Earth is in a different place in space.
17:18:36
pjb
Probably it's safer to do it in "empty" space, and travel back to Earth(t=t₁) with your space ship.
17:21:29
aeth
in case anyone is wondering about how Lisp handles time, it has two ways. Something *almost* like a reverse-ordered ISO 8601 but as multiple return values, as well as non-leap-seconds since 1900. http://www.lispworks.com/documentation/HyperSpec/Body/f_get_un.htm
17:22:02
aeth
The distinction is afaik that ISO 8601 doesn't take daylight savings time into account, you move the offset, but in CL the offset is constant but with a boolean DST flag.
18:37:40
_death
it could.. (defun my-concatenate (&rest sequences) (apply #'concatenate (prompt "What result type?") sequences))
18:50:07
pjb
Notice that nothing prevents your implementation to provide a compiler-macro on concatenate (and map, etc), to optimize out the cases where the return type is known at compilation-time.
23:11:35
rmrenner
So in javascript, it's much more common to have functions called purely for their side-effects, and obviously sometimes these function calls end up being the final statement in a function
23:12:48
rmrenner
So how do you keep parenscript from automatically sticking a return before the last statement in a function?
23:13:36
rmrenner
As an example, I'm looking at using parenscript to generate files that work with p5, the javascript implementation of processing
23:14:35
rmrenner
A simple setup function would look like function setup() { createCanvas(640 480); }
23:16:47
rmrenner
However, if you write: (defun setup () (create-canvas 640 480)), parenscript generates function setup() { return createCanvas(640 480); }
23:23:30
rmrenner
Yeah, it struck me as a weird omission since js functions don't necessarily return anything. The manual says "void" is a reserved word, but I couldn't find any info on what it's used for.
23:35:43
rmrenner
Turns out this question has been raised on stackoverflow: https://stackoverflow.com/questions/28148147/parenscript-and-implicit-return