freenode/#lisp - IRC Chatlog
Search
18:32:29
mfiano
Hmm, having a bit of difficulty restructuring a LOOP form to do what I want. Any takers? :)
18:36:34
Bike
i don't understand what you're going for here. x and y don't change between iterations, so fx and fy don't change, but you recompute them every time anyway?
18:36:39
mfiano
Added a comment for a monofractal (one that doesn't multiply each octave with the previous).
18:41:41
mfiano
Wonder if there's something I'm missing. Here's a Rust (gasp) version: https://github.com/Razaekel/noise-rs/blob/develop/src/noise_fns/generators/fractals/basicmulti.rs#L123-L151
18:42:55
Bike
i don't see anything analogous? if point is the equivalen to x and y, it's reduced on each iteration
18:44:35
mfiano
At least that was the intention. I was looking at a few implementations, not sure I understand this Rust one
18:45:47
mfiano
so :for fx = (* x lacunarity) :then (* fx lacunarity) is what I need for that I believe
18:47:33
mfiano
that still leaves trying to do the initial point and octave 0 sampling inside the iteration. I see the Rust version is not either, but they don't have a powerful DSL :)
18:51:51
Bike
i think the difficulty is that the first "signal" is not scaled like the later ones are.
18:53:14
mfiano
I thought this would be close, but nope: https://gist.github.com/mfiano/e480228fed81a59d6e07c8f8e792702c
18:55:24
Bike
that doesn't actually read any sources beyond the 0th one, so you definitely don't want that
18:56:54
alanz_
I want to play with the dropbox API. Is this the most up to date library for it? https://github.com/jsmpereira/cl-dropbox
18:59:18
alanz_
hmm, maybe this one: https://github.com/deadtrickster/cl-dropbox. Only seven years old, not nine
20:10:46
Nilby
I don't use slime much, but assume the color after pressing c-a-m<tab> should be indicative?
20:46:55
White_Flame
if a macro generates a macrolet body inside its output, how does one expand those again?
20:52:50
mfiano
Sounds like your macro should be broken up into functions. You're not going to be able to interactively macrostep inside a backquoted form.
21:02:50
fe[nl]ix
jasom, _death, jmercouris: anyone interested in me publishing SBCL Linux binaries with libfixposix (and maybe openssl) statically linked ?
21:06:14
White_Flame
mfiano: can't really break out macrolets like that, and it's not too huge, just a few dozens of lines total
21:06:48
mfiano
White_Flame: Does SLIME have interop with macrostep-mode like Sly does? If so then just invoke that on the top-level macro call, press <tab> to jump to the next expandable form until you reach your macrolet call, and press "e" to expand that. (Of course keybindings are probably different; don't remember if I configured sly-macrostep myself or not)
21:09:08
White_Flame
nah, e just says it's not an editable buffer, and anoter C-c Enter doesn't do anything to the macrolet inner usages
21:56:39
jackdaniel
it is the shell command executed before python in # ./shell-command && python foo.py
23:11:17
jasom
quick poll. I'm about to publish my YAML parser. cl-yaml parses "[[],false,null]" to (nil nil nil). I prefer it to parse to #(#() nil :null). My parser is configurable to do it both ways, but which should I default to?
23:12:40
jasom
Reason for my preference: I want to know which of the 3 values was in the actual YAML, so I'm only allowed to parse one value to nil. #() is an empty sequence already and I'm more likely to want to do (if boolean ...) than (if maybe-null ...) so null has to lose out and become a keyword.
23:13:31
jasom
I will provide a convenience function for parsing like cl-yaml if I don't default to the cl-yaml way
23:23:00
jasom
I don't need to be convinced the latter is better in a vaccum, I need to be convinced that it's enough better for the default to be incompatible with existing libraries
23:28:35
jasom
|3b|: if the documentation is correct then there is no way to sepcify variable arguments in defcallback
23:29:48
Bike
the va_list operators are macros and seem to usually involve some weird complicated shuffling, so lisp implementations might not wanna bother
23:30:22
jasom
It's actually fairly easy to implement for 1 ABI, but multiply that by how many ABIs are out there...
23:31:21
jasom
usually the first N values are passed identically to a function of N arguements, and then the rest are done with fancy stack tricks.
23:34:45
Nilby
many C APIs that have variable arguments, also have a version where it passes the va_list, e.g. vprintf, which I assume you could, perhaps unportably, use in a callback
23:43:03
|3b|
i guess i can try to redirect stderr to a file or something and look at the default logging there
23:43:36
Bike
could you write a little wrapper that gets an actual string with vsprintf and then passes that to the lisp callback?
23:44:09
Nilby
I think in practice you can do it, but it's not portable, so CFFI doesn't offer it. The va_list arg tend to be just as stack pointer, so with a stack pointer you can pull out the C args if you know exactly what they are.
23:44:47
|3b|
(not completely trivial since i'm not actually working at the tty on which the code is running, but not too horrible)
23:45:04
jasom
It's entirely possible that if you treat va_list as a void * you can pass it along opaquely to sprintf, but that's ugly...
23:51:22
jasom
|3b|: a quick test on x64 shows that va_list is indeed treated like a void *. Writing a quick cffi test now...
23:54:36
|3b|
ah, guess it only works when loaded as a dependency from other things that depend on osicat... i'll send some more PRs and get you to try again once it loads in a clean image for me
0:17:39
asarch
If you are in the BASH prompt and press the ↑ key, it will show the last command entered, however, in the Slime REPL, the cursor (the blink block) will go up in the buffer, how could you "emulate" the ↑ key function in Slime?
0:19:33
jasom
|3b|: for arm64 take a struct like this, and you can pass it along unmodified: https://github.com/ARM-software/abi-aa/blob/f52e1ad3f81254497a83578dc102f6aac89e52d0/aapcs64/aapcs64.rst#122the-va_list-type
0:30:25
jasom
|3b|: actually do to the way structs are passed by value on arm64, the void pointer should work
1:02:32
White_Flame
if you want local utility functions for your macrolet compile-time bodies use, is that possible?
1:03:19
Bike
macrolet expander functions aren't allowed to refer to the runtime lexical environment, so you can't refer to flet/labels definitions, if that's what you mean
1:05:05
Bike
you can use flet/labels within the expander itself, of course, or refer to local definitions in expansions
4:31:52
markasoftware
is there any way with MOP to change add-method so that you can add multiple methods with the same specializers and qualifiers?
4:32:22
markasoftware
the method objects themselves contain extra information that I will use in the discriminating function to determine which ones should be part of the effective method
4:33:31
Bike
i'm not sure add-method allows that, but even if it does, you'd probably have to override large portions of the machinery
4:33:36
beach
You would just have to subclass STANDARD-GENERIC-FUNCTION and provide a method on ADD-METHOD, specialized to your new class.
4:42:07
markasoftware
yeah, my plan right now is to wrap the methods with extra parameters that my library's users won't know about