freenode/#lisp - IRC Chatlog
Search
8:58:55
hjudt_
i have a problem with dexador: if i use (dex:head "https://my-host/url" :verbose t :headers '(("Accept" . "application/json"))) then i can see in the server response it would send me json. but when i use (dex:get "https://my-host/url" :verbose t :headers '(("Accept" . "application/json"))), the server sends me back "application/xml". however, when i use wget -O - --header "Accept: application/json", the
9:00:24
hjudt_
(perhaps i should add that the server can respond with json or xml depending on the accept header i send it)
9:03:30
hjudt_
strange thing is that dexador verbose output tells me it does set "Accept: application/json". so what's the difference between dexador and wget here?
10:44:46
shrdlu68
hjudt_: Easiest thing to do is probably to inspect the traffic with something like wireshark
13:33:28
flip214
Shinmera: any ETA for ELS registration? No need to hurry, just curious. (And HR wants to know ;)
13:42:27
AeroNotix
Zhivago: your thing about temporary processes and making per-function calls in those slightly reminds me of Erlang.
13:43:06
AeroNotix
in Erlang each function is executed in its own "process" which is not a unix process but an actor within the beam vm. Each process has its own GC and GC happens in isolation from every other process.
14:34:15
AeroNotix
but each function is always executed within a process and all processes are executing concurrently
14:34:18
White_Flame
right, that's an ambiguous implication that to me read as a function gets its own unique process
14:35:05
AeroNotix
since a function cannot be executed outside of a process, there's not much difference unless you understood that each invocation creates a new process for the function to execute in
14:36:49
White_Flame
however, in some of the lisp machines, you could allocate fixed-size regions to work with, and then throw away the region after you were done
14:37:29
AeroNotix
spawn_opts could be used to allocate a heap of your choosing and the process could die when you're done
14:37:44
AeroNotix
I forget if you can disable gc for an individual process but with the right spawn_opts perhaps it's possible
14:37:53
White_Flame
one thing (of quite a few) that I hated about Erlang is that you couldn't sic multiple processes to scan through a single large immutable shared data structure
14:39:53
White_Flame
yeah, ETS wuldn't work. Parallelizing multiple processes to scan a single data structure would be done for optimization; shifting all that into an ETS database form would kill speed & serialize it
14:40:50
White_Flame
right, and taht would be terrible for a fine-grained tree data structure, where you can very quickly traverse it in RAM normally
14:41:08
fe[nl]ix
on recent CPUs it tends to be a severe speed disadvantage to access large(ish) data structures from multiple threads
14:41:23
White_Flame
but in any case, I spent 2-3 years deep in Erlang. It's a great language to learn from, but I certainly don't use it anymore by intent :)
14:41:39
fe[nl]ix
especially if those threads are running on different cores on different NUMA nodes
14:42:10
AeroNotix
fe[nl]ix: you can lock schedulers to cores in Erlang but it still would present the issues you're talking about
14:42:24
White_Flame
fe[nl]ix: yeah, nowadays you really have to manage affinity & such if you're doing that level of optmization
14:43:28
AeroNotix
It's a garbage language itself, imho but nothing comes close for very simple concurrency and structuring concurrent applications
14:43:58
White_Flame
bad syntax, SSA got in the way of editing, very static model of the supervisor configuration which is at odds with dynamic application servers & runtime services, no parallelization of shared structures as mentioned above, etc
14:44:08
White_Flame
however, it has been quite a few years in the meantime, so I don't know how erlang has progressed
14:45:32
fe[nl]ix
White_Flame: in many cases it's significantly faster to pin the pages of the data structure on a NUMA node, assign it to a worker thread pinned on the same node and have the other threads enqueue work requests
14:45:34
White_Flame
automatic load balancing & reconfiguration, uploading new dynamically loaded services
14:46:07
fe[nl]ix
so the data structure is only accessed from a single thread and the shared access is on the work queue
14:46:19
White_Flame
yes, but at least at the time it always ended up in throwing away everything OTP provided and trying to do it yourself with the provided lower level mechanisms
14:47:12
White_Flame
erlang was also part of a heterogeneous system, so our stuff wasn't purely defined in erlang assumptions
14:47:59
White_Flame
it's been too long to recall the exact specifics with the supervisor definitions, but each time we had to figure out what number or setting to put into those defintiions, we always wanted them to be calculated predicates, not fixed values
14:49:02
AeroNotix
those are definitely static still, but a relup/code reload can reconfigure them but probably not the way you want to do it
14:49:36
White_Flame
but in any case, our conclusion was that erlang woudl work great for statically defined systems (like telecom platforms, incidentally), but for dynamically defined systems just didn't play well enough
14:50:03
White_Flame
the underlying systems coudl do all that, but OTP was built around too many assumptions of static definition
14:50:05
AeroNotix
it'd be interesting if the restart strats could take a function atom which would recalculate the restart strategy when a child pid restarted
14:50:55
AeroNotix
but it comes down to whether you could recalculate it quick enough on demand (latency of calculating impeding restart) the lack of shared data would hinder that too. Since if you had shared data you could recalculate it elsewhere and update a variable it could access
15:12:07
dtornabene
curious if anyone has done any audio processing in CL, specifically eating an mp3 and doing analysis on the stream??
15:21:30
Shinmera
I don't know what analysis you want to do on audio data, but you just get a buffer of floats in any case. From there on out you can do whatever with it.
15:22:18
dtornabene
cool! thanks for the reply I acutally just found some of your own stuff from googling
15:22:46
Shinmera
I'm mostly concerned with real-time processing, which may or may not be in your area.
15:24:29
dtornabene
not so much, no. I'd like to do some similarity of sound analysis, similar in some ways to what echonest does with beat and melody comparisons
15:24:57
dtornabene
i have a ton of mp3s, like to filter out some sounds and compare others, and go from there
15:25:52
dtornabene
thanks again for the pointers, it seems like in terms of libraries its a "there be dragons" kind of situation as use cases can get specialized really quickly
15:56:53
dtornabene
thank you very much, this is very much "journey of a thousand miles begins with a single step" territory for me...
16:07:41
angelo
please help, I wrote a project with 4 nested loop, quickload cannot load eventually dropped in the debugger for stack overflow! Thanks
16:12:55
Guest16495
when doing curses development with cl-charms i want my application to handle ctrl-c as an input, but the sbcl repl intercepts it and interrupts the program. is there a way to avoid this?
16:27:10
sjl
note that if you're running SBCL with something like rlwrap, this may cause problems. When using cl-charms I run SBCL directly without rlwrap or anything else around it.
16:32:18
sjl
for built-in stuff in the cl package, you can probably just dump all the symbols into a big file for rlwrap to look at
16:32:45
sjl
but if you want (defun foo () 1) and then be able to tab-complete foo, that's gonna be a lot more involved
16:33:06
dtornabene
the snippet of code I'm using in conjunction with rlwrap is supposed to do that already but doesn't and I've been too lazy to debug it
16:34:52
dtornabene
hold on, I'll find the link to the code I'm using, its from a well known lisp hacker
16:35:22
sjl
anyway, this is my rlwrap config for lisp repls https://bitbucket.org/sjl/dotfiles/src/default/bin/rlwrap-lisp
17:07:19
Shinmera
And once libraries start using it, convincing LW/Franz to add them would probably be easier.
17:13:12
jmercouris
I don't know, and that's one of the reasons I picked SBCL first, not even joking
17:13:25
AeroNotix
whoman: "The name "Steel Bank Common Lisp" is a reference to Carnegie Mellon University Common Lisp from which SBCL forked: Andrew Carnegie made his fortune in the steel industry and Andrew Mellon was a successful banker.
17:14:56
White_Flame
yep, CCL has had better mac & win support, and GUI things. CLISP has been easy to port. ECL is embeddable, etc
17:16:14
pfdietz_
The SBCL fork was a bit daring because build time was an issue back then and SBCL had to compile things twice. Now the build time is almost negligible.
17:16:15
phoe
also CLISP has a very (un)fortunate name because it shares its first name with C(ommon )Lisp
17:16:19
AeroNotix
I believe clasp is complete. I remember the author making a big deal about it being complete in here a few months/years ago
17:16:34
AeroNotix
when I first started I thought CLISP was the only implementation exactly because it was called CLISP
17:17:34
pfdietz_
Clasp is not quite fully gelled but much work is being done. I plan to abuse it horribly when given the go ahead.
17:18:07
AeroNotix
I don't understand the reasonsing behind clasp. "Interoperability between cl and c++" can't you achieve that with FFI?
17:18:13
jmercouris
phoe: It's too bad there's no ecosystem of apps such that one could actually run mezzano as their main OS
17:18:24
phoe
well, clasp has its own kind of C interoperability - it doesn't "just" interface with already compiled C libraries, it compiles C code with LLVM into something that already has Lisp interoperability.
17:18:40
jmercouris
AeroNotix: I don't think someone would embark on such a large project if they didn't examine the obvious :D
17:19:14
pfdietz_
Clasp could enable exploitation of fancy compiler optimizations for loops and such. Good for numerical work.
17:19:29
Bike
clasp also lets you manipulate C++ objects in lisp, have lisp classes that are subclasses of C++ ones, stuff like that
17:19:35
jmercouris
I wish there were implementation independent extensions to other languages like CFFI
17:20:15
phoe
but I wasn't doing it to write proper c or c++, I was doing this to illustrate C++ name mangling
17:20:25
TMA
phoe: declaring it otherwise is undefined behavior in hosted enviroment (hosted == libc available)
17:21:10
jmercouris
Bike: I wouldn't know, I'm not a language expert or anything, but I think simplified bridges could be written with IPC and a child instance
17:21:35
jmercouris
Bike: like I can envision how to make a VERY naieve lisp to python bridge with IPC
17:22:13
AeroNotix
jmercouris: remember about the wankery? You'd invoke their wrath doing it that way
17:22:20
random-nick
afaik there used to be a project that provides lisp and python interoperability by interpreting python
17:23:00
Bike
yeah. well, the more general cause is that a lot of science code is written in fortran
17:24:05
jmercouris
I thought it was reserved for assembler languages with a simple line by line format
17:25:38
edgar-rft
Just simply punch cards until they lose their teeth and speak with a Lisp - voila
17:27:25
pfdietz_
Punch 'A' and it prints A on the column and punches the code for A below it in holes.
17:27:37
TMA
https://en.wikipedia.org/wiki/Punched_card https://en.wikipedia.org/wiki/File:FortranCardPROJ039.agr.jpg
17:27:52
whoman
whoa... we sure went some way beyond morse code eh!! http://www.orosk.com/wp-content/uploads/2016/11/PUNCH-CARD-1.jpg
17:28:16
Bike
in the fortran one you can see it written on top in the original letters, as pfdietz said.
17:29:15
Bike
i have an old punch card i found in a library at home, but i've never used a reader or anything.
17:31:28
pfdietz_
llvm for interop but also to exploit optimization passes written by others for llvm.
17:33:22
Bike
the main problem with clasp right now is that it takes a lot of resources to build, and the compiler is slow.
17:33:35
jmercouris
I have a thinkpad x series with 2gb of ram and 20gb of hard disk, I can do literally all of my work on there
17:33:39
whoman
AeroNotix: by avoiding anything that uses ram. (eg. i've installed 32bit firefox on 64bit os)
17:34:31
jmercouris
s/freebs/freebsd, though it might as well be freebs with all of the manuals you'll spend reading :D
17:48:40
whoman
aagghh! one of my besties went to poland. never got a chance to meet her when she lived 2hrs away and known her for years. take me with you so i can find a monastery and a place to get ram
17:51:52
Bike
this is just about the only context i can imagine "mines" referring to a pleasant locale
17:52:15
AeroNotix
There's a uranium mine that's not too too far from krakow too if you want it there
18:00:01
serviteur
Tesla should start to be profitable, before using all the US money in doing fake pic of a tesla car in space
19:23:43
comborico1611
Would (format t "~{~{~a:~10t~a~}~%~%~}" *db*) VERSUS (format t "~{~{~a:~10t~a~%~}~%~}" *db*) produce the same output?
19:28:29
phoe
comborico1611: the stuff between ~{ and ~} gets repeated for each element in the iteration.
19:28:47
phoe
unless you put a ~^ somewhere in there. this will short-circuit if the list you are iterating on has no more elements.
19:31:32
aeth
Here's the reference for format, which is *not* the hyperspec page for format. http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm
19:32:19
phoe
https://www.hexstreamsoft.com/articles/common-lisp-format-reference/format-directives/
19:32:49
_death
(defpackage :c (:export :/u)) (defvar c:/u (make-synonym-stream '*standard-output*)) (format c:/u "uh-oh~%")