freenode/lisp - IRC Chatlog
Search
3:29:43
aeth
Just about everyone who just puts "1.0" and assumes it's a single-float should afaik think twice about that assumption because of (setf *read-default-float-format* 'double-float) unless I'm wrong
3:30:05
aeth
So any new float system past just having a long-float needs a literal notation, or a reason why not to have one
3:32:48
Bike
actually, i'm not sure how arbitrary precision floats would work. clisp has an (ext:extended-float-digits) or something accessor, but that means you have only one kind of extended float at any given time, and you can just... gain and lose precision?
3:34:36
aeth
And if you permit the arbitrary precision floats to use hardware support where there is a match (potentially 80 and/or 128 bits), then what if the hardware supports both 80 and 128 bits?
3:34:37
Bike
and how do you like, get a high precision float? do some arithmetic and specify the precision you want to end up with? or have a different read syntax...
3:35:05
Bike
i thought the idea was there would be some arbitrary number of fixed precision machine floats
3:36:07
aeth
stylewarning: there is no way to say #single-float-array-of-3(1f0 2f0 3f0) but there is a way to say 1f0 2f0 3f0
3:36:23
aeth
Working with arrays is actually very inconvenient unless you write a few macros or functions to handle the common ones.
3:36:42
aeth
It's common to define "vec" or "vec3", for instance. And then you can just say (vec 1f0 2f0 3f0)
3:36:49
Bike
different unsigned byte lengths aren't distinct in the runtime. you have fixnums and you have bignums, and the length of an integer is obvious from its syntactic form.
3:39:22
aeth
I have to do something like this to make working with specialized arrays of known length easy enough to work with: https://gitlab.com/zombie-raptor/zombie-raptor/blob/b5639da6be400c1482545fe7a874bf3bd0b3db08/util/util.lisp#L92-106
3:40:23
aeth
But it's one thing to add conveniences, and another to take away conveniences (or at least not have them for some float types when others have them), i.e. the 1s0 vs. 1f0 vs. 1d0 vs. 1l0
3:40:51
aeth
stylewarning: I think SBCL optimizes things like mod when it knows the integer is very small
3:41:32
stylewarning
Or optimized SSE arithmetic on notionally boxed types like complex double floats
3:43:15
Bike
numbers don't have to maintain an identity so they don't really need to be boxed, but ive lost the connection to floats.
3:49:24
slark
hello, if i pass to the &body body parameter of a macro `(foo).. the body will contains (`(foo)) right .
3:56:36
Zhivago
Well, `(,@body) would get you back something equivalent to (list ''(foo)) which would evaluate to ('(foo)).
8:04:02
Grue`
hunchentoot started eating a single core (25%) of CPU when idling after the latest quicklisp update
8:10:29
beach
stylewarning: I hadn't made the connection before, but now I know who you are. Was it at ILC in Montreal that we last met?
8:10:32
easye
Grue`: After (asdf:test-op :huchentoot) under sbcl-1.3.19/macos-10.12.5 I don't see such CPU utilization, but that doesn't mean it doesn't exist for you.
8:17:28
stylewarning
When you gave me a stern fatherly talking to about avoiding confusion about the term "mathematical programming" :)
8:19:08
Grue`
easye: doesn't hunchentoot stops the web server after the tests? i only get abnormal cpu usage while the server is running
9:00:18
beach
BW^-: A collection of spanning trees. A spanning tree is a subgraph of a connected graph that contains all the vertices, but that is also a tree, i.e., no cycles.
9:10:38
beach
Though, Norvig and Pitman recommend using WHEN only when the value is unimportant. They would have said ,@(if weather-balloon '((cons "weather balloon" t)) '())
9:11:36
beach
ACTION now fully expects a debate about this issue, but tried to prevent it by presenting it as the opinion of authority, rather than his own.
9:12:51
clintm
Hanging out in #lisp, it sometimes feels like everyone's also on another channel having a discussion I don't see. Re. the 'issue'. :)
9:13:34
BW^-
beach: what are algorithms for doing that translation work - from graph to one or more spanning trees ????
9:13:41
Shinmera
Well, as I mentioned the other day, CL attracts a lot of individualists and people that want to do their own thing, so differing opinions about style is practically a given.
9:14:36
BW^-
beach: it may be asking a lot, but, i "can't see it as a picture" yet, would you mind refering me to some slideshow PDF/PPT or video that shows *geometrically* how such a translation would work out?
9:14:37
beach
BW^-: Collect edges as you track them and mark vertices so that they aren't visited twice.
9:15:17
BW^-
beach: if i'm doing an "offline" algorithm as in no changes accepted, just one single pass from scratch, then I guess I see how i can do that. but i need a dynamic algorithm - there will be insertions and deletions.
9:16:45
BW^-
beach: there is one, and i have the paper, but I don't understand the paper =((((((((((((((((
9:16:58
BW^-
beach: maybe someone explained this stuff. what could I search for at booksc.org etc. to find such an algorithm?
9:18:18
beach
BW^-: Understanding papers takes experience. My standard trick is to make sure I understand each word. Whenever I hit a word that doesn't make sense in the context, it is typically a technical term that I don't know about.
9:20:14
BW^-
beach: this is a quite complex paper. also i ""hate"" mathemathical language, i understand geometrical examples and proofs much better :))
9:44:38
phoe_
Well, it's true, but I read up on the logs and don't fully understand the context of mentioning me.
9:48:27
jackdaniel
stylewarning looks for a full-grown CL programmer who wouldn't require mentoring and will be able to solve some tasks with FOSS software (for money)
10:03:36
clintm
I probably shouldn't think about finding a cl job until I'm not asking about , vs. ,@ and ,@(x (( :P
10:05:01
clintm
I pasted a question earlier about writing a macro interface to something else. I think I closed the tab.
10:05:58
jackdaniel
I just gave you a context, beach suggested you are at least partially grown according to log
10:14:04
phoe_
geez, us at #lisp really have a habit of turning every discussion about foo into either a meta discussion about foo or a discussion about meta foo
10:17:40
phoe_
where you don't have explicit syntax, you have public AbstractLanguageSyntax<JavaSyntax> syntax = AbstractSyntaxBuilder.build(Syntax.JAVA, Syntax.EXPLICIT);
10:32:08
pjb
stylewarning: I'm available as a free-lance CL programmer. Contact me at pjb@informatimago.com for more info.
10:41:37
beach
phoe_: I am not doing the hiring for stylewarning, so I don't know the criteria. It just sounded to me that what he is faced with at the moment is to "grow" Common Lisp programmers from scratch. You are definitely more advanced that that.
10:41:39
beach
If you would be interested in something like that, if I were you, I would not hesitate applying. The company stylewarning works for would figure out whether you qualify. There is no shame in trying, as long as you are being honest about your qualifications.
10:43:28
beach
pjb: It might also be an investment. Ultimately, there would be more people available.
10:44:15
pjb
Depends on the company. If it's established and can make the investment, certainly. Startups have shorter-term concerns and often cannot.
10:44:55
beach
Right then, I was thinking more of the reason I often put in the time to help out newbies.
11:27:59
pjb
You need to find two lispers of different sexes first... Otherwise you only have 50% of chances of getting a new lisper :-)
12:18:22
phoe_
What is a way of destructively splitting a list into a list of elements that satisfy a predicate and a list of elements that don't?
12:26:12
lieven
(loop for x in '(0 1 2 3 4 5 6 7 8 9) if (oddp x) collect x into odds else collect x into evens finally (return (list odds evens)))
12:29:01
lieven
phoe_: seriously, if you need that kind of semantics, the data structure to use might be a vector
12:30:35
pjb
always: (sort list (lambda (a b) (and (funcall predicate a) (not (funcall predicate b)))))
12:31:12
pjb
(let ((predicate 'oddp)) (sort '(0 1 2 3 4 5 6 7 8 9) (lambda (a b) (and (funcall predicate a) (not (funcall predicate b)))))) #| --> (1 3 5 7 9 0 2 4 6 8) |#
12:33:22
pjb
(let ((list (list 1 2))) (let ((a list) (b (cdr list))) (setf (cdr a) nil) (values a b))) #| --> (1) ; (2) |#
12:34:33
pjb
Otherwise you can always use replace to make a non-destructive operation into a destructive one ;-)
12:35:26
pjb
cffi has a lot of problems. Of the biggests: It transforms structs in structs into pointers. It cannot deal with #pragma pack.
12:35:31
Shinmera
If you want it to not cons and can't afford a scratch space either just bubble sort I guess.
12:40:27
phoe_
pjb: Yes. LOOP is useless here since changing the list we iterate on is undefined behaviour.
13:06:24
phoe_
I'll need to make a Jesus symbol macro of sorts that is going to save me in such situations.
13:18:01
pjb
I've got a CoreMIDI/cffi layer that starts to work (I can send and receive MIDI events): https://framagit.org/patchwork/CoreMIDI (No docstring, cf. Apple's CoreMIDI doc). Have fun.
14:16:49
pjb
shka: So, not me, the musician is making it. I'm just porting the application to MacOSX.
14:20:52
oleo
you have to get the sequences right and then tune the effects and durations and whatnot.....
14:22:51
oleo
i'd prefer a realtime synth anyway..... other than for the inital feel of the music which you can compose via the tracker etc....
14:24:12
oleo
until you get used to all the stuff and find out some tricks etc....and know how to run stuff without the need for experimenting anymore....
14:32:09
pjb
http://overtone.github.io/ https://www.youtube.com/watch?v=xzTH_ZqaFKI https://www.youtube.com/watch?v=yY1FSsUV-8c
14:32:56
pjb
and also with visual effects: http://blog.josephwilk.net/art/live-coding-repl-electric.html
14:51:01
phoe_
I hate that idiom and always (defun cat (&rest strings) (apply #'concatenate 'string strings))
15:03:02
pjb
yes, but this cat is wrong. You need: (defun cat (&rest strings) (if (<= (length strings) (1- call-arguments-limit)) (apply #'concatenate 'string strings) (concatenate 'string (first string) (apply #'concatenate 'string (rest strings)))))
15:04:27
phoe_
pjb: no, why? I'm calling this function with one argument less than the maximum of (concatenate 'string ...)
15:05:52
pjb
Of course, with at least 50, we don't mind if we're limited to 49 instead, and with some implementations it's unlimited anyways, so it doesn't matter, but for exact correctness, here you have it.
15:07:15
pjb
concatenate can computer the total length and allocate a single block. with-output-to-string will have to provide only AMORTIZED O(n).
15:09:46
pjb
That makes me think about those ancient programmers who used an AM radio receiver near mainframes in the 60s to detect bugs in running programs…
15:12:39
p_l
pjb: by ear is still popular method of recognising buggy behaviour... and I'm not talking about code touching sound
15:13:02
Shinmera
pjb: There's papers published about intercepting keypresses on laptops using fluctuations in the wifi signals.
15:15:19
easye
pjb: I hadn't heard about AM radio debugging! Is there a source you can recommend to learn about that or is the story part of computer folk history?
15:20:39
pjb
Well, it could never be a systematic and definite debugging tool, but it certainly could be used by programmers and operators to detect unusual behavior. I can witness having seen (and heard) an AM radio on top of the IBM 3031 I programmed on back in 1982, and I've read about this several times elsewhere too.
15:21:44
pjb
Like, they had some kind of magnetic powder to debug magnetic tapes. With it you could easily see the blocks and even read the bytes on those half-inch tapes. (9 bit over half an inch are clearly readable).
15:23:11
dlowe
It may have been something only young people could do, but there was a very high pitched whine to it when the cpu would spin
15:26:47
easye
I guess the closest I ever got to that was figuring out that a Sun 3 was swapping due to the disk chatter. But that was obvious from how slow the system got anyways...