jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
megalography has quit [Ping timeout: 256 seconds]
brettgilio has quit [Remote host closed the connection]
attila_lendvai has quit [Quit: Leaving.]
fikka has joined #lisp
mflem has quit [Read error: Connection reset by peer]
mflem has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
mindCrime_ has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
megalography has joined #lisp
cozachk has quit [Quit: Leaving]
earl-ducaine has joined #lisp
patlv has joined #lisp
Oddity has joined #lisp
loli has quit [Quit: WeeChat 2.1]
loli has joined #lisp
patlv has quit [Ping timeout: 255 seconds]
Kundry_Wag has joined #lisp
mindCrime_ has quit [Ping timeout: 264 seconds]
lavaflow has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
eli_oat has joined #lisp
tessier has quit [Ping timeout: 256 seconds]
eli_oat has quit [Client Quit]
brettgilio has joined #lisp
eli_oat has joined #lisp
patlv has joined #lisp
kerframil has joined #lisp
doesthiswork1 has joined #lisp
doesthiswork has quit [Read error: Connection reset by peer]
charh has joined #lisp
fikka has joined #lisp
brettgilio has quit [Quit: Leaving]
brettgilio has joined #lisp
brettgilio has quit [Client Quit]
brettgilio has joined #lisp
brettgilio has quit [Client Quit]
brettgilio has joined #lisp
patlv has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 240 seconds]
kmurphy4 has joined #lisp
keggsmurph21 has joined #lisp
keggsmurph21 has quit [Remote host closed the connection]
kmurphy4 has quit [Remote host closed the connection]
kmurphy4 has joined #lisp
kmurphy4 has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
bjorkintosh has quit [Quit: Leaving]
jibanes has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
jibanes has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
sjl has joined #lisp
Guest1958 has joined #lisp
Guest1958 is now known as PuercoPop
rumbler31 has joined #lisp
mathZ has joined #lisp
optikalmouse has joined #lisp
k4rtik has joined #lisp
Kundry_Wag has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
brettgilio has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
raynold has joined #lisp
patlv has joined #lisp
light2yellow has quit [Quit: light2yellow]
mathZ has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
buffergn0me has joined #lisp
robotoad has quit [Ping timeout: 256 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
<beach> mfiano: Yes, I intend to implement the GC in Common Lisp. Not in portable Common Lisp obviously. Some primitives for accessing memory are needed.
<beach> Bike: I think Cliki has a place where issues with the Common Lisp HyperSpec are listed. It would be good to add this issue to that list.
<Bike> it's already on there
<beach> Oh, OK. Good.
parjanya has joined #lisp
parjanya has quit [Remote host closed the connection]
parjanya has joined #lisp
nowhere_man has joined #lisp
Kundry_W_ has joined #lisp
robotoad has joined #lisp
SaganMan has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
fikka has joined #lisp
AetherWind has joined #lisp
AetherWind has quit [Remote host closed the connection]
Kundry_W_ has quit [Ping timeout: 265 seconds]
AetherWind has joined #lisp
AetherWind has quit [Client Quit]
parjanya has quit [Read error: Connection reset by peer]
AetherWind has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
parjanya has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
mooshmoosh has joined #lisp
deng_cn has joined #lisp
megalography has quit [Ping timeout: 240 seconds]
parjanya has quit [Read error: Connection reset by peer]
rumbler31 has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
SaganMan has joined #lisp
klltkr_ has joined #lisp
klltkr has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has joined #lisp
patlv has quit [Ping timeout: 256 seconds]
kruhft has joined #lisp
parjanya has joined #lisp
eli_oat has quit [Quit: Leaving.]
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
mindCrime_ has joined #lisp
robotoad has quit [Client Quit]
robotoad has joined #lisp
robotoad has quit [Client Quit]
robotoad has joined #lisp
robotoad has quit [Client Quit]
megalography has joined #lisp
robotoad has joined #lisp
robotoad has quit [Client Quit]
robotoad has joined #lisp
robotoad has quit [Client Quit]
robotoad has joined #lisp
robotoad has quit [Client Quit]
pierpa has quit [Quit: Page closed]
eli_oat has joined #lisp
robotoad has joined #lisp
robotoad has quit [Client Quit]
parjanya has quit [Read error: Connection reset by peer]
robotoad has joined #lisp
Bike has quit [Quit: Lost terminal]
Kundry_Wag has quit [Remote host closed the connection]
vap1 has quit [Ping timeout: 240 seconds]
vtomole has joined #lisp
fikka has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
kristof has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
kristof_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 255 seconds]
<beach> Suppose I want to implement a memory allocator using the technique of Doug Lea. That technique uses a sequence of "bins" sorted by chunk size. In general, having a large number (like 512 or more) of bins is advantageous for performance.
skapata has quit [Remote host closed the connection]
<beach> However, there is a case that might need particular attention, namely searching for the first (i.e. best fit) bin that has at least one chunk that is greater or equal to a particular size that is being allocated. Finding the first potential bin can be done with binary search, and that would be cheap no matter how many bins there are.
<beach> But that first potential bin might have no chunks in it. So one would have to find the first non-empty bin starting with the first potential bin. It would seem that a sequential search is called for here.
<beach> But suppose I maintain a global bitmap of non-empty bins, and a bitmap for each bin with all zeros below the position for this bin and all ones for positions greater than or equal to this position. I can then AND the global bitmap and the bitmap for this bin and search for the first bit position that is set in the resulting bitmap.
rumbler31 has joined #lisp
<beach> Even better: Given a number N between 0 and 64, how can I generate 64-bit bitmap with the N least significant bits set and the others cleared?
<beach> Then I don't need to store any bitmaps other than the global one.
<beach> I guess can take a bitmap with all bits set, and shift it right by 64-N positions.
<beach> Easy.
rumbler31 has quit [Ping timeout: 248 seconds]
<kruhft> I'm working on trying to design a basic switch using propagator techniques.
<kruhft> I think I'll have to pull out SICP, I don't think i can do it from memory.
eli_oat has quit [Quit: Leaving.]
<mfiano> pillton: How can I specialize a single parameter as multiple types using OR?
<beach> kruhft: What is a "switch using propagator techniques"?
Patternmaster has joined #lisp
<kruhft> a switch, like a transistor
<beach> Ah, OK.
<kruhft> and propagator techniques like message passing like Sussman does in SICP for his logic system
<beach> I see.
<kruhft> i'm trying to design a processor
<kruhft> well architect one
<kruhft> and i'm building the lowest level system part, the switch
Pixel_Outlaw has quit [Quit: Leaving]
<kruhft> that i want to design at
<kruhft> and then hopefully some sort of switch to silicon compiler comes around to fill in the details
<kruhft> i'm not really a hardware person
al-damiri has quit [Quit: Connection closed for inactivity]
<kruhft> but i want to design this processor
<kruhft> i was pretty good at computer architecture back in the day
<kruhft> beach: you're writing clasp right?
<jasom> beach: is it necessary to use bins with a compacting GC?
<beach> kruhft: No, I am not writing Clasp. drmeister is.
<beach> jasom: No.
<kruhft> oh yeah
<kruhft> haven't been in here for a while, forgot who is doing what
<jasom> kruhft: beach is writing SICL and Cleavir, the latter of which is used by clasp.
<kruhft> SICL is the userspace Common Lisp implementation library for clasp?
optikalmouse has quit [Quit: optikalmouse]
<beach> minion: Please tell kruhft about SICL.
<minion> kruhft: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
<beach> minion: Please tell kruhft about Cleavir.
<minion> kruhft: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<kruhft> cool, i remember those projects
<jasom> I also saw on the clisp mailing lisp that someone got cleavir working with clisp, targeting clisp bytecode.
<beach> kruhft: Clasp is using Cleavir, but also a few techniques that I designed specifically for SICL, namely fast generic dispatch and some more.
zooey has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
<beach> jasom: Yes, karlosz is writing a Cleavir-based compiler for CLISP.
<jasom> does the fast generic dispatch require first class global environments?
<beach> No.
<jasom> beach: have a paper handy on how it works?
<beach> I do. Hold on...
brettgilio has joined #lisp
<jasom> thanks!
<vtomole> kruhft: Are you trying to write a CPU simulator in Lisp?
<beach> jasom: Nothing magic. Just taking advantage of how processors have evolved.
<kruhft> vtomole: yes, that is the plan
<kruhft> vtomole: for an architecture i want to try out
<vtomole> Funny. I'm currently doing the same thing. What's your plan?
<kruhft> vtomole: this is an implementation of the cpu i want to architect: https://github.com/burtonsamograd/explain
<kruhft> or at least a game to learn how to program it
<vtomole> I'm starting from ground up. I've just defined my and/or/not gates :)
<vtomole> It's going to take a while..
<vtomole> While on this subject. Does anyone know what the "simplest" CPU is?
graphene has quit [Remote host closed the connection]
zooey has joined #lisp
<kruhft> i don't think there could be a 'simplest' cpu, but a SISC (single instruction set computer) would probably qualify
<kruhft> something like Decriment and Branch if Zero would be a pretty simple computer implementation
graphene has joined #lisp
<kruhft> vtomole: if you're interested in working at the gate level in C++, you might find this library of mine interesting: https://github.com/burtonsamograd/anser
<kruhft> it does gate level network creation at the equation level
<kruhft> i haven't found much of a use for it yet personally
<vtomole> Wow. One-insturction set is Turing complete. You learn new things every day :)
<kruhft> but i thought it was intersting enough to write down a while back
<beach> jasom: I deliberately did not design a compacting GC for the global heap in SICL.
<jasom> beach: is that to make FFI interop simpler, or just to explore a less used corner of the GC search space?
<beach> jasom: It turns out that it makes FFI simpler, but that's not the main reason. It especially makes it easier to use a concurrent and parallel collector. Application threads don't have to be informed about objects that moved.
<vtomole> kruhft: Could a one instruction set also just be "(nand bit0 bit1)" ?
<jasom> beach: yeah, I've been experimenting with an incremental collector (that might be possible to turn into a concrrent collector) that is just a simple semi-space that protects the FROM space with the MMU, but even then you end up complicating things like EQL.
<jasom> also it's a terrible hit to throughput because segfaults are expensive.
<beach> jasom: I completely understand.
Beep-Lord has quit [Ping timeout: 245 seconds]
<kruhft> vtomole: i'm note sure exactly. there was a lot of research into it back when it was found out...like in the 50's or something
<kruhft> the wikipedia page has a list of them, i just remember that one specifically
sito has joined #lisp
brettgilio has quit [Quit: Leaving]
<beach> jasom: When I made that decision, it was based on my being convinced about the results by Wilson: http://www.cs.northwestern.edu/~pdinda/ics-s05/doc/dsa.pdf page 14.
brettgilio has joined #lisp
<jasom> beach: to randomly switch back topics to the GF dispatch, what is the rack used for (other than the stamp, which is clear)?
<beach> All the data.
<beach> The header is just a class pointer and a rack pointer.
<jasom> oh
<jasom> After experimenting with my GC, it occurs to me that (other than fragmentation avoidance) the main advantage of a compacting collector is improving throughput, since allocation is a single pointer addition, and for copying collectors, nursery collections are often very fast. For concurrent collectors I think the costs to throughput of managing moving pointers may be greater than the savings in allocation
<jasom> overhead.
<beach> Let me contemplate that for a minute...
<beach> You may be right.
<jasom> SBCL's allocator is significantly higher throughput than most malloc/free implementations on real-world workloads. The latency is what gets you though
<beach> I see.
<beach> I am using a sliding collector for the per-thread nursery with no back pointers to manage.
<beach> Only the global collector keeps objects in a fixed place.
<beach> By "latency", do you mean the time it takes to run the collector?
<jasom> do objects get promoted to the global space when they age-out of the nursery?
<beach> Yes.
<beach> And also when a pointer might be created form the global heap to the nursery.
<jasom> beach: yes, basically the maximum time that the mutator is blocked by memory allocation.
<beach> I see.
sakalli_ has joined #lisp
Kundry_W_ has joined #lisp
<beach> In my scheme, the application threads are only paused for a nursery collection. Allocation is usually done in the per-thread heap, which is just bumping a pointer.
<beach> Of course, I am only at the specification level. None of this stuff has been tested.
<jasom> sounds interesting
brettgilio has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 256 seconds]
brettgilio has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
sakalli_ has quit [Client Quit]
k4rtik has quit [Ping timeout: 248 seconds]
<beach> Also, by using a sliding collector for the nursery, I have a very precise idea of the relative age of objects.
<beach> A traditional copying collector, i.e., one that promotes objects based on whether they survive the GC, runs the risk of promoting objects that have just been allocated and that will die soon. The sliding collector minimizes that risk.
brettgilio has quit [Remote host closed the connection]
<Zhivago> You can simplify the process by having short lived processes where nothing survives the first generation. :)
brettgilio has joined #lisp
<jasom> if you make a pointer from the global heap to the head of a largish list in the nursery, will that require the entire list to be copied at once?
Kundry_W_ has quit [Ping timeout: 240 seconds]
<beach> Yes.
brettgilio has quit [Remote host closed the connection]
<beach> But the nursery is small, so that won't take more time than a GC would.
<beach> My estimate is a few ms.
fikka has joined #lisp
<beach> I wanted it to be good enough for application that process sound.
<jasom> Zhivago: you joke, but I've seen C compilers that never free memory because they will exit after compiling a single file.
<Zhivago> I'm not joking.
<Zhivago> And I think that's a reasonable strategy.
<jasom> It's a reasonable strategy up to the point where more complex optimizations are added that require significant temporary space, and then half the compiler needs to be rewritten :(
<Zhivago> If your computations are algorithmic, then space is bounded by the size of the current inputs, which means that given sufficient resources collection can always be avoided.
nowhere_man has joined #lisp
<Zhivago> Then you break it up into multiple processes, and collection is replaced by output emission.
<jasom> or a customer generated a function with 100k lines of code and OOMs
<fe[nl]ix> jasom: one of the main reasons for Unix processes was garbage collection
<Zhivago> The main difficulty with GC is when there's no notion of consumer or justification for data to exist, which means that everything that might be used by anything needs to be maintained.
fikka has quit [Ping timeout: 268 seconds]
<beach> fe[nl]ix: Can you elaborate on that?
<Zhivago> Once you say, "we are producing output for A, B, and C, from X" then it becomes much simpler.
igemnace has joined #lisp
<jasom> Well this is where you see languages that disallow arbitrary graphs of pointers in order to allow all deallocations to be statically computed.
<fe[nl]ix> beach: the original Unix machines were memory constrained and using lots of tiny processes reduces heap fragmentation across the whole machine because exit() is a garbage collection
<beach> fe[nl]ix: I see. I don't think I have ever seen that as an explicit reason for processes.
<beach> fe[nl]ix: If I can find the source of that information, I'll cite it in my LispOS paper. :)
<fe[nl]ix> I believe that originally there weren't even daemons, and a typical machine would have the init process and one shell per user
isospin has joined #lisp
<beach> That's what Multics does, so it seems likely that they tried to copy that idea.
<fe[nl]ix> I'm not a good scholar, I don't keep track of references :)
<beach> No problem. If you recall, then please let me know.
<fe[nl]ix> and the concept of a unix process as a separate and isolated address space came before Unix
<beach> Absolutely.
<fe[nl]ix> and they were called "virtual machines" before Unix
<fe[nl]ix> which I find so funny
rumbler31 has joined #lisp
<beach> The name makes sense.
<beach> It creates the illusion of having the entire machine at the disposal.
<fe[nl]ix> exactly, coming from batch systems with no virtual memory
isospin has quit [Client Quit]
rumbler31 has quit [Ping timeout: 265 seconds]
pierpal has quit [Read error: Connection reset by peer]
isospin has joined #lisp
isospin has left #lisp [#lisp]
isospin has joined #lisp
isospin has quit [Client Quit]
isospin has joined #lisp
sauvin has joined #lisp
Kundry_Wag has joined #lisp
isospin has quit [Client Quit]
vtomole has quit [Ping timeout: 252 seconds]
mooshmoosh has quit [Quit: Quit]
<beach> jasom: I am working on a fairly detailed specification of the planned SICL garbage collector(s). Would you be interested in reading it once I am done?
eschatologist has joined #lisp
<jasom> beach: yes, I've enjoyed pretty much all of the SICL papers I've read so far
<beach> Excellent. It is not imminent. There are a lot of details to work out. But I'll keep you in mind. Thanks.
shifty has joined #lisp
fikka has joined #lisp
gousuto has quit [Quit: Leaving]
milanj has quit [Quit: This computer has gone to sleep]
vlatkoB has joined #lisp
copec has quit [Ping timeout: 244 seconds]
<drmeister> Is it a reasonable optimization to bind the function slot of symbols that are not fboundp to a function that prints that the function slot is unbound?
<drmeister> I seem to recall that being something that is done.
Inline has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 268 seconds]
copec has joined #lisp
<beach> I do that in SICL.
<beach> It doesn't print it. It signals an error.
* beach vanishes for a while.
fikka has joined #lisp
tessier has joined #lisp
tessier has quit [Changing host]
tessier has joined #lisp
shka_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<drmeister> Right - it should signal an error - how do you pass the name of the function to the error? Do you bind a closure that is closed over the name of the symbol?
fikka has joined #lisp
parjanya has joined #lisp
erratic has quit [Ping timeout: 240 seconds]
parjanya has quit [Client Quit]
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
ebrasca has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
ebrasca has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
milanj has joined #lisp
fikka has joined #lisp
jgkamat has joined #lisp
flamebeard has joined #lisp
Kundry_Wag has joined #lisp
<jgkamat> hi, I currently have a server app I'm developing in CL, I can reload updates to it just fine when I'm using slime, but how would I go about doing it on the server (to have zero downtime)
<jackdaniel> jgkamat: you can tunnel swank port so you can connect remotely
<jackdaniel> I'd be careful with that for security reasons (that's why I mention tunneling)
<jgkamat> I'd rather not do that, I was hoping for some lisp that I could run (I could make a server command that runs it) to reload all the files. Maybe I could (ql:quickload :my-project) again? Would that do what I want? :P
fikka has quit [Ping timeout: 260 seconds]
<jackdaniel> so you make swank to listen for connection from localhost and tunnel your connection so it is done from localhost indeed
<jgkamat> Disclaimer: I'm really bad at asdf and quicklisp in general
<jackdaniel> well, that's what swank gives you: remote repl
<jackdaniel> but sure, you may create an endpoint which called reloads everything
<jackdaniel> but I'd take care of security for that too
<jgkamat> ah that makes sense, I'll look into it. I was planning on SSHing in, attaching to the tmux of the running session and reloading like that
chrnok has joined #lisp
<jgkamat> (I have a cli as part of my server)
<jackdaniel> ah
pierpal has joined #lisp
deng_cn1 has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
deng_cn has quit [Ping timeout: 256 seconds]
deng_cn1 is now known as deng_cn
Kundry_W_ has joined #lisp
pseudonymous has quit [Ping timeout: 256 seconds]
buffergn0me has quit [Ping timeout: 240 seconds]
robotoad has quit [Quit: robotoad]
isospin has joined #lisp
fikka has joined #lisp
Kundry_W_ has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
<pillton> mfiano: Did you solve your problem?
Kundry_Wag has quit [Ping timeout: 255 seconds]
terpri has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
<pillton> mfiano: Here is an example https://hastebin.com/yelodizebu.lisp .
<jgkamat> another unrelated question, I have an error caught in a handler-case, how do I print the stacktrace of the error. I can print the type of error with format.
<pillton> (apropos "backtrace") on SBCL shows a number of functions. e.g. (sb-debug:print-backtrace).
rumbler31 has joined #lisp
<aeth> apropos? wow
<pillton> What?
<aeth> I've always just found things with SLIME tab completion, which breaks down at the hyphens
robotoad has joined #lisp
<pillton> Oh. I thought you were making fun of my answer.
<pillton> I only wish apropos would print the fully qualified symbol name.
<pillton> (quicklisp:system-apropos "backtrace") shows that there is a trivial-backtrace system as well. I have never used it though.
<jdz> SLIME also has slime-apropos function.
doesthiswork1 has quit [Quit: Leaving.]
rumbler31 has quit [Ping timeout: 260 seconds]
<jackdaniel> jgkamat: trivial-backtrace is decent, but you don't want handler-case – you already lost backtrace by this time
scymtym has quit [Ping timeout: 240 seconds]
<jackdaniel> use handler-bind before stack is unwound (I remember there were some discussion about technical details why claiming that is incorrect, I don't remember the details though) - from practical perspective if you print backtrace from handler-bind you'll get backtrace of where error occured
<jgkamat> hmm, my use case is essentially sending errors within a function somewhere else (in addition to the top level). Ie: logging errors to a file. Is there a better way to do that jackdaniel?
<jackdaniel> when you print backtrace from handler-case you'll see backtrace of stack where handler-case is put
<jgkamat> ah, I'll try handler-bind, thanks for the pointer
orivej has joined #lisp
<jackdaniel> jgkamat: for printing errors you may use log4cl and configure it properly
<jackdaniel> it has log:error ; log:info etc, it may be configured to use syslog, a file, console and other appenders simultanouesly
<jackdaniel> I'm sure I've mispelled the last word, checking in the dictionary :-)
<jgkamat> oh wow this look really nice, I'm assuming it catches lisp errors too?
<jackdaniel> log4cl does not catch anything
<jackdaniel> you may use it to print things
<jgkamat> er, logs them, I mean
Smokitch has joined #lisp
<jackdaniel> yes, you may log anything, errors, warnings, info, debug, trace and configure level of verbosity
<jackdaniel> by default debug messages won't be appended
<jgkamat> perfect, thanks, I think this is exactly what I needed :)
<jackdaniel> simultaneously*
<jackdaniel> ↑ this word is weird
<jackdaniel> (spelling-wise)
pierpal has quit [Ping timeout: 256 seconds]
<shrdlu68> English is just weird, I happen to speak a language that's written phonetically.
<jackdaniel> jgkamat: one more thing – keep in mind that handler-bind won't handle the error by default – if it returns normally you'll still have an error
<jackdaniel> one way around that is using (block nil (handler-bind … (return nil) …)) or writing custom handler-case* macro which expands into that
<jgkamat> yah, that makes sense, that's actually what I want, so I might choose handler-bind if I'm too lazy for log4cl :P
<jackdaniel> I usually call log4cl's error logging from the said handler-case* appropriate handler body
<jackdaniel> (because logging and error handling are two orthogonal things if you think about it)
varjag has joined #lisp
<shrdlu68> Slightly off-topic question: does Clojure owe its popularity to integration with the Java ecosystem? Why hasn't ABCL seen the same level of success?
<aeth> There's a mismatch between the JVM and CL.
pierpal has joined #lisp
<shrdlu68> Meaning that ABCL couldn't fill Clojure's niche?
<jackdaniel> shrdlu68: my personal opinion is that Clojure hooked into many trendy topics: functional programming, JVM ecosystem etc. so it felt fresh
<jackdaniel> ABCL on the other hand is traditional CL which doesn't have recpies how you should program (you have dozen of tools for that) – also CL has some historical heritage what may be not appealing to everyone
<jackdaniel> so (once again – IMO!) Clojure is more popular because it had more appeal – "modern" language for "alternative" programmers
<jackdaniel> of course after initial traction many other aspects came into play - i.e more contributors
<shrdlu68> Does someone have a link to a certain work that someone created in CL, something to do with an implementation of a purely functional "framework" in CL?
shka_ has quit [Ping timeout: 240 seconds]
<jackdaniel> shrdlu68: fset is one of such libraries
pierpal has quit [Ping timeout: 256 seconds]
<jackdaniel> for good distributed/parallel programming you can look at lfarm and lparallel
<jackdaniel> for laziness you may look at clazy
graphene has quit [Remote host closed the connection]
<beach> drmeister: Yes, it contains a closure that closes over the name.
<jackdaniel> (I mention lparallel/lfarm/clazy because these are libraries tackling other "trendy" topics)
pierpal has joined #lisp
graphene has joined #lisp
surya has joined #lisp
housel has quit [Read error: Connection reset by peer]
pierpal has quit [Ping timeout: 240 seconds]
<shrdlu68> jackdaniel: Thanks for your insight, and these links.
EvW has joined #lisp
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
<jackdaniel> sure, hopefully you'll find them useful :-)
BitPuffin has joined #lisp
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xificurC has joined #lisp
xificurC has quit [Client Quit]
xificurC has joined #lisp
pierpal has joined #lisp
mange has quit [Remote host closed the connection]
lnostdal has joined #lisp
pierpal has quit [Ping timeout: 256 seconds]
schweers has joined #lisp
pierpal has joined #lisp
scymtym has joined #lisp
megalography has quit [Quit: Leaving.]
hhdave has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
pierpal has joined #lisp
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hhdave has quit [Ping timeout: 260 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
Khisanth has quit [Ping timeout: 265 seconds]
nyaray has joined #lisp
graphene has quit [Remote host closed the connection]
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
graphene has joined #lisp
shrdlu68 has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
hph^ has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<beach> drmeister: I don't do it for every symbol since symbols don't have a function cell. I do it in the first-class global environment when code is loaded (what I call "tied") into that environment that refers might call the function with that name.
shrdlu68 has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
m00natic has joined #lisp
EvW has quit [Ping timeout: 245 seconds]
shrdlu68 has joined #lisp
fikka has joined #lisp
pierpal has quit [Ping timeout: 268 seconds]
dddddd has joined #lisp
Khisanth has joined #lisp
kerframil has quit [Quit: Leaving]
lnostdal has quit [Ping timeout: 276 seconds]
random-nick has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
scymtym_ has joined #lisp
Kundry_Wag has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
graphene has quit [Read error: Connection reset by peer]
mflem has quit [Read error: Connection reset by peer]
graphene has joined #lisp
Kundry_Wag has joined #lisp
terpri has joined #lisp
lumm has joined #lisp
shrdlu68 has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
isospin has quit [Ping timeout: 245 seconds]
xantoz has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
rann has quit []
rann has joined #lisp
xantoz has joined #lisp
<drmeister> beach: Thank you
shrdlu68 has quit [Ping timeout: 248 seconds]
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
kpenc has quit [Ping timeout: 240 seconds]
rawste has joined #lisp
fikka has joined #lisp
<beach> drmeister: Can't sleep?
<drmeister> No - I just realized what time it is - I better get to sleep
lumm has quit [Read error: Connection reset by peer]
wigust has joined #lisp
lumm has joined #lisp
wigust- has quit [Ping timeout: 240 seconds]
<ebzzry> Is there a portable library for java interfacing?
lnostdal has joined #lisp
<jackdaniel> ebzzry: there is https://common-lisp.net/project/cl-plus-j/ using JNI (via CFFI); note that I've never used it, so I have no idea about its pros/cons and whenever it works at all
rippa has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
<ebzzry> jackdaniel: I’ve been trying to get it to work on SBCL, however, it segfaults.
<ebzzry> jackdaniel: I’ll try with other implementations.
pierpal has joined #lisp
_cosmonaut_ has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
xrash has quit [Ping timeout: 248 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
_cosmonaut_ has quit [Ping timeout: 268 seconds]
mishoo has joined #lisp
pierpal has quit [Ping timeout: 248 seconds]
lumm has quit [Quit: lumm]
pierpal has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
lumm has joined #lisp
AetherWind has quit [Quit: Leaving]
devon has joined #lisp
rumbler31 has joined #lisp
lnostdal has quit [Quit: https://www.Quanto.ga/]
_cosmonaut_ has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
isospin has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
vlatkoB_ has joined #lisp
devon has quit [Ping timeout: 264 seconds]
vlatkoB has quit [Ping timeout: 256 seconds]
capisce has quit [Read error: Connection reset by peer]
capisce has joined #lisp
mishoo has quit [Quit: (save-lisp-and-die)]
terrorjack has quit []
terrorjack has joined #lisp
charh has quit [Remote host closed the connection]
exit70 has quit []
exit70 has joined #lisp
devon has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
<dim> ebzzry: what about ABCL?
_cosmonaut_ has quit [Ping timeout: 264 seconds]
_cosmonaut_ has joined #lisp
<ebzzry> In principle, I can use tat.
<ebzzry> *that
<ebzzry> However, the other devs are already using SBCL.
fikka has joined #lisp
<antoszka> Guys, do you know if cl-syslog can log to a syslog daemon over tcp/udp on a nonstandard port? I have a separate logging daemon that I'm trying to test and it does not expose a standard unix socket for logging.
orivej has quit [Ping timeout: 264 seconds]
starman_jr has quit []
starman_jr has joined #lisp
<shka> alexandria has a couple of function with &key start end where start and end are bounds of sequence, end if is not present will be replaced with total length of sequence, lambda list usually looks like this &key (start 0) end
<shka> my question
<shka> why not &key (start 0) (end (length sequence))
<shka> other then perhaps cryptic error message in case of passing something other then sequence
fikka has quit [Ping timeout: 245 seconds]
<jackdaniel> (length sequence) in case of a list may lead to unnecessary traversal before calling the function
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jackdaniel> antoszka: did you try it? cl-syslog has udp subsystem
<devon> (syslog.udp::udp-logger "localhost") => #<USOCKET:DATAGRAM-USOCKET #x302004A0142D>
<jackdaniel> shka: so assuming that NIL means "until end" avoid unnecessary computation
<LdBeth> Is there any possibility to write context aware macros?
<jackdaniel> context awareness is a vague term
Arcaelyx has joined #lisp
<jackdaniel> (defmacro foo (&body body) `(progn (if *context!* (progn ,@body) (error "no context!"))))
oni-on-ion has quit [Ping timeout: 248 seconds]
<antoszka> jackdaniel, devon, thanks, I missed that.
<LdBeth> like in (funcall FOO) FOO has aware it is called by symbol “funcall”
<jackdaniel> LdBeth: I don't understand you
kpenc has joined #lisp
makomo has quit [Ping timeout: 240 seconds]
<devon> LdBeth: (apropos "backtrace") might show you some debugging capabilities of your implementation
<jackdaniel> ah, that. LdBeth you may pair your macros with invoke-with-foo functions
<jackdaniel> then you expand body to a lambda passed to invoke-with-foo
<jackdaniel> then invoke-with-foo will appear in the backtrace
<jackdaniel> (defun invoke-with-foo (cont) (funcall cont)) (defmacro foo (&body body) `(invoke-with-foo (lambda () ,@body)))
<LdBeth> Okay. I got the idea
<shka> so arguments are evaluated even if proper value was supplied?
<jackdaniel> try it and see!
<jackdaniel> (defun xxx (&key (a (progn (print "Hi!") 3))) a)
isospin has quit [Remote host closed the connection]
<shka> jackdaniel: it does not evaluate if i supply :a
<jackdaniel> good you have tried it!
<shka> oddly enough, alexandria in shuffle will (end (or end (proper-list-length sequence))) anyway
<shka> so it will traverse whole sequence anyway
<shka> well, it may be just alexandria gimmick
<_death> shka: OR is short-circuiting
<shka> _death: but &key already does that
<_death> does what?
<shka> if &key (end (length seq)) and i will supply end it won't call length
<_death> right.. what if you supplie :end nil
<_death> *supplied
<shka> that's just error on my part
<shka> i can supply nil as :start and it will have the exact same effect
<_death> SHUFFLE makes it a non-error.. so you can use a simplistic :end end in the caller function instead of building up an arglist
Kundry_Wag has joined #lisp
<shka> uh, i guess
<shka> still, i don't like it
<_death> long default value forms just clutter the arglist
pioneer42 has left #lisp [#lisp]
pierpal has joined #lisp
<_death> and in SHUFFLE's case, you can see that it uses different forms to initialize END depending on the sequence type.. so it'll be even longer than (end (length sequence))
<_death> though you could of course extract that to its own function
NoNumber has joined #lisp
devon has quit [Ping timeout: 256 seconds]
<shka> well, i like to see default in the key portion of default so i guess i don't matter clutter
vxe has joined #lisp
<shka> *i do not care about the clutter
pierpal has quit [Client Quit]
<shka> i can't speak english today
<shka> how words even work
<_death> sure, I can appreciate that
pierpal has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
edgar-rft has quit [Quit: edgar-rft]
milanj has quit [Quit: This computer has gone to sleep]
<Xof> this is the moment for &aux to shine
<Xof> &key end &aux (end (or end (length sequence)))
shifty has quit [Ping timeout: 248 seconds]
markoong has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has quit [Ping timeout: 256 seconds]
<shka> Xof: isn't it effectivly the same as just &key ?
milanj has joined #lisp
<jackdaniel> no, &aux variables won't be part of function-lambda-list
<jackdaniel> &aux is effectively the same sa wrapping whole body in one big let
rumbler31 has joined #lisp
<beach> It's debatable though, whether the parameters in the lambda list are considered to be bound as with LET or as with LET*.
<beach> The required parameters are like LET which is fine.
<beach> But the initialization forms of the others are evaluated in an environment where all previous parameters are in scope.
<beach> So that looks more like LET* to me.
<jackdaniel> according to this: http://www.lispworks.com/documentation/HyperSpec/Body/03_dae.htm it is LET* indeed
rumbler31 has quit [Ping timeout: 248 seconds]
<beach> Yes, but that's not what I meant.
<beach> (defun f (x &key (x (f x))) ...)
<beach> But I can't find the place in the Common Lisp HyperSpec now where it says that the init-form of a parameter is in a scope including all previous parameters.
<beach> I could have made it up, of course.
Inline has joined #lisp
<beach> Ah.
<beach> clhs 3.4.1
surya has quit [Remote host closed the connection]
<beach> It seems to me that if (defun f (x &key (y (f x))) ...) is allowed, then (defun f (x &key (x (f x))) ...) ought to be allowed as well.
<beach> And certainly the END keyword parameter could refer to the SEQUENCE parameter.
<flip214> beach: you're using "x" twice, that's not allowed
<beach> Says who?
<flip214> but with different names you may reference earlier arguments
skapata has joined #lisp
<beach> So (defun f (sequence &key (start 0) (end (length sequence)) ...) is certainly allowed.
fikka has joined #lisp
<flip214> yes, that is allowed.
<flip214> but with two 'x eg SBCL says The variable X occurs more than once in the lambda list.
<beach> flip214: I am more interested in where in the Common Lisp HyperSpec it says it.
<beach> ... because I haven't found that place.
Kundry_Wag has joined #lisp
<beach> flip214: I mean, you could be right, of course.
<beach> flip214: All I am saying is that, since the init-forms can refer to previous parameters, it smells like a LET* to me.
<beach> And certainly, (let* ((x ...) (x (f x))) ...) is allowed.
<flip214> looking right now
Kundry_Wag has quit [Remote host closed the connection]
brendyn has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<jackdaniel> you may find this passage relevant: https://common-lisp.net/project/ecl/static/manual/ch05.html#ansi.let-behavior
<jackdaniel> it is not forbidden in the spec
<jackdaniel> I've looked for it at some point of time
<jackdaniel> (of course I could have missed it)
patlv has joined #lisp
<flip214> perhaps multiple colliding parameter names are so obviously wrong that it isn't written down
eli_oat has joined #lisp
orivej has joined #lisp
<beach> jackdaniel: That passage seems to say exactly what I said as well.
k4rtik has joined #lisp
<beach> flip214: It is obviously wrong for required parameters. Not so obvious for &optional or &key parameters.
<flip214> well, a &key parameter "shadowing" an optional or required seems wrong to me, too
<jackdaniel> beach: well, not necessarily wrong for required parameters *if* they are ignored
ramus has quit [Ping timeout: 240 seconds]
<jackdaniel> this change introduced some regression in a few codebases
<jackdaniel> which were passing functions to other functions which were expected to have a certain lambda list
<jackdaniel> and ignored parameters were named simply "_"
ramus has joined #lisp
<beach> flip214: And since it doesn't to me, I started this discussion with "It's debatable though".
<jackdaniel> but that was not a strong enough clue to withdraw from signalling an error on such occasion (it helps to catch more problematic code)
<beach> jackdaniel: Yes, I see.
<beach> flip214: Of course, if you find the passage in the Common Lisp HyperSpec supporting your position, it won't be debatable anymore.
fikka has joined #lisp
<flip214> beach: I just wouldn't understand when it would _ever_ be useful to have two input parameters with the same name - one would hide the other!
<flip214> I understand &aux and calculation in &key initargs
<flip214> but conflicting names I wouldn't see useful
light2yellow has joined #lisp
vap1 has joined #lisp
vaporatorius has joined #lisp
vaporatorius has joined #lisp
eli_oat has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
<splittist> flip214: it might make certain types of generated code easier. Or harder, of course (:
<shka> what is the fastest (computer time) way to load and save data from disk drive?
<shka> cl-store is good for loading but serialization speed is not that great
devon has joined #lisp
<ecraven> well, given that actually *writing* anything to disk is much slower than CPU, maybe compressing your data is faster? write less -> write faster
LiamH has joined #lisp
<beach> flip214: I don't have a use case for it either, but that could just mean that I am not smart enough to see it. You know, just like the people who don't see a use case for nested functions, multiple dispatch, or first-class packages.
<beach> splittist: Good point.
Bike has joined #lisp
SenasOzys has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
eli_oat has joined #lisp
Kundry_Wag has joined #lisp
vlad_ has joined #lisp
devon has quit [Ping timeout: 255 seconds]
ramus has quit [Ping timeout: 264 seconds]
Kundry_W_ has joined #lisp
doesthiswork has joined #lisp
ramus has joined #lisp
fikka has joined #lisp
dlowe has quit [Quit: ZNC - http://znc.sourceforge.net]
raynold has quit [Quit: Connection closed for inactivity]
Kundry_W_ has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 276 seconds]
omilu has joined #lisp
devon has joined #lisp
pierpal has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
EvW1 has joined #lisp
<shka> ecraven: that is actually good point
dlowe has joined #lisp
<shka> i may think about it
<ecraven> of course, it all depends on how much data you have, and how fast is fast enough
<shka> a lot
<shka> a lot of data
<shka> i shuold think again about making proper compressing/decompressing streams for zip
<shka> using chipz and salza
<shka> there is library called zip, but it does not implement grey streams
<shka> just it's own crap
<shka> :(
dlowe has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 268 seconds]
dlowe has joined #lisp
fikka has joined #lisp
patlv has quit [Ping timeout: 264 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
k4rtik has quit [Ping timeout: 256 seconds]
sjl has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
hhdave has joined #lisp
vlad_ is now known as DonVlad
k4rtik has joined #lisp
fikka has joined #lisp
robotoad has quit [Quit: robotoad]
fikka has quit [Ping timeout: 265 seconds]
lumm has joined #lisp
caltelt has joined #lisp
<hjudt> performance wise, does it make a difference if i loop over a hash-table with (loop for v being the hash-values of...) or (loop for v in (list-values hash-table)...)?
<dlowe> hjudt: yes, LIST-VALUES will allocate a list
rawste has quit [Ping timeout: 245 seconds]
<dlowe> it will be considerably slower and the allocation will cause more garbage collection (though how much is hard to say - probably not much)
<shka> hjudt: depends on hash-table implementation to be honest, but go with dlowe said
<dlowe> The loop syntax isn't great for hash tables. I think the ITERATE library is better in this regard.
pierpal has joined #lisp
<shka> and avoid calling list-values
<dlowe> You can also use MAPHASH if you don't feel like using LOOP
<hjudt> ok, i guessed so. i want to pass either a hash-table or a list as parameter to a function, so it is probably better to use typecase to distinguish between the two cases.
<shka> or defgeneric
<dlowe> yeah any time you want to use typecase is a good indicator that you actually might want a generic function.
<shka> *might*
<hjudt> it is the same code, and i don't expect to extend it to handle other cases.
<dlowe> Sure. You at least want to consider it.
fikka has joined #lisp
rumbler31 has joined #lisp
<hjudt> probably in this case it is better to simply use defun, i've already thought about methods.
<dlowe> If performance isn't critical, it is probably best to convert your hashtable to a list, just to avoid duplicating logic.
<hjudt> i've put the logic in a local function, so duplicating is only with the two cases of loops (hash-table vs list).
<hjudt> and it is used heavily, so this optimization is needed
<hjudt> thanks for your input
<hjudt> actually i could also adapt my list-values function so it returns a list which is only regenerated on changes to the hash-table, which does only occur at a few, predictable places. this might also be a nice improvement i will reconsider...
rumbler31 has quit [Ping timeout: 264 seconds]
lumm has quit [Read error: Connection reset by peer]
<beach> hjudt: That won't be easy. If you delete an item from the hash table, you may have to traverse the list which takes linear time.
k4rtik has quit [Ping timeout: 248 seconds]
lumm has joined #lisp
<dlowe> hjudt: how large is this hash table?
<hjudt> beach: that won't be necessary in my use case. actually the hash table is always cleared and rebuild from scratch, nothing will be deleted.
<hjudt> dlowe: at the moment, 27854 items. lookup is fast the way i use it, but sometimes i have to search the full ht and that shouldn't be too slow too, or it will take a few minutes instead of a few seconds.
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
lumm_ has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
<hjudt> an item can have several properties which need to match, so the ht is useless for this except for the lookup.
lumm_ is now known as lumm
<hjudt> only when i have enough info about an item to identify it exactly, i can do a lookup.
cage_ has joined #lisp
<trittweiler> hjudt: that sounds like a "trie" data structure might be more desirable instead. You would traverse the trie property by property
<hjudt> trittweiler: thanks, i will look into this, maybe it is easier to handle. for now, the current solution is fast enough and the number of items only increases slowly.
EvW1 has quit [Remote host closed the connection]
Kundry_Wag_ has joined #lisp
subr has joined #lisp
subroot has joined #lisp
caltelt has quit [Ping timeout: 256 seconds]
Smokitch has quit []
fikka has quit [Ping timeout: 245 seconds]
shrdlu68 has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 268 seconds]
chrnok has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
scymtym__ has joined #lisp
scymtym_ has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has quit [Ping timeout: 264 seconds]
charh has joined #lisp
Kundry_W_ has quit [Ping timeout: 240 seconds]
<beach> Can someone please read this http://g.oswego.edu/dl/html/malloc.html and help me out with a question? In section "Algorithms", right after the first figure, he writes: "More recent versions omit trailer fields on chunks that are in use by the program". I don't see how that could work. If a block is freed, how can we tell whether the previous block is free as well then?
<beach> You can safely skip the sections preceding "Algorithms".
FreeBirdLjj has joined #lisp
shrdlu68 has joined #lisp
fikka has joined #lisp
<DonVlad> how would you guys substring a string?
<beach> clhs subseq
<DonVlad> thanks
<beach> Anytime.
<DonVlad> this applies just to strings or other types as well, beach ?
<beach> DonVlad: Any sequence.
<beach> A string is a vector and a vector is a sequence.
<beach> Lists are sequences too.
<DonVlad> => lists are vectors ? :P
<beach> Nope.
<beach> "The types vector and the type list are disjoint subtypes of type sequence,"
flamebeard has quit []
fikka has quit [Ping timeout: 276 seconds]
housel has joined #lisp
wheelsucker has joined #lisp
<shka> beach: from what i understand, author says that instead of storing size two times, it can be saved in just one place, at the of the chunk
<beach> "beginning"?
<shka> ?
<beach> "at the of the chunk"
<shka> right
<beach> shka: OK, so you come in with a chunk that has just been freed, and you want to check whether the previous chunk is free too, so that you can coalesce the two.
<shka> end
<beach> But he says "omit trailer fields".
<shka> trailer = trailing?
<beach> So the last size field may be used by the program if the chunk is in use.
<beach> I suppose, yes.
<shka> then at the begining
<beach> So you come in with a chunk that has just been freed, and you want to check whether the previous chunk is free too, so that you can coalesce the two.
<shka> as for finding size of other chunk, well, they are maintained in bins by size
<beach> Normally, the way to do that is to check the size field of the previous chunk, subtract that value to find the beginning and then check whether the status is FREE.
<shka> so my undestanding is that you KNOW what is the size of the next chunk and therefore you can find size
rpg has joined #lisp
<beach> I am talking about the previous chunk.
<shka> oh, ok
<beach> So you come in with a chunk that has just been freed, and you want to check whether the PREVIOUS chunk is free too, so that you can coalesce the two.
shrdlu68 has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
<beach> Normally, the way to do that is to check the size field at the END of the PREVIOUS chunk, subtract that value to find the beginning and then check whether the status is FREE.
<beach> But if the PREVIOUS chunk is in use, then the size field may contain user data.
lumm has quit [Read error: Connection reset by peer]
<shka> aah, i see
lumm has joined #lisp
<shka> beach: i will check the source code
<beach> Oh, good plan.
<beach> I looked at it a long time ago, and it was littered with #ifdef.
<shka> ftp://g.oswego.edu/pub/misc/malloc.c
<shka> line 1677 i think
fikka has quit [Ping timeout: 264 seconds]
<shka> heh, i don't understand this at all :]
<shka> it simply releases until size goes to zero
<shka> ah right, this is after the coaleseing
jmercouris has joined #lisp
<beach> It makes me tired to look at.
<shka> i can undestand that
fikka has joined #lisp
<beach> Anyway, it is not terribly important. I'll just include the trailing size field always.
<shka> what is extern bit?
<beach> Where did you see that?
robotoad has joined #lisp
<shka> in source code, there is a function called is_extern and it checks bit
fikka has quit [Ping timeout: 268 seconds]
<shka> also
<beach> I see is_extern_segment. No is_extern.
<shka> ... i should go home
<jmercouris> hey everyone, I am having a weird issue with a file I am reading
<minion> jmercouris, memo from pjb: send email to pjb@sbde.fr
<minion> jmercouris, memo from pjb: We may need some programmer knowing Cuda (nVidia) and computer vision in a couple of months. I'd prefer a lisper with cl-cuda, rather than a pythonista; there's already enough of them :-) Do you have a linkedIn ?
<beach> shka: Good plan. I am tired, and I am going to call it a day.
<jmercouris> ok, will do
<shka> beach: anyway, are you certain that it even do coaleseing backwards?
<beach> No.
<beach> I don't see how it could.
<shka> it kinda looks like it only attempts to do it forward
<jmercouris> so, I'm looking at the file, and it looks like this: https://imgur.com/a/araXKef
<beach> shka: Entirely possible. I'll read it some other day.
<jmercouris> sometimes where there should be " or other characters, there is a strange symbol, but it is always the same
<flip214> beach: in case that's a reassurance, the SBCL developers don't see a usecase for duplicate function parameter names either ;)
<jmercouris> it is obviously some sort of encoding issue
<shka> beach: have a good evening and a nice tea then!
<jmercouris> but I am not sure whether it is on my side or otherwise
kozy has quit [Remote host closed the connection]
<beach> flip214: Not terribly reassuring, no. :)
<beach> shka: Take care.
<shka> jmercouris: that's in repl?
<shka> anyway, it does not actually look like encoding problem
<shka> but some garbage bytes
<shka> anyway, i am going gome now
<shka> good evening all!
<jmercouris> shka: no, that's in an emacs buffer
<jmercouris> shka: good evening
<jmercouris> the thing is, everytime something like: https://imgur.com/a/araXKef comes up, it is always where quotes should be, or brackets, or some symbol
<jmercouris> I think the mistake is on the end of the person providing the file, because regardless of how I open the file, with whatever program, it looks strange
lumm has quit [Quit: lumm]
fikka has joined #lisp
Kundry_Wag_ has joined #lisp
lumm has joined #lisp
<beach> jmercouris: Try using `od' on it.
<beach> jmercouris: od -c or something like that.
buffergn0me has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
milanj has quit [Quit: This computer has gone to sleep]
subr has quit [Read error: Connection reset by peer]
subroot has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
<jmercouris> beach: what should I look for in the output?
<beach> See whether there are any control characters or something like that. Near the place that looks funny.
<jmercouris> Oh, okay, I see
<jmercouris> maybe I can open up the file in hex mode in emacs
<jmercouris> that might make it easier to see
<jmercouris> the problem is the file is around 38gb, so it is quite hard to find the problematic spots
<jmercouris> as it crashes many programs that try to open the file
<jmercouris> -c helps a lot
<jmercouris> I think this is the closest I've felt to programming in the matrix as a developer
pseudonymous has joined #lisp
cage_ has quit [Remote host closed the connection]
cage_ has joined #lisp
oni-on-ion has joined #lisp
<beach> You can try to split the file in two and see whether one of the halves has the same problem. Then you can continue this process until you have a smaller file.
<jmercouris> the problem is throughout the file, unfortunately
<jmercouris> so I ended up running 'od -cX' so I could see hex and the characters at the same time
<beach> Excellent.
<beach> Then you can split it in two several times.
<jmercouris> it seems that the hex makes sense with the characters I am seeing
<jmercouris> I think Shka was right
<jmercouris> which leads me to believe that someone who encoded this file, did some translation somewhere somehow with some tool that messed everything up
<jmercouris> so I'll have to probably make some regex or some manipulation to clean up these strings
<jmercouris> thank you for your help, seems 'od' is quite a useful program
<beach> Glad I could help.
fmsbeekmans has joined #lisp
<fmsbeekmans> Hi I'm thinking about starting a little book club with my collegues for books that I have been interested for some time. Namely The little Schemer and SICP. Would the former be interesting experienced functional developers?
FreeBirdLjj has quit [Read error: Connection reset by peer]
<fmsbeekmans> Is it worth doing both in that order or would it be more fun to only do SICP?
<beach> fmsbeekmans: Well, you are in a Common Lisp only channel, so we would recommend Common Lisp books instead.
<fmsbeekmans> beach: Haha funny how CLers always claim CL as -the- lisp.
<beach> Nobody did that.
eli_oat has quit [Quit: Leaving.]
optikalmouse has joined #lisp
<fmsbeekmans> beach: Just by calling it lisp.
orivej has joined #lisp
EvW has joined #lisp
<beach> It's just a name.
<beach> The channel has its topic. That's the important part.
k4rtik has joined #lisp
varjag has joined #lisp
<fmsbeekmans> Is there a general lisp channel?
<beach> ##lisp I hear.
<fmsbeekmans> Thanks
<beach> Sure.
fikka has joined #lisp
cage_ has quit [Ping timeout: 240 seconds]
foom2 is now known as foom
_cosmonaut_ has quit [Ping timeout: 265 seconds]
cage_ has joined #lisp
rumbler31 has joined #lisp
patlv has joined #lisp
Guest16746 is now known as thekolb
rumbler31 has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
Smokitch has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
cage_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 256 seconds]
_cosmonaut_ has joined #lisp
cage_ has joined #lisp
schweers has quit [Ping timeout: 276 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
_krator44 is now known as krator44
krator44 has quit [Changing host]
krator44 has joined #lisp
krator44 has joined #lisp
EvW has quit [Ping timeout: 265 seconds]
buffergn0me has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
<jackdaniel> fmsbeekmans: there is also #scheme if you are interested in that particular dialect
patlv has quit [Ping timeout: 264 seconds]
lumm has quit [Quit: lumm]
dogon has joined #lisp
lumm has joined #lisp
fikka has joined #lisp
lumm has quit [Read error: Connection reset by peer]
<fmsbeekmans> jackdaniel: Thanks, doesn't really matter which dialect. I'll have a try there.
lumm has joined #lisp
jmercouris has quit [Ping timeout: 256 seconds]
rawste has joined #lisp
EvW1 has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
Khisanth has quit [Ping timeout: 265 seconds]
dogoff has joined #lisp
l1x has joined #lisp
sendai_ has quit [Ping timeout: 256 seconds]
<jasom> beach: after getting some sleep, you're using a sliding window for the GC? My intuition is that this will make a smaller nursery more useful, as the problem with a classical nursery is that short-lived objects get promoted just because they were recently allocated before a GC, and with a small nursery the fraction of false-positives goes up...
dogon has quit [Ping timeout: 256 seconds]
hhdave has quit [Ping timeout: 255 seconds]
shka_ has joined #lisp
azimut has joined #lisp
<beach> jasom: Exactly.
<beach> A sliding collector makes it unlikely that a recently allocated object will be promoted if a GC happens right after that allocation.
FreeBirdLjj has quit [Remote host closed the connection]
msb has quit [Ping timeout: 265 seconds]
<beach> Another way of putting it is that the sliding collector has a very precise idea of the relative age of objects, so it can promote the oldest and leave the youngest in the nursery.
<beach> shka: I understood how it works. I'll draw a nice picture and show it to you at some point.
<Younder> Jones, Lins 'Garbage Collection'
EvW1 has quit [Ping timeout: 255 seconds]
<beach> Younder: No. Jones, "The Garbage Collection Handbook". More recent.
<Younder> I stand corrected
<jasom> It's on my reading list
<beach> jasom: The thing is that the sliding collector is seen as too costly in the literature (like the one I just cited), because of the screwy way the break table is built.
msb has joined #lisp
* beach is called to dinner by his (admittedly small) family.
elfmacs has joined #lisp
<jasom> With a pointer-increment nursery, it would seem like it could just be a fraction of the nursery, particularly when you have a separate large-object pool.
m00natic has quit [Remote host closed the connection]
makomo has joined #lisp
<jasom> or is there an issue managing cross-window pointers?
Khisanth has joined #lisp
FreeBirdLjj has joined #lisp
pjb has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
fmsbeekmans has left #lisp [#lisp]
SenasOzys has quit [Remote host closed the connection]
kpenc has quit [Remote host closed the connection]
eli_oat has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
milanj has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
vap1 has quit [Quit: Leaving]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
dogoff has quit [Ping timeout: 264 seconds]
eli_oat has quit [Quit: Leaving.]
odian has joined #lisp
_cosmonaut_ has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 240 seconds]
dogoff has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
jmercouris has joined #lisp
rpg has joined #lisp
odian has quit [Ping timeout: 240 seconds]
<jeosol> good morning guys
eli_oat has joined #lisp
<jmercouris> jeosol: good morning
<jeosol> jmercouris, howdy
test1600 has joined #lisp
<jeosol> how far with that survey stuff? how is it going?
dogon has joined #lisp
<jmercouris> jeosol: Very few responses
<jmercouris> unfortunately :\
<ecraven> which survey?
<jmercouris> it is about a genetic algorithm problem
<jmercouris> that involves figuring out how to pack boxes and ship boxes efficiently
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
dogoff has quit [Ping timeout: 264 seconds]
odian has joined #lisp
sakalli_ has joined #lisp
elfmacs has quit [Ping timeout: 240 seconds]
rawste has quit [Quit: Sleep....]
makomo has quit [Quit: WeeChat 2.0.1]
dogon has quit [Ping timeout: 264 seconds]
sakalli_ has quit [Client Quit]
rawste has joined #lisp
rawste has quit [Client Quit]
littlelisper has joined #lisp
sakalli_ has joined #lisp
<beach> jasom: I have not considered partial nurseries.
<beach> jasom: But I keep the nursery so small that it should GC in a few milliseconds.
<jasom> right
<beach> Right now, I am working on trying to understand (and explain in the spec) Doug Lea's memory allocator and how I will adapt it for use in SICL.
rawste has joined #lisp
<beach> Right before dinner, I figured out how they save a word in each object.
dogon has joined #lisp
fikka has joined #lisp
elfmacs has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<beach> jasom: But I think you are right. The old problem of references from an old to a young generation will likely pop up if you try that.
<jeosol> jmercouris: really? hmmm. Not sure what the competition is doing. Or may be few references so far.
odian has quit [Ping timeout: 256 seconds]
<beach> jasom: I am off to spend time with my (admittedly small) family. I'll be back tomorrow morning (UTC+2).
sakalli_ has quit [Remote host closed the connection]
sakalli_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
flazh has quit [Ping timeout: 255 seconds]
sakalli_ has quit [Remote host closed the connection]
sakalli_ has joined #lisp
mflem has joined #lisp
sakalli_ has quit [Client Quit]
<jeosol> jmer..: meant responses above
brendyn has quit [Ping timeout: 268 seconds]
eli_oat has quit [Quit: Leaving.]
eli_oat has joined #lisp
littlelisper has left #lisp [#lisp]
dogoff has joined #lisp
light2yellow has quit [Quit: light2yellow]
rumbler31 has joined #lisp
dogon has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Ping timeout: 248 seconds]
elfmacs has quit [Ping timeout: 240 seconds]
dogon has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
<drmeister> The optimization where calls within a compilation unit can be called directly without going through symbol-function - does anyone know where that is described in the CLHS?
dogoff has quit [Ping timeout: 264 seconds]
odian has joined #lisp
jack_rabbit has quit [Ping timeout: 264 seconds]
dogon has quit [Ping timeout: 264 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
fikka has joined #lisp
dogon has joined #lisp
odian has quit [Ping timeout: 265 seconds]
<jasom> drmeister: one second
<jasom> clhs 3.2.2.3
fikka has quit [Ping timeout: 265 seconds]
xrash has joined #lisp
dogon has quit [Ping timeout: 256 seconds]
<jasom> the "inline" declaration implicitly 3 states, with the default state not one that you can declare
flazh has joined #lisp
fikka has joined #lisp
sauvin has quit [Remote host closed the connection]
parjanya has joined #lisp
Kundry_Wag has joined #lisp
lumm has quit [Remote host closed the connection]
parjanya has quit [Read error: Connection reset by peer]
<drmeister> Thank you.
<drmeister> I don't quite follow your last statement.
<Bike> inline,notinline, and "eh"
<Bike> or NIL in cleavir's terms
parjanya has joined #lisp
mflem has quit [Ping timeout: 245 seconds]
random-nick has quit [Ping timeout: 256 seconds]
graphene has quit [Remote host closed the connection]
<jasom> inline, notinline and what it is by default
graphene has joined #lisp
<Inline> sup sup
eli_oat has quit [Quit: Leaving.]
<Inline> who summoned by magic ?
<Inline> lol
* Inline puts a quote
<Inline> "if you call the devil".....
<Inline> hahahahaha
<scymtym__> there is also (declaim (inline …)) (defun …) (declaim (notinline …)) which can mean "don't inline by default but respect local inline declarations"
<Inline> err, doesn't locally respect such ?
<Inline> (locally (declare .....
<scymtym__> not every defined function is "equipped" for inlining
<scymtym__> (locally (declare (inline …))) can't change that retroactively
parjanya has quit [Read error: Connection reset by peer]
<Inline> a sequential inline notinline, i would have thought that would be just temporary inlining
<Inline> i.e. hop to it's place and turn back where you left off instead of copying and expanding it's code
* Inline talks to the compiler
<scymtym__> the initial inline declaration prepares the function for inlining *and* makes inlining the default behavior. the subsequent notinline declaration leaves the function prepared for inlining but changes the default behavior back to not inlining. after that, the function is still prepared for inlining which can be requested, for example, via (locally (declare (inline …)))
phoe has joined #lisp
<stylewarning> always nice to have a `defun-inlineable`
odian has joined #lisp
phoe is now known as phoe_krk
<Inline> ok
devon has quit [Ping timeout: 240 seconds]
caltelt has joined #lisp
parjanya has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
phoe_krk is now known as phoe
EvW has joined #lisp
random-nick has joined #lisp
mflem has joined #lisp
parjanya has quit [Read error: Connection reset by peer]
smasta has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Remote host closed the connection]
skapata has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
<pjb> scymtym__: this is wrong. notinline has nothing to do with inlining, and everything to do with notinlining.
<pjb> scymtym__: notice that this is notinline, not not-inline.
Kundry_W_ has joined #lisp
<pjb> and the order doesn't matter.
smasta has quit [Ping timeout: 240 seconds]
skapata has joined #lisp
phenoble has joined #lisp
smasta has joined #lisp
<scymtym__> clhs inline
<scymtym__> pjb: the idiom is discussed there ^
<pjb> scymtym__: yes, I have it under the eyes.
<pjb> Notably, it does nothing to the function, those declarations only concern the calls to the function, not the function itself.
Kundry_W_ has quit [Ping timeout: 240 seconds]
<scymtym__> the sentence that starts with "To define a function f that is not inline by default …" seems to be about the definition
<pjb> The idiom in question has the effect of letting the compiler compile some recursive calls as inline calls (which can be done, surprisingly). If you had the notinline before, then this optimization wouldn't be available to the compiler. But that's the only effect of this order.
<pjb> functions are not inline or not inline.
<pjb> function calls are.
caltelt has quit [Ping timeout: 256 seconds]
<pjb> The only thing, is that having the inline declaration before the function helps the compiler to book-keep information for inlining.
<pjb> BUT
<pjb> notice that the compiler is allowed to inline function calls to functions defined inside the same compilation-unit anyways!
<pjb> Therefore this book-keeping stuff is bullshit: the compilers are already allowed to keep the information whatever declaration you put.
<Inline> translation unit is the same as compilation unit right ?
<pjb> There's no translation unit in CL.
<Inline> aah ok
<pjb> otherwise, yes, same concept.
<Inline> ok
parjanya has joined #lisp
<pjb> Also, a compiler can compile a function call as being both inline and notinline. Because semantically, the effect of notinline is actually that the function call (foo …) is AS IF (funcall (symbol-function 'foo) …). So the compiler may call the function inline (copy the source of the function in place of the function call), AND keep track of the dependency of the caller to the callee, so when the callee is redefined (setf
<pjb> symbol-function), the caller gets recompiled.
<pjb> (at run-time).
<pjb> Admittedly, few implementations care to use this optimization.
parjanya has quit [Read error: Connection reset by peer]
k4rtik has quit [Ping timeout: 265 seconds]
parjanya has joined #lisp
graphene has quit [Remote host closed the connection]
vlatkoB_ has quit [Remote host closed the connection]
parjanya has quit [Client Quit]
graphene has joined #lisp
NotSpooky has joined #lisp
orivej has joined #lisp
<drmeister> Thank you
azimut has joined #lisp
lumm has joined #lisp
EvW has quit [Remote host closed the connection]
EvW has joined #lisp
Kundry_Wag has joined #lisp
cage_ has quit [Quit: Leaving]
fikka has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* p_l misses forwarding pointers a bit
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<p_l> hmm, would taking a tag bit for "this is forwarding pointer" and having possibility of reading it instead of header work?.... hmmm
mlf|2 has joined #lisp
adlai has quit [Ping timeout: 268 seconds]
mflem has quit [Ping timeout: 245 seconds]
graphene has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 240 seconds]
graphene has joined #lisp
acolarh has quit [Ping timeout: 256 seconds]
patlv has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
odian has quit [Ping timeout: 264 seconds]
Kundry_Wag_ has joined #lisp
Smokitch has quit []
optikalmouse has quit [Quit: optikalmouse]
Arcaelyx has joined #lisp
acolarh has joined #lisp
fikka has joined #lisp
xantoz has quit [Ping timeout: 264 seconds]
xantoz has joined #lisp
rpg has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
jeosol has quit [Quit: Page closed]
fikka has joined #lisp
patlv has quit [Ping timeout: 255 seconds]
edgar-rft has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
igemnace has quit [Quit: WeeChat 2.1]
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
scymtym__ has quit [Ping timeout: 255 seconds]
wheelsucker has quit [Quit: Client Quit]
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
EvW1 has joined #lisp
Pixel_Outlaw has joined #lisp
felideon has quit [Ping timeout: 276 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
iridioid has joined #lisp
smasta has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
iridioid has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
<jmercouris> I have some information from a database that I want to include in my image
<jmercouris> is it enough to have a top-level statement that invokes a function to load this data from the database and then dump the image?
<jmercouris> s/statement/expression
Kundry_Wag has quit [Remote host closed the connection]
k4rtik has joined #lisp
Kundry_Wag has joined #lisp
patlv has joined #lisp
scymtym has joined #lisp
<oni-on-ion> inline huh?? turned off lisp
<rpg> jmercouris: probably.... depends a lot on what you want to do with the data. Also, you probably want to tear down the database connection before you dump the image.
<jmercouris> rpg: I just want to instantiate a hash table in the image
<jmercouris> which leads me to another question, will having a large hash-table persisted in my image slow down my application start-up time?
<rpg> jmercouris: That should be fine then, but notice that you don't want an image with a half-open database connection!
<jmercouris> yes, I'll remember to close the database, probably use a with type macro
<oni-on-ion> jmercouris: nope, ie symbols , and afaik and imo is good practice to persist
<random-nick> doesn't sbcl use a static heap size?
<jmercouris> I'm talking about a very large hash table, perhaps one that has around 100,000 entries
<rpg> jmercouris: I believe the answer is "no," but it's pretty dependent on implementation, memory, etc. The basic notion is that you are pulling the full image in and that's faster than taking a fasl and doing all the things involved in loading it.
<jmercouris> I need my program to start almost instantaneously, and then load this information in memory
<jmercouris> but I don't want to distribute my database to my end users
<oni-on-ion> afaik sbcl is same startup time (almost zero) regardless of image size ? \
<jmercouris> Okay, I'll do some testing, but that is good to know
<jmercouris> I happen to be using SBCL for the time being
<jmercouris> actually I'll also ask on #sbcl, thanks
<rpg> If your users are definitely going to need this table, then there's no reason to load it lazily, and I believe this is the fastest way to load it.
<jmercouris> They will definitely need this table
<jmercouris> I just would like to give them an opportunity to begin typing before the table is completely loaded into memory
<rpg> Then this should be the fastest way to get it loaded. I don't know if there's any way to optimize the memory layout (e.g., to keep the hash table in contiguous memory) before dumping. I'd definitely suggest creating the hash table with a known-big-enough :size argument -- that might improve the initial memory layout.
<rpg> I wonder if you can somehow shove it into old memory, since you are never going to want it garbage-collected.
<oni-on-ion> mmap()
lumm has quit [Ping timeout: 240 seconds]
Bike has quit [Ping timeout: 252 seconds]
<jmercouris> rpg: shove into old memory?
<rpg> jmercouris: You don't want the garbage collector to bother looking at this table -- you know it's going to stay around. It might help make your program more efficient to find a way (this would definitely be SBCL-specific) to tell the lisp environment that this is permanent memory so it can be hidden from the garbage collector.
NoNumber has quit [Read error: Connection reset by peer]
milanj has joined #lisp
fikka has joined #lisp
devon has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<housel> sb-ext:purify, or :purify arg to sb-ext:save-lisp-and-die
fikka has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Remote host closed the connection]
<whartung> Yea, mmap. Store it “off heap”, GC never even knows it exists, but you get to handle all the access and marshalling of stuff — which is a pain.
<whartung> at that point you get to treat it like an in ram “real fast” database
<whartung> (and then you think “why not store it in a db and let it cache it anyway, isn’t that what they’re for?”)
rumbler31 has joined #lisp
LiamH has quit [Quit: Leaving.]
patlv has quit [Ping timeout: 256 seconds]
mindCrime_ has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
nopf has joined #lisp
DonVlad has quit [Remote host closed the connection]
patlv has joined #lisp
Trystam has joined #lisp
patlv has quit [Ping timeout: 248 seconds]
Tristam has quit [Ping timeout: 276 seconds]
Trystam is now known as Tristam
Bike has joined #lisp
JuanDaugherty has joined #lisp
makomo has joined #lisp
eschatologist has quit [Quit: ZNC 1.6.6+deb1 - http://znc.in]
eschatologist has joined #lisp
shka_ has quit [Ping timeout: 260 seconds]
dogon has joined #lisp
test1600 has quit [Quit: Leaving]
pseudonymous has quit [Ping timeout: 256 seconds]
jmercouris has quit [Ping timeout: 256 seconds]
mindCrime_ has joined #lisp
devon has quit [Ping timeout: 265 seconds]
nickenchuggets has quit [Ping timeout: 260 seconds]
phenoble has quit [Quit: WeeChat 1.9.1]
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
patlv has joined #lisp
EvW1 has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
pseudonymous has joined #lisp
patlv has quit [Ping timeout: 240 seconds]
dogon has quit [Ping timeout: 256 seconds]
odian has joined #lisp
raynold has joined #lisp
_paul0 has joined #lisp
Kundry_W_ has joined #lisp
odian has quit [Ping timeout: 265 seconds]
paul0 has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 265 seconds]
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
robotoad has quit [Quit: robotoad]
patlv has joined #lisp
rawste has quit [Quit: Sleep....]
didi has joined #lisp
patlv has quit [Ping timeout: 240 seconds]
k4rtik has quit [Ping timeout: 265 seconds]
<didi> Decisions, decisions... should I start using ENDP, instead of NULL, to test for the end of a list?
pierpal has quit [Ping timeout: 260 seconds]
<pjb> didi: if it's a list (that is, a proper list) then use FIRST REST LISTP and ENDP.
robotoad has joined #lisp
<Xach> yes
<pjb> if it's something made of conses and nil, then use CAR CDR CONSP and NULL
* didi nods
<pjb> whartung: if you use mmap, you may use com.informatimago.common-lisp.heap.heap to store lisp objects in it.
<whartung> well that makes things easy pjb
<didi> In another news, I recently discovered LOOP's keyword NCONC. It took me long enough. :-P
<pjb> Now, it's not native lisp objects, so it may be a draw back, but it allows to share lisp objects (using shared memory) with other implementations, so it may be an advantage.
<Xach> phew
shifty has joined #lisp
graphene has quit [Remote host closed the connection]
pseudonymous has quit [Ping timeout: 240 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
graphene has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<didi> And a nitpick: LOOP's keywords for hash-tables are confusing. Using [each, the, in, of] makes no difference, but I was trained that using [in, on] with list does.
nowhere_man has joined #lisp
<pjb> didi: write your own loop macro with non-confusing key word uses.
<didi> pjb: Nah.
<pjb> use iterate.
<didi> I dream to use SEQUENCE. One day, my darling, one day...
<White_Flame> ugh, yet another (vector (unsigned-byte 8)) vs (simple-array (unsigned-byte 8)) mismatch, this time with cl-sqlite
<White_Flame> I wish one or the other were considered standard for optimized byte arrays
zachk has joined #lisp
zachk has quit [Changing host]
zachk has joined #lisp
pierpal has joined #lisp
fikka has joined #lisp
<aeth> didi: I rarely parse lists that way with stuff like endp
<aeth> or car, cdr, caddr first, etc.
<aeth> destructuring-bind takes a while to get used to, but it has replaced almost all of my old ways of parsing lists because usually there's *some* structure
<didi> aeth: Ah, never thought of using it to iterate over lists. Good one.
fikka has quit [Ping timeout: 240 seconds]
<aeth> And for iterating, I usually use do-destructuring-bind (dolist with destructuring-bind) or a higher order function with destructuring-lambda (lambda with one argument, on which a destructuring bind is applied)
iridioid has joined #lisp
<aeth> destructuring-bind gets annoying with iteration unless you build trivial abstractions like that to flatten it
<mfiano> Or just use trivia
<aeth> Alternatively, there are general macros to flatten stuff, but it's probably more intended for with-foo, let, multiple-value-bind, destructuring-bind, etc., stacking together, rather than being used in an iteration
<aeth> mfiano: what's trivia?
NotSpooky has quit [Remote host closed the connection]
NotSpooky has joined #lisp
<mfiano> a faster alternative to optima
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
<aeth> definitely an option but it's very heavyweight compared to a handful of trivial macros on top of built-in forms