freenode/#lisp - IRC Chatlog
Search
14:41:39
p_l
if one digs deep enough, windows first shows a message passing system between each process and kernel, and if you dig deeper you find undocumented support for ASTs
14:42:16
random9899
afaik there's not even 1 single time reference like 1 ns on what you can depend on with the current hw we have, it's all voltage dependent.... not ?
14:42:39
random9899
so what do you go for timing it well as threading programmers when you have to rely on such things ?
14:43:22
lukego
random9899: I usually use the RDTSC/RDTSCP instructions. Those are based on a reference clock that doesn't vary. at least on recent CPUs that support the relevant feature flag
14:45:35
beach
jmercouris: I am flattered of course. But I am thinking I would like for SICL to be slightly more advanced than it currently is.
14:50:00
random9899
On Windows platforms, Microsoft strongly discourages using the TSC for high-resolution timing for exactly these reasons, providing instead the Windows APIs QueryPerformanceCounter and QueryPerformanceFrequency.[2] On POSIX systems, a program can get similar function by reading the value of CLOCK_MONOTONIC clock using the clock_gettime function.[3]
14:50:53
random9899
Since the family 10h (Barcelona/Phenom), AMD chips feature a constant TSC, which can be driven either by the HyperTransport speed or the highest P state. A CPUID bit (Fn8000_0007:EDX_8) advertises this.
14:52:17
lukego
have to be careful though e.g. be prepared for different cores to have different epocs. but it's a low level feature :) and libc has slightly higher level things on top
14:53:25
random9899
There is no promise that the timestamp counters of multiple CPUs on a single motherboard will be synchronized. Therefore, a program can get reliable results only by limiting itself to run on one specific CPU. Even then, the CPU speed may change because of power-saving measures taken by the OS or BIOS, or the system may be hibernated and later resumed, resetting the TSC. In those latter cases, to stay relevant,
14:54:05
lukego
fe[nl]ix: True. Though I think all CPUs made in the last N years have the invariant TSC.
14:55:17
lukego
otherwise I believe glibc can give you a more consistent clock with nanosecond precision that is (safely) sourced from TSC under the hood.
14:57:41
lukego
fe[nl]ix: btw do you know how is iolib support on LispWorks and on Mac? (known to not work? or known that somebody does that? etc)
15:42:18
beach
Help me think this through, please: I would like to transform the dpANS TeX files to a bunch of files that I can compile with a single LaTeX command, say pdflatex.
15:42:28
beach
There are several obstacles. For one thing, the dpANS files do not use LaTeX, and a number of TeX macros basically emulate LaTeX macros in incompatible ways. For another, each chapter is meant to be compiled with TeX separately, so there are files that are included in each chapter file. Furthermore, there is a mixture of "semantic" macros and typesetting macros, and I would like to get rid of the typesetting macros without
15:42:28
beach
sacrificing the semantics macros. I would also like to replace the specific TeX macros that have counterparts in LaTeX.
15:42:40
beach
The purpose of the exercise is to obtain a maintainable LaTeX document with indexes, table of contents, cross references etc. This LaTeX document would be the basis for WSCL.
15:42:41
beach
I would then start modifying the text, probably putting original paragraphs in appendices and referring to them from the main text. But that's in the future. So how do I go about this in a way that does not introduce too many errors? I don't mind manual editing. It is not urgent.
17:39:44
random9899
The whole language always available. There is no real distinction between read-time, compile-time, and runtime. You can compile or run code while reading, read or run code while compiling, and read or compile code at runtime.
17:39:44
random9899
Running code at read-time lets users reprogram Lisp's syntax; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp's use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using s-expressions, an idea recently reinvented as XML.
17:40:47
Bike
if you have a question you want answered or topic you would like to discuss, please use your own words
18:01:16
phoe
random9899: Graham has quite a lot of essays, they're a rather good reading as long as you take him with a pinch of salt
18:03:15
random9899
i put the quotes, well wrt to the confusion arising in people when talking about read-time, run-time and compile-time....like with schweers about his question about what a #.(declaim...) is different from a normal (declaim ..) etc....
18:06:14
jackdaniel
question: given cltl2 interface is implemented, how am I supposed that variable is unknown for my own declarations? example: (let ((x 3)) (declare (ignore y)) …) will issue a simple-warning
18:06:36
jackdaniel
I want to do the same in a function in cltl2:define-declaration, the thing is that lexical variables are note yet in the environment
18:07:23
jackdaniel
so variable-information will fail to find y even if it is there (let ((y bam)) (declare (phoe y)) …)
18:07:45
jackdaniel
phoe: lexical variables are not in the environment yet at the time of invoking declaration lambda function
18:08:50
phoe
like, hm - the list of new bindings from LET needs to be passed to the declaration function
18:08:52
jackdaniel
I know how to do it *using* compiler internals, because I'm already doing that, but not sure how to achive it simply using cltl2
18:13:22
phoe
This seems to be rather silly. Inside (let ((x 3)) ...), I would expect X to be lexically bound. Even inside a (declare ...) that might happen in there.
18:14:02
jackdaniel
declarations are processed at compilation time, there is nothing to be bound yet. only some information in lexenv may be present
18:15:24
jackdaniel
when you have flet, first you process definitions *then* you extend the environment
18:15:40
jackdaniel
when you have lable,s first you extend the environment and then you process definitions
18:16:43
Bike
declare isn't like a separate form or anything. it makes sense to think of (let ((y bam)) (declare (phoe y)) ...) as being like (let+ ((y bam phoe)) ...). there is probably no time at which the variable is bound but not typed as far as the environment is concerned.
18:17:11
Bike
in other words i don't understand what either of you are talking about. "declaration lambda function"?
18:19:12
Bike
cltl2 doesn't seem to specify what the environment is for or when the function is called.
18:20:30
Bike
I suppose you could say that the environment is first augmented with a lexical y, then that's passed to the define-declaration function, and then that's used to produce the actual environment used for processing the body.
18:21:04
Bike
in the case of (phoe y) as a free declaration, the environment passed to the declaration function would have y unbound, i.e. variable-information returns NIL.
18:21:19
jackdaniel
I'm asking, because I'm trying to figure what's the right thing to do (implementing cltl2 for ECL – first writing a test suite)
18:22:24
Bike
it's not so much a lack of implementation as it is bugginess. they're probably still in the tracker
18:22:47
Bike
https://bugs.launchpad.net/sbcl?field.searchtext=cltl2&search=Search&field.status%3Alist=NEW&field.status%3Alist=INCOMPLETE_WITH_RESPONSE&field.status%3Alist=INCOMPLETE_WITHOUT_RESPONSE&field.status%3Alist=CONFIRMED&field.status%3Alist=TRIAGED&field.status%3Alist=INPROGRESS&field.status%3Alist=FIXCOMMITTED&field.assignee=&field.bug_reporter=&field.omit_dupes=on&field.has_patch=&field.has_no_package=
18:24:10
Bike
the one i hit was 769592, which is that augment-environment signals stupid errors sometimes because it goes through internal compiler machinery that immediately signals when it hits inconsistencies, because they matter for compilation but not cltl2
18:24:53
Bike
i wrote a cltl2 wrapper library but didn't bother with it. and it has so many users! at least zero
18:25:15
Bike
if you do want to worry about it, i think what i described would be a reasonable way to do it
18:25:37
phoe
Bike: I would be worried if it had negative user count; knowing how much you deal with C++ it would likely mean an integer overflow
19:16:44
fiddlerwoaroof
But, I appreciate what it does, I've always been slightly annoyed about the duplication between the ASDF system's dependency lists and the defpackage forms
21:11:26
aeth
fiddlerwoaroof: It simplifies your definitions of external dependencies, but it doesn't simplify your definitions of internal dependencies that much because unless your project is flat, you are going to have to create a /foo.lisp for every /foo/ so you can just import my-project/foo instead of my-project/foo/bar