freenode/#lisp - IRC Chatlog
Search
8:21:48
beach
johnnymacs: What on earth is that supposed to mean? Linked lists do not have any computation power.
8:24:49
johnnymacs
Is it not true that I can represent the number five as a linked list 5 deep and represent subtractionf rom that list as popping the the list 3 times to get a list 2 deep. And isn't it true that I can represent an array as a list, and isn't it true that I can represent an integer reteurn value as a list, and isn't it true I can represent and integer input value as a list?
8:30:03
stylewarning
johnnymacs: representation of values is only a part of any sort of computing device/program/interpreter/etc
8:30:48
stylewarning
Even if we can represent 2 and 3 as lists, who is in charge of computing, say, 2+3 as a list?
8:33:13
stylewarning
Whatever that “something” is—an interpreter—is what you can have a conversation about Turing completeness over
12:17:13
jeosol
stylewarning: I missed your comment, about CL being better. My comment yesterday was because I discovered a nasty date related bug in my large code base. It didn't take long to fix the change, just need to add :before defmethod
12:18:04
jeosol
regarding your comment being better. That's possible. I mostly focus on the (my) application side and try to do most things as I understand the language
12:20:16
jeosol
what is the best way to read the output log file (can get as large as 10MB) of a program that runs for several hours, typically 2 to 7 hours. I have to do this for multiple cases also.
12:21:40
jeosol
The reason I want to read the file, is that it emits several messages during the run, e.g., changes in the state of the program, current simulation time (infer % complete), and other info that may be useful to make dynamic changes for next run
12:23:03
jeosol
For an example of such a message, here is one (running tail -f file) => STEP 1011 TIME= 5607.00 DAYS ( +2.0 DAYS REPT 1 ITS) (9-MAY-2031)
12:24:39
jeosol
In this case and for this message, I would be picking up information about TIME (5607 days) and DATE (9-MAY-2031). I figure I'll use some time of regex but it would not be efficient to read the whole file each time (methinks)
14:03:27
jeosol
_death: The file grows each time. hmm. I guess I don't understand how the file stream will work in this case.
15:47:25
beach
I think I have a more complete specification of the SICL garbage collector(s): http://metamodular.com/garbage-collector.pdf
16:18:55
beach
caltelt: Speaking of JVM, I have read several papers on excellent compacting garbage collectors for Java, but then at the same time I hear that the default garbage collector is of type stop-the-world. I can't quite reconcile the two pieces of information.
16:26:00
caltelt
Depends on which version of Java we're talking about. I think the original GC for the JVM was stop-the-world, but latest versions use the ParallelGC.
16:27:53
caltelt
Nowadays, the three main GC's I know of that people use are Parallel, Concurrent Mark Sweep, and (the new shiny) G1 gc
17:18:43
p_l
Shenandoah (latest) doesn't stop the world unless required (too slow compaction rate while concurrent, critical lack of free memory)
17:20:30
p_l
beach: stop-the-world and compacting also aren't exclusive, but orthogonal (and usually compacting *force* stop the world unless you deal with multi-processor lispm or system where forwarding pointers were made through Software (Shenandoah, Azul)
17:26:46
makomo
i need some advice regarding a DSL within lisp i'm going to build. (as i've probably mentioned before) it will be used to define and simulate hardware. now, i would want most of the language to be statically typed, so that everything is chcked *before* the simulation is run
17:27:58
makomo
since the DSL is embedded within lisp, what would be the best way to do stuff like type checking? do i really want to walk the lispy AST and go from that, or should i use macros and expand into stuff that will assert the correctness of these DSL programs?
17:28:13
caltelt
Also of note, those GC's are only for the standard openjdk/hotspot JVM's. Other implementations such as IBM have their own GC's (and heap layouts)
17:29:16
stylewarning
makomo: If your DSL is statically typed, then you should, in your DSL, either declare the types, or do type inference. In any case, a type analysis would be good for safety.
17:29:57
stylewarning
makomo: when you translate your DSL into Lisp, you can declare all of the types within Lisp. You can even be especially good about data allocation so no GC happens.
17:31:37
makomo
stylewarning: hm, what do you mean when i "translate it into Lisp"? to me it already is Lisp :-D. do you mean something like "after the DSL stuff expands into code that will build the model of the simulation (using Lisp's data structures)"?
17:31:52
makomo
i.e., let the DSL expand into code that builds the model, and then check that model?
17:32:27
stylewarning
No, reverse order. You analyze the model for type safety and the like, then expand it into fully-typed, type-safe
17:33:14
makomo
stylewarning: how do i get to the model though without "codewalking" the thing myself?
17:34:12
makomo
stylewarning: what i have in my mind is: DSL (Lisp macros) -> expand into Lisp code that builds the model using CLOS and other stuff
17:34:32
makomo
i.e. defining a component will be translated into something like (make-instance 'component ...)
17:35:07
makomo
yes, stuff like (defcomponent <name> <pins> <list of options like wires, subcomponents, processes>)
17:36:58
Bike
how do types factor in here? something like "don't connected an output pin to another output pin" doesn't seem like it requires walking or any runtime checks
17:37:06
stylewarning
What does it mean to have a sub-component though? How does it interact with other components?
17:37:41
makomo
stylewarning: "addr" and "data" specify that internal wires that are named ADDR and DATA are connected to the two pins of the memory, and that's how they communicate
17:38:12
makomo
Bike: and also like being able to assign from pin A to pin B only if they're of the same width
17:38:39
makomo
yes, it shouldn't require any checks while the simulation is running, only while it is being "compiled"
17:39:09
makomo
but how/where should i implement these checks? within these DSL macros? as an after-step after the model is built (by the DSL macros)?
17:40:40
Bike
mm, i would say verify it once you've wired up all the intermediate structures you get from the macros
17:41:04
Bike
so that e.g. if you define two components you can redefine one without worrying about the other until you're actually ready to go, kind of thing
17:41:42
makomo
Bike: mhm, that seems to make more sense for me, since it's more modular that way. the checking of the model is done after it has been constructed
17:41:59
p_l
beach: your complaint reminds me of how annoyingly fragmented and "hidden" of sorts information about GC is :(
17:42:00
stylewarning
Also be sure to understand the difference between a component specification (which you can inspect in terms of wire widths, inputs, outputs, etc.) and actual components (which may or may not be CLOS instances at the end; they may be funky efficient compiled code, etc)
17:43:10
stylewarning
If you defclass a component, I actually suggest you defclass a component-specification. Then you use these specifications to build a model, then you compile that model.
17:43:30
beach
p_l: Yes, I see. The published techniques are pretty informative, but what a particular system does may not be very transparent.
17:44:17
makomo
stylewarning: for me, "model" are the component/process specifications. the "non-spec" classes are just particular instances of this specification/model that will be actually run
17:45:27
makomo
stylewarning: by "defclass a component" do you mean "define a component", i.e. define it using this DSL?
17:45:38
stylewarning
makomo: A class shouldn’t be the substrate in which you store specifications, and instances shouldn’t be implementations of those specifications, in my opinion
17:46:33
makomo
oh, that's what you mean -- like, i shouldn't represent a component's specification using a CLOS class, but rather a CLOS object (which is an instance of the SOMETHING-SPEC class)?
17:47:13
makomo
yup, that's what i currently have. i did think about representing the components' specs as actual CLOS classes though, but that would require MOP trickery and stuff
17:47:34
stylewarning
Whatever “machine” you’re building will require a graph or tree of these component spec instances, which you can walk and check regarding pins and whatever.
17:47:45
makomo
and i'm still not clear on the benefits i would get (except "neat" stuff like instances of these classes corresponding to instances of the specifications, the wires being just plain slots, etc.)
17:48:02
makomo
stylewarning: mhm, definitely. why would you avoid using CLOS classes like this though?
17:48:20
stylewarning
I think MOP should be used when one wants to introspect and reflect on CLOS itself.
17:49:17
makomo
stylewarning: hmm idk. i don't have that much experience with MOP, but this seemed like one of those "wow it fits really nicely as an idea here" kind of things
17:49:25
stylewarning
Using MOP here is, IMO, gratuitous shoehorning of a problem into a somewhat unnatural and overly expressive framework
17:49:32
makomo
i.e. the fact that a "class" from this object language corresponds to a class within my host language is pretty cool
17:51:01
skidd0
is there an easy way to get a member of a list (of structs) by a slot value (an id i've set)?
17:51:45
pjb
(find slot-value list-of-structs :key (function slot-accessor) :test (function some-other-equal-function))
17:52:01
skidd0
i could loop through all the elements in the list and stop when I find it, but i'm figuring there's a built-in or simpler answer