freenode/#lisp - IRC Chatlog
Search
20:28:44
lottaquestions
Check out https://github.com/wzrdsappr/trading-core/blob/master/examples/backtesting-simulation.lisp
20:29:52
lottaquestions
(defparameter *agent-specs* `((simple-model :L 89) (channel-breakout-trend-following :fast-period 89 :slow-period 211) (envelope-moving-avg-trend-following :N 89 :width 3.2) (adaptive-moving-avg-trend-following :min-period 59 :max-period 126 :width-factor 3.2 :snr-factor 0.5) (fractal-ama-trend-following :max-period 200 :min-period
20:29:53
lottaquestions
10 :fractal-length 126) (opening-range-breakout :volatility-limit 1.5 :N 21) (range-projection-mean-reversion :N 34 :projection-interval :week) (swing-breakout :event-count 21 :expected-width 1.5 :price-extension 2.0) (swing-mean-reversion :event-count 21 :expected-width 2.0 :max-allowed-breakout 1.5)))
20:31:29
sjl_
https://github.com/wzrdsappr/trading-core/blob/master/examples/backtesting-simulation.lisp#L46 is where make-instance is called
20:42:40
jackdaniel
copec: it seems that imgui runs in the same process as ecl while emacs provides only swank connection
20:43:03
_death
copec: it's a C++ program that embeds ECL and has imgui and bindings for it.. it loads a lisp file, and the first thing that's done is to start a swank server, so I can connect using slime
20:43:40
_death
copec: it wouldn't be difficult to add a text editor and be "self contained" but for development emacs/slime is just too convenient :)
20:49:43
copec
I haven't attempted anything but simple FFI, how difficult was it to get ecl+imgui going?
20:49:44
_death
previously I used it with tic-80, if you want to see how easy it is to embed.. https://github.com/death/TIC-80
20:56:49
_death
copec: it's not difficult, but writing bindings by hand can be a bit boring so progress is slow.. a few functions every now and then, and it's about 80% complete now, I'd say
0:47:54
fengshaun
I've heard of common lisp's superior debuggability, and I've seen sbcl dropping me to a debugger to poke around. where should I go to learn things I don't know that I don't know. i.e. how to be super effective in debugging cl
0:48:19
fengshaun
I feel like there is a lot of stuff in CL's debug-land that I don't know is possible
0:52:30
pjb
fengshaun: there are different debuggers. Each implementation has its own. And there are debuggers that work with a lot of different implementations (eg. slime).
0:52:56
pjb
fengshaun: the best way would be to read the user manual of both the implementation and of slime (since I would advise you to use slime when possible).
0:53:37
fengshaun
any resources to give a quick overview of what's possible so I can go deep later as need arises?
0:53:38
pjb
fengshaun: also good, is to write your own debugging facilities. For example, I wrote a stepper (cl-stepper), since some implementation don't provide cl:step, and most do a crude job at it.
0:54:12
Xach
fengshaun: i think i use v and t on frames the most in the slime debugger. v jumps to the location of the error (if there is high enough debug at compile time) and t shows the value of local variables (ditto)
0:54:26
Xach
fengshaun: i haven't tried the stepper lately. i don't know if it works nicely for sbcl.
0:55:37
Xach
sly has a feature that looks neat called stickers but i didn't stick with it long enough to really get a feel for them
0:56:27
fengshaun
I was hoping for a shorter read than the user manual to get a feel for all features before diving deep
0:57:48
pjb
fengshaun: then just enter into the debugger (evaluate (break) in the slime REPL), and type C-h m
1:31:03
copec
dtrace allows an arbitrary level of inspection, it allows you to group cross-cutting concerns arbitrarily
1:34:00
p_l
I'm not sure about equivalent of dtrace helpers for dynamic generated code that isn't represented in binary's DWARF data
1:34:31
p_l
most of the time it's "dump a file named according to template X in /tmp that contains symbol data in this format"
2:23:43
pjb
p_l: you could patch a CL compiler to generate DWARF at the same time it generates code dynamically.
2:29:01
mister_m
i find myself wanting to traverse a list and use those list values to populate a hash table. My first instinct is to define a hash table in a let statement, and in the body of that statement have a dolist expression where i modify the hash table. Is there a better way to do this?
2:30:29
mister_m
I'd use a reduce perhaps in JS but I'm having a bit of trouble with CL's reduce in doing this
4:56:07
pjb
mister_m: if you like reduce go ahead! (reduce (lambda (h e) (setf (gethash (car e) h) (cdr e)) h) '((a . 1) (b . 2) (c . 3)) :initial-value (make-hash-table))
6:35:10
p_l
pjb: the linux perftools format is essentially "drop a file named after PID with table of `address:symbol name`". DWARF is only used for static data. DTrace OTOH had essentially a callback interface that you could implement top return the data