freenode/#lisp - IRC Chatlog
Search
9:40:59
flip214
does anyone have an example of sending a (vector (unsigned-byte 8) (*)) via CFFI to a function expecting a char*?
11:15:39
vydd
flip214: something like https://gist.github.com/vydd/6484a05906ebc10595f6b7e15b41d048 ?
11:16:35
vydd
oh wow. so last time I visited was 2 years ago :\ Shinmera, if you still know what this was about, I'm happy to answer
11:17:23
jackdaniel
I feel stagnant, it doesn't feel as if you haven't said anything for two years, hm
11:24:17
drmeister
no-defun-allowed: So you have ABCL running as a Minecraft (Forge) mode but there's no documentation or any information on how to access the Java classes? What I would do starting in a situation like that is I would punch some trees and then take the wood and craft planks and sticks and use those to craft a wooden pick. Then you can mine for cobblestone and use that to craft a stone pick.
11:26:45
drmeister
ACTION usually spends his first night in Minecraft crying in a dark hole - trying to avoid zombies.
11:32:58
no-defun-allowed
drmeister: Oh, ABCL is very, very well documented and I got myself through some examples.
11:33:24
no-defun-allowed
But as a proprietary program, all the methods' names are obsfucated and you need a very big table of method names to translate your way out.
11:34:14
no-defun-allowed
For most mods, this is no problem, because the toolchain has a post-processing step that consults that table and replaces all the methods, but ABCL doesn't benefit from this as its method lookups are done at runtime.
11:35:26
no-defun-allowed
In #lispcafe we figured out where that table is and how to read it, and I was able to pull out a method (net.minecraft.client.Minecraft.getMinecraft) and call it using it.
11:37:04
no-defun-allowed
So now I just have to figure out Forge, which doesn't have any nice documentation pages with a list of classes and methods, and instead wants you to rip out some bulky Java IDE to work things out.
11:37:19
jackdaniel
I'm still waiting for a CL implementation written for a hardware built with mnecraft
11:38:32
no-defun-allowed
"Compiling Common Lisp to Minecraft Redstone", a paper by the S-expressionists published in ELS 2029
11:40:13
no-defun-allowed
The plan is to write a wrapper around java:jmethod (call it jmethod*) which performs this swizzling and I can work through a few Forge examples from there.
11:46:53
no-defun-allowed
drmeister: I advise you make charcoal early on, then make torches, so you can cry in a lit up hole at least.
14:08:51
thijso
Jeeshh. I've just about kicked my minecraft addiction, guys. Stop talking about that in here.
14:14:43
dlowe
as part of the forge installation process, they decompile your installed minecraft back into java code and then patch annotations into it. You're intended to read the code to find out what to tweak/override.
14:21:34
tourjin
is there any preassigned style in emacs like dark mode? white screen hurts my eyes.
14:55:47
drmeister
no-defun-allowed: Please keep me up to date on your minecraft/common lisp exploration.
16:07:41
thijso
If I do a (make-instance inside of a package, I shouldn't need to fully qualify the classname, right? I'm trying to indirectly instantiate a class, by doing (let ((class (intern (format nil "~a~a" classname suffix))) and then using that to (make-instance class ..
16:08:28
thijso
But it's not working. If I print out some stuff it looks like the difference is that it works with <package>::<class> and not with just <class>
16:08:38
Bike
depends on what you mean by "inside a package". that code will create the symbol with intern, so it'll be interned in whatever *package* is in place when intern is called.
16:09:22
thijso
yeah, but it's all inside the same file which has an (in-package :bla) at the top...
16:14:46
Shinmera
you can also do `(let ((*package* #.*package*)) ...)` to bind the runtime package to the one used during compilation.
16:23:32
flip214
minion: memo for vydd: thanks, but I'd hoped to _not_ touch the individual bytes - just push the address on
18:07:18
Bike
Yes, you can take the method-function and then call it with a list of arguments and list of next methods.
20:34:21
sameerynho
hey folks, I'm using slime and swank with Emacs. When i use slime-connect to connect to swank server it just output connecting to .... and do nothing
21:09:50
jgkamat
Hey, does anyone know a library or easy method to get a super simple hackable calculator in common lisp. Eg: "1 + 3 + 4" = 8. I'm trying to eventually make a dice roller, ie: 5 + 2d4 = 5 + roll(4) + roll(4).
21:10:55
jgkamat
I would like to avoid doing any work like building a parser or whatever if possible, but ideally it would be nice to support parenthasis and subtraction and other stuff like that
21:15:48
thijso
How does CL manage class cleanup? If I have a class that contains a slot for a usocket socket, and I connect and use it, do I need to explicitly close the connection before the class instance goes away? Seems like the proper thing to do, but how? I'm looking in CLHS, but can't find anything on class instance destruction...
21:18:01
Bike
thijso: try looking at the finalizers in the trivial-garbage library, but I think you're supposed to use more reliable means
21:18:22
jgkamat
Bike: yes that would work, but ideally I would like it to be pre-packaged (ie: I wouldn't have to come up with grammars and all). If you know a good parser that's easy to use I'll take that as well
21:21:38
Bike
thijso: yes, as in, you should close the socket more explicitly than leaving it for whenever the object holding the reference to it happens to be garbage collected