freenode/#lisp - IRC Chatlog
Search
10:30:11
jmercouris
hello everyone, short article we wrote about how we implemented hooks: https://nyxt.atlas.engineer/article/hooks-implementation.org and how we merged them into serapeum
10:48:33
scymtym
article: "During the development of Nyxt we quickly felt dissatisfied with our initial hook implementation (based on Emacs)." second sentence of the linked issue regarding merging into serapeum: "In Next we use https://github.com/scymtym/architecture.hooks"
10:58:43
phoe
I understood it more like "we first used a custom emacslike implementation, then used scymtym's hooks, and now we use this current implementation from serapeum"
11:02:46
scymtym
phoe: i understood it that way as well, because i was involved and already knew, but i don't think you could get that from the previous version of the article. making the influences clear seems important since, for example, scymtym/architecture.hooks was modeled after generic functions and to some extent Boost.Signals rather than what Emacs does
11:04:26
scymtym
jmercouris: sure (i currently get a 502 for the URL, so i couldn't look at the revised version)
11:47:21
beach
jmercouris: There is no such thing as "a lambda" in Common Lisp. Maybe there is in Emacs Lisp, but not in Common Lisp.
12:59:02
beach
It would then be better to use the correct terminology, and add notes about names of similar constructs in other languages.
12:59:33
phoe
Would anyone be interested in reviewing my first/newest book, "The Common Lisp Condition System", on Amazon? The deal is that Apress can offer free ebook versions of the book to some people, and they would like to get a review posted on Amazon in return.
13:03:16
drmeister
How worried should I be about reproducibility of random number sequences generated using (random <x> <random-state>) where I load <random-state> from a saved <random-state>?
13:03:54
drmeister
It's arithmetic right? Completely deterministic. I should be able to reload a random-state 10 years from now and generate the same sequence if the random number generator algorithm hasn't changed.
13:04:24
phoe
Notes: One important use of make-random-state is to allow the same series of pseudo-random numbers to be generated many times within a single program.
13:05:05
phoe
"A random state object contains state information used by the pseudo-random number generator."
13:05:31
phoe
so, yes, if the algorithm has not changed then knowing the random state is enough to reconstruct the PRNG state
13:06:24
Xach
by "your own" i don't mean write your own, i mean use a RNG library that someone else wrote, and that you can fully understand and control
13:06:31
phoe
but then you need to assume that your lisp implementation that'll exist in 10 years from now will have no changes to its algorithm
13:07:49
drmeister
Since I control the lisp implementation I could make sure the algorithm doesn't change. We are using the boost::random library.
13:13:06
_death
often there's benefit from using your own.. for example I recently switched to using a xoshiro implementation in a program that resulted in a significant speedup, and it also solved the issue of initializing the random state to a particular one throughout runs (can usually be done, nonportably)
13:13:06
drmeister
Using the mersenne twister means I'll get the same random number sequence on whatever it runs on - right? Say we move Cando to ARM - the same saved random-state will get me the same sequence of pseudo random numbers. Correct?
13:14:20
Bike
a PRNG is basically deterministic. it's just an algorithm that outputs a sequence of integers based on an input state
13:14:42
drmeister
I added the ability to readably print and read random-state yesterday (it was an oversight for a long time).
13:15:51
Nilby
This is one of the reasone people make secure enclavess with their own chip. Maybe the best thing to do is test that your same random code & state produces the same results.
13:16:43
_death
drmeister: for fun, here's a way to reconstruct mt19937 state from 624 consecutive outputs: https://gist.github.com/death/9c11ffb8594e91dfbe7b6e9baf0cbc31
13:17:25
drmeister
I want to use a random-state as the seed for generating molecular sequences that will be difficult to impossible to reverse engineer.
13:18:36
drmeister
I will write out the sequences - but they will be generated from the random number generator - if they became inconsistent - there would be trouble.
13:20:23
drmeister
I don't have 624 consecutive outputs at this point - I have around 360 and they are each modulo some value.
15:18:23
astronavt
are there any good lisp blogs to follow or places to follow updates in the lisp community, e.g. new library releases and such?
15:27:28
astronavt
its a shame. i can see why people dont want to use it nowadays, but its such a cool language id hate to see it fall too far into obscurity
15:28:33
astronavt
if anything the dependence on SLIME is too much of an obstacle. if you had good vscode/atom support for it i bet people would start using it more
15:30:00
phoe
atom and sublime text seem to get slime clients of their own, though, and I can see they have some development ongoing
15:39:23
beach
astronavt: But I seriously don't think that the lack of vscode/atom support would attract more people.
15:41:30
phoe
I think that good vscode/atom/sublime support for Lisp (by good I mean comparable with slime/sly) would be a really big boon to its popularity nowadays
15:41:33
Xach
I think it's good to get rid of meaningless difficulties so you can get on to meaningful difficulties
15:41:34
beach
astronavt: Every so often, someone shows up here with a miracle solution to making more people use Common Lisp, and what they then tell us is their own personal little problem they have with Common Lisp. But that does not mean that many others avoided Common Lisp for that reason, and certainly not that fixing the problem would attract more people.
15:42:27
beach
But I will shut up now, because I can see that my take on this is not shared by others.
15:42:30
Xach
"lisp does not work with my favorite editor" is a meaningless difficulty. better to get past that to something more meaningful.
15:43:53
Xach
"it is hard to get and install libraries" is a meaningless difficulty, "there aren't any libraries that do what i need" is a meaningful one
15:46:14
astronavt
i said it was a shame that more people didnt use it and suggested one thing that could help based on my own personal experience & talking to others
15:47:27
Xach
we get more than our fair share of people who have a plan like "if the standard functions were all generic lisp would be more popular" or "if the standard function names were all more logical lisp would be more popular" or "if you made stuff immutable and ran it on the jvm with incompatible syntax lisp would be more popular"
15:50:05
astronavt
the stdlib is definitely unusual compared to modern languages. but i dont think that is what turns people off. im sure most people here see the hyperspec as full of features, not cruft
15:55:59
dbotton
beach I agree with you. Using a language means either job or become an enthusiast. Becoming an enthusiast means appreciating the language
16:02:27
jmercouris
am I correct in thinking that local-time does not have a way to parse +rfc-1123-format+?
16:02:39
cl-arthur
astronavt: most programming languages are stuck in the 60s anyway, according to Alan Kay :D
16:14:49
Xach
|3b|: thanks. it crashed on me. possibly a futile attempt on my mac laptop? don't want to bother you more about it, it looked fun to try.
16:20:29
Xach
|3b|: 2020-10-22 12:20:11.839 sbcl[22877:2109368] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: NSWindow drag regions should only be invalidated on the Main Thread!
16:23:38
Xach
|3b|: cl-glut-examples:render-to-texture worked (but the texture was in a small part of a big window). running graph-paper resulted in The function CL-GLUT:MOUSE-WHEEL-FUNC is undefined.
16:23:50
|3b|
also i think in 3b-glim at https://github.com/3b/3b-glim/blob/master/3d-s/scratchpad.lisp#L50 add :version 420 to the reload-program* call
16:25:51
Xach
I wouldn't mind if it's only on my mac laptop. But I don't really know where to start.
16:30:30
|3b|
though hopefully someone will finish a gl->metal wrapper by the time they decide to completely drop gl
16:33:12
|3b|
more that they are very opinionated and happen to have opinions that don't map well to current CL ecosystem :/
16:56:04
Xach
scymtym: i don't have any directly handy. i remember seeing interactions where each on-screen object had a corresponding instance to be inspected and possibly modified on the fly in a seamless way. buttons, windows, etc. nothing conceptually unusual but an impressive level of "just works" energy
17:02:23
scymtym
Xach: this probably has too much other stuff around it, but https://github.com/scymtym/McCLIM/tree/wip-broadway-vector/Backends/Broadway contains a websocket-based 2d-graphics systems
17:22:56
phoe
Xach: you might want to evaluate https://www.reddit.com/r/Common_Lisp/comments/jg3qa7/error_while_installing_quicklisp/
17:56:57
phoe
we might really need a quicklisp mirror on a service that doesn't need to follow american embargo rules
17:58:59
Xach
a small price to pay to ensure everyone in the world has access to 27 different personal utility libraries
18:00:27
jackdaniel
hang on, I have 2.5am somewhere on my disk, it is bundled with a reader macro to type lists with [foo 1 2]
18:03:42
scymtym
please make it silently switch from [ to { in case my URL library which also installs a reader macro for [ is already loaded. don't worry, it pushes multiple things onto *FEATURES* so you should have no trouble detecting its presence