jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
sonny has joined #commonlisp
X-Scale has quit [Ping timeout: 260 seconds]
<sonny> can cl handle binary stuff?
<aeth> :element-type '(unsigned-byte 8) instead of 'character
<sonny> ok, and I get all the normal logic functions?
<aeth> and use e.g. read-byte intsead of read-line/read-char, etc.
lagash has quit [Quit: ZNC - https://znc.in]
<sonny> hmm, ok
lagash has joined #commonlisp
Patternmaster has quit [Remote host closed the connection]
Patternmaster has joined #commonlisp
Patternmaster has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
<Bike> sonny: the bitwise operations are logand, logior, etc, if that's what you mean
lagash has quit [Quit: ZNC - https://znc.in]
haku has quit [Quit: WeeChat 3.6]
haku has joined #commonlisp
Oladon has quit [Quit: Leaving.]
lagash has joined #commonlisp
<pjb> sonny: there are more and better bit operations in CL than in C!
<pjb> sonny: also, there are bit-vectors.
<sonny> those correspond to integral types in C?
<sonny> or maybe custom?
<pjb> (map 'bit-vector (function logand) #*1100 #*1010) #| --> #*1000 |#
<sonny> what type is #*1100
<pjb> bit-vector
<sonny> ah
<sonny> ok, I am just looking for a language to make a compiler and I need this low level stuff
<sonny> thanks
<pjb> Of course, you may also do (logand #b1100 #b1010) #| --> 8 |#
<pjb> or (bit-and #*1100 #*1010) #| --> #*1000 |#
<sonny> what type is the result?
<sonny> the first expression results in 8
<pjb> or (boole boole-and 12 10) #| --> 8 |#
<pjb> you can use either bit-vector, or integers or bits, or also generalized boolean: (and 't 'nil) #| --> nil |#
<pjb> (mapcar (lambda (a b) (and a b)) '(t t nil nil) '(t nil t nil)) #| --> (t nil nil nil) |#
akoana has quit [Quit: leaving]
<sonny> yeah but do those result in numbers or those types?
<pjb> depends on the operation. bit-* stuff return bit-vector. log* stuff integers
<pjb> (format nil "~B" (dpb #b1010 (byte 4 2) #b111100001111)) #| --> "111100101011" |#
ryanbw has quit [Ping timeout: 255 seconds]
<pjb> (let ((v (make-array 12 :element-type 'bit :initial-contents #*111100001111))) (replace v #*1010 :start1 2) v) #| --> #*111010001111 |# (the order of bits is from low order up in bit-vectors)
<pjb> integers are not mutable, each time you create new integers. bit-vectors may be mutable, so it may be advantageous in some algorithms.
<sonny> hmm, ok
Volt_ has quit [Quit: ]
Volt_ has joined #commonlisp
chrcav has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
random-nick has quit [Ping timeout: 255 seconds]
lagash has joined #commonlisp
holycow has joined #commonlisp
xristos has quit [Ping timeout: 268 seconds]
<aeth> my guess is that it makes sense to be mutable if length > 60
<aeth> perhaps considerably so. You could also do a hybrid approach of doing bit operations on an array several integers/fixnums long, so it might not even break even at unsigned-fixnum-size or 64 or whatever.
waleee has quit [Ping timeout: 265 seconds]
madand has quit [Ping timeout: 276 seconds]
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #commonlisp
markb1 has quit [Ping timeout: 268 seconds]
Oladon has joined #commonlisp
<bitblit1> <pjb> "CodeBitCookie: I would write..." <- pjb: Thanks! Although, I was only giving an example to ask if I could nest loop "forms or keywords"
<pjb> bitblit1: you can nest if else end
<pjb> it doesn't make sense to nest anything else.
Volt_ has quit [Ping timeout: 268 seconds]
<bitblit1> Oh yeah, true, lmao didn't think about that.
markb1 has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
sonny has quit [Quit: Client closed]
markb1 has quit [Ping timeout: 240 seconds]
dipper_ has joined #commonlisp
<bitblit1> Do you guys think I should make a c++ app just for my portfolio?
<hayley> What kind of portofolio? Who would be the audience?
<hayley> kami: I think I have made the compiler work using a new set representation, which handles the more complex character classes using a lookup table. Now I just need to implement the classes in the "frontend" and parser.
dcb has quit [Quit: MSN Messenger 3.8]
lagash has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
lagash has quit [Quit: ZNC - https://znc.in]
<bitblit1> <hayley> "What kind of portofolio? Who..." <- For a job, no specific audience, just to be a simple programmer
<hayley> What do you want to program?
<bitblit1> In backend, maybe APIs or just server part of a webapp
<bitblit1> *no-defun-allowed*: I don't really care about specifics that much as I just want to be given a task (or have an idea) to start coding. However, I think the frontend mostly takes away the fun part of the programming and is always in an unstable state. There will always be a new JS framework or library you will need to learn. Whereas with the backend, it's more if it works it works.
msavoritias has quit [Ping timeout: 240 seconds]
sonny has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
Oladon has quit [Quit: Leaving.]
igemnace has joined #commonlisp
ryanbw has joined #commonlisp
igemnace has quit [Remote host closed the connection]
kevingal has quit [Remote host closed the connection]
msavoritias has joined #commonlisp
sonny has quit [Quit: Client closed]
Inline has quit [Quit: Leaving]
pve has joined #commonlisp
shka has joined #commonlisp
rgherdt has joined #commonlisp
jonatack3 has joined #commonlisp
jonatack2 has quit [Ping timeout: 248 seconds]
lagash has joined #commonlisp
chip_x has quit [Ping timeout: 256 seconds]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
pawa2 has quit [Quit: leaving]
splatt990 has quit [Ping timeout: 250 seconds]
lagash has quit [Quit: ZNC - https://znc.in]
madand has joined #commonlisp
jeosol has quit [Quit: Client closed]
prokhor has quit [Remote host closed the connection]
kenran has joined #commonlisp
ryanbw has quit [Ping timeout: 248 seconds]
ryanbw has joined #commonlisp
sonny has joined #commonlisp
sonny has quit [Quit: Client closed]
cosimone has quit [Ping timeout: 256 seconds]
cosimone has joined #commonlisp
Gleefre has joined #commonlisp
waleee has joined #commonlisp
kenran has quit [Remote host closed the connection]
euandreh has joined #commonlisp
euandreh has quit [Remote host closed the connection]
euandreh has joined #commonlisp
cosimone has quit [Ping timeout: 265 seconds]
random-nick has joined #commonlisp
McParen has joined #commonlisp
jmdaemon has quit [Ping timeout: 276 seconds]
NicknameJohn has joined #commonlisp
NicknameJohn has quit [Client Quit]
NicknameJohn has joined #commonlisp
jonatack has joined #commonlisp
NicknameJohn has quit [Client Quit]
NicknameJohn has joined #commonlisp
jonatack3 has quit [Ping timeout: 264 seconds]
NicknameJohn has quit [Client Quit]
NicknameJohn has joined #commonlisp
NicknameJohn has quit [Client Quit]
NicknameJohn has joined #commonlisp
madand` has joined #commonlisp
waleee has quit [Ping timeout: 246 seconds]
madand has quit [Ping timeout: 264 seconds]
rgherdt has quit [Ping timeout: 248 seconds]
euandreh has quit [Ping timeout: 248 seconds]
euandreh has joined #commonlisp
lagash has joined #commonlisp
McParen has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
prokhor has joined #commonlisp
McParen has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
madand` has quit [Remote host closed the connection]
Lumine has joined #commonlisp
cage has joined #commonlisp
lagash has joined #commonlisp
dcb has joined #commonlisp
markb_one has quit [Ping timeout: 248 seconds]
tyson2 has joined #commonlisp
markb1 has joined #commonlisp
rgherdt has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
bitmapper has joined #commonlisp
morganw has joined #commonlisp
zxcvz has joined #commonlisp
Everything has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #commonlisp
dipper_ has quit [Ping timeout: 268 seconds]
dirtcastle has joined #commonlisp
dirtcastle_ has joined #commonlisp
repeter`` has quit [Ping timeout: 248 seconds]
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
son0p has joined #commonlisp
edgar-rft has quit [Read error: Connection reset by peer]
edgar-rft has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
tyson2 has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
kevingal has joined #commonlisp
jeosol has joined #commonlisp
bird_ has joined #commonlisp
bird_ is now known as gnoo
tyson2 has quit [Remote host closed the connection]
gnoo has quit [Read error: Connection reset by peer]
kevingal has quit [Ping timeout: 246 seconds]
dirtcastle has quit [Remote host closed the connection]
frgo has joined #commonlisp
lagash has joined #commonlisp
bjorkintosh has quit [Remote host closed the connection]
chrcav has quit [Ping timeout: 276 seconds]
tyson2 has joined #commonlisp
chrcav has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
lagash has quit [Quit: ZNC - https://znc.in]
markb_one has joined #commonlisp
kenran has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
lagash has joined #commonlisp
waleee has joined #commonlisp
occ has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
jmdaemon has joined #commonlisp
Noisytoot has quit [Excess Flood]
Everything has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
tyson2 has joined #commonlisp
bitmapper has quit [Quit: Connection closed for inactivity]
tyson2 has quit [Remote host closed the connection]
lagash has quit [Quit: ZNC - https://znc.in]
Inline has joined #commonlisp
bitmapper has joined #commonlisp
Lumine has quit [Remote host closed the connection]
lagash has joined #commonlisp
kenran has quit [Remote host closed the connection]
shka has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #commonlisp
pve has quit [Quit: leaving]
lagash has quit [Quit: ZNC - https://znc.in]
cage has quit [Quit: rcirc on GNU Emacs 28.2]
<ober> is there a way to coerce a hash to a list for format purposes?
<aeth> alexandria:hash-table-alist or alexandria:hash-table-plist
<ober> ty
<aeth> doesn't preserve order so e.g. (alexandria:hash-table-plist (alexandria:plist-hash-table '(:foo 42 :bar 43))) => (:BAR 43 :FOO 42) ; for me, yours may differ
lagash has joined #commonlisp
tyson2 has joined #commonlisp
<ober> The value "#<HASH-TABLE :TEST EQUAL :COUNT 2 {101241A613}>" is not of type HASH-TABLE
<aeth> huh
<ober> I must be converting it to a string I think
tyson2 has quit [Remote host closed the connection]
<aeth> oh, yes
<aeth> you have to turn it into the list and then print it
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
gnoo has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #commonlisp
holycow has quit [Quit: Lost terminal]
srolls has quit [Remote host closed the connection]
gnoo has quit [Ping timeout: 246 seconds]
<ober> what is a #(#<hash-table>...) type-of says simple-base-string
attila_lendvai has quit [Ping timeout: 260 seconds]
<aeth> ober: that means you're turning it into a string before you try to convert hash table into a plist or alist
<aeth> you need to do it in the other order
<aeth> turn it into a plist (probably prints the best) and then turn it into a string or print it to standard-output (whichever you want to do)
srolls has joined #commonlisp
srolls has quit [Remote host closed the connection]
lagash has quit [Quit: ZNC - https://znc.in]
rgherdt has quit [Remote host closed the connection]
lagash has joined #commonlisp
srolls has joined #commonlisp
ym has joined #commonlisp
notzmv has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
Gleefre has joined #commonlisp
morganw has quit [Remote host closed the connection]
lagash has joined #commonlisp
<ober> ok
ec_ has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
lagash has quit [Quit: ZNC - https://znc.in]
occ has quit [Ping timeout: 276 seconds]
ym has quit [Quit: Leaving]
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
lagash has joined #commonlisp
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #commonlisp
ym has joined #commonlisp