freenode/lisp - IRC Chatlog
Search
7:20:03
fiddlerwoaroof
no-defun-allowed: ABCL ships JFLI in a contrib, which makes dealing with Java a lot nicer
7:24:49
no-defun-allowed
Most of the complexity is coming from the stupid obsfucation Minecraft has, so I had to write some methods which look up a table to translate the human friendly names (like posX) to crap (like field_12345)
8:13:14
no-defun-allowed
ACTION uploaded a video: aimbot.exe.mp4 (5666KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/QHnNwKOxBHLEZoFkPsUouPJz >
8:13:24
no-defun-allowed
drmeister: I made a terrible, terrible aimbot to test out the deswizzler (and I only had to provide one obsfucated name, thanks to god damn method overloading.)
8:15:45
no-defun-allowed
I guess I have to key my method table using all the Java classes...somehow.
8:40:54
seok
I'm stressing out whether I should swap to SQL as the lack of community of common-lisp - mongodb users make it difficult to ask for help in odd cases
8:42:11
seok
I would love to use lisp image as a db, but I have doubts whether it would keep up with the performance standard of SQL or NoSQL DBs
8:42:58
jackdaniel
when you use external database you need to: a) speak some protocol (transmission), b) serialize/deserialize data (computing)
8:43:45
jackdaniel
however I could imagine a database in beach-envisioned system where your process simply gains access to the database memory
8:43:53
seok
What about data integrity? How can I be sure that data won't be lost in case of unexpected shutdowns
8:45:00
jdz
Integrity does not safeguard from data loos, it just guarantees integrity of written data.
8:45:57
jonatack
seok: did a one year project for the paris airports where we were required to use mongo... never again
8:45:59
jackdaniel
seok: but yes, using "real" database will give you some guarantees which are not available in stock lisp image :)
8:47:52
seok
If I could be convinced that a lisp database can be just as scalable and data-secure as full DB's, I would go for that right away
8:48:52
jonatack
mongo was fun at first but if any risk of evolving toward needing a RDBMS instead... heh
8:49:51
jackdaniel
seok: that was primarily meant as a joke, lisp image is not a way to go for managing data in any non-personal project. if it is a small project with single client use sqlite, otherwise use postgresql
8:50:56
jonatack
mongo is the wrong choice for relational mapping without going down rabbit holes to accomodate/cascading updates and let's not get started about maintaining db integrity in that case
8:53:49
jonatack
basically an SQL backend with maybe a mongo one for the document part would have been fine, but some manager sold the project as cheaper by speccing only having to deploy and admin mongo for everything
8:55:02
jonatack
the takeaway: if the value of the data is in the relationships between the data, then go for an RDBMS.
8:56:32
jonatack
it was unfortunately not CL but a ruby/rails/react app but the database aspect should apply broadly
8:59:36
jonatack
part of it was a web app, the rest an internal management/AI tool to dump data from employees' heads as they were nearing retirement, centralise the data, and apply learning to it
9:00:47
jonatack
to automate tasks and probably hire fewer people, hopefully doing more interesting work without the dumb automated parts
11:39:25
beach
Yes, unit testing is good most of the time. Sometimes it is very hard to accomplish, though.
11:39:54
beach
And many times it is tedious if the technique used is to enumerate every possible case.
12:15:16
thijso
So naming... If I have a class that gets to an end state (giving an answer to for example 'find-node') using multiple rpc-exchanges, what would be a good name for such a class? rpc-process? rpc-action?
12:17:29
thijso
Hhmmm, maybe I shouldn't be generalizing too much. Something like find-node-<something>.
12:21:11
thijso
Yeah, not the class, an instance of that class. And wording is bad. I mean a method of that class that gives the answer to 'find-node', which is an iterative process using 'rpc-exchange's to get to that answer
12:34:33
beach
I think I had better let others figure this out. I do not understand your terminology. I feel more stupid than usual. Sorry.
12:42:14
ck_
thijso: maybe show an invocation and the result of it, then people can tell you whether your naming is somehow unusual or not
12:42:21
beach
I am guessing that it is not a call that is named find-node, but some function that, when called, makes the remote procedure call. Am I understanding this right?
12:47:20
thijso
I'm probably not being clear. Indeed there are rpc calls being done to a different node (instance of the same code running on a different host/port/whatever). Some of them have a type :find-node and pass on a :node-id they want to find. The other side replies with the closest ones it knows and the requester iterates on those to find the one it wants (or ends up with x closest results, but not the actual one
12:49:02
thijso
I'm thinking of making a class that keeps track of the iterations of the rpc calls it has done, keeping track of the replies (found nodes) it gets and removes the duplicate results from different nodes it has queried. In the end it should end up with the answer (1 node, or the x closest ones to that id)
12:50:46
beach
Now it makes more sense. But again, only instances of classes that are also functions do things, like "keep track", "remove", etc. Those would be generic functions specialized to some class.
12:53:21
beach
thijso: So a class could be called rpc-state, or find-node-state or something like that.
12:54:30
beach
thijso: And you would have one or more generic functions with methods specialized to that class for keeping track of the answers.
12:55:53
thijso
beach: I think we have different understandings of 'keep track'. In my view, the slots in the class are where the keeping track is happening, the method manipulate the data in those slots, but it's 'saved' in there. Or am I seeing this completely wrong?
12:58:25
beach
thijso: I was remarking on your saying that "it [referring to the class] gets and removes the duplicate results from different nodes it has queried"
13:04:10
thijso
yeah, I understand. I wasn't being clear. And I probably have too much bagage from other languages in there still.
13:04:39
beach
shka_: Except that it gets complicated, because a function is an instance of the class FUNCTION.
14:25:23
ralt
thijso: composition usually comes in handy there, where the instance would hold an "rpc" object in one of its slots, and the rpc object can manage caching and whatever is needed, and the methods just do e.g. (defmethod find-node ((node node)) (rpc-call (rpc node) :method :find-node :node-id ...))
16:45:34
alandipert
what are good references on compiling lisp? representation, transformation, heuristics, etc. i have PAIP and Lisp in Small Pieces, looking for others
18:29:43
remexre
like, (can-call (x) (foo fixnum x x)) would apply to string iff there were a (defmethod foo ((_ fixnum) (_ string) (_ string))), etc
18:35:00
Bike
well, those aren't the compiler. i'm just saying compiler declarations are a major use of types and what you're describing would be totally useless there.