<k-stz> ok, fair enough, gonna have to test it tomorrow leaving it a C array
<pjb> also, it depends on what you want to optimize.
<k-stz> pjb: the non obvious part to me was "pattern of access"
<pjb> You may want to optimize safety and ease of use; lisp data is easier to use than foreign data.
<dwts> mrottenkolber: is there an alternative that returns same results across implementations?
<dwts> sorry, that was fro mfiano
<k-stz> But also the idea to make a lisp-array from pointer data sounded mildly exciting ;), so I thought it made by even a common thing to do!
<Bike> it is. cffi has translator functions for it, i think.
<pjb> It's only that it's slow. So you need to be able to amortize it, if your purpose is to optimize execution speed.
<Bike> it basically amounts to making a lisp array of the length of the c array and copying the c array contents (translating as you go)
<pjb> Of course, being able to crash fast is not good either even if it's a common choice.
<mfiano> dwts: The author of Common Lisp Recipes gives an example, `(type-of "foo")`, giving 4 different results across 6 different implementations. To be portable, you probably want to check for an explicit type/subtype with TYPEP/SUBTYPEP, or perhaps someone more familiar can give more help.
<pjb> It's faster to compute the data in lisp, so you don't have to convert it!
mishoo_ has joined #lisp
<k-stz> Bike: well that's a bummer, one would imagine it would be faster
<Bike> i belive dwts only wanted type-of in the first place
<Bike> k-stz: how could it be faster
<Bike> *wanted for debugging
<dwts> mfiano: Understood. Thanks a lot
<pjb> Memory accesses are the bottleneck nowadays.
<dwts> Bike: that is correct. but mfiano's comment gave me more food for thought
wxie has quit [Remote host closed the connection]
<k-stz> Bike well just have lisp use the exact addresses pointed to, not freshly allocate an array
<pjb> (hard disk (or ssd) accesses are non-existent, the network is usually faster).
<mfiano> clhs type-of
<Bike> but it's a c array. lisp arrays have type information and stuff. and can be garbage collected.
mishoo has quit [Read error: Connection reset by peer]
<mfiano> See `Notes`.
<Zhivago> type-of is probably only useful for debugging purposes.
<mfiano> Indeed
<Zhivago> subtypep or class-of are probably useful.
AxelAlex has quit [Quit: AxelAlex]
<dwts> interesting
<dwts> I was wondering, is anyone here using common lisp at work? I've only used scheme (in the past) common lisp (now) for some toy projects
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<k-stz> ah I see thank you and good day
markong has quit [Remote host closed the connection]
k-stz has quit [Remote host closed the connection]
dfgdfgdf has quit [Quit: Leaving]
<Xach> dwts: i usually use common lisp at work
<dwts> Xach: Given that there aren't many (to my knowledge) common lisp positions, how many years of experience one would require to get a senior common lisp position?
<Xach> dwts: no idea, sorry.
<dwts> also if you don't mind in which field are you using common lisp?
<dwts> Xach: np
<Xach> I do contract work, so the work varies a lot.
<dwts> so, wide range of application
<dwts> well I guess, if youare a contractor, client doesn't care what lang you are using
damke has quit [Ping timeout: 240 seconds]
<Xach> In my case, I am hired specifically to help on Common Lisp projects.
<dwts> that's nice
JenElizabeth has quit [Remote host closed the connection]
JenElizabeth has joined #lisp
<Xach> There are CL projects in many companies, but they are not often made public. They are often the work of enthusiastic individuals who really want to use Common Lisp and have some discretion at work. That might be because they are founders or just given a lot of independence.
<Xach> Student work turned into a product
<Xach> etc
quazimodo has quit [Ping timeout: 248 seconds]
<Xach> Before I did contract CL work, I used CL to write tools to make life easier in various ways - to process or generate data, or to generate code for tools in other languages.
<dwts> Yeah, I've noticed that you can't get much info on that subject. Apart from a few companies that were using common lisp and then turned to python/whatever it's really hard to get any info
lisp_guest has quit [Ping timeout: 248 seconds]
<dwts> Xach: generate code? Now that sounds very interesting!
SuperJen has joined #lisp
<Xach> dwts: rob warnock has written quite a bit on the topic. he uses the CL pretty-printer in nice ways to generate code.
<Xach> Somewhere in the 3,265 articles at https://www.xach.com/rpw3/articles/
* Xach can't think of the right keywords at the moment
mishoo_ has quit [Ping timeout: 240 seconds]
damke has joined #lisp
JenElizabeth has quit [Ping timeout: 268 seconds]
<dwts> lol, that is a big list!
Jen has joined #lisp
Jen is now known as Guest74841
<dwts> Xach: this kind of info make lisp's power look unlimited...or only limited to one's imagination
SuperJen has quit [Ping timeout: 240 seconds]
<Xach> dwts: Rob Warnock is a creative and inspiring hacker.
SuperJen has joined #lisp
damke has quit [Ping timeout: 240 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
damke_ has joined #lisp
<dwts> Xach: how come he's using usenet and not some mailing list? He sure sounds old :P
* dwts checking age
<dwts> yep, I think I'm right
Guest74841 has quit [Ping timeout: 260 seconds]
damke has joined #lisp
<Xach> dwts: usenet was the center of lisp discussion for multiple decades
stee_3_ has quit [Ping timeout: 255 seconds]
<dwts> Xach: didn't know that
damke_ has quit [Ping timeout: 240 seconds]
<mejja> (format t "~%foo_t ~a_foos[~d] = {~ ~%~{~<~%~1,68:; {~/0x/, ~2/0x/}~>~^,~}~%};~%" instance (/ (length data) 2) data))
<mejja> readable?
damke_ has joined #lisp
<antoszka> I thought you had "insane" there ;)
stee_3 has joined #lisp
<dwts> lol
damke has quit [Ping timeout: 240 seconds]
<dwts> Xach: how feasible do you think it would be to write a linter in common-lisp? I was thinking about a chef linter
fikka has quit [Ping timeout: 248 seconds]
<Xach> dwts: Feasible? Always very feasible. Perhaps not especially easy.
<dwts> hehe
<pjb> and already done multiple times.
xfwduke has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
<aeth> mejja: format takes in streams, so you can break it up into smaller parts and even mix non-format writing/printing things in as well
<aeth> I would personally break up any long thing into multiple lines
<aeth> (only format nil would make this hard, but you could use with-output-to-string instead to generate a string that way)
damke has joined #lisp
<dwts> cool stuff!
damke_ has quit [Ping timeout: 240 seconds]
<aeth> mejja: Here's an example (but, of course, this is a toy example and I wouldn't break this up): (progn (format t "Hello, ") (format t "world!"))
<aeth> So I'd personally break up what you're doing into logical subsections if possible.
<mejja> code snippet is from the link pasted by Xarch a page up. original author is Rob Warnock not me..
<Xach> Xarch! That's a euro-typo I haven't seen in ages.
<aeth> mejja: Well, it's bad style, it's like having a 200 line function or something.
<mejja> Xach: 😛
* Xach can't see that in his 7x14 font in xterm :(
<dwts> works nice in terminology
<aeth> mejja: if it ran (it doesn't!) and if Lisp Paste was still up, I'd try to make it more readable
MrBusiness has joined #lisp
fikka has joined #lisp
<aeth> If you want to see a completely different approach to generating C-style syntax, I generate a subset of GLSL (which uses C-style syntax) recursively here: https://gitlab.com/zombie-raptor/zombie-raptor/blob/79ba7be2b51ca8992c453490fb9a7bb109027818/data/generate-glsl.lisp
neoncontrails has quit [Remote host closed the connection]
<aeth> It's not very efficient because it recursively returns strings generated by format nil, but it runs while compiling to produce constant strings so I don't really care about performance. If I had to write it today, I might consider a with-output-to-string stream instead of returning and concatenating strings.
damke has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 255 seconds]
fortitude has quit [Quit: Leaving]
neoncontrails has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
smokeink has joined #lisp
X-Scale has quit [Ping timeout: 268 seconds]
[X-Scale] has joined #lisp
[X-Scale] is now known as X-Scale
damke has joined #lisp
fikka has joined #lisp
peterhil has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 268 seconds]
peterhil has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
hexfive has quit [Quit: WeeChat 1.9.1]
wooden has quit [Read error: Connection reset by peer]
White_Flame has quit [Changing host]
White_Flame has joined #lisp
wooden_ has joined #lisp
White_Flame has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
emaczen` has joined #lisp
White_Flame has joined #lisp
Ukari has quit [Ping timeout: 268 seconds]
emaczen has quit [Ping timeout: 255 seconds]
rumbler31 has joined #lisp
caseyowo has joined #lisp
quazimodo has joined #lisp
fikka has joined #lisp
python476 has quit [Ping timeout: 240 seconds]
X-Scale has quit [Ping timeout: 248 seconds]
[X-Scale] has joined #lisp
[X-Scale] is now known as X-Scale
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
zachk has quit [Quit: night]
fikka has quit [Ping timeout: 240 seconds]
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
smokeink has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
d4ryus1 has joined #lisp
d4ryus has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
mejja has quit [Quit: mejja]
Xal has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 268 seconds]
igemnace has joined #lisp
Xal has joined #lisp
dieggsy has quit [Remote host closed the connection]
dieggsy has joined #lisp
pierpa has quit [Quit: Page closed]
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
voidlily has quit [Ping timeout: 258 seconds]
alexmlw has joined #lisp
fikka has joined #lisp
Jen has joined #lisp
Jen is now known as Guest67214
tonton__ has joined #lisp
tonton has quit [Ping timeout: 248 seconds]
phax has joined #lisp
SuperJen has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 248 seconds]
alexmlw has quit [Quit: alexmlw]
tonton__ has quit [Ping timeout: 248 seconds]
test1600 has joined #lisp
tonton has joined #lisp
fikka has joined #lisp
SuperJen has joined #lisp
dddddd has quit [Remote host closed the connection]
<internet_cafe> hi
Guest67214 has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 260 seconds]
<internet_cafe> i got a dumb question
<internet_cafe> any clisp nerds down to answer a dumb question?
<mfiano> just ask your question, and understand that 'clisp' refers to an implementation, and not common lisp the language
dieggsy has quit [Read error: Connection reset by peer]
<internet_cafe> ok, i have a list like (('a' 1) ('b' 2) ('c' 3)), is there a way to get 3 by looking up 'c' ?
<Bike> clhs assoc
<Bike> is 'a' supposed to mean a string or what? that's not valid syntax.
<mfiano> I don't think you realize what that list represents
<mfiano> that is quoting each atom, and not stringifying the cars of each sublist
<pjb> Bike: it's still valid syntax.
<pjb> Bike: ' is a terminating macro.
<pjb> (quote (('a' 1) ('b' 2) ('c' 3))) #| --> (('a '1) ('b '2) ('c '3)) |#
<Bike> i have my doubts that that's happening here
mson has joined #lisp
<pjb> internet_cafe: (let ((list (quote (('a' 1) ('b' 2) ('c' 3))))) (cadadr (assoc 'c list :key (function cadr)))) #| --> 3 |#
<pjb> Bike: what's happening here is that you have a newbie who refuses to read a tutorial.
<pjb> internet_cafe: if you want more: Common Lisp: A Gentle Introduction to Symbolic Computation http://www.cs.cmu.edu/~dst/LispBook/ http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
smokeink has joined #lisp
<internet_cafe> thank you
<internet_cafe> yeah i understand its not valid syntax
<pjb> internet_cafe: it's perfectly valid syntax.
Ukari has joined #lisp
<pjb> internet_cafe: but it doesn't do what you believe.
<pjb> internet_cafe: cf. http://sprunge.us/eTQD
<pjb> internet_cafe: if you read a tutorial, you'd know that 'x is equivalent to (quote x) and quote is a symbol just like any other.
damke has joined #lisp
fikka has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
<internet_cafe> thanks, i know " " is for strings
<internet_cafe> i appreciate all the friendly advice
<internet_cafe> it was assoc / alist that i was interested in
<internet_cafe> i'll continue to RTFM
<pjb> internet_cafe: did you mean strings?
<pjb> You will have to use the :test option, since in general, you don't keep references to the string used as keys…
voidlily has joined #lisp
damke_ has joined #lisp
<pjb> internet_cafe: one advantage of lisp is also one inconvenient. Since it's written using syntax for data, almost all forms are valid. As data of course, but also as lisp source, since you can always interpret any lisp data as lisp code. At worst, it will signal an error (and this may be what you want, who are we to say otherwise?).
<pjb> internet_cafe: the big advantage from this is that it gives the programmer great freedom to transform the code as you wish, and to process it very easily thru functions and macros.
damke has quit [Ping timeout: 240 seconds]
<pjb> There are still some texts you cannot read as lisp data. For example if you have unbalanced | or if you have multiple dots in lists or vectors, things like that.
<pjb> (foo|bar) #| ERROR: Unexpected end of file on #<string-input-stream :closed #x302008CDECCD> |#
<pjb> (foo . bar . baz) #| ERROR: Reader error on #<string-input-stream :closed #x302008CFECCD>: Dot context error in ".". |#
<pjb> (foo ') #| ERROR: Reader error on #<string-input-stream :closed #x302008C5ECCD>: Unmatched ')' . |#
<hooman> hehe
<pjb> More than 2 colons too, depending on the implementation: (quote cl-user:::bar) #| --> \:BAR |# but ccl accepts it.
shifty has joined #lisp
thebardian has joined #lisp
fikka has joined #lisp
Bike has quit [Quit: Lost terminal]
BitPuffin|osx has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
aoeu1024 has quit [Ping timeout: 248 seconds]
LocaMocha has joined #lisp
jameser has joined #lisp
_whitelogger has joined #lisp
voidlily has quit [Remote host closed the connection]
fikka has joined #lisp
xfwduke has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Remote host closed the connection]
quazimodo has joined #lisp
safe has joined #lisp
damke_ has quit [Ping timeout: 252 seconds]
xfwduke has joined #lisp
slyrus has joined #lisp
dieggsy has joined #lisp
Jonsky has joined #lisp
fikka has joined #lisp
ksool has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
ksool has joined #lisp
neoncontrails has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
xfwduke has quit [Ping timeout: 260 seconds]
asarch has quit [Quit: Leaving]
Ukari has quit [Ping timeout: 248 seconds]
lisp_guest has joined #lisp
zmt00 has quit [Quit: Leaving]
fikka has joined #lisp
<beach> Good morning everyone!
fikka has quit [Ping timeout: 250 seconds]
vtomole has joined #lisp
smokeink has quit [Remote host closed the connection]
dieggsy has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
<fiddlerwoaroof> morning beach
oleo has quit [Quit: Leaving]
milanj has quit [Quit: This computer has gone to sleep]
easye has joined #lisp
panji has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
resttime has joined #lisp
d4ryus1 is now known as d4ryus
damke_ has joined #lisp
mson has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
sellout has quit [Ping timeout: 240 seconds]
phax has quit [Quit: phax]
shifty has quit [Ping timeout: 248 seconds]
Jonsky has quit [Ping timeout: 260 seconds]
voidlily has joined #lisp
damke_ has joined #lisp
fikka has joined #lisp
Karl_Dscc has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
flamebeard has joined #lisp
vlatkoB has joined #lisp
fikka has joined #lisp
quazimodo has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<vtomole> I don't know where to ask this, but I've been trying to implement a lisp parser in C using recursive decent, and it's recursive more than in should. I've looked at it for a week now, so this is my last resort:https://gist.github.com/vtomole/5ec6bb35080c3c544682eaa58c19604e
<vtomole> Any help appreaciated!
rumbler31 has joined #lisp
lisp_guest has quit [Ping timeout: 248 seconds]
dec0n has joined #lisp
fikka has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
<jasom> vtomole: unless it's specifically a common lisp parser, that's off-topic here, perhaps ##lisp? One on-topic answer I can give you is to point you to http://clhs.lisp.se/Body/02_b.htm which describes the algorithm used by common lisp for parsing
<vtomole> Sorry yeah. Common Lisp parser
<vtomole> I'm trying to boostrap CL off C
<jasom> jasom: http://www.lispworks.com/documentation/HyperSpec/Body/02_da.htm describes the default behavior of the "(" character
<vtomole> Yeah. I've read those, and I'm pretty sure my implementation idoes it. There is just a small bug with mine. It recurses more than it should using a token list
<beach> vtomole: How is your token list represented?
<jasom> The core algorithm is a very simple parser with essentially only 1 character lookahead
Karl_Dscc has quit [Remote host closed the connection]
<jasom> vtomole: slight nit-pick; you do not use that algorithm, since it is character based and you are tokenizing your parens
<beach> vtomole: I agree with jasom.
<vtomole> jasom: Sure sorry
fikka has quit [Ping timeout: 248 seconds]
<beach> vtomole: In parse_pair, what is the token list after you parse the CAR?
<beach> vtomole: It looks like it is the same as it was before you parse the CAR.
<jasom> indeed, I don't see you descending to the next item anywhere in this code
<jasom> so you are just parsing the same opening parentheses forever
Khisanth has quit [Ping timeout: 268 seconds]
<vtomole> Hmm let me check
<jasom> consider perhaps using a debugger to inspect your call stacks, that would make what is going on obvious
<jasom> "C-f next" showed no results in the gist you pasted...
<vtomole> next for token_list? That's what I had earlier. I switch it back to that after the remove front segfaults
<jasom> vtomole: why did it segfault?
<vtomole> I'm trying to figure that out right now with GDB.
<vtomole> token list before car :+ ( - 2 3 ) 7 ). token list after car: + ( - 2 3 ) 7 ) ( - 2 3 ) 7 ) - 2 3 ) 7 )
<vtomole> This is with:(+ (- 2 3) 7 )
damke has joined #lisp
<vtomole> before and after: "car_obj = parse(token_list);" to be more specific
damke_ has quit [Ping timeout: 240 seconds]
<jasom> hmm, I would expect that you'd end up with a cons containing two pluses, but I can't see all the code, so don't know for sure
mishoo_ has joined #lisp
<vtomole> Two pluses?
<jasom> oh, no that's not what you would end up with because this code is confusing
<vtomole> Where is it confusing?
<beach> vtomole: It is confusing in many ways.
<jasom> parse_pair is called with a token list beginning with the token before the CAR. That is very counterintuitive
caseyowo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Khisanth has joined #lisp
nowhere_man has quit [Remote host closed the connection]
<jasom> I assume that scmp is the same as !strcmp() but can't be sure...
<beach> vtomole: A function such as parse_pair or atom must return two things, the result of the parse, and the remaining token list. Otherwise, you will end up calling the same function over and over again on the same list of tokens.
<vtomole> jasom: Sorry sorry it is. i forgot to change that, but is call strcmp, but i don't have to type "==0".
<vtomole> *it calls
<beach> vtomole: Also, in parse_pair, once you parse the CAR, you parse the CDR by calling parse_pair, but parse_pair starts by removing the first token, assuming it is an opening parenthesis, but that is not the case for the remainder of the list of tokens.
<jasom> vtomole: alternatively to returning the remaining token list, you can destructively modify it, since lisp's parsing algorithm will never backtrack. But you need *some* way of signaling how much was parsed
fikka has quit [Ping timeout: 260 seconds]
nowhere_man has joined #lisp
<vtomole> jasom: I tried destructively modfiying it by calling a remove_front() procedure, but that caused a segfault after a couple of calls to parse_pair()
emaczen`` has joined #lisp
<jasom> vtomole: destructively modifying it is perhaps harder to get right, but getting anything right without planning it out is going to be hard
<vtomole> beach: Would removing the token from the list be a better solution than returning two things?
<vtomole> jasom: I understand
emaczen` has quit [Ping timeout: 250 seconds]
<jasom> vtomole: for returning multiple values in C, it is idiomatic to have the return value be an indication of success, and then pass all of the "output" values as pointer parameters
<beach> vtomole: You need to return two things, both the result of the parse, and the remaining tokens. But you can do it as jasom says, or you can return a struct.
<vtomole> struct it is! :)
<jasom> so e.g. int parse(object **parsedObject, token_list ** tokenList); // which is invoked like {object *result; if(parse(&result, &theList)) ...
fikka has joined #lisp
emaczen`` has quit [Ping timeout: 250 seconds]
caseyowo has joined #lisp
fikka has quit [Ping timeout: 258 seconds]
Devon has quit [Ping timeout: 248 seconds]
safe has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<beach> vtomole: And you need to remove the left parenthesis before calling parse_pair. And parse_pair should be renamed. Call it parse_list instead, because the list can be empty.
<vtomole> sure. thank you.
<beach> vtomole: And you have WAY too many blank lines in that code.
<vtomole> I'm paranoid about making it readable
BigSafari has joined #lisp
daniel-s has joined #lisp
<pjb> vtomole: you cannot implement a Common Lisp parser without implementing the whole Common Lisp. Read chapter 2.
<beach> vtomole: By having blank lines, there are fewer lines displayed simultaneously, making it harder to read.
<beach> pjb: I think we will take that issue at some later point.
<pjb> :-)
<beach> pjb: vtomole has some more fundamental problems with programming in general that we need to address first.
<vtomole> You need to implement the whole language before implementing it's parser?
<beach> Yes.
<beach> vtomole: Also, please indent your code correctly.
<jasom> vtomole: which is why you implement a subset for bootstrapping
fikka has quit [Ping timeout: 258 seconds]
<vtomole> beach: I "M-x-indent-code" ed that before i posted it.
shka has joined #lisp
eSVG has joined #lisp
<vtomole> Thanks a lot guys!
<pjb> vtomole: you could use an enum for the token type instead of strings. This would simplify testing, and also it would be faster.
fikka has joined #lisp
jameser has quit [Max SendQ exceeded]
<vtomole> Yeah. I'm going to do that now that it works. I always try to get a dirty implementation working first.
jameser has joined #lisp
<pjb> vtomole: you should start by writing the grammar you want to parse. Then you can either implement the parser by hand, or use a parser generator from the grammar.
<pjb> Using flex and bison (or lex and yacc), you could implement the lexer and parser in 2 hours.
<vtomole> Im doing this for learning reasons, so i want to implement it without a generator.
<pjb> ok
Ukari has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
fikka has joined #lisp
<beach> vtomole: Then, when you get this version to work, I suggest you rewrite it completely using getchar() so that it will be closer to what Common Lisp READ does. As you can see from the Common Lisp HyperSpec, the Common Lisp READ function does not tokenize first.
<pjb> Also, you can implement a readtable.
<pjb> (even in C).
<beach> vtomole: Also, by using getchar() you don't have to return two values, since the stream is destructively modified by getchar().
<beach> vtomole: Section 2.2 of the Common Lisp HyperSpec is very detailed and phrased in terms of an input stream.
Kevslinger has quit [Quit: Connection closed for inactivity]
vtomole has quit [Ping timeout: 260 seconds]
thebardian has quit [Remote host closed the connection]
mson has quit [Quit: Connection closed for inactivity]
caseyowo has quit [Ping timeout: 248 seconds]
<loke`> I'm reading this document about LISP 1.5:
shka has quit [Ping timeout: 240 seconds]
<loke`> On page 24, the following sentence can be foundL “The commas in writing S-expressions may be omitted. This is an accident.”
<loke`> Wtf? :-)
<loke`> Sorry. It's LISP I
<loke`> Or 1?
<pjb> 1
<pjb> Yes, the initial sexp syntax used comma instead of space, so symbols could have space in their name!
<pjb> (A MAN,THE CAT) was a list of two symbols: (|A MAN| |THE CAT|) in CL.
murii has joined #lisp
trosa-work has joined #lisp
<pjb> note that semicolon was used in m-expressions.
trosa-work has quit [Client Quit]
Reinhilde is now known as Ellenor
beach` has joined #lisp
beach has quit [Disconnected by services]
beach` is now known as beach
Ukari has quit [Ping timeout: 268 seconds]
<loke`> pjb: I saw that in the original paper from McCarthy. But I didn't know how it worked in LISP 1
<loke`> So are you saying that spaces was not allowed in symbols in LISP 1, but it was intended to work just like the original paper?
<loke`> This means that they have four different notations in this document: Maths, M-exprs, comma-separated expr and finally, the actual sexprs used in the implementation.
orivej has quit [Ping timeout: 268 seconds]
<Shinmera> No pseudo-code?
<loke`> Shinmera: I don't think so. I can't see any.
<loke`> But they express everything using at least two notations: M-exprs and S-exprs.
<loke`> It's clear that at the time of writing, they still saw sexprs as being a hack, and something to be replaced by m-exprs at a later time.
<Shinmera> Another instance of people being unable to predict even the near future.
rumbler31 has joined #lisp
<loke`> Hmm, they use the term SAP in this document. It seems the history of that term's use in SBCL dates back to the beginning.
<loke`> (I don't know what the abbreviation means though)
fikka has quit [Ping timeout: 260 seconds]
<Shinmera> In SBCL I believe it's System Area Pointer
<loke`> Oh
nowhere_man has quit [Ping timeout: 240 seconds]
<loke`> they use it in the LISP 1 manual to refer to machine code.
kolko has joined #lisp
<loke`> or assembly.
fikka has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
fluter has quit [Ping timeout: 252 seconds]
panji has left #lisp [#lisp]
hhdave has joined #lisp
eSVG has quit [Quit: Leaving]
fluter has joined #lisp
nowhere_man has joined #lisp
nowhere_man has quit [Client Quit]
test1600 has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
test1600 has joined #lisp
megalography has joined #lisp
Ukari has joined #lisp
PressAI has joined #lisp
damke has quit [Ping timeout: 240 seconds]
damke has joined #lisp
angavrilov has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
milanj has joined #lisp
_cosmonaut_ has joined #lisp
daniel-s has quit [Remote host closed the connection]
arbv has quit [Ping timeout: 250 seconds]
arbv has joined #lisp
arbv has quit [Ping timeout: 248 seconds]
arbv has joined #lisp
_cosmonaut_ has quit [Remote host closed the connection]
arbv has quit [Ping timeout: 255 seconds]
arbv has joined #lisp
BitPuffin|osx has quit [Ping timeout: 248 seconds]
_cosmonaut_ has joined #lisp
PressAI has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 248 seconds]
Cymew has quit [Remote host closed the connection]
arbv has quit [Ping timeout: 240 seconds]
arbv has joined #lisp
trosa-work has joined #lisp
trosa-work has quit [Remote host closed the connection]
trosa-work has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trosa-work has quit [Remote host closed the connection]
test1600 has quit [Read error: Connection reset by peer]
Ukari has quit [Ping timeout: 258 seconds]
scymtym has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
m00natic has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
aoeu256 has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
yrk has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
dddddd has joined #lisp
brendyn has quit [Quit: WeeChat 1.9.1]
Ellenor is now known as Reinhilde
damke has quit [Ping timeout: 240 seconds]
jameser has joined #lisp
brendyn has joined #lisp
Bicyclidine has joined #lisp
Cymew has joined #lisp
jameser has quit [Ping timeout: 260 seconds]
thinkpad has joined #lisp
arbv has quit [Ping timeout: 255 seconds]
damke has joined #lisp
arbv has joined #lisp
wxie has joined #lisp
yeticry has quit [Ping timeout: 240 seconds]
lrvy has joined #lisp
shifty has joined #lisp
lrvy has quit [Client Quit]
orivej has joined #lisp
yeticry has joined #lisp
lisp_guest has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
murii has quit [Read error: Connection reset by peer]
arbv has quit [Ping timeout: 240 seconds]
yeticry has quit [Remote host closed the connection]
yeticry has joined #lisp
Jen has joined #lisp
Jen is now known as Guest62504
murii has joined #lisp
quazimodo has quit [Ping timeout: 250 seconds]
SuperJen has quit [Ping timeout: 240 seconds]
arbv has joined #lisp
milanj has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
Amplituhedron has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 255 seconds]
Kevslinger has joined #lisp
arbv has joined #lisp
igemnace has quit [Quit: WeeChat 1.9.1]
jameser has joined #lisp
trosa-work has joined #lisp
Tobbi has joined #lisp
jameser has quit [Ping timeout: 240 seconds]
brendyn has quit [Read error: No route to host]
arbv has quit [Ping timeout: 250 seconds]
jameser has joined #lisp
brendyn has joined #lisp
yeticry has quit [Ping timeout: 255 seconds]
arbv has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
EvW has joined #lisp
damke_ has joined #lisp
GrayArea has joined #lisp
arbv has quit [Ping timeout: 258 seconds]
yeticry has joined #lisp
damke has quit [Ping timeout: 240 seconds]
arbv has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
arbv has quit [Ping timeout: 248 seconds]
nowhere_man has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
arbv has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has joined #lisp
yeticry has quit [Ping timeout: 248 seconds]
Bicyclidine has quit [Ping timeout: 240 seconds]
Guest62504 has quit [Remote host closed the connection]
Guest62504 has joined #lisp
arbv has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
arbv has joined #lisp
yeticry has joined #lisp
murii has quit [Ping timeout: 240 seconds]
eudoxia has joined #lisp
rumbler31 has joined #lisp
murii has joined #lisp
rumbler31 has quit [Remote host closed the connection]
murii_ has joined #lisp
murii has quit [Read error: Connection reset by peer]
wxie has quit [Quit: Bye.]
igemnace has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
murii_ has quit [Ping timeout: 268 seconds]
murii_ has joined #lisp
arbv has joined #lisp
lnostdal has quit [Ping timeout: 248 seconds]
python476 has joined #lisp
DGASAU has joined #lisp
Bike has joined #lisp
jameser has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tobbi has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lnostdal has joined #lisp
jameser has joined #lisp
Tobbi has quit [Remote host closed the connection]
Tobbi has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
k-stz has joined #lisp
attila_lendvai has quit [Ping timeout: 252 seconds]
dddddd has quit [Ping timeout: 240 seconds]
jameser has joined #lisp
murii_ has quit [Ping timeout: 252 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Josh_2 has joined #lisp
BitPuffin|osx has joined #lisp
Tobbi has quit [Remote host closed the connection]
Tobbi has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
jameser has joined #lisp
rumbler31 has joined #lisp
igemnace has joined #lisp
tlaxkit has joined #lisp
oleo has joined #lisp
FreeBirdLjj has joined #lisp
kami has joined #lisp
mson has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kami> Hello #lisp.
<Josh_2> areeet
<oleo> hello kami
<Josh_2> oleo: this gonna sound strange, but I was thinking about you today O:
<oleo> what were you thinking about me today ?
FreeBirdLjj has quit [Ping timeout: 240 seconds]
vlatkoB has quit [Remote host closed the connection]
<oleo> :)
<Josh_2> I mean it wasn't bad
vlatkoB has joined #lisp
<oleo> ah :)
<oleo> that's always good
LiamH has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
jameser has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<Josh_2> Was about you saying you worked in a warehouse or a factory, something like that a long while ago
<oleo> jep
lnostdal has quit [Ping timeout: 258 seconds]
jameser has quit [Client Quit]
zagura has quit [Ping timeout: 240 seconds]
hjudt has quit [Ping timeout: 255 seconds]
<oleo> i suppose you were more on #clnoobs then
jmercouris has joined #lisp
<Josh_2> Yah
<jmercouris> Can someone please explain to me why in CLOS we define both an accessor and a slot name?
<jmercouris> In which scenarios would we want them to be different?
papachan has joined #lisp
<beach> jmercouris: Slots are implementation details and should be hidden.
zagura has joined #lisp
zagura has quit [Changing host]
zagura has joined #lisp
<jmercouris> So it's basically just a question of encapsulation?
<beach> "just"? Yes.
<oleo> jmercouris, when the class layer abstraction terminology has to be different than the application layer terminology maybe ?
<eudoxia> accessors are methods, and so can be overridden in subclasses
<kami> orivej: I'm trying to (ql:quickload :quickdist) and get an error re com.informatimago.common-lisp.lisp-reader. Does it work for you?
igemnace has joined #lisp
<jmercouris> eudoxia: Aha! That is a scenario that makes sense to me
<jmercouris> Thank you all for your input!
<jmercouris> beach: Also you are right, the struct type way of naming acessors is unbelievably verbose and painful
<Shinmera> eudoxia: Accessors can also have around, after/before, so you can implement checks and computations.
<Shinmera> err, jmercouris
<beach> jmercouris: What is the "struct type way"?
<Shinmera> Having the struct name prefixed to the slot accessor name.
<beach> Ah, yes, right.
trosa-work has quit [Remote host closed the connection]
<jmercouris> beach: Yeah you said it like a month or so ago, I've only now found myself agreeing with it
<beach> I see.
<orivej> kami: yes, it does
<jmercouris> Shinmera: So basically this aids in the encapsulation by being able to effectively define something akin to "setters" and "getters" in java?
<Shinmera> Yes.
<Shinmera> It's just much more convenient than setters and getters, so you don't notice it usually.
<kami> orivej: where does the system c.i.c-l.lisp-reader gets loaded from in your case? Is it in Quicklisp?
jameser has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<orivej> kami: sorry, no, it is from the commit a1ef00b of my checkout of lisp-reader. Feel free to fix it and submit a PR, or I'll look into it in a few days.
lnostdal has joined #lisp
milanj has joined #lisp
<kami> orivej: I'll have a look today.
<orivej> thank you
milanj has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
sjl has joined #lisp
<kami> orivej: what exactly is 'my checkout of lisp-reader'? I assumed you forked com.informatimago either on gitlab or on github, but don't find anything.
oleo has joined #lisp
jdz has quit [Ping timeout: 264 seconds]
<orivej> kami: it is not a fork, just a checkout of the source repo: https://github.com/informatimago/lisp/tree/a1ef00b
<kami> orivej: I see. Thank you.
milanj has joined #lisp
fikka has joined #lisp
resttime has quit [Ping timeout: 258 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
neoncontrails has joined #lisp
jdz has joined #lisp
zooey has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 248 seconds]
BitPuffin|osx has quit [Ping timeout: 264 seconds]
jameser has joined #lisp
jameser has quit [Client Quit]
zooey has joined #lisp
Josh_2` has joined #lisp
Josh_2` has quit [Read error: Connection reset by peer]
Josh_2 has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
FreeBirdLjj has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
kami has quit [Ping timeout: 240 seconds]
damke has joined #lisp
rippa has joined #lisp
fikka has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
<jmercouris> I'm trying to include parenscript in my program (which I distribute as a binary), I see the function (ps:ps-compile-stream), so I should be able to compile parenscript into javascript from some stream
Josh_2 has quit [Ping timeout: 240 seconds]
rumbler3_ has joined #lisp
<jmercouris> Therefore, my question is, where, and how to save my parenscript such that I can load it using ps-compile-stream
fikka has quit [Ping timeout: 248 seconds]
<eudoxia> you can use asdf:system-relative-pathname to get the absolute path of a file in your source tree
<jmercouris> eudoxia: A good idea, but when I compile my program, I don't ship it with ASDF in the image
<eudoxia> (asdf:system-relative-pathname :my-app #p"resources/ps/main.lisp")
igemnace has quit [Read error: Connection reset by peer]
<eudoxia> right, yeah, you might need to have ASDF do the transformation at build time
<eudoxia> this would require building an ASDF extension, but I'm certain someone must've built one for parenscript
igemnace has joined #lisp
<jmercouris> eudoxia: It says here: http://quickdocs.org/asdf-linguist/ that you yourself have worked on this system
<jmercouris> or am I mistaken?
<eudoxia> yes
BigSafari has quit [Ping timeout: 248 seconds]
<eudoxia> don't know if asdf-linguist works on modern ASDF, mind you
igemnace has quit [Read error: Connection reset by peer]
rumbler3_ has quit [Ping timeout: 248 seconds]
<jmercouris> I'm afraid this solution isn't very satisfactory
<jmercouris> Is there a way to inline parenscript in common lisp files?
<eudoxia> yes
<eudoxia> you can perform the transform at run-time
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris> eudoxia: How can I do that?
<jmercouris> Can you please show me a very brief example?
<eudoxia> something like (defparameter +my-code+ `(progn ... parenscript code here ...)) and then use (ps:ps +my-code+)
<eudoxia> i think this should work
<jmercouris> Hmm, yes that should work, that's a good idea I think
<jmercouris> Yes, perhaps not the most elegant, but it will always work
<eudoxia> actually, uh, ps:ps is a macro
<jmercouris> Damnit
<jmercouris> I was about to suggest making a macro that automatically compiles parenscript inline and wraps them in defaparams
<eudoxia> yes
<eudoxia> (ps:ps <some ps code>) will evaluate to a string at macroexpansion time
<eudoxia> ps:ps* is the function underlying the macro
<jmercouris> so we're looking at something like (defparameter ps-function-1 (ps:ps <ps code>))
<jmercouris> and then I can just inject ps-function-1 wherever I need that js
<eudoxia> yes
<eudoxia> you could do that
<jmercouris> I'll probably make a nice macro to do it then, thanks for your advice
<jmercouris> I think this is a good and simple way to inline
<jmercouris> Maybe at some latter point, if it ever actually matters, I'll make a robust way to load resources from my executable regardless of platform
<jmercouris> I can create resources robustly, and access those created ones, what I cannot do is robustly ship resources (e.g. including parenscript file with my sources)
Cymew has quit [Remote host closed the connection]
kami has joined #lisp
fikka has joined #lisp
lisp_guest has quit [Quit: Leaving]
<kami> pjb: is 'com.informatimago.common-lisp.lisp-reader' in Quicklisp?
igemnace has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
flamebeard has quit [Quit: Leaving]
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
dec0n has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<mfiano> jmercouris: the path to the asdf system may be different on a user's machine from the path when it was compiled. i have a hacky solution to that problem
SaganMan has joined #lisp
lnostdal has quit [Ping timeout: 250 seconds]
sjl has quit [Quit: WeeChat 1.9]
sjl has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
brendyn has quit [Ping timeout: 240 seconds]
<jmercouris> mfiano: It's okay, I won't be using ASDF for this task
<jmercouris> mfiano: Thank you for the offer though
<mfiano> I use UIOP
<mfiano> Which is included with asdf
<jmercouris> mfiano: I am familiar with UIOP, I use it for a few things myself
<jmercouris> mfiano: An interesting idea
hjudt has joined #lisp
FreeBirdLjj has joined #lisp
<hjudt> Shinmera: that's great! it gives more insight and will help alot.
myrkraverk_ has joined #lisp
<jmercouris> mfiano: Thank you for sharing
<Shinmera> I hope it will help people too, not just alots.
<mfiano> sure
lnostdal has joined #lisp
myrkraverk has quit [Ping timeout: 268 seconds]
DGASAU has quit [Ping timeout: 240 seconds]
myrkraverk_ is now known as myrkraverk
JuanDaugherty has joined #lisp
rumbler3_ has joined #lisp
fikka has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
thinkpad has quit [Ping timeout: 248 seconds]
DGASAU has joined #lisp
hooman has quit [Ping timeout: 248 seconds]
rumbler3_ has quit [Ping timeout: 248 seconds]
DGASAU has quit [Ping timeout: 246 seconds]
zmt00 has joined #lisp
DGASAU has joined #lisp
Ukari has joined #lisp
moei has quit [Quit: Leaving...]
asarch has joined #lisp
Josh_2 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
raynold has joined #lisp
Guest62504 has quit [Ping timeout: 240 seconds]
Jesin has joined #lisp
fikka has joined #lisp
nowhere_man has joined #lisp
Amplituhedron has quit [Ping timeout: 246 seconds]
damke_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
_cosmonaut_ has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Karl_Dscc has joined #lisp
whoman has joined #lisp
tlaxkit has quit [Quit: ¡Adiós!]
Amplituhedron has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
warweasle has joined #lisp
Colleen has quit [Ping timeout: 240 seconds]
EvW1 has joined #lisp
fikka has joined #lisp
rippa has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 248 seconds]
rippa has joined #lisp
lnostdal has quit [Ping timeout: 260 seconds]
hhdave has quit [Ping timeout: 246 seconds]
Khisanth has quit [Ping timeout: 260 seconds]
Amplituhedron has quit [Ping timeout: 268 seconds]
<jasom> loke`: the whole "optional commas" thing LISP 1.5 had by accident was adopted in clojure (commas are whitespace in clojure)
<Shinmera> Ick
<warweasle> Snooty accent: "How *revolting*!"
<Shinmera> Same, but unironically.
<jasom> I actually kind of like it, it gives additional tools besides indentation for segmenting the code
Amplituhedron has joined #lisp
random-nick has joined #lisp
fikka has joined #lisp
lnostdal has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
damke_ has joined #lisp
wigust has joined #lisp
m00natic has quit [Remote host closed the connection]
Amplituhedron has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
Khisanth has joined #lisp
shrdlu68 has joined #lisp
random-nick has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
angavrilov_ has joined #lisp
angavrilov has quit [Ping timeout: 268 seconds]
shka has joined #lisp
Amplituhedron has joined #lisp
dcluna has quit [Ping timeout: 248 seconds]
<shka> good evening
<Josh_2> morning
dcluna has joined #lisp
<stacksmith> To quote Alan Perlis: "Syntactic sugar causes cancer of the semicolon"
<shka> pjb: I ended up by writing my own cons cell. Code works very well now. A lot faster then before.
FreeBirdLjj has quit [Remote host closed the connection]
fikka has joined #lisp
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #lisp
rumbler3_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
moei has joined #lisp
rumbler3_ has quit [Ping timeout: 252 seconds]
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- \o/]
neoncontrails has quit [Remote host closed the connection]
fikka has joined #lisp
zacts has quit [Quit: WeeChat 1.4]
shifty has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
sjl__ has joined #lisp
yaewa has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
neoncontrails has joined #lisp
moei has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 255 seconds]
yaewa has quit [Client Quit]
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
MrBusiness has quit [Ping timeout: 240 seconds]
zacts has joined #lisp
bmgxc9 has joined #lisp
moei has joined #lisp
moei has quit [Client Quit]
Kaisyu has quit [Quit: Connection closed for inactivity]
neoncontrails has quit [Remote host closed the connection]
eudoxia has quit [Quit: Leaving]
Josh_2 has quit [Read error: Connection reset by peer]
fikka has joined #lisp
neoncontrails has joined #lisp
fikka has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
sjl__ is now known as sjl
Ukari has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
dddddd has joined #lisp
varjag has joined #lisp
pseudonymous has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
bmgxc9 has quit [Ping timeout: 250 seconds]
moei has joined #lisp
fikka has joined #lisp
jstoddard has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
pseudonymous has quit [Remote host closed the connection]
pseudonymous has joined #lisp
remi`bd has joined #lisp
Amplituhedron has quit [Ping timeout: 240 seconds]
jack_rabbit has quit [Remote host closed the connection]
fikka has joined #lisp
EvW1 has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 264 seconds]
damke has joined #lisp
yaewa has joined #lisp
fikka has joined #lisp
moei has quit [Ping timeout: 240 seconds]
yaewa has quit [Client Quit]
mson has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 255 seconds]
moei has joined #lisp
fikka has joined #lisp
k-stz has quit [Remote host closed the connection]
k-stz has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke has quit [Ping timeout: 252 seconds]
damke has joined #lisp
zachk has joined #lisp
damke has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 248 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fikka has joined #lisp
rumbler3_ has joined #lisp
Mandus has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 248 seconds]
rumbler3_ has quit [Ping timeout: 268 seconds]
<asarch> Do you recommend to learn Smalltalk for a better comprehension of CLOS?
* Ober would not
BigSafari has joined #lisp
<jasom> asarch: no; ST inspired some predecessors of CLOS, but it turned into something quite different
Karl_Dscc has quit [Remote host closed the connection]
<asarch> Thank you
<asarch> Thank you very much jasom :-)
shka has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
igemnace has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
terpri has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
vlatkoB has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
eminhi has joined #lisp
fikka has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 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]
orivej has joined #lisp
fikka has joined #lisp
eminhi has quit [Quit: leaving]
angavrilov_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
scymtym has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
damke has joined #lisp
troydm has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
jcob has joined #lisp
<jcob> Hey guys, how do you open a file as readonly, especially on linux in sbcl
<jcob> I'd rtfm but I'm having trouble finding where things like WITH-OPEN-FILE would be documented
damke has quit [Ping timeout: 240 seconds]
<Josh_2> clhs with-open-file
<Josh_2> :direction input
mson has joined #lisp
<k-stz> hey Josh_2 google practical common lisp, the lisp book, it has a chapter dedicated to it, i found it very useful just recently when I needed to look something up about with-open-file
<Josh_2> Wait why me?
<k-stz> ah autocomplete fail, was for jcob
mishoo_ has quit [Ping timeout: 264 seconds]
<Josh_2> ahh okay
Xal has quit [Ping timeout: 248 seconds]
Xal has joined #lisp
fikka has joined #lisp
jcob has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
knicklux has joined #lisp
neoncontrails has quit [Remote host closed the connection]
damke_ has joined #lisp
xrash has joined #lisp
Tobbi has joined #lisp
fikka has quit [Client Quit]
fikka has joined #lisp
papachan has quit [Quit: Saliendo]
damke_ has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
markong has joined #lisp
shrdlu68 has quit [Quit: Lost terminal]
neoncontrails has joined #lisp
pierpa has joined #lisp
<jasom> minion: tell jcob about book
<minion> book: No definition was found in the first 5 lines of http://www.cliki.net/book
<jasom> clhs with-open-file
remi`bd has quit [Quit: leaving]
<jasom> jcob: see above for the lisp specification for with-open-file
<jasom> oh, he left
knicklux has quit [Quit: Leaving]
simplegauss has joined #lisp
<aeth> Oh wow, SBCL recognizes a very complicated cond-driven tail recursion that moves back and forth between over a dozen functions... and inlines them (even the ones not declared as such), and efficiently handles them without consing.
<aeth> Because I rewrote it to use streams instead of string concatenation and thus probably made all of it tail recursive
<foom2> It won't inline functions not declared as inline.
<aeth> It won't inline functions declared as notinline
<foom2> It also won't inline functions not declared as inline.
Ukari has joined #lisp
<aeth> foom2: If it was not inlined it would show up in trace, it does not.
<aeth> Only the call to to-infix shows up when I call to-infix
<aeth> oh hmm, it does show up
<aeth> Why didn't it before? hmm
<aeth> Maybe my test case hit something that did inline
<simplegauss> i'd like to preface this with (1) i am sincerely wondering, don't mean to just rile people up (2) i have done non-trivial projects in both CL and Haskell. Do there remain problems that have a much more natural/easy solution in CL (and preferably only CL) as compared to Haskell? i am of course aware of macros, but i'd rather look at this from the point of view of problems, or at least other features of CL, perhaps in combination with
<simplegauss> macros. it just seems (and i am sure this point of view is incorrect, just don't see why) that CL does not bring anything to the table in the landscape of /today's/ languages (specifically Haskell). please prove me wrong :)
<simplegauss> in particular, it seems something like maxima could be written in Haskell today, for example.
<aeth> simplegauss: Pick something both high-performance and stateful. e.g. Make a 3D game in Common Lisp. Now make a game in Haskell.
<Shinmera> simplegauss: Turing tarpit.
LiamH has quit [Quit: Leaving.]
wxie has joined #lisp
<aeth> simplegauss: Something like Maxima could be written in Haskell today. Any language can interface with Fortran. It looks like modern Maxima translated the Fortran source directly into CL, though, because CL now has acceptable performance there, if I'm interpreting this correctly.
<simplegauss> aeth: thanks for bringing that (3D gaming point) up, this actually helps clarify my question, and why i don't think i can answer it by googling. (1) it's actually a misconception that Haskell is particularly poor as regards handling state/high-performance. i've found Haskell performance comparable to SBCL for sufficiently complicated code. it might be true that in particular 3D/visualization libraries aren't there for Haskell (I have n
<simplegauss> idea, more interested in symbolic mathematics), but this isn't a feature of Common Lisp per say. (2) even if the above weren't true, this isn't really something CL brings to the table, right? it's performance doesn't compare to C++ anyway. are my impressions on performance severely out of date? it seems according to the computer language benchmarks game that CL and Haskell are in the same class...
<simplegauss> Shinmera: not sure what you mean, my question comes exactly because i am wondering what things are easy/natural in CL that are effectively undoable in Haskell.
<Shinmera> simplegauss: Maxima can be written in any turing-complete language.
<aeth> simplegauss: CL is a compromise language (as all languages made by committee are), so it provides a compromise between various programming approaches for people who want to write a large, complicated, very-multiparadigm program in one language.
MrBusiness has joined #lisp
<simplegauss> Shinmera: yes, but "feasibly", for some colloquial definition. i was actually just looking at the feature set, did not know it was translated directly from FORTRAN.
<aeth> You probably could get Haskell to run a 3D game but you'd have to invent literally everything yourself to fit the opinionated nature of Haskell. With Common Lisp, you can take the C/C++ literature and just translate the methods to idiomatic CL, and it won't be as fast, but it will be the same imperative paradigm, so you don't have to be inventive.
xrash has quit [Ping timeout: 248 seconds]
<zachk> for a simple 3d game in haskell check out frag
<aeth> And you have advantages with CL over C++. You don't have to hack around to get live coding, you don't have to worry about safety, and you don't have to plug in a separate scripting language.
<Shinmera> simplegauss: I frankly see little point in trying to convince you of anything. CL isn't the best for everything and neither is Haskell. Just use what you like, when you think it's appropriate.
<aeth> The disadvantage is you probably have to write almost everything yourself, which is why you rarely see completed Lisp games. Haskell probably has a similar disadvantage, but it also has the added disadvantage of having to *invent* those things, not just write those things in the language.
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> i.e. you have to come up with the Haskell way of implementing equivalent things, and then implement them
Tobbi has joined #lisp
<simplegauss> just to be clear i'm not asking you guys to convince me. i'm just having trouble positioning CL w.r.t. everything else. for example, i could position haskell w.r.t. others by saying it offers a uniquely useful/flexible typesystem, truly functional, typeclasses, and largely acceptable performance. it is basically the only "mainstream" langauge that satisfies these features (there are some others, but let's put them in a class with
<aeth> My point is, with CL, you can take most concepts and implement it without too many modifications to fit the Foo way of doing things. Not an ideal language, not a consistent language, not a beautiful language, but convenient to program in.
<simplegauss> Haskell). is there a similar list for CL? interactivity is offered by others, as is C-interop.
<aeth> As for interactivity, I think the only language that beats CL there is Smalltalk.
Bike has joined #lisp
<Shinmera> Nobody has replicated CLOS & MOP yet.
<Shinmera> One of the few things remaining that other languages have not yet adopted from Lisp.
<Shinmera> I don't think Lisp's strength lies in a single aspect, though. Feature comparisons like that are boring.
<aeth> some languages have things similar to MOP, just not as sophisticated, afaik
<Shinmera> It's the whole package deal that makes it attractive to me, and that's not something you can just put into a list to compare with other things.
<Bike> MOP is indirectly descended from smalltalk, naturally.
<aeth> simplegauss: CL is, afaik, basically everything trendy in programming languages through the 1980s glued together inelegantly into one language. If you want a simple way to describe it. At least, that's my opinion.
<simplegauss> aeth: thanks! i don't want to start evangelizing haskell, so i won't argue on the forced opinionation bit :) but in (the scope of) your example, for example, it seems one of the "features" you are saying CL has is convenience in wrapping/using C/C++, which certainly others have. my question is what are more of those, especially those that differentiate CL.
<aeth> If CL got revisions along the same spirit today, it'd try to bolt on parts from Haskell and Rust and whatever else is trendy.
<Shinmera> CL is a combination of lisp languages, not of just random languages out there.
<simplegauss> it's just that PG has the "blub" paper and i'm worried i'm succumbing to it by failing to see what i would be missing outside of CL. perhaps that paper is less relevant today, would you agree?
<aeth> simplegauss: I didn't say convenience in wrapping/using C/C++, I said convenience of being able to translate C/C++ algorithms into CL without much modification. But not just that language. Also Java, or Python, or whatever, really.
<aeth> I can just read something written in C and write it up in CL, replacing the C-isms with CL-isms. Or Java or C++ or whatever. CL has a sufficiently large, dirty, inelegant, unideal feature set. It even has gotos, so you can take your 1980s BASIC and translate those algorithms
<simplegauss> but can't you do that (perhaps without the gotos :)) in python as well? or C++ for that matter :)
* Shinmera sighs
<Shinmera> You can always find another language that replicates or shares a particular feature of CL
<aeth> simplegauss: You can't write Python-style code in C++, and you can't write goto-heavy code in Python, and you can't write Scheme-style FP in either.
<Shinmera> You'll be hard pressed to find one that has all of them
<aeth> simplegauss: But you can write Python-style code in CL, and goto-heavy code in CL, and Scheme-style FP in CL (although not portably, unfortunately... but SBCL does support TCO).
thinkpad has joined #lisp
<Josh_2> Neat thing about CL is you can do what ya want
kami has quit [Remote host closed the connection]
<Josh_2> It doesn't force you to do something in a particular way and that's nice
<aeth> You can do pretty much everything in CL short of manage memory, and you can sort of do that.
sjl has quit [Ping timeout: 248 seconds]
<Josh_2> Can do what ya want and that's the best and I can see why it puts people off
<Josh_2> Spend more time thinking about how to do something than doing it
<Josh_2> Cos you can do it however ya want
pseudonymous has quit [Ping timeout: 240 seconds]
<aeth> What CL does lack is FP optimizations (mostly around immutability) and other things that became trendy after it was set in stone.
<simplegauss> aeth, Shinmera: thanks, i think i understand!
<simplegauss> aeth: it looks like some people are working to add those in (https://github.com/guicho271828/inlined-generic-function)
<pjb> aeth: wrong.
rumbler31 has joined #lisp
<pjb> aeth: languages don't provide optimization. implementations do.
<pjb> aeth: nothing prevents you to write an implementation of CL that performs all the FP optimiation you want, including around immutability.
<aeth> pjb: You cannot declare something immutable in CL because any declaration that isn't listed in the standard is assumed to be a type, e.g. (declare (foo some-var)) is declaring some-var to be of type foo
<pjb> after all, it's rather trivial to determine if a data structure is used immutably or if it's mutated.
<pjb> aeth: don't declare anything it's not the job of the programmer, but of the implementation!
<aeth> pjb: You cannot determine automatically if something is immutable across the function boundary if the function isn't inlined because (foo 42) might return "Hello, world" now but it could be recompiled to return #(1 2 3) the next iteration.
<aeth> pjb: Unless there's some standards-compliant way to recompile all users of a function when a function is recompiled (although it still wouldn't work on higher order functions)
<pjb> Who talks about function boundary! GLOBAL ANALYSIS! You're writing an implementation!
sjl has joined #lisp
<aeth> pjb: The global analysis needs to update or no one will use it because SLIME is too nice.
<pjb> Go tell that to Haskell programmers.
<aeth> But, yes, global analysis would get rid of the need to declare types most of the time afaik
<pjb> When you're developping you don't need functional optimizations!
<aeth> Oh, and type declarations are mostly useful for numbers and sequences because of the built-in generic number/sequence stuff
<aeth> Most of the time they're already unnecessary
<aeth> I hope the implementation can guess the type of (write-char char)
<aeth> (Takes in character, returns character)
<pjb> Doesn't need to guess, it's specified.
<pjb> And it doesn't take a character. It takes anything.
<pjb> It returns a character only if it's given a character that can be encoded with the external-formal of the passed or implied stream. Otherwise it signals an error.
<pjb> You need to elaborate a formal specification of CL!
<Bike> no, it takes a character.
damke_ has joined #lisp
<pjb> Nope: Proof: (handler-case (write-char 42) (error () 'got-you!)) #| w --> got-you! |#
<Bike> clhs 1.4.4.3
<specbot> The ``Arguments and Values'' Section of a Dictionary Entry: http://www.lispworks.com/reference/HyperSpec/Body/01_ddc.htm
<Bike> " Except as explicitly specified otherwise, the consequences are undefined if these type restrictions are violated."
<aeth> pjb: For the purpose of a compiler, it should warn when it knows that the program will cause a runtime type error. e.g. SBCL does with this: (defun foobar () (let ((foo 42)) (write-char foo)))
<mrottenkolber> A type specifier for a real > 0 anyone?
<aeth> The issue with SBCL is it doesn't do this enough!
<pjb> But the program doesn't cause a runtime type error! It returns GOT-YOU!
<pillton> (real (0))
<earl-ducaine> Attempting to do something sinful: is there any way to create new nongraphic character with nice names, e.g. #\newline and #\space.
<earl-ducaine> I believe I know the answer: not without editing the readtable.
quazimodo has quit [Ping timeout: 248 seconds]
<pjb> You see, this is why you need to perform a global analysis!
<earl-ducaine> Just wanted to confirm.
<Bike> earl-ducaine: "create new"?
<mrottenkolber> pillton: and my memory comes back, thank you!
<pjb> (And again, why sbcl is bad).
<pjb> Almost no day pass that you find a new reason why not to use sbcl…
<aeth> pjb: Global analysis is how you'd beat SBCL in performance (especially without declarations!)
<Bike> you want a compiler that calls write-char with an argument it knows is wrong?
<pjb> (handler-case (write-char 42) (error () '|yes, definitely!|)) #| w --> |yes, definitely!| |#
<earl-ducaine> I want to create a character #\end
<earl-ducaine> for zetalisp compatibility, without editing the original files.
damke has joined #lisp
<Bike> when you say "create", do you mean that you want #\end in source to resolve to some existing character?
<pjb> earl-ducaine: if your implementation supports unicode, then you can use the private code points for this.
<pjb> earl-ducaine: but you cannot bind character names to them. (Unless you have implementation specific extensions that would allow that).
<earl-ducaine> correct.
<pjb> earl-ducaine: instead, you would just (defconstant +end+ #\ue0001)
<Bike> earl-ducaine: yeah, you'd have to bind a readtable, but on the bright side i don't think it would be that hard since you have name-char for the built in resolution.
damke_ has quit [Ping timeout: 240 seconds]
<pjb> Well, of course, you can always add a reader macro and even shadow char-name, and name-char.
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
damke_ has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
damke_ has joined #lisp
Kaisyu has joined #lisp
jameser has joined #lisp
simplegauss has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
astronav_ has joined #lisp
hexfive has joined #lisp
damke has joined #lisp
jmercouris has quit [Remote host closed the connection]
jmercouris has joined #lisp
astronav_ has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 240 seconds]
wxie has quit [Remote host closed the connection]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
<jmercouris> Hey everyone, I'm having trouble with nested macro evaluation: https://gist.github.com/a30e65b52c8cfeab79a2fe21f1e7301f
<jmercouris> Basically parenscript has a macro chain, which is not getting expanded within my own macro
<jmercouris> to clarify: chain is the name of the macro
<Bike> is it not ps:chain?
<Bike> or, well, does (defparameter add-span (ps:ps (let ...))) work or no.
<jmercouris> it produces the string under the prefix output
<Bike> what?
<jmercouris> I don't think it is ps:chain because it is encapsulated in a ps:ps
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris> Bike: Please see line 20 of the gist
<Bike> yes, that's what you get with defparen
<jmercouris> Correct
<Bike> i'm asking if you get the same output if you do the defparameter directly.
<jmercouris> Hmm, I'm not sure, let me try that
<Bike> for ps:chain, what i meant was, does the parenscript compiler treat ps:chain the same as cl-user::chain, expanding it as a macro or whatever.
<jmercouris> No I do not get the same output
<Bike> because if not, perhaps that's the issue.
<jmercouris> It seems to work if I do it that way
<jmercouris> Bike: This is the output I get: https://gist.github.com/cb3bc626c296458627622a86c6504e99
quazimodo has quit [Ping timeout: 240 seconds]
<Bike> um... isn't that still wrong?
damke has joined #lisp
<Bike> it's exactly the same, in fact.
<jmercouris> Ah damnit, sorry, it is late here
<jmercouris> Yes, it is the same, let me try prefixing the chain command
damke_ has quit [Ping timeout: 240 seconds]
<Bike> doing ps:chain and ps:@ makes it work for me.
<jmercouris> Prefixing the command seems to have fixed the issue
<jmercouris> I don't want to :use parenscript within my package, so I'll just have to be careful about that I guess, thank you for your help
<jmercouris> I shouldn't have assumed the ps macro would take care of it for me
<earl-ducaine> re: adding 'nice named' characters, e.g. #\End. I tried the following implementation specific code: (push '(151 "End" "^3") SB-IMPL::*base-char-name-alist*)
<earl-ducaine> and it worked!
<Bike> i would really just define my own #\
hexfive has quit [Quit: WeeChat 1.9.1]
<earl-ducaine> haha. Yeah. I was curious how sbcl did it.
damke has quit [Ping timeout: 246 seconds]
markong has quit [Ping timeout: 268 seconds]
<earl-ducaine> If I were ever to share the code I would remove non-portable things like #\End anyway.
markong has joined #lisp
<pillton> mrottenkolber: I'm not sure I want to be your memory.
<pillton> mrottenkolber: The idea of external memory is appealing though.