Xach changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/>
z3n3 has quit [Ping timeout: 260 seconds]
cosimone has quit [Ping timeout: 245 seconds]
z3n3 has joined #lisp
efm has quit [Quit: Konversation terminated!]
efm has joined #lisp
z3n3 has quit [Quit: WeeChat 2.7]
<LdBeth> STOP
aap_ has joined #lisp
beaky has quit [Read error: Connection reset by peer]
aap has quit [Read error: Connection reset by peer]
beaky has joined #lisp
Irenes[m] has quit [Ping timeout: 252 seconds]
torbo has joined #lisp
<Xach> LdBeth: sending a telegram?
<LdBeth> ATTN
<asarch> How would you convert an integer into a string?
<LdBeth> By #'format
<LdBeth> or either #'write-to-string
<asarch> Thank you! Thank you very much! :-)
<LdBeth> I guess thinking [type-of-a]->string is harmful
ebrasca has joined #lisp
turona has quit [Ping timeout: 272 seconds]
<ebrasca> Can I ask about usocket implementation here?
<Xach> ebrasca: sure
<ebrasca> What is function wait-for-input-internal ?
<ebrasca> What function wait-for-input-internal have?
smazga has quit [Quit: leaving]
bitmapper has joined #lisp
<bitmapper> does anyone know the status of lispworks personal 64bit?
turona has joined #lisp
Nilby has quit [Ping timeout: 272 seconds]
<ebrasca> Xach: ^
<pjb> asarch: prin1-to-string for any lisp object, including integers.
<asarch> Yeah!
<pjb> ebrasca: what does it have?
<pjb> LdBeth: not harmful, but using to<-from instead of from->to might be better in lisp: (c<-b (b<-a a)) instead of (b->c (a->b a))
<pjb> ebrasca: you're not making sense.
<ebrasca> pjb: I need to implement wait-for-input-internal for usocket Mezzano implementation.
<ebrasca> pjb: But I don't undestand wait-for-input-internal.
<pjb> ebrasca: well -internal probably means that it's an internal function, so it can do anything, depending on the implementation of your code. wait-for-input should be clear enough: it should wait until something is ready to be read.
<pjb> ebrasca: it should be noted that you get no help from CL for this kind of features. There's a LISTEN function for character streams, but since it's always implementation and platform dependent if and how streams are buffered, LISTEN doesn't give much information. It does precisely what it's specified to do, indicate whether there's data ready to be processed for lisp. But more data could have been available if the things had bee
<pjb> unbuffered or raw.
<LdBeth> pjb: I mean thinking in coercion while asking for formatting is no good. There could have many functions have type number->string
<pjb> LdBeth: Oh, you mean (haskell-type number -> type), not number->type.
<LdBeth> pjb: or (scheme number->string)
<Xach> ebrasca: it's something like select, poll, epoll, or kqueues.
<Xach> ebrasca: in unix terms, wait for an fd to have data
hostile has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<pjb> LdBeth: scheme number->string doesn't have the type number -> string: it can signal errors…
<LdBeth> That only means it’s a partial function
dddddd has quit [Read error: Connection reset by peer]
<pjb> It's a way to see it. What's the type of a partial function?
<pjb> (it looks like types are important to you, so I ask)
<pjb> Note how C++ or Java function signatures include the set of conditions that are signaled. int foo(int x) throws Y,Z;
<LdBeth> pjb: partial in the sense that not all elements in the set of input type are covered. However you can still view conditions/errors/exceptions as objects of certain type
<dlowe> pretty sure C++ doesn't have checked exceptions so far
Oladon has quit [Quit: Leaving.]
<_death> C++ has exception specifications, but nobody uses them because they have issues.. except maybe to say that a function does not throw
<LdBeth> A partial function in domain A could be a total on in domain B which is a subset of A
hostile has joined #lisp
<dlowe> _death: I honestly can't keep up with C++ anymore since I don't use it day-to-day
<LdBeth> But I argues that thinking in terms of type is not all that important in CL
Josh_2 has joined #lisp
<dlowe> _death: okay, those actually cause runtime errors instead of compiler checks. yikes.
asarch has quit [Quit: Leaving]
<_death> dlowe: well, I wanted to say that I haven't used it for a while, but then I recalled that I used it today.. to add a bit of texture manipulation functions to my imgui+ecl thingy so that I can use vecto to draw stuff and see it appear immediately on screen :)
<dlowe> "If an exception is thrown from a function that has not specified the thrown exception in its exception specification, the result is a call to the function unexpected()."
* dlowe kicks sand over C++. I think we've seen enough.
<_death> I could've just used cl-opengl for that bit, but I didn't want to depend on it for such basic functionality so provided my own interface
<phoe> dlowe: void unexpected() { return spanish_inquisition; }
<Xach> _death: i am on the verge of making something that uses the vecto api but draws into a browser immediately instead. i need faster feedback.
<_death> lemme make a video :)
<Xach> and faster rendering. vecto is too slow :(
<dlowe> Xach: like with parenscript?
<dlowe> phoe: :D
<Xach> dlowe: i was thinking a websocket where lisp pushes primitives to a little js kernel that draws to a canvas. but it's all thinking so far, no doing.
Nilby has joined #lisp
<Xach> bidirectional, too, so i could send mouse events to lisp and react. again, mostly daydreaming without code so far.
<Xach> this seems legit easier than porting my preferred way of messing around with graphic objects to javascript
<Xach> and then also using javascript
<smokeink> Xach: I think it's very doable; I've done it with trident mode but I want to switch to using websockets ;
<Xach> smokeink: what is trident mode?
<Xach> oh, i see
<smokeink> it's an emacs plugin to send parenscript to the browser
sjl has joined #lisp
swflint has quit [Quit: ZNC - http://znc.in]
* Xach downloads vlc to play
swflint has joined #lisp
<Xach> _death: cool!
<Xach> i guess if you don't have to compress anything that helps runtime
<Xach> _death: vectometry is so much nicer to use
<_death> Xach: the color changes every time I C-M-x.. I didn't measure how much time it takes to render though
<_death> (every time I evaluate, it replaces the texture)
<Xach> cool
<_death> you could do something like that with simple cl-opengl code.. likely easier than websockets+js :)
<Xach> _death: i want to offload rasterizing too
<_death> ah
<Xach> so js gets canvas commands, not a bitmap
<Xach> but fairly terse canvas commands - not straight code to eval
<_death> what about a cairo backend or something
<Xach> avoiding ffi mostly.
<Xach> i can grok socket ffi and it doesn't need a library.
<_death> is it just for speed reasons?
<Xach> _death: i'd like to cut down the feedback loop of thinking about a tweak to a graphics hack and seeing what it looks like. i'd also like to add some interactivity.
* _death tries something a bit more interactive
<Xach> for example
<Xach> https://i.imgur.com/mgXMaMY.png would be fun to make all the "rays" point at the cursor
<_death> it's not so bad
bitmapper has quit [Ping timeout: 272 seconds]
<HiRE> so yet another dumb question because I haven't hit my quota for today
<HiRE> im messing with bytes and stuff
<HiRE> `#xABCDEFQRZ` defines a hex value
<HiRE> but
<HiRE> `0xABCDEFQRZ` does something too
<Bike> not QRZ, surely.
<HiRE> one prints the decimal to the REPL (#x...) the other prints |0xasdasd|
<Bike> the second is a symbol.
<HiRE> Bike, special extended hex syntax clearly
<_death> #36rABCDEFQRZ
<HiRE> so symbols can begin with numbers
<HiRE> thats so foreign to me
<Bike> it's a bit unusual.
<Xach> _death: neat
<HiRE> why does it choose to bracket the output of those symbols with `|`?
<HiRE> wow #36rABCDEFQRZ evaluates
<_death> Xach: this is ecl btw
<HiRE> 2910003677103
<HiRE> lool
<Bike> those are escape characters. They mean that that all the characters in the name are exactly those characters, and not downcased or anything.
<Xach> _death: looks fun
<HiRE> Ok that makes sense. Thank you Bike
<Bike> #36rABCDEFQRZ means ABCDEFQRZ in base 36, if that's not clear
<HiRE> yep I just think its funny to think about base 36
<HiRE> for some reason
<_death> Xach: it is.. though I've not been working on it for a month
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
<pjb>
<pjb> /whoami
<loke> I'm trying to find that meme-picture "what I see"/"what they see" of Lisp code
<loke> I searched through the entirety of LispMemes on reddit with no luck
rumbler31 has quit [Remote host closed the connection]
<loke> no-defun-allowed: thanks :-)
<no-defun-allowed> (:
ahungry has joined #lisp
<loke> Speaking of lispmemes... Where does this come from? https://www.reddit.com/r/LispMemes/comments/ciw99r/heres_a_better_way_to_macro/
<no-defun-allowed> "FYI, this came out of cl-emb."
<loke> Yeah, but what is cl-emb?
<loke> There must be some story to this, because no sane person would write code like that. Ever.
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 272 seconds]
saravia has joined #lisp
<_death> HiRE: you just need some practice.. try this (setf *read-base* 36)
swflint has quit [Ping timeout: 272 seconds]
hsaziz has joined #lisp
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
swflint has joined #lisp
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
swflint has quit [Ping timeout: 272 seconds]
milanj has quit [Quit: This computer has gone to sleep]
jackdaniel has quit [Ping timeout: 250 seconds]
Mon_Ouie has quit [Ping timeout: 250 seconds]
jackdaniel has joined #lisp
Codaraxis_ has joined #lisp
dru1d has quit [Ping timeout: 250 seconds]
dru1d has joined #lisp
Mon_Ouie has joined #lisp
Codaraxis has quit [Ping timeout: 260 seconds]
asdf_asdf_asdf has quit [Remote host closed the connection]
swflint has joined #lisp
hsaziz has quit [Ping timeout: 265 seconds]
saravia has quit [Ping timeout: 268 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
saravia has joined #lisp
saravia has quit [Client Quit]
Bike has quit [Quit: Lost terminal]
g0d_shatter has joined #lisp
<smokeink> (let () (defvar x0 2) x0) ; why does it give a Warning: this undefined variable: X0 ? (when evaling it the 1st time) and this one doesn't?: (progn (defvar x6 2) x6)
Khisanth has quit [Ping timeout: 268 seconds]
<pjb> smokeink: The second form could also give a warning when evaluating it the first time. If it doesn't, it may show that you evalulate it in a REPL that uses an optimization for progn forms.
<pjb> smokeink: in both cases, defvar doesn't do anything until the form is evaluated: it has no compilation-time effect. Therefore when both forms are compiled, at compilation time, there is no variable known by x0 or x6.
<pjb> smokeink: once you evaluate them, the symbol x0 (or x6) is marked as being special, a dynamic binding is established between the symbol and the initial value, and all the code that was compiled using lexical binding of variables named x0 (or x6) are still lexical bindings. So basically, your defvar forms are useless.
<pjb> smokeink: unless, you try to compile new code.
<pjb> smokeink: in which case, since you have a different environment between the old code already compiled, and the new code, you can get semantic discrepancies, and strange bugs.
<pjb> And when I write strange bugs, I mean bugs you will spend days to debug…
<pjb> Therefore 1- never use defvar or defparameter other than as toplevel form (note progn keeps it a toplevel form, so what I called optimization above must actually be the specified semantic).
<pjb> 2- always name your special variables using the earmuff convention!!!
<pjb> ie. don't use x0 or x6, but *x0* and *x6*!
<pjb> smokeink: (defvar *x0* 2) (let () *x0*) #| --> 2 |# (progn (defvar *x6* 2) *x6*) #| --> 2 |#
<smokeink> yes I use the earmuffs
zdm has joined #lisp
<pjb> China releases its own programming language Mulan <https://cntechpost.com/2020/01/17/china-releases-its-own-programming-language-mulan/>
Khisanth has joined #lisp
<smokeink> if they don't use Chinese characters, I wouldn't call it very Chinese https://img2018.cnblogs.com/i-beta/989505/202001/989505-20200117111140494-1123911009.png
<no-defun-allowed> pjb: I cannot find any information on the language other than news, and how is it related to Lisp?
Codaraxis_ has quit [Read error: Connection reset by peer]
<no-defun-allowed> "elastic actor execution model" sounds interesting, but it sounds difficult to put with "C" and embedded devices.
<nirved> smokeink: (let () (declare (special x0)) ...) would remove the warning
hsaziz has joined #lisp
<loke> pjb: any link to the language implementation?
madage has quit [Remote host closed the connection]
<smokeink> nirved, pjb: cool,thanks
<LdBeth> no-defun-allowed: according to some Chinese user, it’s currently like a cut down version of Python
<no-defun-allowed> I don't C the "see" reference then.
ebrasca has quit [Remote host closed the connection]
<LdBeth> Anyway, it seems like a troll
<pjb> loke: not yet, but I think that beach should have traveled North from Vietnam…
madage has joined #lisp
<smokeink> pjb: here's some Common Lisp https://paste.ofcode.org/Wnu3ffzKvnwf3ZM3M8cibA in Classical Chinese . the advantage is having short identifiers - if you're used to the logograms -
<pjb> smokeink: and the advantage, is that since it's lisp code, ie. lisp data, we can easily write a little function to substitute the chinese ideogram with words using the latin alphabet. :-)
slyrus__ has joined #lisp
<smokeink> you could, but that would be at the end when you want to share the code with others ; during development you can keep it short
slyrus_ has quit [Ping timeout: 272 seconds]
g0d_shatter has quit [Quit: Leaving]
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 268 seconds]
hsaziz has quit [Ping timeout: 240 seconds]
karlosz has joined #lisp
<beach> Good morning everyone!
<Josh_2> Mornin beach
gko has joined #lisp
phlim has joined #lisp
Khisanth has quit [Ping timeout: 272 seconds]
refpga has quit [Ping timeout: 272 seconds]
refpga has joined #lisp
Qudit314159 has quit [Read error: Connection reset by peer]
Codaraxis_ has joined #lisp
Khisanth has joined #lisp
refpga has quit [Ping timeout: 268 seconds]
dale has quit [Quit: My computer has gone to sleep]
boeg has quit [Read error: Connection reset by peer]
boeg has joined #lisp
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
oxum has quit [Remote host closed the connection]
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
<HiRE> hm
<HiRE> so I am trying to summarize a bunch of booleans... I figured I could do something like `(reduce #'or '(t t t t nil))` and expect it to be false.
<HiRE> but reduce doesn't like #'or...says its not a function
<HiRE> is there a smarter way to do that?
<White_Flame> OR is a macro, but (lambda (x y) (or x y)) would work
<HiRE> ah, so the reason is because its a macro
<HiRE> interesting
<HiRE> makes sense.
<White_Flame> if it was a function, it couldn't do short circuiting
<White_Flame> (some #'identity '(t t t t nil)) also can work
<White_Flame> and is likely to be optimized
<HiRE> how does identity work?
<HiRE> I suppose I could just RTFM
<White_Flame> just passes the parameter through
<HiRE> oh its literally the identity function...lol
<HiRE> got it
<White_Flame> also, if you use REDUCE, it will always traverse the entire list. SOME/EVERY/etc will early exit if the condition is met/breached
<HiRE> wait there's a smarter way to do this I think
<HiRE> I think im overthinking this
vlatkoB has joined #lisp
<HiRE> I remember from PCL there's a way to unwrap a list into a function's args
<HiRE> (or <unwrappy thing>(t t t t nil))
<White_Flame> but OR isn't a function ;)
<HiRE> damnit
<HiRE> you're right
<HiRE> haha
Necktwi has quit [Read error: Connection reset by peer]
<no-defun-allowed> APPLY?
<White_Flame> it would be (apply #'or list) if OR were a function
<no-defun-allowed> You would have to use SOME; and I would advise against using APPLY where you want to REDUCE because some implementations may have small argument limits.
whiteline has quit [Remote host closed the connection]
<loke> HiRE: You might be looking for MOTANY?
<loke> I mena NOTANY?
whiteline has joined #lisp
<HiRE> oh right! there's also a SOME function
atgreen has quit [Ping timeout: 260 seconds]
Necktwi has joined #lisp
narimiran has joined #lisp
gravicappa has joined #lisp
oxum has joined #lisp
oxum_ has joined #lisp
oxum has quit [Remote host closed the connection]
pilne has quit [Quit: First shalt thou take out the Holy Pin. Then, shalt thou count to three. No more. No less.]
orivej has joined #lisp
asarch has joined #lisp
<pjb> HiRE: (some #'identity list) == (find nil list :test-not 'eql) == (not (find nil list))
<pjb> Oops.
<pjb> HiRE: (some #'identity list) == (find nil list :test-not 'eql)
<HiRE> interesting. Makes sense since identity will just return the list directly into some.
ebzzry has quit [Ping timeout: 240 seconds]
<HiRE> thats a clean way to do it
<pjb> No, it's wrong. Let me think.
<pjb> Because if find doesn't find it, it returns nil!
<pjb> There:
<pjb> (some #'identity list) == (position nil list :test-not 'eql)
<pjb> (every #'identity list) == (not (position nil list))
<pjb>
torbo has quit [Remote host closed the connection]
akoana has joined #lisp
<Nilby> And when you're familiar with those, then you can move on to the more vague temporally mutable versions: past-identity possible-position sometime once whenever and whatever.
<HiRE> (whatever 'my-list)
<HiRE> nondeterministic boolean function
<HiRE> returns whatever it feels like at the moment
<HiRE> thats on the same level of using #define in C to make your entire program read like a telegraph
sauvin has joined #lisp
ebzzry has joined #lisp
<loke> (defun WHATEVER () (zerop (random 2)))
oxum has joined #lisp
<Nilby> Also AMB, McCarthy's "angleic operator".
oxum_ has quit [Read error: Connection reset by peer]
oxum_ has joined #lisp
<Nilby> "angelic" that is
oxum has quit [Ping timeout: 260 seconds]
<no-defun-allowed> I've only really heard it being called the "ambiguous" operator.
ahungry has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 260 seconds]
<Nilby> I think it's called that since it hovers over your function and waits for it to die.
ebzzry has quit [Ping timeout: 265 seconds]
asarch has quit [Quit: Leaving]
brown121408 has quit [Ping timeout: 240 seconds]
brown121408 has joined #lisp
akoana has left #lisp ["Leaving"]
refpga has joined #lisp
zdm has quit [Remote host closed the connection]
ebzzry has joined #lisp
hsaziz has joined #lisp
aap has joined #lisp
haziz has joined #lisp
lclark` has joined #lisp
oxum_ has quit [Read error: Connection reset by peer]
oxum has joined #lisp
payphone_ has joined #lisp
Finnfinn_oops has joined #lisp
pok_ has joined #lisp
JohnMS_WORK has joined #lisp
Ekho- has joined #lisp
hsaziz has quit [*.net *.split]
Necktwi has quit [*.net *.split]
aap_ has quit [*.net *.split]
lclark has quit [*.net *.split]
badgerblock has quit [*.net *.split]
davisr has quit [*.net *.split]
drmeister has quit [*.net *.split]
davr0s has quit [*.net *.split]
trittweiler has quit [*.net *.split]
acolarh has quit [*.net *.split]
simplegauss_ has quit [*.net *.split]
drewc has quit [*.net *.split]
fouric has quit [*.net *.split]
ft has quit [*.net *.split]
cmatei has quit [*.net *.split]
pok has quit [*.net *.split]
nightfly has quit [*.net *.split]
scal has quit [*.net *.split]
bkst_ has quit [*.net *.split]
alandipert has quit [*.net *.split]
payphone has quit [*.net *.split]
ssake has quit [*.net *.split]
zigpaw has quit [*.net *.split]
Finnfinn has quit [*.net *.split]
cyberlard has quit [*.net *.split]
Ekho has quit [*.net *.split]
snits has quit [*.net *.split]
surrealpie has quit [*.net *.split]
glamas has quit [*.net *.split]
cnomad has quit [*.net *.split]
haziz is now known as hsaziz
pok_ is now known as pok
jlpeters has quit [Ping timeout: 240 seconds]
jlpeters has joined #lisp
dnaeon has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
ggole has joined #lisp
madagest has joined #lisp
madage has quit [Ping timeout: 240 seconds]
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
xkapastel has joined #lisp
milanj has joined #lisp
oxum has quit [Read error: Connection reset by peer]
varjag has joined #lisp
oxum has joined #lisp
Necktwi has joined #lisp
drmeister has joined #lisp
nightfly has joined #lisp
badgerblock has joined #lisp
ft has joined #lisp
fouric has joined #lisp
trittweiler has joined #lisp
davisr has joined #lisp
davr0s has joined #lisp
cmatei has joined #lisp
scal has joined #lisp
drewc has joined #lisp
simplegauss_ has joined #lisp
acolarh has joined #lisp
surrealpie has joined #lisp
snits has joined #lisp
cyberlard has joined #lisp
glamas has joined #lisp
zigpaw has joined #lisp
ssake has joined #lisp
alandipert has joined #lisp
bkst_ has joined #lisp
cnomad has joined #lisp
mfiano2 has quit [Remote host closed the connection]
thecoffemaker has quit [Ping timeout: 268 seconds]
thecoffemaker has joined #lisp
thecoffemaker has quit [Changing host]
thecoffemaker has joined #lisp
frgo has joined #lisp
scymtym has joined #lisp
<shka_> good day!
<smokeink> good Day
<shka_> quick, general question, how to quickly generate colormaps?
<shka_> maybe there is already some sort of library for that
<jackdaniel> could you elaborate what do you mean by a colormap? and what representation is that you are expecting?
<shka_> colormap as those found in software like matlab, that is: way to visualize value from 0.0 to 1.0 as a color from the range
<shka_> this kind of thing
<no-defun-allowed> Some of those look like a gradient that just changes the hue, saturation or brightness.
<no-defun-allowed> A first approximation could be to set up a HSV tuple for the minimum and another for the maximum, then lerp between those in a loop to generate the colours.
<jackdaniel> clim could provide you with some primitives (it has functions for ihs and rgb color manipulation)
rwcom2 has joined #lisp
<jackdaniel> but there is no built-in function to generate a function [0;1] -> [r;g;b]
<jackdaniel> [0;1] -> (r g b)
rwcom has quit [Ping timeout: 272 seconds]
rwcom2 is now known as rwcom
<scymtym> i found that for rasterizing gradient-like things in mcclim, patterns work pretty well: https://techfak.de/~jmoringe/mcclim-color-picker.png
<Shinmera> shka_: You can just use something like this https://github.com/Shinmera/colored/blob/master/ops.lisp#L239-L253
_fe_ has joined #lisp
hhdave has joined #lisp
hhdave has quit [Client Quit]
tiwEllien has joined #lisp
hhdave has joined #lisp
<shka_> Shinmera: thanks!
<shka_> jackdaniel: thanks!
dnaeon has quit [Ping timeout: 260 seconds]
rumbler31 has joined #lisp
davepdotorg has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #lisp
jprajzne has joined #lisp
oxum_ has joined #lisp
oxum has quit [Read error: Connection reset by peer]
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #lisp
frgo has quit [Remote host closed the connection]
holycow has quit [Quit: Lost terminal]
frgo has joined #lisp
decent-username has joined #lisp
jonatack has quit [Ping timeout: 272 seconds]
KD35 has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
mingus has quit [Read error: Connection reset by peer]
<KD35> hello
mingus has joined #lisp
quazimod1 has joined #lisp
quazimodo has quit [Ping timeout: 265 seconds]
<KD35> I'm trying to make multiple :where clause using Mito but I'm in struggle. Would somebody be able to help?
hsaziz has quit [Ping timeout: 268 seconds]
<KD35> What I've tried is like this, (mito:select-dao 'post (mapcan (lambda (k) `(sxql:where (:like :title (concatenate 'string "%%" ,k "%%")))) keywords))
<KD35> I would appreciate for any hint.
<jdz> KD35: How do you expect those where clauses to be combined?
<jdz> I'd expect a single sxql:where with the multiple criteria combined using AND or OR.
<KD35>
<KD35> (mito:select-dao 'post (sxql:where (:like :title "%lisp%" )) (sxql:where (:like :title "%sbcl%" )))
<jdz> KD35: you did not answer my question.
<KD35> this code would work and I want to get keywords as a list of ("lisp" "sbcl")
<jdz> KD35: you want posts with both of those keywords, or any of them?
<KD35> any ot them
<jdz> KD35: So how do you expect mito to figure that out on its own? You have not specified that.
<KD35> #<SXQL-STATEMENT: SELECT * FROM post WHERE ((title LIKE '%lisp%') AND (title LIKE '%sbcl%'))>
<jdz> KD35: Have you put the "AND" anywhere?
<KD35> sorry the result of above was AND but I want OR
z147 has joined #lisp
rippa has joined #lisp
<jdz> I'd expect something like (sxql:where (:or (:like :title "...") (:like :title "..."))).
<KD35> ah you are corect. That's what I want.
<KD35> But anyway the point here is that I would like to use keywords list.
<KD35> I thought Mito will provide such a functionality but I couldn't find. So I tried to solve using macro and didn't work.
<jdz> If all that did not work was the default of AND instead of OR, then you have your answer.
<jdz> (mito:select-dao 'post (sxql:where (:or `(mapcan ...))))
dddddd has joined #lisp
<jdz> Umm, the backquote does not seem right, but you hopefully get the idea.
<KD35> Thank you for your advice. I'm trying it now.
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
william1 has joined #lisp
oxum_ has quit [Ping timeout: 258 seconds]
<no-defun-allowed> minion: memo for another-user: I came up with another trick for the brainfuck compiler; replacing the TAPE structure with two local variables drops the execution to 3 seconds on Clozure with the Mandelbrot program (and somehow it makes the SBCL compiler hang) which is 1/3 of the time the last compiler took.
<minion> Remembered. I'll tell another-user when he/she/it next speaks.
frgo has joined #lisp
<no-defun-allowed> I wonder what makes the SBCL compiler hang on the generated code. It's a lot of code, sure, but it takes more than 30 seconds to compile and the only change was replacing the structure with local variables.
xkapastel has quit [Quit: Connection closed for inactivity]
<scymtym> no-defun-allowed: is the code available?
frgo has quit [Ping timeout: 272 seconds]
<no-defun-allowed> The compiler, the generated CL code, or both?
oxum has joined #lisp
<scymtym> if the compiler is self-contained, the compiler. and the problematic input program, probably. if it isn't too much trouble
<jdz> no-defun-allowed: how do the two variables simulate a tape?
<no-defun-allowed> The compiler is https://plaster.tymoon.eu/view/1642#1642 and it compiles https://raw.githubusercontent.com/kostya/benchmarks/master/brainfuck2/mandel.b to about 10,000 pretty printed lines of CL.
<scymtym> no-defun-allowed: thanks
tiwEllien has quit [Ping timeout: 258 seconds]
<no-defun-allowed> jdz: One for the data, and one for the head address. I slack off like most implementations and use a finite-but-pretty-large tape.
<jdz> I once wanted something similar, so I used two lists; moving through the "tape" would be popping elements from one list and pushing them to the other. Inserting at current position would be pushing to one of them, depending on whether it has to be inserted left or right of the "cursor".
tiwEllien has joined #lisp
smokeink has quit [Ping timeout: 272 seconds]
<jdz> But using lists instead of a vector might have the obvious drawback.
<no-defun-allowed> Yeah, I saw an implementation in Lisp do that. Specialised arrays are usually faster though, and we're playing a benchmark which is a very stupid game.
karlosz has quit [Quit: karlosz]
<beach> I know very little about this thing, but do you need insert/delete at arbitrary positions of the "tape"?
<beach> If so, a Flexichain should be much better than a list.
<jdz> no-defun-allowed: It's also funny that your implementation starts at the middle of the tape, and what I saw in other language entries is that they start at the beginning.
<no-defun-allowed> beach: As in taking the "tape" (A B) and inserting C to get (A B C)? The target language only could write to get (A C) or (C B), depending on the head's position.
jonatack has joined #lisp
lansiir has quit [Remote host closed the connection]
<boeg> What type does slot-values like `(:documentation "a docstring")` have? Like what are they? They don't appear to be like a cons or a list as far as I can see
<no-defun-allowed> (The six instructions are to move the head either way, increment or decrement the value on the tape at the head, print the value at the head and loop.)
karlosz has joined #lisp
frgo has joined #lisp
jmercouris has joined #lisp
<boeg> actually seems they are just list
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
william1 has quit [Ping timeout: 268 seconds]
karlosz has quit [Quit: karlosz]
<jmercouris> how to test if connectivity to internet is available? drakma?
trittweiler_ has quit [Ping timeout: 240 seconds]
Nilby has quit [Ping timeout: 272 seconds]
<galdor> "connectivity to internet" is not a one or zero thing
<jmercouris> Yeah, that's a tough thing isn't it
<jmercouris> how do I know if there just isn't an insane delay for packet loss or whatever
<galdor> if you want to test if you can access a specific internet service, just try and see what happens
hsaziz has joined #lisp
<no-defun-allowed> (usocket:socket-connect "1.1.1.1" 80) ;; provided you don't mind giving CloudFlare (or substitute for your own big company) a TCP connection
<galdor> if you want to check for packet loss, it's a tricky subject, you may want to read about ICMP
<jmercouris> I'll avoid X-Y'ing here
<jmercouris> basically I want to check in Next if the user has a suitable internet connection, and if not, show the help page
<jmercouris> I'm thinking probably I should try to use usocket as no-defun-allowed said and check their home page
<galdor> you're the author of Next ? congrats !
<galdor> it's an interesting project
<jmercouris> thank you :-), yes I am
<galdor> yeah, and then the browser will tell you internet is down because an admin blocked 1.1.1.1 on the network
<galdor> the right way is to try to access the page normally, and handle socket errors to infer the possible causes of the errors
<no-defun-allowed> jmercouris did then say "their home page", which I imagine is somewhat less likely to be blocked.
<galdor> it's still wrong in general
<jmercouris> perhaps drakma is the way then, try to fetch the home page
<galdor> it's a bit like trying to check if a file is readable by various mechanisms before, you know, trying to read it
<galdor> Next uses drakma for HTTP ? and CL+SSL ?
<jmercouris> Not exactly no
<jmercouris> Sometimes, yes
<jmercouris> dexador sometimes
<jmercouris> there is per-buffer VPN, Proxy, download, sometimes the web renderer port stack will load an asset, sometimes lisp directly
rumbler31 has joined #lisp
amerlyq has joined #lisp
william1 has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
<scymtym> no-defun-allowed: Python tracks more properties for lexical variables than for structure slots. in this case it creates a million (quite literally) integer range types for the various variables (mainly POSITION, i think) and performs operations, mostly TYPE= in this case, on them
<no-defun-allowed> Oh, fair enough then. Does it try to constrain my declarations further?
<scymtym> i think (let ((position …)) <POSITION has a constant initial value or a declared type> (incf position) (incf position) …) leads to a fresh integer range type being associated with each program point, but i haven't looked that closely
<no-defun-allowed> Right.
<no-defun-allowed> One idea I'll test tomorrow (heading off to bed now) is putting each instruction in a FLET and inlining those functions. Would that avoid that inference (if you know off the top of your head)?
whiteline has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
whiteline has joined #lisp
<scymtym> i think it would, but not sure
<scymtym> even better would be if SBCL could just handle that code, of course
atgreen has joined #lisp
gxt has joined #lisp
<no-defun-allowed> Sure. That probably is pathological stuff though, I don't think it's a problem that SBCL can't compile it quickly.
Lord_of_Life_ has joined #lisp
<scymtym> true
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<flip214> luis: how about an option to increase slime hex message length indicator to 8 digits?
whiteline has quit [Ping timeout: 260 seconds]
whiteline has joined #lisp
orivej has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
brown121407 has joined #lisp
brown121408 has quit [Read error: Connection reset by peer]
william1 has quit [Ping timeout: 268 seconds]
asdf_asdf_asdf has joined #lisp
KD35 has quit [Remote host closed the connection]
m00natic has joined #lisp
hsaziz has quit [Ping timeout: 268 seconds]
smokeink has joined #lisp
milanj has joined #lisp
random-nick has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
decent-username has quit [Ping timeout: 272 seconds]
varjag has joined #lisp
<Xach>
jmercouris has quit [Ping timeout: 272 seconds]
jonatack has quit [Ping timeout: 265 seconds]
rumbler31 has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 265 seconds]
rumbler31 has quit [Ping timeout: 258 seconds]
<beach> no-defun-allowed: OK, I see. Thanks.
<beach> boeg: That's not a slot. It's a documentation string.
<boeg> beach: yes but isnt is saved as a slot value anyways? Anyways, its just a list i found out
<beach> Yes, it is stored as a slot when it is a class or a generic function for instance, or a slot too as I recall.
<beach> Then it is accessible using the function DOCUMENTATION.
ebrasca has joined #lisp
gaqwas has joined #lisp
montaropdf has joined #lisp
atgreen has quit [Ping timeout: 260 seconds]
<boeg> beach: yes, thank you
<_death> no-defun-allowed: still it might just be low-hanging fruit to get it to compile faster.. e.g., during compilation I C-c C-c'd and it was at some pushnew form to component-reanalyze-functionals, which is a set represented as a list.. it was used in few places so I replaced it with a hash table (sbcl likely has a better representation for sets) .. this shaved a few seconds from compilation
kenu has joined #lisp
<kenu> hi
scymtym_ has joined #lisp
Bike has joined #lisp
<kenu> I've got a problem with postmodern's insert-dao, I've got (setq s-sql:*escape-sql-names-p* :literal), but then there is following error on inserting a record Database error 42703: column "updatedat" of relation "actions" does not exist
<kenu> QUERY: INSERT INTO "actions" ("updatedat", "createdat", "actiontype", "referer", "visitorip", "productid", "visitorid", "shopuserid", "userid") VALUES ("$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9") RETURNING "shoptransactionid", "actionid"
scymtym has quit [Ping timeout: 260 seconds]
<_death> kenu: well, does it exist or not?
<kenu> it doesn't but the actual question is how do I ahndle cammelCase column names with dao
<_death> I'm guessing |updatedAt| though I've not used postmodern in a while
<kenu> the actual column names in db are as follow updatedAt createdAt and so on
<_death> :col-name "updatedAt" in the dao class should work
oxum_ has joined #lisp
hhdave has quit [Ping timeout: 260 seconds]
smokeink has quit [Ping timeout: 268 seconds]
<Xach> oh crud.
oxum_ has quit [Remote host closed the connection]
* Xach needs to update ops5 to use named-readtables
hhdave has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
LiamH has joined #lisp
lucasb has joined #lisp
asdf_asdf_asdf has quit [Remote host closed the connection]
<kenu> once the columns are correct in cammel case I've got following error
<kenu> ebugger invoked on a CL-POSTGRES-ERROR:UNDEFINED-COLUMN in thread
<kenu> Database error 42703: column "$1" does not exist
<kenu> QUERY: INSERT INTO "actions" ("updatedAt", "createdAt", "actionType", "referer", "visitorIp", "productId", "visitorId", "shopUserId", "userId") VALUES ("$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9") RETURNING "shopTransactionId", "actionId"
<kenu> #<THREAD "main thread" RUNNING {10005084C3}>:
reimu_ has joined #lisp
thecoffemaker has quit [Read error: Connection reset by peer]
milanj has joined #lisp
<galdor> positional parameters should not be quoted, and certainly not with double quotes
harovali has joined #lisp
pfdietz has joined #lisp
oxum has joined #lisp
<kenu> yes, but that's produced by insert-dao
oxum has quit [Ping timeout: 272 seconds]
patlv has joined #lisp
<Xach> kenu: can you show the code?
reimu__ has joined #lisp
asdf_asdf_asdf has joined #lisp
<_death> Xach: it's cool to resurrect such projects :)
reimu_ has quit [Ping timeout: 265 seconds]
dmc00 has left #lisp ["ERC (IRC client for Emacs 25.1.1)"]
chimneys has joined #lisp
<chimneys> what's the equivalent of eval (+ 2 3) in lisp
<chimneys> I read gigamonkeys book am unable to eval
<beach> chimneys: That *is* a valid Common Lisp expression.
<beach> chimneys: Just type it to your REPL.
<chimneys> no ( + 2 3) needs eval, without repl , hence the query
<dlowe> chimneys: You want (eval '(+ 2 3)) but you really need to understand why
<dlowe> and also if you want to store input code to be executed later, you're much better off wrapping it in a function and storing the result of CL:COMPILE to call later
<jackdaniel> if you put (+ 2 3) in your source code it will be evaluated unless explicitly quoted
<jackdaniel> (print (+ 2 3)) if you want a visible side effect
Inline has joined #lisp
<beach> chimneys: This is the place where we typically ask "What is it that you *really* want to do?"
<pfdietz> eval is almost never the right thing to be doing.
<chimneys> jupyter notebooks %%writefile file.cl \n code.. shift+enter to get new cell then !clisp file.cl
rumbler31 has joined #lisp
<pfdietz> (and I say that as someone who does use it on occasion, but only when it's appropriate)
<jackdaniel> a) learn, b) troll, c) move on, d) eval
<jackdaniel> (I've suggested 4 answers to the typical question)
oxum has joined #lisp
<kenu> (defclass |actions| ()
<kenu> :reader |action-actionId|)
<kenu> :reader |action-userId|)
<kenu> ((|actionId| :col-type (or db-null integer) :initarg :action-id
<kenu> (|userId| :col-type (or db-null integer) :initarg :user-id
<kenu> (|shopUserId| :col-type (or db-null integer) :initarg :shop-user-id
<kenu> :reader |action-shopUserId|)
<kenu> (|shopTransactionId| :col-type (or db-null integer) :initarg :shop-transaction-id
<kenu> :reader |action-shopTransactionId|)
<kenu> (|visitorId| :col-type (or db-null integer) :initarg :visitor-id
<kenu> :accessor |action-visitorId|)
<kenu> (|productId| :col-type (or db-null integer) :initarg :product-id
<Bike> don't paste more than one line of code, please, kenu
<kenu> :accessor |action-productId|)
<jackdaniel> please do not multiline-post (use a pastebin service of some sort)
<kenu> (|visitorIp| :col-type string :initarg :visitor-ip
<kenu> :accessor |action-visitorIp|)
<kenu> (|referer| :col-type string :initarg :referer
<kenu> :accessor |action-referer|)
<kenu> (|actionType| :col-type string :initarg :action-type
<kenu> :accessor |action-actionType|)
kenu was kicked from #lisp by jackdaniel [kenu]
<jackdaniel> first
<Bike> it's kind of bizarre when you can tell they're just pasting inexorably and can't stop
jonatack has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
kenu has joined #lisp
<kenu> :P
oxum has quit [Ping timeout: 240 seconds]
<jackdaniel> kenu: thank you
<phoe> 15:47 -!- mode/#lisp [-o jack_rabbit] by jackdaniel
<dlowe> There are irc clients that automatically pastebin large pastes
<jackdaniel> yes, I've stripped jack_rabbit from privigiles multiple times
<phoe> :(
<phoe> poor thing
<jackdaniel> I feel bad about it, otoh he didn't lose anything, just like with priate copies of software ,)
<jdz> kenu: You don't have to escape the accessors in your DEFCLASS.
patlv_ has joined #lisp
<jdz> And I'd expect there to be a slot and class options to provide case-sensitive names for columns and table name.
oxum has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Cymew has quit [Ping timeout: 268 seconds]
<jdz> kenu: :col-name and :table-name, if I'm reading the documentation correctly.
oxum has quit [Ping timeout: 268 seconds]
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` has joined #lisp
jmercouris has joined #lisp
<jmercouris> since declaim is implementation dependent, is it possibly that it could signal a condition in some implementations?
X-Scale` is now known as X-Scale
<Bike> sure, why not? (declaim 4) probably would
<jmercouris> should declaim therefore be avoided in implementation independent code as it may cause issues?
<Shinmera> anything can signal a condition (stack exhausted, memory exhausted, etc.)
<Bike> uh, no? what?
<Bike> if you use declaim/proclaim with a valid declaration specifier it shouldn't signal an error.
<Bike> in the same way (+ 3 4) will probably not signal an error
<jmercouris> shouldn't is different than cannot
<Bike> proclaim is not particularly different from any function in the standard in terms of when it signals
<Odin-> In that case you shouldn't do anything, because you can't be sure the implementation actually implements the standard.
<Bike> right.
<jmercouris> the CLHS doesn't say that declaim WONT do something undesirable
<jmercouris> I just want to know if I should avoid it or not
<jmercouris> will it cause me issues with portability if I am to use it?
<Bike> Not any more than calling + or PRINT would.
sjl_ has joined #lisp
<jmercouris> OK, thank you
<Bike> I don't understand why you think declaim is special in this aspect.
<Odin-> If it does cause any kind of issue, that would be an implementation bug, not a bug in your code.
<_death> indeed.. and if you use nonstandard declarations, you may be able to use (declaim (declaration ...)) to tell other implementations to not warn
ralt has joined #lisp
<_death> (but likely don't want to read the declaration name symbols anyway)
<jmercouris> I see
<Bike> I mean if you have a reason to think declaim is especially dangerous I'd like to hear it
<jmercouris> I am just trying not to assume anything, that's all
<jmercouris> I have it a lot in my codebase, was just questioning it
<Bike> i see
<_death> I think I used declaration declaration once :)
<pfdietz> I used declaration declarationyesterday!
<pfdietz> (adds space)
<_death> what was it for?
<pfdietz> The problem was to turn off inlining in a package. I did that by (conditionally) shadowing the symbol INLINE, then declaring the new symbol to be a declaration (which is then ignored).
<_death> sneaky
<_death> reminds me of #define private public
<jackdaniel> very useful technique ;)
jonatack has quit [Ping timeout: 265 seconds]
<pfdietz> Sneaky is when I write a macroexpand hook to automatically add the shadowing to a defpackage form at macroexpansion time.
patlv_ has quit [Read error: Connection reset by peer]
patlv_ has joined #lisp
<phoe> pfdietz: yes, that was a very good hack
<Xach> but what about uiop:define-me-a-package
<jmercouris> Xach: you get me there, I tried to find uiop:define-me-a-package
oxum has joined #lisp
<jmercouris> I must have a too old verison of uiop :P
pfdietz has quit [Remote host closed the connection]
<phoe> (uiop:make-me-a-sandwich :sudo t)
refpga has quit [Remote host closed the connection]
<Shinmera> Colleen: make me a sandwich
<Colleen> Not even in your dreams, buddy.
refpga has joined #lisp
<_death> Colleen: sudo make me a sandwich
<Colleen> Unknown command. Possible matches: 8, set, say, mop, get, time, tell, roll, help, deny,
tiwEllien has quit [Quit: WeeChat 2.7]
rumbler31 has joined #lisp
patlv_ has quit [Ping timeout: 272 seconds]
<jmercouris> Shinmera: does Colleen perform the logging for you?
<Shinmera> among other things yes
<jmercouris> or is that a different program?
rumbler31 has quit [Ping timeout: 265 seconds]
<chimneys> opusmodus vs openmusic what's the difference
<pjb> Bike: declaim forms are data for the CL compilers, and for any tool that will take the source as input. Therefore it is as dangerous as any data. (declaim (launch-missile :type supersonic :target-coordinate (find-current-coordinate 'Bike))) if you happen to process this source with a program that is connected to the Russian missile network, you're toast…
tiwEllien has joined #lisp
montaropdf has quit [Quit: Bon week-end]
<Xach> chimneys: they are different programs for different purposes.
<pjb> jmercouris: the only thing of declaim and proclaim, is that they may mutate some global state. For example, the optimization levels. And there is no introspection of the declared (or declaimed) declarations! Therefore it is bad to use proclaim or declaim as toplevel forms in libraries!
<Demosthenex> is there a cl lib for pgp or gpg? i was discussing doing a POC password repo and that came up. my google-fu can't seem to find a straight answer
<pjb> jmercouris: you can instead write and export a function that will call proclaim to declare the things like you'd want them, and let the user call it. Of course, if you want to declaim stuff for compilation time, the user will have to load this function before compiling your library which can be difficult if this function is in your library…
<chimneys> xach ok
<pjb> Demosthenex: there's ironclad for cryptography.
<Xach> Demosthenex: i don't know of one.
<jmercouris> pjb: hm, cat and mouse problem
<Xach> Demosthenex: the primitives are implemented in ironclad, but not drawn together in the overall format.
<Demosthenex> pjb: i was reading that, it's a cl native crypto lib, but it also said limited support for public key crypto
refpga has quit [Remote host closed the connection]
<jmercouris> pjb: no wait, chicken and egg, sorry
pfdietz has joined #lisp
<Demosthenex> grepping through quicklisp code, i'm seeing shell calls to gpg on occasion
<Xach> i have implemented protocol-compliant signature verification but i am not interested in implementating encryption/decryption
<Odin-> Crypto is hard.
<chimneys> Xach: on a side note, emacs does render graphics like tetris,images ,etc how?
<jmercouris> chimneys: it is a long story, and not for this channel
<Odin-> chimneys: Emacs is its own environment.
<Demosthenex> Odin-: i agree completely. which is why i was looking for a library
<pjb> jmercouris: what I do, is write a separate, "tool" library, and instruct to load it first, use it to configure things, and then compile and load the target library.
<pjb> jmercouris: this way the user is responsible for configuring his environment.
<Demosthenex> _death: hey, that's a good find. a library for a wrapper lib ;]
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
<HiRE> Is there a nice way to expland a number into a list of bytes? For example, if I want a 4 byte representation of 13 in hex, I would get (#x00 #x00 #x00 #x0D)
<HiRE> happy to write it myself. l1sp didnt turn up anything which is why I ask
ebrasca has quit [Remote host closed the connection]
<HiRE> 13d*
<HiRE> expand*
<HiRE> sorry just woke u
<Shinmera> you can just use LDB for that.
<HiRE> p
<Shinmera> clhs ldb
<Shinmera> do note that byte does not equal octet.
<HiRE> right. I do mean byte here so this will work.
<HiRE> thank you!
knicklux has joined #lisp
smazga has joined #lisp
Codaraxis_ has quit [Ping timeout: 265 seconds]
reimu_ has joined #lisp
reimu__ has quit [Ping timeout: 265 seconds]
reimu__ has joined #lisp
<pjb> (loop with n = (random (expt 2 64)) for pos from 0 to 56 by 8 collect (ldb (byte 8 pos) n)) #| --> (205 7 220 165 176 97 6 156) |#
Necktwi has quit [Read error: Connection reset by peer]
reimu_ has quit [Ping timeout: 240 seconds]
<pjb> HiRE: ^
oxum has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: Leaving.]
kamog has joined #lisp
<HiRE> thank you pjb :)
Necktwi has joined #lisp
asdf_asdf_asdf has quit [Remote host closed the connection]
asdf_asdf_asdf has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
jmercouris has quit [Ping timeout: 260 seconds]
ebzzry has quit [Ping timeout: 265 seconds]
lclark` has quit [Remote host closed the connection]
efm has quit [Remote host closed the connection]
efm has joined #lisp
ebzzry has joined #lisp
jonatack has joined #lisp
tiwEllien has quit [Ping timeout: 268 seconds]
madage has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
madagest has quit [Ping timeout: 240 seconds]
frgo has quit []
slyrus_ has quit [Read error: Connection reset by peer]
slyrus has joined #lisp
frgo has joined #lisp
refpga has joined #lisp
tiwEllien has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
reimu_ has joined #lisp
ebzzry has joined #lisp
davepdotorg has quit [Read error: Connection reset by peer]
davepdot_ has joined #lisp
reimu__ has quit [Ping timeout: 265 seconds]
Bike has quit [Remote host closed the connection]
rumbler31 has joined #lisp
Bike has joined #lisp
<chimneys> hey can we write GTA V in lisp? or flightgear fligt simulator
<Xach> chimneys: yes
hhdave has quit [Quit: hhdave]
<chimneys> by avoiding C++ headache,
<chimneys> I mean those are performance demanding games
<chimneys> those are best seller games
<Xach> ok
<pjb> chimneys: I once considered merging flightgear with ecl, to be able to script it in CL…
rumbler31 has quit [Ping timeout: 268 seconds]
<beach> chimneys: Common Lisp can generate code with performance comparable to that generated by a C compiler.
davepdot_ has quit [Ping timeout: 265 seconds]
<beach> chimneys: Furthermore, as I often point out, given the manual memory management of C++, it is impossible to write a C++ program that is both fast and modular.
<beach> chimneys: So if you want fast C++ code, you are in for a maintenance nightmare.
<pjb> chimneys: it shouldn't be too hard to do: first compile flightgear as a library. Then link it with libecl in a single executable. Then add the flightgear API to lisp. Since it's already scriptable in lua IIRC, it shouldn't be too hard.
<Xach> beach: on the other hand, games remind me of movie sets a little bit. they are not built to last or to be extensible, but to provide an entertaining brief impression and then be discarded. as long as they are captured once under the right conditions it is ok.
<pjb> chimneys: now, IIRC flightgear uses C++, so it may be more indicated to use clasp (an ecl derivative optimized for C++ interaction), but clasp didn't exist at the time.
<Xach> Many unacceptable shortcuts in building a place to live are acceptable in other contexts.
<pjb> Not all games are games. Realistic simulators like flightgear are in a different category, and used not as games, but as training or study tools amongst other uses.
<beach> Xach: I believe you. But the maintenance nightmare must be a problem during development as well, I would imagine.
<Xach> I have not heard many stories about how pleasant it is to make games
<pjb> For example, you could hook the worldwide flight data into flightgear and see real traffic.
<pjb> Pleasantness is reduced by the capitalistic constraints on commercial game development…
refpga has quit [Remote host closed the connection]
<Xach> but the upside is you can pretend you are interacting with a space ship, and we can't really make space ships that millions can try yet, so
m00natic has quit [Remote host closed the connection]
<_death> Xach: this is true, but in recent years some companies put a lot of effort in maintenance of existing games, especially if they have an "online community"
<Bike> some people want to be space ship maintenance crew
scymtym_ has quit [Ping timeout: 252 seconds]
<Xach> anyway, it makes me think about how many entertaining illusions are created by unsustainable practices and the magic is from a) not knowing that there's a trick involved or b) not knowing how the trick works or c) not believing that anyone would go to the lengths to make it work
knicklux has quit [Ping timeout: 252 seconds]
efm has quit [Quit: Konversation terminated!]
<chimneys> xach run fortran routines and tell me the speed of your desktop mine is 200GFLOPS
<Xach> chimneys: no.
<chimneys> lisp is 4 times slower than java and C++ I checked on those benchmarks,so if your desktop is 4 times faster then lisp performance shouldn't matter
<beach> chimneys: You should be very careful about believing such benchmarks.
mangul has joined #lisp
<beach> chimneys: Most often, the comparison does not involve programs with the same semantics in the different languages involved.
<chimneys> hmm the language is fortran matrix calculations linpack
<beach> chimneys: Good for you.
ebzzry has quit [Ping timeout: 265 seconds]
<_death> when use of (say) _mm_mul_pd is consider valid, the programming language doesn't matter much
<pjb> Almost our whole lisp history is lost…
<sjl_> https://web.archive.org/web/*/www.bitsavers.org may have some
<HiRE> I think beach hit the nail on the head. You can't be both fast and modular. It's one of those attribute triangle problems.
scymtym has joined #lisp
<HiRE> chimneys is missing the GC optimization route. Benchmarks aren't perfect. Lisp is highly compiler dependent.
<HiRE> I mean they power space shuttles with it so it's can't be that bad for real time/near real time work
<HiRE> lol
<HiRE> I think chimneys is vastly overestimating how optimized games actually are...last one I downloaded was 50GB and ran like garbage...
<HiRE> really easy to fall into religious zealotry if you just cite benchmark-game.
<HiRE> (you could argue real time doesn't imply fast but rather consistent...but you see my point)
<pjb> HiRE: it depends. Modularity is in the source. We have compiler to mix and merge and optimize and remove generality.
brown121408 has joined #lisp
<Xach> The answer to "Can I do X with Lisp?" is always yes, but the question of "Will it be as easy to do X in Lisp as it is in SomeOtherLanguage?" is usually "it depends a lot on X and SomeOtherLanguage"
<pjb> eg. if a global analysis of your lisp program demonstrates that 1- the program never evaluates input (ie. it doesn't change at run-time), 2- at a call point, the arguments to a generic function are always of the same class, then it can hardwire the method called without computing anything.
<pjb> And other such type-based optimization.
<pjb> If it can prove it…
<HiRE> yeah. To Xach's point the magic of turing completeness makes "can I do X in Y" vacuously true.
<HiRE> Some languages have features that enable better developer interop, nicer structures to help think about things, etc.
FreeBirdLjj has joined #lisp
brown121407 has quit [Ping timeout: 268 seconds]
<HiRE> at least this discussion is more thought provoking than "eww parentheses" :P
oxum has joined #lisp
<chimneys> but still you yourself admitted C isn't faster than a factor of 10 that a good CL code, and processor capacity doubles every year so 2**3 = 8, so the hardware is lagging by only 3 years, and therefore the game too.
<chimneys> infact they said numerous times on numerous sites CL generates C-like optimized code
<chimneys> so I assume the factor is max 10
<pjb> chimneys: the factor is less than 2 and some times CL is faster.
<pjb> chimneys: check the cliki Performance page!
<chimneys> so were are on the same page hen
FreeBirdLjj has quit [Ping timeout: 260 seconds]
harovali1 has joined #lisp
<_death> high performance code is never vanilla C, so no need to expect it to be vanilla Lisp either
harovali has quit [Ping timeout: 258 seconds]
<chimneys> vanilla?
<_death> chocolate, if you prefer
mangul has quit [Ping timeout: 268 seconds]
<HiRE> It's getting off topic but I'll leave it at this and clear channel. C++ is likely popular because of the extensive amount of libraries, bandwagoning, and developer interop.
<HiRE> good for business.
<HiRE> lisp has a significantly higher learning curve and thats not good for business.
abralek has joined #lisp
<chimneys> which benchmarks on cliki compare C vs CL pjb
<chimneys> you said sometimes CL is faster
abralek has quit [Quit: Quit]
<pjb> chimneys: see section Program Performance
oxum has quit [Ping timeout: 268 seconds]
<chimneys> I did android phone benchmarks and found 200Mflops desktop 200Gflop , and laptop 50gflops
<chimneys> so the phone is thousand times slower, so the factor is 10 shouldn't even matter , even if it's 20, 2**4 = 16 , so you just lag by only 4 years?
<chimneys> do you get my logic?
oxum has joined #lisp
<chimneys> instead 4 years may take development time for GTA V
<chimneys> so development time is the killer factor? no?
<chimneys> also companies can save lots of money too, as it's less headache, for example google used Java and lost billion dollar lawsuit to oracle upon copyrights of Java in android
Codaraxis has joined #lisp
oxum has quit [Ping timeout: 265 seconds]
slyrus_ has joined #lisp
oxum has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
oxum has quit [Ping timeout: 240 seconds]
_fe_ has quit [Quit: Leaving]
oxum has joined #lisp
amerlyq has quit [Quit: amerlyq]
ljavorsk_ has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
brown121407 has joined #lisp
brown121408 has quit [Read error: Connection reset by peer]
harovali1 has quit [Remote host closed the connection]
pilne has joined #lisp
bitmapper has joined #lisp
reepca has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
reimu__ has joined #lisp
<phoe> why are we talking about GTA V development time and Java on Android in #lisp
<jackdaniel> because that's what trol^W^W^W^Wheroes do
<Xach> phoe: it died out
reimu_ has quit [Ping timeout: 268 seconds]
<phoe> I might have made a mistake yesterday
chimneys was banned on #lisp by phoe [*!*eo@unaffiliated/hortiel]
chimneys was kicked from #lisp by phoe [chimneys]
<zigpaw> should be ^H instead of ^W I think, but you did that on purpose didn't you? :P
reimu_ has joined #lisp
<jackdaniel> zigpaw: yes, I forgot which was that, thanks! ;)
ljavorsk_ has quit [Ping timeout: 258 seconds]
reimu__ has quit [Ping timeout: 272 seconds]
EvW has joined #lisp
sauvin has quit [Ping timeout: 272 seconds]
rumbler31 has joined #lisp
frgo_ has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
ljavorsk_ has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
knicklux has joined #lisp
bitmapper has quit [Ping timeout: 272 seconds]
reimu__ has joined #lisp
reimu_ has quit [Ping timeout: 272 seconds]
milanj has quit [Quit: This computer has gone to sleep]
phlim has quit [Quit: WeeChat 2.4]
Codaraxis has quit [Read error: Connection reset by peer]
<HiRE> are we able to post code here for review? I have some stuff I'm working on and in a few days I'd like experienced eyes to rip it apart and make me cry.
<dlowe> maybe you'd prefer #clschool
<HiRE> oh ok
<phoe> HiRE: and as long as you use any kind of pastebin service
<HiRE> that was the plan. I wouldn't want to flood the channel.
<HiRE> lol
patlv_ has joined #lisp
developernotes has joined #lisp
tiwEllien has quit [Ping timeout: 268 seconds]
cl-arthur has joined #lisp
developernotes has quit [Client Quit]
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
harovali has joined #lisp
gabiruh has quit [Ping timeout: 260 seconds]
atgreen has joined #lisp
phlim has joined #lisp
ljavorsk_ has quit [Ping timeout: 260 seconds]
<Xach> HiRE: it can be tough sorting out good feedback from bad. it gets easier with practice.
cosimone has joined #lisp
milanj has joined #lisp
<HiRE> Xach, I decided to embark on a PNG writing library thing for fun
<HiRE> thinking it'd be a relatively straight forward project
<HiRE> I was wrong
tiwEllien has joined #lisp
<Xach> HiRE: like, writing the file format?
<HiRE> yeah
<Xach> HiRE: i made one of those, maybe it would be helpful for reference.
<HiRE> sure that'd be useful
<HiRE> its an interesting file format just kind of complicated in implementation
<HiRE> mostly because im new to lisp
<Xach> sure
<Xach> it uses https://github.com/xach/salza2 as the compressor
<HiRE> oh cool thank you
<HiRE> this will be useful
<Shinmera> HiRE: there's a new, very fast deflate/zip compressor by |3b|: https://github.com/3b/3bz
<Shinmera> oh wait, I guess it only does decompression, nevermind
narimiran has quit [Ping timeout: 258 seconds]
gravicappa has quit [Ping timeout: 265 seconds]
dnaeon has joined #lisp
bitmapper has joined #lisp
rumbler31 has joined #lisp
jmercouris has joined #lisp
dnaeon has quit [Ping timeout: 260 seconds]
tiwEllien has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rumbler31 has quit [Ping timeout: 272 seconds]
inaciano has joined #lisp
aeth has quit [Read error: Connection reset by peer]
aeth has joined #lisp
patlv__ has joined #lisp
raghavgururajan has joined #lisp
patlv__ has quit [Client Quit]
patlv_ has quit [Ping timeout: 272 seconds]
decent-username has joined #lisp
pfdietz has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 265 seconds]
EvW has quit [Ping timeout: 248 seconds]
jmercouris has quit [Remote host closed the connection]
harovali has quit [Ping timeout: 265 seconds]
quazimod1 has quit [Ping timeout: 268 seconds]
quazimodo has joined #lisp
EvW has joined #lisp
Bike has quit [Quit: Bike]
ebrasca has joined #lisp
sjl_ has quit [Ping timeout: 240 seconds]
holycow has joined #lisp
slyrus__ has joined #lisp
oni-on-ion has quit [Read error: Connection reset by peer]
oni-on-ion has joined #lisp
slyrus_ has quit [Ping timeout: 272 seconds]
doublex_ has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
knicklux has quit [Ping timeout: 268 seconds]
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
asarch has joined #lisp
<asarch> !repl (/ 450.0 25.9)
<Xach> asarch: no thanks
<asarch> JK :-P
thecoffemaker has joined #lisp
reimu_ has joined #lisp
reimu__ has quit [Ping timeout: 268 seconds]
holycow has quit [Quit: Lost terminal]
LiamH has quit [Quit: Leaving.]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #lisp
brettgilio has quit [Read error: Connection reset by peer]
brettgilio_ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
reimu__ has joined #lisp
clothespin has joined #lisp
Bike has joined #lisp
kamog has quit [Quit: ERC (IRC client for Emacs 26.3)]
DGASAU has quit [Read error: Connection reset by peer]
reimu_ has quit [Ping timeout: 265 seconds]
reimu_ has joined #lisp
DGASAU has joined #lisp
reimu__ has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
reimu_ has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
inaciano has quit [Quit: Saindo]
tiwEllien has joined #lisp
smokeink has joined #lisp
v0|d has joined #lisp
cosimone has quit [Quit: Quit.]
random-nick has quit [Ping timeout: 272 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
holycow has joined #lisp