freenode/#lisp - IRC Chatlog
Search
20:48:59
White_Flame
mooch2: lisp sexprs are a way better codegen than outputting asm instructions in normal dynarecs.
20:49:33
phoe
that is possible, for example by splitting your system into my-emu.nes.config and my-emu.nes.backend
20:49:36
LdBeth
hortiel_: JavaScript these days is like assembly. You may avoid it depends on what kind of tasks you’d like to do
20:49:55
phoe
load only :my-emu.nes.config at startup and use the configuration options that it presents to you
20:50:16
mooch2
White_Flame, except dynarecs rely on pre-decoding the opcodes and then running them all as one big block
20:50:17
phoe
and then when you want to fire up a game then load the heavy machinery in :my-emu.nes.backend that depends on :my-emu.nes.config
20:52:29
White_Flame
mooch2: usually cycle accuracy requiring events between various chips happen in a minority of cycles. Being able to unroll and partially reevaluate instructions can get you better speed in the straightforward portions, and run slow paths when accesses intersect, depending on the architecture
20:53:06
White_Flame
it's an interesting field that since Lisp can do much better codegen, can yield better speed than C-based emulators that have to do everything more interpreted
20:53:53
jasom
White_Flame: many emulators do not hold that the minority of cycles require cycle accuracy because the majority of instructions will access a shared memory bus.
20:55:13
White_Flame
for instance, on a single raster line the more fixed-function chips know what spots are "live". If the CPU's processing within that line touches one of those locations, you break out of the fast path
20:55:15
pjb
mooch2: 1- you can create a new channel just by joining it. You can "lock" it and become op by using freenode bots, I don't know how, read freenode documentation.
20:56:42
LdBeth
mooch2: since you already have a project you can put the channel in your project description
20:56:51
pjb
mooch2: 2- there are a lot of different kinds of emulators and they can be written in CL. It's indeed an interesting subject. It may be interesting to divert their the discussion to a specific channel, when it becomes too loudly, crowding the general discussion in #lisp. So if you expect a lot of traffic specifically about emulators in CL (or in lisp in general), it may be interresting to create this channel.
20:57:43
White_Flame
i have a semi-functional ivory chip emulation, but I need some assistance in debugging
20:58:12
oni-on-ion
mooch2, false. performance, non-consing technique, its very helpful. to each their own, though.
20:58:31
White_Flame
mooch2: I followed the docs, but it goes off into la-la land on bootup execution
20:58:54
mooch2
White_Flame, yeah but you might've made an error in your coding of the info from the docs
20:59:03
White_Flame
so my next step will otherwise be to disassemble and try to figure out what it "should" be doing
21:00:07
White_Flame
and the VLM itself is not documented at all, and has unknown variances from the hardware ivory envrionment
21:02:57
oni-on-ion
more fun to me is to create Fantasy Console. especially with [common] lisp being somewhat halfway there ^_^
21:03:27
White_Flame
most are from illegal sources. they just had sceners rewrite summary docs with the descriptions of their findings of the most critical portions
21:04:07
White_Flame
but yeahh, lots of hardware edge cases would have been experimentally discovered, and not be officially documnted at all
21:04:45
White_Flame
I don't recall a single case of legal trouble around emu devs based on copyrights of leaked docs
21:05:05
phoe
1) emulators were, are, and will be developed despite emulation being a huge grey area, 2) emulation legality is #lispcafe more than #lisp
21:07:15
White_Flame
I need to leave, but using "illegal" docs does not mmake the software illegal at all. The software is fine. Only your possession of the docs might be actionable
21:09:34
pjb
mooch2: if you're interested in lisp X, the first thing to do is to search X on cliki.net !!!
21:10:29
oni-on-ion
i've a feeling that illegal docs would lead to enough suspicion. for example if another company made an exact Tesla clone. but then, RMS at MIT labs ...
21:13:11
mooch2
oni-on-ion, not really, it's still describing the same things you'd find reverse engineering the thing
21:13:24
pjb
mooch2: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
21:13:53
pjb
mooch2: emulators are not written from dumps of the silicon design, but from the manual describing the processor.
21:14:57
Xach
If you're new here, it is not always clear that you can and should ignore everything pjb writes in any medium.
21:15:40
pjb
mooch2: emulators are written in general BEFORE the hardware is completed, to let software engineer develop the software at the same time the hardware engineers develop the hardware!
21:16:31
phoe
pjb: you are semantically correct but people commonly refering to emulators usually refer to retro-emulators where you already have all the software but lack a physical machine.
21:18:12
oni-on-ion
to take a short tangent, we should have the specs/schematics for all parts in our iphones shouldnt we ?
21:20:03
oni-on-ion
also of course we should be aware of the difference between Emulator and Simulator. i think pjb referred more to Simulator when considering hardware development
21:20:20
oni-on-ion
mooch2, ahh. i was looking at GBA because its awesome. or NDS its bigger brother =)
21:30:35
oni-on-ion
i was helping der group whom ripped/dumped the gamecube eeprom it was fun but lost my cube =) i was a pirate at the time so couldnt tell from there if it were immoral or illegal
3:23:46
equwal
no-defun-allowed: CL lacks lots of basic functions it would be nice to have. Like today I wanted to compute some permutations, and had to write the code manually (when it could have been a library).
3:31:35
pjb
Strange... (com.informatimago.clext.association::permutations '(1 2 3)) #| --> ((1 2 3) (2 1 3) (2 3 1) (1 3 2) (3 1 2) (3 2 1)) |#
4:46:33
aeth
permutations would be pretty low on my 'nice to have built into a language' list, below regexp, and I rarely use regexp
4:49:48
aeth
but when the hard algorithm for $thing is on Wikipedia and it's not that many lines (incomprehensible lines, but still not many lines)...
6:02:30
ebrasca
loke: For example replace (+ (* x x) (* x x) (* x x)) with (* 3 x x) or someting better.
6:06:18
aeth
and when they're not floats, you still get generic arithmetic unless you can bound the problem because they could become bignums
6:36:02
loke
You have a simplifier function that takes an expression, and simplifies it, such as: ((MTIMES) x x) → ((MEXPT) x)
6:45:00
ebrasca
loke: Can maxima replace (loop :for i :from 1 :to 10 :sum i) with someting like (/ (* (+ 1 10) 10) 2) ?
6:50:16
no-defun-allowed
Maxima doesn't work on arbitrary CL code, and I don't think it has too many imperative constructs either.
7:00:28
aeth
you'd want a separate macro for that because, well, once you go declarative you lose a lot of determinism. Changeg one thing and suddenly O(1) to O(n!)
7:05:39
loke
Since all Maxima equations are expressed as Lisp structures, you can easily use it programatically
7:10:30
aeth
This isn't particularly hard to program up. It can get messy later on but still... https://en.wikipedia.org/wiki/Summation#Identities
7:11:31
aeth
iirc, I started doing something along those lines for my Project Euler solutions, but never cleaned it up enough to be useful
7:21:43
aeth
the problem with rules is that you can never have enough rules in your system if you don't limit your scope
7:22:12
aeth
before you know it, you're going to be saying "sure, I guess integrals are technically in the scope of a summation macro"
7:26:24
edgar-rft
For infinite scope you'd need an infinite number of rules. There's always at least one case left. Same why one can't handle *all* real-world problems with laws. :-)
7:27:15
aeth
ebrasca: two potential downsides: (1) compilation time or (2) too magical so you can't actually tell what's going on
7:28:35
aeth
I suppose the third downside is that you give up some dynamicness to be optimized. You can see this fairly directly what the currently-optimized CL looks like
7:29:41
aeth
ebrasca: afaik optimizations are, well, the goal of optimizations is to take something that's easy to understand and make it hard to understand, but faster, so that the source code is as simple as possible
7:32:53
aeth
The downside if you go too far is that it can be fragile. You wind up with a system you don't really understand and you can only hope to say the right magic words to make it run fast. SQL appears to me like a good example of this.
8:09:13
p_l
(the joke goes that if you know how to use EXPLAIN there's a >$300k/year salary waiting for you)