freenode/#lisp - IRC Chatlog
Search
22:16:10
python476
maybe later, when I have a stable situation I'll do [common]lisp project in-house
22:17:06
pjb
For example, when I have to write code in C, I write it in CL first, debug it, and when it's good, I translate it to C.
22:17:43
pjb
Or since I use emacs, I may write emacs lisp code to help me produce the code in the programming languages I need to use.
22:18:46
python476
I sense that this dynamic prototyping for near optimal solution to optimized rewrite is becoming a skill to spread
22:18:47
pjb
python476: I recently improved my LINC translator: https://github.com/informatimago/lisp/tree/master/languages/linc which let me generate C code from sexps.
22:19:06
python476
read a few articles about people ditching straight c++ for python or else on first drafts
22:22:53
pjb
https://github.com/informatimago/lisp/blob/master/languages/linc/test-statements.sexpc generates https://pastebin.com/DWE8Yk4L
0:09:38
no-defun-allowed
Fortunately I don't think I need that kind of function now but it does sound handy to know.
3:43:10
beach
minion: Memo for jmercouris: Because it only removes from the end, whereas subseq can simultaneously remove from the start and from the end.
6:31:19
manualcrank
performance is usually average, but occasionally awful (vs same algorithm in another lang)
6:35:34
no-defun-allowed
Though it will slow down the program a bit, it will show you the slow function calls.
6:39:04
no-defun-allowed
The interface looks like TRACE, use (sb-profile:profile foo bar baz) to profile foo bar and baz, sb-profile:unprofile to unprofile, and (sb-profile:report) to see the report
6:44:50
no-defun-allowed
I don't know how the problem goes, but could you try to generate some input data?
6:46:56
shka__
manualcrank: without profiler it is imposible to tell what's going on (unless algorithm sucks)
6:47:47
manualcrank
again, though, direct translation of algo to c++ = 0.06s (like all the other c++ soln's)
6:48:49
shka__
manualcrank: i would generate data, put it in the vector, eleminate read-lines and see how this works then
6:49:18
shka__
he is already reserving proper size of the hash-table so i don't think that realocations are a problem
6:51:20
xantoz
is there some way to re-use the memory when reading the strings in lisp? (in C I would just use stack-alloced fixed-size arrays for current and previous word)
6:52:14
no-defun-allowed
read-sequence? Still don't think that'd be the bottleneck and you should investigate further.
6:52:22
xantoz
I was thinking that read-line would create lots of transient objects, but I might be wront
6:53:48
shka__
manualcrank: if words are short (8 chars) you probabbly won't come close to C++ anyway but i agree that 1.2s is suspicious
6:56:55
shka__
i you want some words https://github.com/sirherrbatka/cl-data-structures/blob/master/test/files/words.txt
9:40:03
jmercouris
for boolean variable naming, what convention is favored by yourself or the community?
9:40:03
minion
jmercouris, memo from beach: Because it only removes from the end, whereas subseq can simultaneously remove from the start and from the end.
9:40:34
jmercouris
beach: however, I can't imagine myself remembering the spec so well and keeping that in mind
9:55:09
flip214
who's maintaining 5am? I've got a feature request resp. bug report: when PARSE-INTEGER reports an error, :START isn't taken into account - so 5am happily reports "no digits in string "1234...""
10:00:49
varjag
is there a way to associate compilation in certain buffers to certain SLIME connections?
10:05:05
scymtym
flip214: i see. do you know where that happens? i couldn't immediately find any references to PARSE-INTEGER in 5am's code
10:07:01
jmercouris
for boolean variable naming, what convention is favored by yourself or the community?
10:10:28
scymtym
flip214: SBCL has both error messages: (parse-integer "12345" :start 5) => "no non-whitespace char…" (parse-integer "12345-" :start 5) => "no digits in string …"