freenode/#lisp - IRC Chatlog
Search
6:26:10
reinuseslisp
shka: bt is for (logical?) threads, I mean something like unix's sysconf(_SC_NPROCESSORS_ONLN)
6:40:32
jackdaniel
reinuseslisp: bordeaux threads is just a portability layer which maps into threads in common lisp implementation
6:42:27
reinuseslisp
I just didn't find a word to differentiate CPU cores/threads and application (bordeaux-) threads
6:56:51
reinuseslisp
https://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine
7:11:46
jackdaniel
there are bindings to openmp for CL, if that's not an overkill, you could use that
7:50:03
schweers
does anyone have an idea why `prin1' or `format' with "~S" would emit a linefeed after printing a symbol? It seems to me that this only happens when printing on a socket stream.
7:54:34
schweers
I could swear that the code in question worked before, I’m really stumped why this happens now
8:01:49
schweers
well, I have to change the readtable-case as I’m interacting with a scheme, but that’s disabled for now
8:03:59
schweers
wait, pp should not be turned on, that’s why I’m using prin1 and/or format with "~S"
8:05:24
schweers
well, I can’t reproduce it outside of my program, which I find quite disconcerting. Oh well, more debugging it is.
8:06:26
schweers
Well, if no one else has an idea, I suspect it really is a problem with some other code I’ve written, i.e. the problem is not me misunderstanding `prin1'
11:04:34
phoe
Is there any function that, given a cons and a value, destructively updates that cons in a way similar to PUSH?
11:05:05
phoe
Like - I can write it myself, it's simple, but is there anything like that out in the wild already?
11:30:36
TMA
phoe: you mean something like (lambda (cons value) (push (cdr cons) (car cons)) (setf (car cons) value)) ?
11:31:41
Bike
the parameter names in the defgeneric are irrelevant except for debugging, so i can imagine it working and an implementation not bothering ot check
11:35:11
TMA
it looks like it might be a problem -- it shall be an generic-function-lambda-list -- which is a lambda-list -- which does not allow for repeated var names
11:40:11
phoe
I just found a bug in my few months' old code - it produced code like (defgeneric foo (t t t)) by mistake where it should have produced (defgeneric foo (bar baz quux)).
12:07:52
jackdaniel
please file a bug, though I don't think it's a high-priority issue (if you put t as parameter name you ask for a fail anyway)
12:17:11
schweers
jackdaniel: just out of curiosity: what exactly is the bug here? that such a defgeneric does not signal an error?
12:18:25
phoe
a) because T is not a valid variable name as it's a constant, b) because there are duplicate parameter names
12:19:20
phoe
jackdaniel: it's a petty issue, but as I said, it's possible to turn these into real-life compilation bugs
12:20:31
schweers
and not like the implementation to silently do the thing I probably meant. Although I think I’d prefer a warning over an error.
13:40:08
|3b|
is it actually forbidden to define a function with T as a parameter? T is a valid variable name (it has to be since it names a constant variable), you just aren't allowed to bind it (since it is a constant and in CL package), but binding doesn't happen until you call the function
13:40:41
|3b|
ACTION isn't arguing that anything that complains should stop complaining (even at full warning level), just curious if i missed something in the spec
13:40:44
schweers
I guess the reason it is illegal is that it is forbidden to redefine names defined in the standard
13:41:06
|3b|
it is forbidden to /bind/ them (and a bunch of other things unrelated to function parameters)
13:41:46
specbot
The COMMON-LISP Package: http://www.lispworks.com/reference/HyperSpec/Body/11_aba.htm
13:42:25
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
13:43:18
Bike
defgeneric doesn't actually establish bindings, and i think it would be reasonable, if very slightly inconvenient, for an implementation to accept (t t t) as a gf lambda list
15:49:51
Bike
anyway, it looks like flipkart has dozens and dozens of forks of things which are mostly open source