freenode/#lisp - IRC Chatlog
Search
16:42:04
skidd0
when I (ql:quickload :my-package) it "runs" the code in the my-package file proceduraly, right?
16:42:53
skidd0
I ask because i have a (ubiquitous:restore 'my-config) that doesn't appear to have been "run" after the quickload
16:57:00
Bike
if you mean you put something like that in your asd file, that'll probably be problematic
17:07:40
skidd0
i know it's being loaded because it throws errors due to the not working config setup
17:17:55
beach
esthlos: are you allowed to wrap the bit vector in something, or does it have to be a "raw" bit vector?
17:31:18
esthlos
as long as it's efficient. rotation on lists is easy enough, but I worry that vector -> list -> vector takes too much time
17:37:24
beach
(defclass wrapped-bitvector () ((underlying-bitvector ....) (offset ...))) then (defun rotate (wrapped-bitvector amount) (incf (offset wrapped-bitvector) amount))
17:54:33
esthlos
beach: that's an interesting idea. I have to constantly make new vectors. question then is what costs more: creating the wrapped-bitvector, or the dumb rotation with a loop and setf
17:55:38
esthlos
obviously your method scales far better, but these bit vectors are capped at 2^7 in length
17:57:04
flip214
anyway, I'd suggest to create the underlying-bitvector with double the size, and setting bit N and (+ N size) at each SETF.
17:57:33
flip214
then retrieving any bit sequence can be done with a single call with the offset, no need to check for wraparound
17:58:25
flip214
depending on the actual things you need to do a vector of 2^(7+1) bytes where only a single bit is used might be even easier -- though not as L1 cache efficient ;)
17:59:05
flip214
esthlos: if it's really only 2^7 bits, why not keep them in a BIGNUM (or, if you have enough control, in one SSE or two CPU registers)?
18:10:09
esthlos
flip214: the rotation is by single bits. keeping them in a bignum is also an interesting idea. though I'm trying to be very transparent about bitwise operations in the code itself
18:11:44
msmith
has anyone compared NTP timestamps to the output of get-universal-time? I seems like the latter is just the first 32 bits of the former. is this correct? by that I mean they both equal the seconds relative to 0h on 1 January 1900 and should be identical
20:26:22
gendl
Hi, in CL is there a standard way to specify the default :element-type for opening a file?
20:26:48
gendl
or does it always have to be specified explicitly with :element-type on the call to open (or with-open-file etc)?
20:29:21
sjl
anyone have a link to that paper that talked about simplifying operations on bytes in cl compilers?
20:32:10
runix_1
In CL when I want to "clear" an array, is it then basically enough to just set the fill-pointer to 0 and put in values again, or is there something to also consider when doing this? I suppose the alternative would be to create a new array and let the GC collect the old one?
20:34:55
sjl
runix_1: if you just set the fill pointer, the other elements won't be able to be GC'ed until they get replaced
20:36:04
sjl
If you want to clear out all the values to allow them to be GC'ed, you could do (fill array nil) or something similar
20:36:14
sjl
and https://pdfs.semanticscholar.org/7089/0eff0e93aba49174a9346731f4bf9225706d.pdf was the paper I was looking for
20:50:29
gendl
PuercoPop: according to the CLHS, "the default is character."http://clhs.lisp.se/Body/f_open.htm. So I guess any implementation which lets you change that default would be violating the standard.
20:59:10
PuercoPop
weird that a bot doesn't work when the message is directed to them. Btw gendl it can query clhs mop and 'lp' which I'm not sure what it stands for
22:59:29
runix_1
Can you have a defmethod be temporary within a function, such that it only exists when the function is "active"?
23:00:40
Bike
you could have the function bind a dynamic variable that the (global) method consults to determine its behavior.
23:06:17
jmercouris
you could have a defmethod at the top of the function body, and at the bottom you could execute remove-method
23:11:08
PuercoPop
jmercouris: Bike's suggestion of the dynamic variable + an :around method sounds like the most sensible approach for what you want to do.
0:32:09
skidd0
anyone using postmodern, how do you handle database migrations and alterations during development?
0:40:20
Thorondor[m]
I think postmodern doesn't have anything for doing that, you will have to do it yourself.
1:21:18
Xach
skidd0: yes, to load the alterations. i like using SQL directly with postgres whenever possible.
1:35:02
Xach
dim wrote a book on postgres. and he wrote a very great <whatever>-to-postgres converter, pgloader.
1:48:05
skidd0
also Xach, and anyone else, do you have anything you remember when first learning lisp that you wish you knew sooner?
1:52:58
Xach
start making stuff, keep trying to do it better, ask for people to look at what you've done and suggest improvements or make you aware of stuff that would make life easier, interact with people and show your work
1:54:44
skidd0
I'm going to put my "learn lisp" to-do program on github once i've got a working version
1:57:18
jeosol
I agree with start to build stuff and refine as you go. I was able to build a very large system follow this, but I have done a lot of refactoring since.
2:02:02
skidd0
I got really into web-dev with Flask (python) because of Miguel's well-structured Flask Mega Tutorial. I've looked at PCL, but are there other examples of project based learning for Common Lisp?
2:21:19
sabrac
skidd0: I expect to be dropping a roadmap for potential postmodern development in another 24 hours or so. Migration support is on the roadmap
2:23:10
jeosol
nice, I wanted to say this. I did benefit from your postmodern tutorials when I started, used that lib and clsql but mostly with postgresql
2:25:58
sabrac
Thank you. I want to find the time to write some tutorials that do not assume the reader already knows sql, but life gets in the way.
2:46:44
jeosol
hahaha, that's funny. The reminders about the library comparison. Those where useful for sure. The ones on Json, time libraries, and csv business
3:54:02
skidd0
sabrac: i see create-all-tables and create-package-tables, but neither seem to create the tables i identify when i (defclass something .. :table-name somethings)