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
oni-on-ion has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
makomo has quit [Ping timeout: 250 seconds]
manualcrank has joined #lisp
idlus has joined #lisp
karlosz has quit [Quit: karlosz]
nowhereman has joined #lisp
nowhereman has quit [Read error: Connection reset by peer]
nowhereman has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
moldybits has joined #lisp
nirved has quit [Read error: Connection reset by peer]
nirved has joined #lisp
serviteur has quit [Remote host closed the connection]
nirved_ has joined #lisp
nirved has quit [Ping timeout: 258 seconds]
karlosz has joined #lisp
igemnace has joined #lisp
karlosz has quit [Client Quit]
Josh_2 has quit [Remote host closed the connection]
<no-defun-allowed> is there a way to change how hunchentoot produces error pages? i'd like to generate error pages instead of using a directory of template files
orivej has joined #lisp
karlosz has joined #lisp
<no-defun-allowed> looks like it's hunchentoot:acceptor-status-message
zotan has quit [Ping timeout: 258 seconds]
zotan has joined #lisp
zotan has quit [Ping timeout: 248 seconds]
zotan has joined #lisp
wigust- has joined #lisp
wigust has quit [Ping timeout: 248 seconds]
mindCrime_ has quit [Excess Flood]
mindCrime_ has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
dddddd has quit [Remote host closed the connection]
kajo has quit [Ping timeout: 248 seconds]
<sukaeto> minion: memo for serviteur: sure! Here's my init.lisp: https://pastebin.com/WBtjzVya
<minion> Remembered. I'll tell serviteur when he/she/it next speaks.
orivej has quit [Ping timeout: 258 seconds]
idlus has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life has joined #lisp
ahungry has joined #lisp
<beach> Good morning everyone!
<ahungry> mornin
idlus has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
idlus has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
t58 has quit [Quit: Night]
mooshmoosh has quit [Ping timeout: 250 seconds]
idlus has joined #lisp
mooshmoosh has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
idlus has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
pierpal has quit [Ping timeout: 255 seconds]
mindCrime_ has quit [Ping timeout: 250 seconds]
pankajgodbole has joined #lisp
idlus has joined #lisp
mooshmoosh has quit [Ping timeout: 252 seconds]
mooshmoosh has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
vlatkoB has joined #lisp
torbo has quit [Remote host closed the connection]
mathrick has quit [Ping timeout: 276 seconds]
mathrick has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Intensity has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
shifty has joined #lisp
oni-on-ion has quit [Ping timeout: 248 seconds]
idlus has joined #lisp
Inline has quit [Quit: Leaving]
libertyprime has quit [Ping timeout: 250 seconds]
dacoda has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
igemnace has joined #lisp
RagnarDanneskjol has joined #lisp
ahungry has quit [Remote host closed the connection]
dacoda has quit [Remote host closed the connection]
dacoda has joined #lisp
JohnMS_WORK has joined #lisp
dacoda has quit [Ping timeout: 264 seconds]
libertyprime has joined #lisp
dddddd has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
Folkol has joined #lisp
shka_ has joined #lisp
orivej has joined #lisp
shka_ has quit [Ping timeout: 248 seconds]
makomo has joined #lisp
varjag has joined #lisp
flazh has quit [Quit: flazh]
flazh has joined #lisp
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nirved has joined #lisp
ltriant has quit [Quit: leaving]
nirved_ has quit [Ping timeout: 258 seconds]
Lord_of_Life has quit [Ping timeout: 258 seconds]
nirved_ has joined #lisp
nowhereman has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 250 seconds]
nirved has quit [Ping timeout: 264 seconds]
Lord_of_Life has joined #lisp
Folkol has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
idlus has joined #lisp
idlus has quit [Remote host closed the connection]
idlus has joined #lisp
techquila has joined #lisp
ecilam has joined #lisp
t58 has joined #lisp
pierpal has joined #lisp
schweers has joined #lisp
dddddd has quit [Ping timeout: 250 seconds]
dddddd has joined #lisp
troydm has quit [Ping timeout: 245 seconds]
mathrick has quit [Ping timeout: 248 seconds]
dale has quit [Quit: dale]
nirved has joined #lisp
scymtym has joined #lisp
asarch has joined #lisp
nirved_ has quit [Ping timeout: 248 seconds]
angavrilov has joined #lisp
derrida has quit [Ping timeout: 245 seconds]
derrida has joined #lisp
anewuser has joined #lisp
Arcaelyx has quit [Ping timeout: 246 seconds]
<asarch> One stupid question: how much "Common Lisp" is cl.el?
marusich has quit [Remote host closed the connection]
idlus has quit [Ping timeout: 256 seconds]
nowhereman has joined #lisp
<no-defun-allowed> not packages or several CL types like chars and complex numbers afaik
<asarch> ~50% or less?
heisig has joined #lisp
<no-defun-allowed> probably yeah
<no-defun-allowed> there's also no multiple dispatch in emacs's CLOS but it's less work to port the common stuff like LOOP since that's present
<schweers> no-defun-allowed: cl-defgeneric and cl-defmethod do multiple dispatch, as far as I remember.
<no-defun-allowed> oh, neat
<schweers> But with limitations. I think it is (or was?) not possible to specialize on vector without also specializing on all “classes”.
idlus has joined #lisp
<schweers> But don’t take my word for this, it’s been some time since I used it.
<asarch> Wow! :-(
<asarch> Anyway, thank you guys
<asarch> Thank you very much :-)
asarch has quit [Quit: Leaving]
shka__ has quit [Quit: WeeChat 1.9.1]
mathrick has joined #lisp
<pjb> minion: memo for asarch: it's not much Common Lisp. There's emacs-cl which is a CL implementation written in emacs lisp pre-lexical bindings (version 24 or 25). It would be nice to update it for current emacs lisp, using lexical bindings.
<minion> Remembered. I'll tell asarch when he/she/it next speaks.
<no-defun-allowed> schweers: maybe that was the limitation, but i remember there was something wrong
<no-defun-allowed> probably since instances in cl.el are represented as vectors i think?
<no-defun-allowed> yeah seems like it
<schweers> Yeah. In general it’s more a klutch to make elisp slightly less painful, not a replacement for a proper lisp.
manualcrank has quit [Quit: WeeChat 1.9.1]
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
idlus has quit [Ping timeout: 256 seconds]
fivo has joined #lisp
orivej has joined #lisp
idlus has joined #lisp
shka_ has joined #lisp
phoe has quit [Ping timeout: 276 seconds]
idlus has quit [Ping timeout: 256 seconds]
phoe has joined #lisp
idlus has joined #lisp
cosimone has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
idlus has quit [Ping timeout: 256 seconds]
brundleticks has joined #lisp
gabr has left #lisp [#lisp]
idlus has joined #lisp
idlus_ has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Remote host closed the connection]
idlus_ has quit [Ping timeout: 256 seconds]
idlus_ has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
idlus_ has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
varjag has quit [Read error: Connection reset by peer]
flazh has quit [Quit: flazh]
idlus_ has joined #lisp
<fivo> Hi
<fivo> Is there any library or piece of code that recognized the encoding of a stream?
<fivo> *recognizes
<beach> Is that even possible in general?
<White_Flame> the best guess would involve reading the entire stream first before deciding
<White_Flame> and I think it's probably a reasonable taks for neural nets
<White_Flame> unless you just want really basic heuristics
<White_Flame> (of which I don't think I've seen a library)
<fivo> yes did something ad hoc where common encodings are recongized
<fivo> sorry I meant I was looking for something where common encodings are recongized
idlus_ has quit [Remote host closed the connection]
idlus_ has joined #lisp
varjag has joined #lisp
flazh has joined #lisp
anewuser has quit [Quit: anewuser]
idlus_ has quit [Ping timeout: 256 seconds]
Josh_2 has joined #lisp
<phoe> fivo: encoding isn't a property of a stream
<phoe> it's a property of data
<phoe> and a single stream can freely spit out data encoded in several different manners
<phoe> I'd say it's a wrongly stated question and a wrongly approached problem
Folkol has joined #lisp
<fivo> phoe: ok, supposing that the stream has one single encoding
<phoe> fivo: again, it's a property of data, not the stream; e.g. the HTTP protocol tells you about the content encoding it is going to use in the HTTP headers
<phoe> you can't be sure until you read the whole data anyway
<phoe> something that looks like a few gigabytes of ASCII can end with a UTF-8 sequence as its last byte
sz0 has joined #lisp
<phoe> that's a protocol question and not a stream one.
<phoe> s/last byte/last bytes/
<White_Flame> and a single HTTP connection can have multiple chunks of different encodings
<fivo> I have file blobs coming from git repositories
<fivo> essentially just a sequence of octets
<fivo> sometimes :utf8 sometimes :iso-8859-1 etc...
<phoe> so you don't want to get stream encoding, you want a blackbox that takes in a blob and spits out a list of possible character encodings
<phoe> I wonder if babel has such a thing
<phoe> this should help you
<fivo> phoe: yes, sorry if by stream encoding something else is meant
idlus_ has joined #lisp
kajo has joined #lisp
amerlyq has joined #lisp
ggole has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
jmercouris has joined #lisp
<jmercouris> opinions on postmodern vs mito?
akoana has joined #lisp
<dim> Postmodern is very good; I'm discovering mito, reading the README at the github repository, and I say it's as bad as any other ORM around, avoid it
<dim> a good ORM knows that the result type of a SQL statement is a relation, and then allows you to map the dynamic SELECT result type to an object in your application; POMM for PHP and JOOQ for Java do that
<dim> a bad ORM thinks a relation is a base table and then only CRUD makes sense, every other SQL query is something complex to write and maintain and it's the hell
<dim> jmercouris: my advice is to use Postmodern and avoid this mito ORM
<Josh_2> How to people create CL software that interacts with postgresql?
<Josh_2> How does the communication happen, is it a socket?
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
<jackdaniel> Josh_2: one way to learn that is to find postmodern repository and read the readme
<Josh_2> oof literally first bullet point
shifty has quit [Ping timeout: 258 seconds]
elderK has quit [Quit: Connection closed for inactivity]
<no-defun-allowed> Yes, SQL servers use a socket typically.
jmercouris has quit [Ping timeout: 258 seconds]
notzmv has quit [Remote host closed the connection]
vaartis has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
<schweers> Is there a good idiomatic alternative to (not (not x))? I want to know if two expressions are either both true or both nil.
<schweers> I mean of course in the standard. I know that it is trivial to write my own funcion or just do it inline.
jmercouris has joined #lisp
<jmercouris> dim: you are quite involved with postgres, so I will take your advice very strongly
<jmercouris> dim: you are quite involved with postgres, so I will take your advice very strongly
<jmercouris> it means rewriting a lot of code, but it could be quite worth it
<dim> jmercouris: otherwise write an ORM/OMM tool for PostgreSQL that does it the right way and allows you to do the mapping at the query level, not the model level
<jmercouris> I meant the rewrite from Mito->Postmodern code
<dim> think about INSERT INTO ... SELECT ... RETURNING ...; or even WITH ... (insert ...returning ...) update ... returning ...; as other queries you typically write when using PostgreSQL and want to map into a collection of objects
<dim> jmercouris: yeah that'd be worth it
orivej has quit [Ping timeout: 245 seconds]
<dim> basically, approach SQL as a first-class citizen and understand what Relation means in RDBMS, that'd be great
idlus_ has joined #lisp
<dim> hint: a relation is a collection (set in relational theory, bag in SQL) of objects sharing common definition (attribute domains), a t-uple (same number of "columns", always in the same order, with the same data types)
<dim> any SQL query returns a collection of objects of the same type
<dim> TABLE is an SQL query, not the most interesting one
<dim> ORM should map the result of SQL query (a RELATION) to a collection of objects in memory, and that's it
<phoe> Josh_2: I use postmodern and cl-yesql
<phoe> which means that I write actual SQL code that then gets automatically pulled into CL as functions
<Josh_2> Thats cool
<phoe> it means that I don't have an ORM
<phoe> but I also get rid of a lot of boilerplate to connect Lisp and SQL together, since cl-yesql compiles SQL statements into Lisp functions
<phoe> and also my queries are readable to non-lispers since they are written in standard PostgreSQL
<phoe> and that is value to me, since I can't assume I'll only work with lispers who'll want to read (:select ...) stuff
<Josh_2> very good point
<phoe> so essentially I had a choice of using a Lisp ORM at which point I have very little idea what is going on in the SQL layer, OR using SXQL or some other means of writing SQL in Lisp, OR using cl-yesql to write SQL and have that auto-parsed as Lisp functions
<dim> last I looked at cl-yesql I didn't like it, it was much too simplistic; a quick look tells me I should have another try nowaday
<phoe> I've bugged ruricolist for a few useful features and most of them got implemented (;
<dim> I have https://github.com/dimitri/pgloader/blob/master/src/utils/queries.lisp in pgloader to do something more specific with SQL variants and such
<dim> phoe: nice! ;-)
rixard has joined #lisp
<phoe> so basically, if I felt something was limiting me in cl-yesql, I threw an issue at the github page
LiamH has joined #lisp
<phoe> and now I feel compelled to also throw some stuff at his patreon page to complement the github feature requests
idlus has joined #lisp
quazimodo has quit [Ping timeout: 250 seconds]
idlus_ has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
idlus has joined #lisp
rwlisp has joined #lisp
ironbutt has quit [Ping timeout: 246 seconds]
jmercouris has quit [Ping timeout: 246 seconds]
sjl_ has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
idlus has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
idlus has quit [Ping timeout: 256 seconds]
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
wxie has joined #lisp
deng_cn has joined #lisp
deng_cn has quit [Client Quit]
Bike has joined #lisp
saravia has joined #lisp
wxie has quit [Quit: wxie]
dale_ has joined #lisp
dale_ is now known as dale
vaartis has left #lisp ["ERC (IRC client for Emacs 26.2)"]
khisanth_ has quit [Ping timeout: 246 seconds]
v88m has quit [Read error: Connection reset by peer]
lucasb has joined #lisp
nullman` has joined #lisp
cosimone has joined #lisp
v88m has joined #lisp
khisanth_ has joined #lisp
mindCrime has joined #lisp
v88m has quit [Ping timeout: 252 seconds]
idlus has joined #lisp
v88m has joined #lisp
Inline has joined #lisp
wxie has joined #lisp
milanj has joined #lisp
warweasle has joined #lisp
Josh_2 has joined #lisp
vms14 has joined #lisp
longshi has joined #lisp
<vms14> it's strange that works
moei has joined #lisp
wxie has quit [Quit: wxie]
heisig has quit [Quit: Leaving]
<vms14> btw a tiling wm is very good for programming
orivej has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
<dlowe> you mean like emacs?
<vms14> emacs can do it, so there is no need for a tiling wm
<dlowe> emacs pretty much is a tiling wm
<vms14> I have the screen divided by 4 and every window is an emacsclient
<Josh_2> Tiling os xd
<vms14> on of them with slime, the others are files
<vms14> it's very productive
<vms14> I needed to start dividing the program by files
<vms14> I'm learning a lot with lisp
<vms14> it lets you focus on the design, and design is my main problem
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
FreeBirdLjj has joined #lisp
nowhereman has quit [Ping timeout: 248 seconds]
dale has quit [Ping timeout: 255 seconds]
cosimone has joined #lisp
Jesin has quit [Quit: Leaving]
cosimone has quit [Client Quit]
lavaflow has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
Zaab1t has joined #lisp
defunkydrummer has joined #lisp
Zaab1t has quit [Remote host closed the connection]
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anewuser has joined #lisp
varjag has joined #lisp
Jesin has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
cosimone has quit [Quit: WeeChat 2.3]
idlus has joined #lisp
vms14 has quit [Quit: WeeChat 2.3]
idlus has quit [Ping timeout: 256 seconds]
dale has joined #lisp
idlus has joined #lisp
rippa has joined #lisp
warweasle has quit [Ping timeout: 264 seconds]
cosimone has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Folkol has joined #lisp
warweasle has joined #lisp
black_13 has joined #lisp
<black_13> is this the correct place to ask about how lisp is made
<black_13> that is what is a cons cell
<beach> Sure.
<beach> black_13: Or #clschool if it is really basic stuff.
<beach> Try here first.
<beach> You'll be told to move if appropriate.
<black_13> #clschool
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schweers has quit [Ping timeout: 252 seconds]
<black_13> i am trying to understand the EBNF of a lisp list
<beach> OK.
<White_Flame> BNF won't show you much. The token semantics are very regular
<White_Flame> a cons cell is just a 2-slot structure, but generally with an optimized representation with no additional overhead
<White_Flame> ie, literally 2 words of memory
cosimone has quit [Ping timeout: 264 seconds]
anewuser has quit [Ping timeout: 248 seconds]
<beach> black_13: State your question, and we'll see.
cosimone has joined #lisp
<black_13> i have looked at something like SIOD (Scheme not lisp)
<black_13> hey lets see if i can get flamed
<beach> black_13: Well, this channel is dedicated to Common Lisp. Flaming is unusual here, but if you start asking too many Scheme-specific questions, you will be asked to take them elsewhere.
<beach> black_13: CONS cells and lists are likely represented the same way in both Common Lisp and Scheme.
<black_13> its not so much lisp or scheme its what might possible be inside a lisp
<beach> Sure.
<beach> Ask away.
<black_13> you know the the PSPICE circuit system uses cons cells
<White_Flame> (and while this is a Common Lisp channel, ##lisp is for general lisp family discussion)
<beach> black_13: I didn't know that myself, but I am willing to believe you.
<black_13> oh i am show to be in #lisp but then there is a ##lisp as well
<beach> Is there anyone there? I have never tried it.
<White_Flame> yeah, it's lower volume, but there's plenty of people there to participate when chat does arise
<beach> I see.
* beach suspects that black_13 will never get around to asking any questions.
<black_13> i have a lisp
<black_13> give this http://codepad.org/uJRbcfrq
<Josh_2> oof
<black_13> if you have (1 2 3) as a lisp list what do the cons cells implement in C look like or could look like
<black_13> or if you have a tagged variant how many cells does take in total represent say (1)
<White_Flame> (1 . (2 . (3 . NIL)))
<White_Flame> where ( a . d ) is a single cons cell
<beach> black_13: Three cells. The CAR of the first one is 1, the CAR of the second one is 2,. The CAR of the third one is 3.
<beach> black_13: The CDR of the first one is the second one.
<beach> The CDR of the second one is the third one.
<beach> The CDR of the third one is NIL.
<White_Flame> btw, there are some books that walk through building a Lisp system. "Lisp In Small Pieces" is one that's well regarded
<black_13> no book will replace talking to a person
<black_13> and i have that book
<White_Flame> they can give you structure, though, and the larger strategies & details you'll need to deal with
<White_Flame> ah, good
<beach> black_13: But there is no great point in trying to understand it through C code, because such code is necessarily artificial because of the static type system.
ggole has quit [Remote host closed the connection]
ggole has joined #lisp
<phoe> beach: if someone is already thinking in a particular language, implementing a basic Lisp in that language could help them understand it. I say it from my own experience - I didn't really understand how Lisp lexical environments work until I implemented https://github.com/phoe-trash/malish - and that is a very silly and small Lisp in Haskell. And Haskell has an even stricter type system.
<beach> black_13: If you look at *y* in this picture, you can see a list (a b c): http://metamodular.com/cells.png
<phoe> s/understand it/understand Lisp/
<beach> phoe: Fair enough.
<beach> I was just put off by the ENUM stuff.
<phoe> And I think this idea is what https://github.com/kanaka/mal is about.
<phoe> beach: no doubt. It's ugly compared to Lisp keywords. (:
<phoe> Or just symbols, speaking generally.
<White_Flame> I just now realized that the Prolog [ | ] representation for cons lists is visually similar to the split-box diagram visuals
<phoe> White_Flame: woah
<beach> phoe: It looked to me like code to satisfy the C compiler as opposed to code for real Lisp functionality.
<black_13> phoe: hey i have seen your github in some searches great content
idlus_ has joined #lisp
<phoe> black_13: wait woah where how
<black_13> i have been looking at github repos for lisps
<phoe> beach: exactly, it is there to satisfy the C compiler. A lot of that Haskell code in my repository is also there to satisfy the Haskell compiler.
idlus has quit [Ping timeout: 256 seconds]
<phoe> black_13: I suggest beach's stuff for reading - his code is clean and readable. https://github.com/robert-strandh
<black_13> ok
fivo has quit [Quit: WeeChat 1.9.1]
<black_13> i the diagram it shows a cell that has and arrow to "a"
<phoe> that's the symbol A
lumm has joined #lisp
<black_13> does this mean that the cons has the a value and the cdr pointer to point to the next cons cell
<phoe> "has the a value" not really
<phoe> conses don't have values per se
<phoe> conses have two slots - a CAR and a CDR
<black_13> just pointers
<phoe> and both hold references to some other things
<phoe> if you're from the C world, yes, think of those as pointers
<phoe> though pointers are completely invisible in the standard Common Lisp world - it's not even a term in the standard
<black_13> I guess I am from the C world or Sea World
<black_13> call me shamu
<black_13> or ishmael
<phoe> then think of cons cells as structs with two fields
<phoe> and both of those fields are pointers to Lisp datums
<White_Flame> usually, the value can be either a literal integer or a pointer
<White_Flame> on 64-bit systems, it can also be a literal 32-bit float
<sjl_> don't confuse them with fixnums yet
<phoe> ^
<White_Flame> well, the question is how things are implemented
<phoe> White_Flame: those are details
<phoe> for now, treat all Lisp objects as boxed Lisp datums
<White_Flame> and tag bits are a pretty important part of understanding how to build a lisp heap
<sjl_> get them to understand the common case, then worry about the performance-related edge cases later
cage_ has joined #lisp
<White_Flame> but yeah, you can box all the things
<phoe> no literals anywhere, just Lisp objects
<phoe> box *everything*
<phoe> and once you understand how this works, start thinking of optimizing
<White_Flame> but since it's C, you'll still have to identify all the boxes with their type
<White_Flame> with runtime data
<phoe> yep - look at how MAL implements that
<phoe> type, metadata, and a C union of all allowed types
Aruseus has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
<black_13> phoe: one large union
<phoe> black_13: actually it's a struct that consists of three fields: type, metadata, and one big union
<phoe> that's a Lisp object for you
<black_13> give that kind of union
<black_13> what does (1) where 1 is an unsigned int
<black_13> does the the memory look like how many cons cells
<black_13> maybe my question is how many and what kind of cons cells does it take to represent an idea
<White_Flame> (1 . NIL)
<White_Flame> so a single cons cell
<White_Flame> a list has as many cons cells as it has elements (not counting nested stuff)
<phoe> black_13: an idea? what do you mean?
Arcaelyx has joined #lisp
<black_13> sorry thinking out loud
<phoe> black_13: you seriously need to read up on how Lisp things work
<black_13> sure but you have given me some context i really needed
<White_Flame> also, there are no "kinds" of cons cells. They're a generic 2-tuple, which could be linked list cells, key-value pairs, tree branches, etc
<phoe> oh yes, Lisp data is pretty nice in that regard - any Lisp object can go into a cons cell
<phoe> integer, float, symbol, string, hash table, another cons cell, whatever Lisp has, you name it
nowhereman has joined #lisp
<black_13> https://web.mit.edu/alexmv/6.037/sicp.pdf I wish i had taken this class or similar but i was too busy taking EE classes
<phoe> this greatly simplifies cons design as they literally only need to have two pointers to Lisp objects
<black_13> and using FORTRAN (that dates me)
<phoe> black_13: watch the lectures
<phoe> these are simply amazing stuff
idlus_ has joined #lisp
<black_13> I have those
<black_13> and have watched
milanj has quit [Quit: Leaving]
<phoe> so you should understand how cons cells work by now
<black_13> but frankly I didn't have any context
<black_13> closer dont be surprised i show up again
<phoe> black_13: well, on the other hand
<phoe> anything that gets you closer to understanding is good stuff
cosimone has quit [Quit: WeeChat 2.3]
<phoe> if you're already thinking in C, then I guess that showing Lisp data from the C programmer point of view might be most valuable of all the points of view
<Josh_2> If you are thinking in C perhaps you are lost already xD
<Josh_2> jk
<phoe> Josh_2: that's a *bad* joke
<Josh_2> Best kind of jokes
<jackdaniel> if you are interested how Lisp values may be implemented in C check out src/h/object.h file in ecl source code
<phoe> there are bad jokes that are good and bad jokes that are bad. Yours was in the second category.
<jackdaniel> s/values/objects/
<Josh_2> phoe: Sounds just like me xD
<phoe> oh right, ECL is a Common Lisp implementation written in portable C
<Josh_2> I'm good at bad jokes which are bad :P
longshi has quit [Ping timeout: 264 seconds]
<defunkydrummer> block_13: at the risk of repeating something... Consider that in Lisp, at runtime all values have a type. So these values are "lisp objects" and the type of lisp objects is always known at runtime. At the low level, this often is implemented by using some bits of a register to "tag" the value with the type, for example let's say we're using 64-bit
<defunkydrummer> registers, then we use some of those bits to tag the type (if they're immediate objects). A CONS is also a lisp object, btw
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
<defunkydrummer> 2.3.1 Objects representation --> this will give you one idea of how an actual implementation (ECL) does it in C
Arcaelyx has joined #lisp
lavaflow has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
nanoz has joined #lisp
margaritamike has joined #lisp
v88m has quit [Remote host closed the connection]
v88m has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
nowhereman has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 248 seconds]
<sukaeto> re: Postgres and Lisp. I've been using sxql with postmodern under the covers. We've mostly been pretty happy with it.
<sukaeto> if you have relations with lots of rows of small strings, you may run in to memory issues early with postmodern - it'll allocate a 64 character string to fill what it gets out of the DB into
<sukaeto> ("early" as in "earlier than you would've otherwise")
<sukaeto> (I ended up locally patching the function where this happens to copy-seq the string so that I ended up with one that was exactly the right number of characters. This works better for our workload, but I never submitted it upstream since it's probably not a good solution in general.)
idlus_ has joined #lisp
<sukaeto> er, I should clarify that this happens when your DB encoding is utf8.
<sukaeto> (also "sxql" should be "sxql and datafly")
kajo has quit [Ping timeout: 248 seconds]
troydm has joined #lisp
<black_13> this project was various steps at implementation https://github.com/kanaka/mal/blob/master/c
idlus_ has quit [Ping timeout: 256 seconds]
<phoe> yes
idlus_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
orivej_ has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
Lord_of_Life has joined #lisp
cosimone has joined #lisp
voidlily has quit [Ping timeout: 276 seconds]
<defunkydrummer> minion: note to jmercouris: Hola John; i like CLSQL for postgres due to good documentation and the availability of two PG drivers, one native and other through CFFI. After 'enjoying' iBatis, Hibernate, NHibernate and SQLAlchemy, i don't like ORMs so much. CLSQL's "functional sql" works well for my purposes, and don't forget you can easily retrieve
<defunkydrummer> a row as an ALIST or PLIST which is more flexible than boxing everything into objects.
<minion> Remembered. I'll tell jmercouris when he/she/it next speaks.
maxxcan has joined #lisp
ggole has quit [Ping timeout: 264 seconds]
maxxcan has quit [Quit: maxxcan]
voidlily has joined #lisp
ggole has joined #lisp
nanoz has quit [Ping timeout: 246 seconds]
pankajgodbole has quit [Ping timeout: 246 seconds]
ggole has quit [Quit: Leaving]
cosimone has quit [Quit: WeeChat 2.3]
_ark_ has joined #lisp
warweasle has quit [Quit: later]
idlus has joined #lisp
Lord_of_Life_ has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
idlus has quit [Ping timeout: 256 seconds]
bendersteed has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
bendersteed has quit [Client Quit]
black_13 has quit [Ping timeout: 256 seconds]
idlus_ has joined #lisp
igemnace has quit [Ping timeout: 246 seconds]
dyelar has quit [Quit: Leaving.]
MichaelRaskin has joined #lisp
lumm_ has joined #lisp
cage_ has quit [Remote host closed the connection]
lumm has quit [Ping timeout: 248 seconds]
nitrix has joined #lisp
lumm_ is now known as lumm
Arcaelyx has quit [Ping timeout: 246 seconds]
Aruseus has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
idlus_ has quit [Ping timeout: 256 seconds]
zmt00 has quit [Quit: Leaving]
zmt00 has joined #lisp
defunkydrummer has quit [Ping timeout: 258 seconds]
lemoinem is now known as Guest82699
Guest82699 has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
rwlisp has quit [Ping timeout: 248 seconds]
zmt00 has quit [Ping timeout: 248 seconds]
dddddd has quit [Ping timeout: 248 seconds]
_whitelogger has quit [Ping timeout: 248 seconds]
edgar-rft has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
joast has quit [Quit: Leaving.]
Jesin has quit [Quit: Leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
pierpal has quit [Ping timeout: 252 seconds]
mindCrime has quit [Ping timeout: 246 seconds]