phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
d4ryus1 has joined #lisp
d4ryus has quit [Ping timeout: 252 seconds]
ecilam has joined #lisp
elderK has quit [Ping timeout: 245 seconds]
<asarch> Thank you!
elderK has joined #lisp
asarch has quit [Quit: Leaving]
elderK has quit [Ping timeout: 245 seconds]
flazh has joined #lisp
ym555_ has quit [Quit: leaving...]
rozenglass has quit [Ping timeout: 272 seconds]
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.2)]
<moldybits> in CLOS, i have a class that no methods specialize on, but i want to handle any attempt of applying any method to it. (defmethod whatever ((x number)) x) (defclass foo () ()) (whatever (make-instance 'foo)) ; instead of erroring i want to intercept this
<moldybits> my goal is to have an object that defers every method application and slot-value to another object seamlessly, except for chosen methods/slots that i want to override
<no-defun-allowed> (defmethod no-applicable-method :around (gf &rest arguments) (if (find-if (lambda (x) (typep x 'anti-social-class)) arguments) do-something-else (call-next-method))) might work
linli has joined #lisp
linli has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
<oni-on-ion> wasn't someone in here looking for something like this recently ? https://github.com/plops/cl-cpp-generator
lavaflow1 has quit [Ping timeout: 258 seconds]
<oni-on-ion> too bad for all the funcall's though
<oni-on-ion> FUNCALLs*
<oni-on-ion> emacs would be useful in having real-time output/expansion for DSLs
Kaisyu7 has joined #lisp
<moldybits> no-defun-allowed: still messing with it, but this might work. thanks! :)
jeosol has quit [Quit: Page closed]
eschatologist_ has joined #lisp
manualcrank has joined #lisp
eschatologist_ has quit [Quit: ZNC 1.7.4-rc1 - https://znc.in]
eschatologist_ has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
eschatologist has quit [Quit: ZNC 1.7.2+deb2 - https://znc.in]
eschatologist_ is now known as eschatologist
makomo has quit [Ping timeout: 272 seconds]
igemnace has joined #lisp
nolanv has quit [Ping timeout: 245 seconds]
nolanv has joined #lisp
Lycurgus has joined #lisp
Arcaelyx_ has quit [Ping timeout: 248 seconds]
Arcaelyx has joined #lisp
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
corvidzz has quit [Remote host closed the connection]
kajo has joined #lisp
buffergn0me has joined #lisp
InvertAlwaysInve has joined #lisp
<pjb> moldybits: AFAIK, it's not possible. Remember that methods are attached to generic functions, not to objects or classes.
<pjb> moldybits: you will have to define a method on each generic function for that class.
<pjb> moldybits: you can use a macro to help, but it will have to be done.
paule32 has quit [Ping timeout: 272 seconds]
chens has joined #lisp
aindilis has quit [Ping timeout: 248 seconds]
orivej has joined #lisp
aindilis has joined #lisp
<LdBeth> Is it a good idea to rely on emacs’ font-lock text-property to predicate if a delimiter is in a string so I can ignore it?
orivej_ has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
karlosz_ has joined #lisp
<pjb> LdBeth: ignore it, there's another mechanism.
torbo has joined #lisp
<pjb> LdBeth: (syntax-after (point))
<LdBeth> pjb: thank you
zotan has quit [Ping timeout: 272 seconds]
<pjb> or perhaps it's something else. This one might be two low level.
flazh has quit [Ping timeout: 258 seconds]
<pjb> LdBeth: see (c-guess-basic-syntax)
zotan has joined #lisp
flazh has joined #lisp
orivej_ has quit [Ping timeout: 272 seconds]
<LdBeth> I find the cool thing is I can change the display of many )))s to ] without affecting parent matching
Lycurgus has quit [Quit: Exeunt]
dddddd has quit [Remote host closed the connection]
* LdBeth uploaded an image: ima_7a79fe2.jpeg (8KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/kbjWwfdpmsHKlQyBwXnEJHoD >
karlosz_ has quit [Quit: karlosz_]
<pjb> LdBeth: this can be done trivially with font-locking. But indeed, the regexp may be complex if you want to avoid strings, (and comments), notably in CL where strings can stand on several lines, and comments can be embedded.
<pjb> with the compose-region operator…
<beach> Good morning everyone!
<LdBeth> beach: morning
<LdBeth> pjb: for my purpose these should be inserted by user and doesn’t mean to be preserved across sessions
<pjb> LdBeth: you can let the user type the )))) using paredit, and display them as a single ]
alexanderbarbosa has quit [Remote host closed the connection]
libertyprime has quit [Quit: leaving]
jcowan has left #lisp [#lisp]
jeosol has joined #lisp
anewuser has joined #lisp
nanoz has joined #lisp
karlosz_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
torbo has quit [Remote host closed the connection]
_whitelogger has joined #lisp
_whitelogger has joined #lisp
anewuser has quit [Quit: anewuser]
<ck_> Good morning
karlosz_ has quit [Quit: karlosz_]
bugrum has quit [Quit: Leaving]
nanoz has quit [Ping timeout: 248 seconds]
karlosz_ has joined #lisp
orivej has joined #lisp
libertyprime has joined #lisp
dale has quit [Quit: dale]
InvertAlwaysInve has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #lisp
Inline has quit [Quit: Leaving]
samebchase has joined #lisp
MichaelRaskin has quit [Quit: MichaelRaskin]
libertyprime has quit [Ping timeout: 246 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
libertyprime has joined #lisp
wusticality has quit [Ping timeout: 272 seconds]
makomo has joined #lisp
Arcaelyx has quit [Ping timeout: 272 seconds]
zhlyg has joined #lisp
vlatkoB has joined #lisp
svillemot has quit [Quit: ZNC 1.7.2+deb2 - https://znc.in]
svillemot has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
jprajzne has joined #lisp
JohnMS_WORK has joined #lisp
libertyprime has quit [Ping timeout: 246 seconds]
libertyprime has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
pjb has quit [Quit: switching workstation]
Guest14704 has quit [Quit: switching workstation]
pjb has joined #lisp
esrse has joined #lisp
<no-defun-allowed> Does anyone have a CCL 1.12beta image for ARM I could have a copy of?
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
vlatkoB has quit [Remote host closed the connection]
nolanv has quit [Quit: WeeChat 2.4]
vlatkoB has joined #lisp
nolanv has joined #lisp
donotturnoff has joined #lisp
libertyprime has quit [Ping timeout: 246 seconds]
libertyprime has joined #lisp
quazimodo has joined #lisp
ltriant has quit [Quit: leaving]
nowhere_man has quit [Ping timeout: 258 seconds]
varjag has joined #lisp
karlosz_ has quit [Quit: karlosz_]
karlosz_ has joined #lisp
scymtym has joined #lisp
sigjuice has joined #lisp
zhlyg has quit [Ping timeout: 245 seconds]
schweers has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
v88m has quit [Read error: Connection reset by peer]
varjag has joined #lisp
v88m has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
SaganMan has joined #lisp
crystalball has joined #lisp
zotan has quit [Ping timeout: 248 seconds]
crystalball has quit []
zotan has joined #lisp
beach has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
karlosz_ has quit [Quit: karlosz_]
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
zotan has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
zotan has joined #lisp
techquila has quit [Client Quit]
themsay has quit [Read error: Connection reset by peer]
techquila has joined #lisp
themsay has joined #lisp
SaganMan has quit [Ping timeout: 272 seconds]
themsay has quit [Ping timeout: 245 seconds]
SaganMan has joined #lisp
h11 has quit [Ping timeout: 252 seconds]
h11 has joined #lisp
crystalball has joined #lisp
kajo has quit [Ping timeout: 248 seconds]
lnostdal has joined #lisp
crystalball has quit []
quazimodo has quit [Ping timeout: 244 seconds]
themsay has joined #lisp
quazimodo has joined #lisp
themsay has quit [Ping timeout: 244 seconds]
stux|RC has quit [Ping timeout: 248 seconds]
themsay has joined #lisp
quazimodo has quit [Ping timeout: 245 seconds]
crystalball has joined #lisp
stux|RC has joined #lisp
crystalball has quit [Client Quit]
shrdlu68 has quit [Ping timeout: 272 seconds]
Arcaelyx has joined #lisp
josemanuel has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
themsay has quit [Read error: Connection reset by peer]
Lycurgus has joined #lisp
themsay has joined #lisp
catalinbostan has joined #lisp
orivej has joined #lisp
josemanuel has quit [Quit: leaving]
josemanuel has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
manualcrank has quit [Quit: WeeChat 1.9.1]
chens has quit [Write error: Connection reset by peer]
d4ryus1 is now known as d4ryus
szmer has joined #lisp
papachan has joined #lisp
crystalball has joined #lisp
esrse has quit [Ping timeout: 248 seconds]
Lycurgus has quit [Quit: Exeunt]
dddddd has joined #lisp
orivej has joined #lisp
v88m has quit [Ping timeout: 248 seconds]
orivej has quit [Ping timeout: 245 seconds]
defaultxr has quit [Ping timeout: 245 seconds]
SaganMan has quit [Ping timeout: 245 seconds]
crystalball has quit []
m00natic has joined #lisp
ghard has quit [Ping timeout: 250 seconds]
makomo has quit [Ping timeout: 248 seconds]
papachan has quit [Quit: Saliendo]
_whitelogger has joined #lisp
catalinbostan has quit [Quit: Textual IRC Client: www.textualapp.com]
Bike has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
LiamH has joined #lisp
gxt has quit [Ping timeout: 256 seconds]
lucasb has joined #lisp
alexanderbarbosa has joined #lisp
papachan has joined #lisp
gxt has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
josemanuel has quit [Quit: leaving]
jmercouris has joined #lisp
<jmercouris> I'm getting the following return value from a funciton in a library I'm using @2019-03-08T15:33:13.000000+01:00
<jmercouris> what does the ampersand mean?
<jmercouris> sorry the "@" symbol
<Bike> that's non standard
<Bike> i think it's a reader macro in local-tie
<Bike> time
<jmercouris> ok, good to know that it is non-standard
<Bike> um, so the object itself is a "timestamp".
<jmercouris> I was wondering how I had not learned about this
<jmercouris> interesting, a timestamp object...
<jmercouris> I guess that makes a lot of sense
<jmercouris> ok, so I'm getting these timestamps from SXQL, I am wondering if instead there is a way to just query by time instead of checking the timestamp
<jmercouris> something like (select-dao 'object (where :created_at < date-24-hours-ago))
<jmercouris> I guess I'll have to look into how sxql accepts/creates dates
<jmercouris> maybe I can pass a timestamp object...
<jmercouris> local-time seems pretty handy: (local-time:adjust-timestamp (local-time:today) (offset :day -1))
<jmercouris> just like that you can get a timestamp for yesterday!
<Bike> yeah, it's the usual library for this sort of thing.
igemnace has joined #lisp
Inline has joined #lisp
<jmercouris> in case anyone is wondering in the future, you can use local-time objects in SXQL to do date comparisons
iovec has joined #lisp
iovec has quit [Read error: Connection reset by peer]
iovec has joined #lisp
<dlowe> local-time isn't great, but it mostly gets the job done
jmercouris has quit [Ping timeout: 258 seconds]
saravia has joined #lisp
<jdz> jmercouris: You might be able to do something like (... :created_at < "now() - interval '24 hours'")
lionrouge has joined #lisp
<lionrouge> hi !
ebzzry has joined #lisp
<lionrouge> what LISP interpreter/dialect for MS-DOS would you recommend?
<ebzzry> Does anyone know what happened to matlisp (https://github.com/matlisp)?
<jdz> lionrouge: MS-DOS? Really?
<jdz> Back in the day there was pc-lisp, if I remember correctly.
<jdz> It tried to be compatible with franz-lisp.
<lionrouge> jdz, really. It's for a school which still has mixed MS-DOS/Linux environment
<aeth> The lack of updates in 25-30 years and the limitations of 16-bit will be painful to work with. Shouldn't be hard to run in DOSBox, though
cosimone has joined #lisp
<lionrouge> it's for educational purposes
FreeBirdLjj has joined #lisp
<jdz> I remember writing lisp in Notepad.exe; the only way it was educational was suffering.
cosimone has quit [Client Quit]
<jdz> That's probably the purpose of modern education, though.
papachan has quit [Quit: Leaving]
cosimone has joined #lisp
<aeth> The way a Lisp usually works (although 16-bit ones might be different because of necessity) is that they have tag bits on everything, which means that anything that cannot fit in a word *with* the tag bit has to be heap allocated except in niche circumstances.
<aeth> e.g. single-floats fit in a 64-bit Lisp's word size, but not double-floats, since 64-bit floats need some tag bits. But in 32-bit Lisps, even single-floats will be heap allocated if they're 32-bit IEEE single-precision floating point
cosimone has quit [Client Quit]
<aeth> And a fixnum is basically the largest signed integer that isn't heap allocated on an implementation. So e.g. for 64-bit SBCL that's a 63-bit unsigned integer because it uses one bit as a tag. Unsigned fixnums are used for most minimum sizes, which means at most you get 2 less than the word size in bits, or 62-bit for SBCL.
<aeth> So if I'm doing this correctly, then for a 16-bit implementation that uses the absolute largest fixnum like 64-bit SBCL does for 64-bit you get this as your largest non-bignum integer (= (- (expt 2 14) 1) 16383)
<aeth> At most 16383. Some implementations might be less, and that doesn't mean that your largest array has 16383 elements because it depends on e.g. how its tagging works.
<aeth> The minimum value for array-total-size-limit is 1024. It's definitely possible that the DOS Common Lisp you find does actually have this value. That means some docstrings are too large.
jprajzne has quit [Remote host closed the connection]
<aeth> If you use a 64-bit CL you basically never have to think about limits and this is esoteric knowledge. If you use a 32-bit CL, you might hit certain limits if you're working with e.g. images or video. If you use a 16-bit made-for-DOS CL, you have to change how you write programs to work around certain limits. It doesn't sound like it would give people a good impression of the language at least imo.
<aeth> I guess unless the point of the exercise was working around the limitations.
mindCrime has joined #lisp
dmiles has quit [Ping timeout: 245 seconds]
dmiles has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hhdave has joined #lisp
schweers has quit [Ping timeout: 248 seconds]
<moldybits> maybe elisp or scheme is more appropriate?
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<edgar-rft> lionrouge: there's an XLISP-PLUS interpreter from 2016 that still runs on MS-DOS at the bottom of the page -> http://www.almy.us/xlisp.html
FreeBirdLjj has quit [Ping timeout: 245 seconds]
lnostdal has quit [Ping timeout: 245 seconds]
rippa has joined #lisp
<lionrouge> edgar-rft, thanks
v88m has joined #lisp
Posterdati has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
kajo has joined #lisp
lavaflow has joined #lisp
<jackdaniel> do you have opinions about data-frame concept in general? is there some good CL library implementing the abstraction? if not, would people find it useful?
Lycurgus has joined #lisp
<jackdaniel> (data frames are basically arrays with named columns and rows where you may select particular columns and/or rows depending on what you need, used i.e in statistics or in ggplot2)
warweasle has joined #lisp
Posterdati has joined #lisp
* ck_ has to resist dark memories of trying to ''program'' in R
shka_ has joined #lisp
beach has joined #lisp
mulk has quit [Ping timeout: 244 seconds]
alexanderbarbosa has quit [Remote host closed the connection]
simendsjo has joined #lisp
lnostdal has joined #lisp
lnostdal has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
orivej has joined #lisp
vutral has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 248 seconds]
sjl has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
hhdave has quit [Quit: hhdave]
moldybits has quit [Quit: WeeChat 2.4]
xkapastel has joined #lisp
<dlowe> I've made ad-hoc data frames and associated functions, but I never put it all into a library
<jackdaniel> does it cons when subsets are selected?
<jackdaniel> (i.e copies data)
moldybits has joined #lisp
<grewal> I've never used a data frame, but if I needed that sort of abstraction, I'd probably just use an array of structs
<dlowe> jackdaniel: no, it didn't. I was only operating on medium sized datasets, though.
<dlowe> datasets too large to mess with by hand but still fitting comfortably in a corner of memory
<jackdaniel> dlowe: thank you. is the repository public?
jmercouris has joined #lisp
<dlowe> "I never put it all into a library"
<jackdaniel> yes, but you might have put it as a file in some other project
<jackdaniel> I didn't miss that part
<dlowe> No, sorry :/
<dlowe> it was for work
<jackdaniel> understood, thank you
jmercouris has left #lisp [#lisp]
[6502] has joined #lisp
nanoz has joined #lisp
<[6502]> Hello... in a toy lisp interpreter I'm playing with I "mark" environments that are captured in lambdas (and I follow up the environment parent chain until the global environment or a marked one is found)...
<[6502]> ...When executing a function call I check if after the body evaluation the environment has been made reachable by a lambda capture and when this is not the case I recycle it immediately instead of leaving the job to the gc...
<[6502]> ...Are there reason for which this trick shouldn't work? it saves me a LOT of consing.
<dlowe> [6502]: this is a forum for Common Lisp. I think you want ##lisp which focuses on the lisp family
<dlowe> I mean, unless you're writing it in CL
lucasb has quit [Quit: Connection closed for inactivity]
<[6502]> no... the interpreter is in C++
<Bike> there's no reason for it not to work. most of the time you don't even need to allocate an environment.
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
flazh has quit [Ping timeout: 245 seconds]
jmercouris has joined #lisp
[6502] has quit [Quit: Page closed]
heisig has joined #lisp
<jeosol> jackdaniel: are you planning on writing or working on dataframe? I think it will be useful. This was brought up here a while ago, and I recall someone had something in CL similar to python pandas.
<jeosol> but not fully implemented or something like that
m00natic has quit [Remote host closed the connection]
<jackdaniel> jeosol: I wrote a working prototype of polyclot (mcclim application to plot data) and now I'm rewriting it into something with arms and legs
alexanderbarbosa has joined #lisp
<jackdaniel> and data-frames are very convenient as a way for mapping dataset to the aesthetics
heisig has quit [Remote host closed the connection]
makomo has joined #lisp
chipolux has quit [Quit: chipolux]
vutral has joined #lisp
<jackdaniel> (so I'm apparently writing a barebone implementation which will serve these needs)
<sjl> jeosol: are you thinking of https://github.com/numcl/numcl ?
heisig has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
heisig has quit [Remote host closed the connection]
hiroaki has joined #lisp
<jmercouris> I'm having a bit of an issue with cl-csv it seems to be swallowing things up
<jmercouris> or I can't go through the same CSV twice
<jmercouris> I tried making a stream twice to get past this
<jmercouris> I do (flexi-streams:make-flexi-stream ...) from a file I get, I do this twice, but you can only read a stream once
<jmercouris> alexandria:copy-stream?
<jeosol> sjl: it's possible it this one but if my memory serves me right, the one I was talking had functionalities to allow panda-like manipulations, some of which jackdaniel alluded above
<sjl> ah
rozenglass has joined #lisp
<jmercouris> how can I take a stream and produce two flexi-streams from it?
<sjl> jmercouris: once you read from a stream, that's it. that's how streams work. copy-stream isn't what you want (that's for piping one stream to another)
<sjl> what are you actually trying to do?
<jmercouris> sjl: well, I have a CSV that I am trying to go through twice with two different functions
<jmercouris> both of those functions use cl-csv to traverse the CSV
<sjl> and you don't want to (with-open-file (...) (do-thing-1 ...)) (with-open-file (...) (do-thing-2 ...)) ?
<jmercouris> sjl: I can't say I do, this is the upload to a server, and so I get a stream from the web framework
<sjl> By default Lisp (probably) won't save the whole contents of a stream... if someone updates a 100gb file, the whole point of using a stream is to not have to hold it all in memory
<jmercouris> yes
<jackdaniel> jmercouris: first read stream into some kind of sequence
<jackdaniel> and then use said sequence
<jackdaniel> if you are sure that it is not too much data
<jmercouris> I am sure
<jmercouris> it is usually around ~500kb
<sjl> Yeah, if it's small enough to keep in memory, read it from the initial stream into a buffer and then work with that.
alexanderbarbosa has quit [Read error: Connection reset by peer]
<aeth> jmercouris: What I'd consider doing is use something like a pipe e.g. https://gitlab.com/zombie-raptor/zombie-raptor/blob/17eb01a05e3f2b8ac6edab8c7592fe03df7e5b49/util/stream.lisp
<sjl> then use flexi-streams' make-in-memory-input-stream twice to make two streams you can give to the CSV parser
<jmercouris> how do I copy a stream into a sequence?
<aeth> jmercouris: But under the hood, which you can even see there, the pipe is just going to either (a) read into a buffer or (b) read into a /tmp file (I go with a, many go with b)
<dlowe> clhs read-sequence
<aeth> well, read/write into
<sjl> alexandria:read-streamm-content-into-(byte-vector|string)
<sjl> if you don't want to handle the buffering stuff yourself
lucasb has joined #lisp
<jmercouris> I do not, I want to be as simpe as possible
<jmercouris> aeth: thanks for the reference I'll take a read later
<jmercouris> bookmark'd
<sjl> actually if you want to use the flexi-streams stuff on top, you definitely want the byte vector version
<aeth> jmercouris: It's just a trivial use of trivial-gray-streams, probably subtly incorrect because I haven't used it enough to hit edge cases
<aeth> using gray streams means there is some performance penalty, probably
<jmercouris> sjl: ok, I just put string in :D
<jmercouris> good thing you said that
<sjl> the flexi-stream docs for make-in-memory-input-stream specifically says "the octets in the subsequence"
<jmercouris> not sure what they mean
<jackdaniel> cl-csv operates on character streams
<jackdaniel> and your stream is a byte vector
<jackdaniel> how about (with-input-from-string …) ;?
<jackdaniel> (after you have your sequence read to a string)
<jmercouris> this is turning way too complex :D
<jackdaniel> (let ((string (a:read-stream-content-insto-string stream))) (w-i-f-s (s string) (deactivate-targets s)) (w-i-f-s (s string) (do-csv (row s) …)))
<jackdaniel> >afk<
<aeth> with-output-to-string combined with with-input-from-string seems like it might work if it's small enough and it doesn't have to be used interactively
<jmercouris> I'll give that a shot...
<jmercouris> more and more problems
beach has quit [Ping timeout: 268 seconds]
<jmercouris> I just don't get it
<jmercouris> why must it be so painful
<dlowe> because dealing with character encodings is awful
<jmercouris> I'm getting really close to rewriting my code..
<jmercouris> to just somehow magically go through the same stream
<jmercouris> cl-csv:read-csv can take a string
<aeth> Well, you're probably getting UTF-8 and you need to translate that into the internal format of the implementation, which is probably UTF-32. Unless the library is already translating UTF-8 to UTF-32, in which case you just need to CODE-CHAR it.
<jmercouris> cl-csv:do-csv cannot, and must take a pathname or whatever
<jmercouris> aeth: what if I do not get UTF-8 though? what if a windows user uses the application?
<aeth> I don't think there's a convenient, universal way to detect all encodings.
<aeth> Especially all of the legacy ones that look like extended ASCII with special characters in the upper half.
<aeth> You might be able to determine which Unicode encoding it is.
<jmercouris> :\
<jmercouris> there must be a simpler way
<jmercouris> it was working taking the stream and just piping into cl-csv
<jmercouris> why can I not just duplicate a stream somehow?
<jmercouris> copy the contents of one stream into two streams
<dlowe> read-byte from one, write-byte into a echo-stream
<dlowe> read-byte from the echo streams
<jmercouris> dlowe: did you mean write-byte into echo streams?
<dlowe> yes
<aeth> jmercouris: the thing is, being naive about encodings will work fine for characters 0 through 127
<aeth> usually.
<aeth> try adding é to your input and see what happens
<jmercouris> no thanks :D
<aeth> it's possible some library or the implementation is already handling things
<jmercouris> how can I just make a stream?
manualcrank has joined #lisp
<jmercouris> make-in-memory-output-stream?
<jmercouris> I however want to be able to write to the echo stream, and then read from it... no?
<dlowe> that's what echo streams do
<jmercouris> I'm confused here
themsay has quit [Read error: Connection reset by peer]
<dlowe> clhs echo-stream
<jmercouris> oh, I thought you had made up the term "echo stream" to describe this concept
<jmercouris> I wasn't looking up echo-stream
<dlowe> ...
<aeth> And it looks like flexi-streams is a layer on top of that.
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
themsay has joined #lisp
<aeth> It looks like flexi-streams does its own encoding handling.
<aeth> You could probably add some logic that defaults to UTF-8 but also attempts to detect if it's using whatever Windows's default format is instead.
<aeth> That would cover 99.9% of all things, probably.
<jmercouris> I guess I could, but I don't want to go down that path
<dlowe> just assume utf-8 and if you find some other encoding, it's wrong :p
<aeth> yeah, or that
Kevslinger has joined #lisp
<aeth> It's probably not to hard to do utf-8 on Windows since almost the entire web speaks utf-8 now.
<jmercouris> make-in-memory-input-stream does not support an encoding..
<aeth> I guess because that works on octets? Are you working on (CL) characters or octets?
<jmercouris> I have no idea, I'm just working wit whatever caveman gives me
<jmercouris> s/wit/with
Lycurgus has joined #lisp
Jesin has quit [Ping timeout: 258 seconds]
sauvin has quit [Ping timeout: 245 seconds]
mulk has joined #lisp
zigpaw has quit [Ping timeout: 252 seconds]
<aeth> jmercouris: So your issue is you need to pass a stream from caveman into a CSV library twice, right? The simplest answer is to put it into a string and then with-input-from-string twice if it's small enough, right?
themsay has quit [Ping timeout: 272 seconds]
<aeth> So the remaining issue then is getting it into a string
<aeth> If I'm understanding things correctly
<jmercouris> yeah that would be the simplest
<jmercouris> but all of my code is using cl-csv:do-csv
<jmercouris> and not read-csv which can take a string..
<dlowe> with-input-from-string will turn a string into a stream
<aeth> well, if do-csv takes a stream and with-input-from-string makes a stream from a string, then there's no issue
<aeth> The issue is reduced to turning your input into a string
<jmercouris> ok, I gave up
<jmercouris> I just go through the stream once and handle it in both palces
<jmercouris> plaes*
<aeth> with-output-to-string is the easiest solution, if it's a bidirectional character stream
<jmercouris> places*
papachan has joined #lisp
<jmercouris> it is
<jmercouris> but it was having problems reading the encoding for some reason
<jmercouris> I dont know I might revisit this code
<jmercouris> but I'm tired of looking at it :\
<jmercouris> at least it works now
<jmercouris> thank you all for your help/patience :D
<jmercouris> at least this code is more efficient by just going through the stream once :D
Jesin has joined #lisp
<jmercouris> goodbye everyone
jmercouris has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
Josh_2 has joined #lisp
simendsjo has quit [Ping timeout: 248 seconds]
Lycurgus has quit [Quit: Exeunt]
nanoz has quit [Ping timeout: 248 seconds]
themsay has joined #lisp
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
linack has joined #lisp
linack has left #lisp [#lisp]
mulk has quit [Quit: ZNC - http://znc.in]
shka_ has quit [Ping timeout: 245 seconds]
mulk has joined #lisp
josemanuel has joined #lisp
byronkatz has joined #lisp
josemanuel has quit [Client Quit]
vlatkoB has quit [Remote host closed the connection]
simendsjo has joined #lisp
byronkatz has quit [Quit: Going offline, see ya! (www.adiirc.com)]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
xkapastel has quit [Quit: Connection closed for inactivity]
papachan has quit [Quit: Leaving]
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]
troydm has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
rozenglass has quit [Remote host closed the connection]
rozenglass has joined #lisp
simendsjo has quit [Ping timeout: 244 seconds]
chipolux has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
defaultxr has joined #lisp
kenu has joined #lisp
<kenu> hi
<kenu> Is there a way to have quicklisp and asdf work with each other flawlessly?
<kenu> I've got my stuff in common-lisp folder as per asdf manual
<kenu> but quickload dosn't store downloaded packages there
[6502] has joined #lisp
<kenu> manually moving the folders doesnt feel to be the right way...
<pjb> kenu: you can symlink your stuff into ~/quicklisp/local-projects/
[6502] has quit [Quit: Page closed]
papachan has joined #lisp
rozenglass has quit [Remote host closed the connection]
donotturnoff has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
flazh has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
Bike has quit []
<Xach> kenu: systems provided by quicklisp will always be stored in the quicklisp directory in a certain structure.
<Xach> kenu: other systems can go anywhere as long as asdf's find-system can find them.
rumbler31 has quit [Remote host closed the connection]
LiamH has quit [Quit: Leaving.]
mindCrime has quit [Ping timeout: 245 seconds]
<Xach> kenu: I'm curious - what prompts the desire to have downloaded stuff go there?
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
kenu has quit [Ping timeout: 272 seconds]
drot has quit [Quit: Quit.]
sz0 has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
gxt has quit [Ping timeout: 256 seconds]
gxt has joined #lisp
Bike has joined #lisp
lionrouge has quit [Quit: Leaving]
alexanderbarbosa has joined #lisp
Jesin has quit [Quit: Leaving]
tombert has joined #lisp
ym555 has joined #lisp
bexx has joined #lisp
Jesin has joined #lisp
Lycurgus has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
tfb has quit []
tfb has joined #lisp
pfdietz has quit [Ping timeout: 256 seconds]
ltriant has joined #lisp
dddddd has quit [Read error: Connection reset by peer]
dddddd has joined #lisp
bexx has quit [Remote host closed the connection]
quazimodo has joined #lisp
saravia has quit [Remote host closed the connection]
<manualcrank> hey, people
<manualcrank> a few days ago i complained about the performance of sbcl on the competitive programming site open.kattis.com, specifically the awful performance (compared to other languages there) of READ-LINE.
<manualcrank> You absolutely need to be able to consume input as fast as possible on this site. Using ios_base::sync_with_stdio(false) in C++ or memory mapped input in C can chew through the input in literally 0 seconds vs. TLE (time limit exceeded) in Lisp.
<manualcrank> Here's an example: <https://open.kattis.com/problems/hardwoodspecies>
<manualcrank> A sol'n based on READ-LINE doesn't finish in the allotted 1 sec :- (
<manualcrank> Ditto one based on READ-SEQUENCE (in my tests READ-SEQUENCE --- on *STANDARD-INPUT* --- is _slower_ than READ-LINE).
<manualcrank> So anyway i managed to accidentally cobble together a solution using DEFINE-ALIEN-ROUTINE, which I can't really explain how it works because I'm a complete newbie at foreign function stuff.
<manualcrank> See it here: <http://pasted.co/d921528c>
<no-defun-allowed> nice, i was going to suggest that
<manualcrank> It calls C's gets(). Performance is dramatically better (finishes in < 0.6s, which is average).
<manualcrank> But (1) it still creates a string object for every line and (2) what I really wanted to do was be able to call fgets_unlocked(), but couldn't figure out how to convert between stdin and *STANDARD-INPUT*