<pjb>
drmeister: forbid your user to use Excel, pretty please! We don't want a chemical catastroph on Earth in addition to the pandemies!
<loke>
pjb: I'm reading the article. How can such a study even be accepted at all when they'r enot releaseing the data. It's insame.
mikecheck has joined #lisp
<pjb>
loke: it's not really the point, since commercial products are also released without providing the data/sources/tests/whatever they used to create it.
lxbarbosa has quit [Ping timeout: 246 seconds]
<pjb>
The point is if you base real-life decisions on Excel, you're screwed, and if you do that in a chemical plant, or a bank, you're screwing the fucking planet!
<pjb>
If Apple doesn't let nuclear power plants to use their toy computers, there's a reason!
<pjb>
(and the problem is not the hardware, and Microsoft is worse than Apple).
<aeth>
Yes, Excel is broken by design due to backwards compatibility. No, you can't get people to stop using Excel. And finally, it really should have been called "Excell". Pun opportunity missed.
vlatkoB has joined #lisp
<drmeister>
What's nice about the xlsx system is I can color blocks of cells, change fonts and scale and still read everything into Common Lisp.
asarch has quit [Quit: Leaving]
gravicappa has joined #lisp
JohnMS_WORK has joined #lisp
<drmeister>
Aaaaand the result... If we recycle one particularly nasty solvent - we can reduce its use by 40x.
<pjb>
drmeister: how can you be sure: you used Excel!!!
<drmeister>
No - I use excel as a user interface. It's a means to get the data into the 5500 lines of Common Lisp that run the simulation.
<pjb>
It's not reassuring at all.
<pjb>
GIGO
<aeth>
Excel as a data input method messed up some biology papers a few years ago iirc because it coerced some input into a different type (some gene names iirc)
<drmeister>
I'm using symbols and numbers.
<phoe>
morniiing
<no-defun-allowed>
Hello phoe
shifty has joined #lisp
mwgkgk has joined #lisp
Oladon has quit [Quit: Leaving.]
<phoe>
Hey no-defun-allowed
dddddd has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
retropikzel has quit [Quit: Leaving]
cylb has joined #lisp
shka_ has joined #lisp
_paul0 has joined #lisp
orivej has joined #lisp
cylb has quit [Ping timeout: 265 seconds]
paul0 has quit [Ping timeout: 272 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
hiroaki has joined #lisp
Cymew has joined #lisp
Blukunfando has joined #lisp
shangul has joined #lisp
mn3m has quit [Read error: Connection reset by peer]
mtzono has joined #lisp
mn3m has joined #lisp
mtzono has quit [Client Quit]
mikecheck has left #lisp ["part"]
epony has quit [Quit: reconf]
dale has quit [Quit: My computer has gone to sleep]
keep_learning has quit [Quit: This computer has gone to sleep]
keep_learning has joined #lisp
narimiran has quit [Quit: leaving]
Oladon has quit [Quit: Leaving.]
narimiran has joined #lisp
jeosol has joined #lisp
varjag has joined #lisp
heisig has joined #lisp
SGASAU has quit [Read error: Connection reset by peer]
SGASAU has joined #lisp
jprajzne has joined #lisp
z147 has joined #lisp
Lycurgus has joined #lisp
pve has joined #lisp
ljavorsk has joined #lisp
mwgkgk has quit [Quit: Connection closed for inactivity]
cylb has joined #lisp
cylb has quit [Ping timeout: 256 seconds]
nwoob_ has joined #lisp
nwoob has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 260 seconds]
jmercouris has joined #lisp
shifty has joined #lisp
duuqnd has joined #lisp
JamesY has joined #lisp
<jmercouris>
hello everyone
<minion>
jmercouris, memo from phoe: flatpak, appimage.
<jmercouris>
phoe: indeed, we have guix pack though, I'm looking to make debs, etc to get it mainlined into package managers
<jmercouris>
I've been thinking, is there a way to have an object of class X and turn it into an object of class Y?
<pjb>
jmercouris: what's in clhs should work, whether it's + or change-class!
<phoe>
if an object is assumed to be of class A and someone changes its class to B where B is not a subclass of A, that's e.g. a way to defeat typechecks
<jmercouris>
Absolutely, I'm pretty sure phoe meant that misusing it can be dangerous, like GOTO
<pjb>
phoe: not at all!
<phoe>
first stuff an A into a A-typed slot, then change-class it into B
JamesY has quit [Ping timeout: 256 seconds]
<aeth>
pjb: yes, phoe is absolutely right
<aeth>
type checks are probably done when slots are modified.
<pjb>
(defclass a () ()) (defclass b () ()) (let ((o (make-instance 'a))) (check-type o a) (change-class o 'b) (check-type o b)) #| --> nil |#
<phoe>
unless the methods on u-i-f-d-c you've defined explicitly prevent such transformation, it is going to work
<pjb>
absolutely no problem.
<jmercouris>
OK, here is a scenario, someone writes a method expecting object A to have some properties
<jmercouris>
could it be said that programmers are entomologists?
<phoe>
aeth: correct, that's what I meant
<aeth>
phoe: It will have the same weakness, though. It does type checks on slot setting
<phoe>
pjb: "just do not write any fucking type declarations" wtf
<phoe>
that's what type systems are for
<jmercouris>
I'm actually anti type checking
<aeth>
pjb: preconditions and postconditions are a pretty big part of programming.
<aeth>
Types or not.
<jmercouris>
type checking is too often touted as the magic bullet...
<pjb>
jmercouris: I embrace dynamic type checking!
<aeth>
I should probably change my checked-type into a general assert functionality before I finalize my utility library. I already implement it through ASSERT since CHECK-TYPE can't be used in the MOP
<jmercouris>
aeth: link to utility library?
<pjb>
phoe: for example, your bug may be in :type a instead of :type (or a b).
<aeth>
It's a bunch of things I spun out of my game engine
<aeth>
In varying degrees of completeness/polish
<phoe>
pjb: my point is that it's worth to mention that CHANGE-CLASS is a footgun.
ralt has joined #lisp
<pjb>
phoe: yeah, just like + or any other lisp operator!
<ralt>
good morning
<phoe>
no
<jmercouris>
aeth: as compared to serapeum and alexandria, where does it fall?
<phoe>
it allows for things that are impossible in other languages at the cost of getting errors that are impossible in other languages
<aeth>
jmercouris: in between
<ralt>
I have started using (wild-)inferred-package-system
<phoe>
+ is available in other languages, CHANGE-CLASS is not
<ralt>
it's pretty good, really
<pjb>
phoe: oh! you want to write programs in other programming languages… I see…
<jmercouris>
phoe: in python change-class is available
<jmercouris>
phoe: not literally, but you know
<aeth>
jmercouris: it has alexandriaish stuff like do-hash-table and yet another hash table constructor macro (e.g. (hash :foo 42 :bar 43)) but it doesn't do radical things like #h(:foo 42 :bar 43)
<pjb>
phoe: but if you want to code in C, it's easier to use C, than to use a subset of CL…
<aeth>
jmercouris: on the other hand it has some fairly large macros
<phoe>
pjb: yes, the original comment was a pointer to the discussion where someone asked for a comparison between CLOS and object systems of other languages
<phoe>
so it's relevant to compare CLOS to other languages' object systems
<phoe>
also, C doesn't have a standard object system
<jmercouris>
aeth: that's nice! :-)
<aeth>
jmercouris: Nearly everything there uses DEFINE-FUNCTION, which is a modification of DEFUN that helps with type declarations, inlines, and other things. It doesn't quite do everything DEFUN does yet, though. e.g. &aux
<ralt>
there's just one thing I'm a bit on the fence about: if I want to use a dep, I _have to_ use e.g. (:import-from :cl-ppcre #:scan) and (scan), I can't just do (invented) (:import :cl-ppcre) (ppcre:scan). Anyone knows if I'm missing something, or if I should just declare :cl-ppcre in the :depends-on of my .asd file and move on?
<jmercouris>
aeth: I bet ambrevar will love your library and will want to use it in Next :-D
<jmercouris>
aeth: I'm sure you've seen all the type declarations and checking in our source...
<phoe>
ralt: I suggest an explicit :depends-on
<aeth>
jmercouris: It needs to be cleaned up in places. e.g. I think do-hash-table needs to be put in a BLOCK NIL (iirc the conversation the other day) so that you can break early from it, and a few other things.
<phoe>
there are multiple cases where package- and system-names are mismatched, or there are multiple packages in a system
<jmercouris>
aeth: especially will want to use define-function
<phoe>
e.g. system "lparallel"
<phoe>
which has a package lparallel.queue
<aeth>
jmercouris: yeah, my utility library is like 95% random niche things of varying degrees of usefulness... and define-function
<phoe>
but ASDF loading "lparallel.queue" is going to explode because such a system doesn't exist
<aeth>
the idea of define-function being that everything you can do with a DEFUN (except the name itself) is more concise
<ralt>
phoe: ah, yeah, that's a fair point
<jmercouris>
aeth: oh typed lists even!
<ralt>
either way, I really like with wild-package-inferred-system, it's a really nice step up
<jmercouris>
flashbacks of java
<jmercouris>
the only thing we don't have is a <?> operator syntax
<phoe>
I found it's much nicer to have explicit external dependencies listed in one place rather than implicitly define them all over the place
<aeth>
jmercouris: I mean, it's not surprisingly a big collection of everything that a game engine uses
<ralt>
my reasoning is that I'd rather have the dependencies defined as close to the code using them as possible
<phoe>
yep, so we're from two different camps :D
<aeth>
jmercouris: typed lists are mostly useless in CL (and they're slower!) but they're useful in a game engine because you only need to verify the contents once
<ralt>
^^
z147_ has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
<jmercouris>
is github working for anyone else?
<aeth>
if I get a random NIL somewhere (and it used to happen all of the time) it's really hard to tell where it came from because it shows up in the game loop, not when it first appeared
<jmercouris>
aeth: were you trying to make a no-cons game engine?
<phoe>
jmercouris: github is up for me.
<ralt>
I wonder if there's a joke with cons-less...
<aeth>
jmercouris: sort of... the engine itself doesn't cons during the game loop
<aeth>
jmercouris: in practice, anything that uses the engine conses a bit.
<jmercouris>
OK, I'm going to restart my network
<aeth>
s/during the game loop/during the game loop in SBCL/
z147 has quit [Quit: z147]
<aeth>
I don't think any other CL implementation provides enough information to tell if something is consing during a specific part of the program. If it does, it's nowhere near as straightforward as SBCL... and it probably does cons in the other CLs because SBCL is built more around that sort of thing.
<aeth>
e.g. SBCL will warn you if (declare (dynamic-extent foo)) fails, and will give you a note if a double-float conses if you're at (speed 3)
mercourisj has joined #lisp
jmercouris has quit [Disconnected by services]
mercourisj is now known as jmercouris
<aeth>
jmercouris: anyway, I wouldn't use zr-utils yet because there are a few rough edges so it doesn't quite represent a stable API yet, which is absolutely a deal breaker for a util library
<aeth>
I was tempted to split it into /stable and /unstable when I spun it off
jmercouris has quit [Ping timeout: 256 seconds]
jmercouris has joined #lisp
<aeth>
In particular, in array.lisp, I need to support offsets, either directly or with two new sets of functions/macros. I also need to rename with-2D-array-accessors because it supports 1D and 2D arrays. Also, read.lisp is entirely work-in-progress and util.lisp has a few incomplete things like with-bindings, which also needs elisp written so it's indented properly.
z147_ has quit [Remote host closed the connection]
z147 has joined #lisp
<aeth>
data-structures.lisp needs some cleanup for readability and I probably want to give the typed lists an optional dependency on trivial-extensible-sequences for an API that's nicer, but slower and less portable. (I suppose I could also implement a sequence API for queues as well.)
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
mn3m has quit [Quit: mn3m]
ljavorsk has quit [Ping timeout: 250 seconds]
<jmercouris>
Shinmera: I'm having some issues with deploy, can you help?
<phoe>
jmercouris: what sorta issues
<jmercouris>
phoe: you have macOS right?
<phoe>
jmercouris: nope
<jmercouris>
ah
<jmercouris>
OK well
<jmercouris>
it copies the shared libraries into the app bundle
<jmercouris>
that seems to work
<jmercouris>
however when my program launches, it looks for glib, but doesnt find it
<jmercouris>
despite it existing in the app bundle
<phoe>
yes - but the question is whose responsibility it is to inform the Lisp image that it is supposed to look for these dylibs there
<phoe>
is OSX supposed to do that
<jmercouris>
2
<jmercouris>
so technically yes, but in this case no
<phoe>
or is it the program's responsibility to find these dylibs
<jmercouris>
that
<jmercouris>
normally you will use otool to set the rpath
<jmercouris>
but in the case of Lisp, since it is done at runtime
<jmercouris>
Lisp must do it itself
<jmercouris>
I thought deploy would edit the CFFI search paths
<phoe>
the latter means that deploy process isn't complete, and I guess that CFFI should be instructed to look for foreign libraries in #p"../Resources/" too
aindilis has quit [Remote host closed the connection]
<flip214>
jmercouris: "man ld.so" gives you "LD_DEBUG=files command" (or =all)
<flip214>
to find out which dependencies get solved where/how
aindilis has joined #lisp
froggey has quit [Ping timeout: 256 seconds]
cosimone has joined #lisp
cosimone has quit [Quit: Terminated!]
rand_t has joined #lisp
joshcom has quit [Ping timeout: 250 seconds]
Bike has joined #lisp
SGASAU has quit [Remote host closed the connection]
froggey has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
SGASAU has joined #lisp
dddddd has joined #lisp
emys has joined #lisp
cylb has joined #lisp
<Bike>
phoe: can i ask why you closed that sicl issue?
<phoe>
Bike: I'm about to open one that suggests that my condition system could be plugged into SICL
<Bike>
ah.
<phoe>
I'm just finishing testing this thing and making last polishes
epony has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
<Bike>
beach may have other ideas for the debugger part, though i'm sure your code is an improvement on what's there right now
<Bike>
plus a real debugger ought to be able to do backtrace stuff that can't be done portably
<phoe>
Bike: one can extend my debugger with a command that does (ql:quickload :dissect)
<phoe>
or (sicl-internals:backtrace)
<phoe>
or whatever
<Bike>
sure.
<phoe>
but yes, the debugger can be removed and replaced with any other function
<beach>
phoe: I think that using "debugger" for something that allows the programmer to stare at a backtrace when things go wrong, is a gross misrepresentation.
<phoe>
beach: sure
emys has quit [Ping timeout: 256 seconds]
<phoe>
anyway, I could move my debugger to a fully separate ASDF system since it's currently modular enough
<phoe>
it's not much of an issue.
<phoe>
for now, lemme clean this thing up a bit more
<beach>
I haven't looked at what you are doing on the debugger part, so I currently have no opinion about it.
<phoe>
sure, no rush about it
emys has joined #lisp
EvW has joined #lisp
Josh_2 has joined #lisp
<Josh_2>
Afternoon all
emys has quit [Ping timeout: 256 seconds]
<beach>
Hello Josh_2.
<Josh_2>
Is there a way I can use the function (read-byte ..) in place of (fast-read-byte.. )?
Bourne has quit [Remote host closed the connection]
<phoe>
Josh_2: you mean fast-io?
<phoe>
why use standard read-byte with it?
<Josh_2>
fast-io provides fast-read-byte
<Josh_2>
I don't want to actually use read-byte
<phoe>
the easy answer is "no, you can't use read-byte with fast-io buffers"
<Josh_2>
I don't want to use read-byte, just sorta overwrite the default functionality of read-byte in a specific circumstance, sorta like you can do (let ((x 1))(let ((x 2)) (print x))) -> 2
Bourne has joined #lisp
<phoe>
you can do that only in lexical scope by doing (flet ((cl:read-byte ...)) ...)
<pjb>
Josh_2: override, for what body of code?
<pjb>
phoe: no, you cannot.
<phoe>
wait, can't you?
<beach>
Nope.
<Josh_2>
I have tried that phoe with something else
<Josh_2>
doesn't work
<beach>
Josh_2: That's not the point. The point is whether it is allowed by the standard.
<phoe>
oh wait.
<phoe>
yes, that's forbidden; binding these symbols as variables is OK, as functions - not OK
<phoe>
so, nope, you can't do that in general.
<pjb>
phoe: 11.1.2.1.2
<phoe>
oh right
<phoe>
"If an external symbol of the COMMON-LISP package is **NOT** defined as a standardized function, macro, or special operator..."
<phoe>
(emphasis mine)
<jcowan>
Does anyone know why? LISP-SYMBOL-REDEFINITION-AGAIN says not, and it makes little sense to me.
<jcowan>
s/not/it does not
<pjb>
why what?
<jcowan>
why CL: function symbols can't be lexically bound with flet or labels.
<pjb>
Because implementations are allowed to open-code all CL functions.
<phoe>
proposal, chapter 3
<phoe>
it's there
<pjb>
open-code ~= inline.
<phoe>
it's allowed to lexically bind it as a function only if it isn't globally bound as fun/mac/specop
<pjb>
jcowan: there's also the point that internally, CL functions can call other functions than CL functions to perform their job.
<jcowan>
phoe: I understand the rule but not the reasoning
<Bike>
cos it messes with macro hygeine.
<jcowan>
Bike: how is that?
<pjb>
jcowan: ie. even if you overriden a function such as CL:READ-CHAR, it could have no effect on say, CL:READ-LINE.
<phoe>
if you rebound it lexically then it would have no effect either though
<Bike>
you lexically bind CAR and now a million standard macros will do weird unpredictable things.
<pjb>
jcowan: the rule is also tere to protect the implementation, so you may not modify a CL function that is used by other CL functions.
<Bike>
i thought this was like, one of the main problems that led to scheme's macro system.
<jcowan>
pjb: That doesn't make sense: the definition of cl:read-line is not within some lexical scope of your program.
<pjb>
jcowan: indeed, global functions are not in a LEXICAL scope, but in a DYNAMIC scope.
<pjb>
this is not scheme…
<jcowan>
Bike: You are right, but in that case, lexically binding cl:car or cl:otherwise with let shouldn't be allowed either
SGASAU has quit [Remote host closed the connection]
<phoe>
they aren't bound as variables though
<Bike>
yeah i don't see what you're getting at.
<phoe>
not by the standard
<phoe>
a macro cannot portably depend on the value of cl:car as a variable
<jcowan>
phoe: Ah.
<pjb>
jcowan: both are allowed, because 1- they are lexical, 2- a variable binding doesn't change the meaning of the code, weither there's open-coding or not of cl:car.
SGASAU has joined #lisp
ljavorsk_ has joined #lisp
ljavorsk has quit [Quit: I'm out, bye]
ljavorsk_ has quit [Client Quit]
ljavorsk has joined #lisp
lemoinem has quit [Ping timeout: 250 seconds]
v_m_v has joined #lisp
emys has joined #lisp
gko has joined #lisp
asarch has joined #lisp
lemoinem has joined #lisp
emys has quit [Ping timeout: 240 seconds]
samlamamma has joined #lisp
emys has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
<shka_>
hello
<shka_>
so i renamed cl-data-frames to vellum
<shka_>
which is unique, i hope :P
<phoe>
vellum doesn't need to be unique
<phoe>
#:vellum382 should, however
<shka_>
must, even
<flip214>
phoe: it's hard to get #\# and #\: in a domain name, though
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
keep_learning has quit [Quit: This computer has gone to sleep]
lxbarbosa has joined #lisp
SGASAU has quit [Remote host closed the connection]
sjl_ has joined #lisp
SGASAU has joined #lisp
emys has joined #lisp
bitmapper has joined #lisp
phoenixj74 has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 260 seconds]
<shukryzablah>
shka_: where can i get it
wheelsucker has joined #lisp
<edgar-rft>
let's make Common Lisp more unique by renaming it to (gensym)
refpga has joined #lisp
phoenixj has joined #lisp
<phoe>
let's make it special
emys has joined #lisp
gravicappa has quit [Ping timeout: 250 seconds]
<phoe>
A handler function cannot "see" handlers that were established in the same cluster and handlers that were established inside the scope of its binding form
<phoe>
What about restarts?
<Bike>
you want to invoke a restart from a restart?
<phoe>
yes
<phoe>
the question is whether all restarts are visible
<phoe>
or only the one bound "earlier"
<phoe>
so whether restarts behave the same as handlers
<Bike>
"If invoke-restart is done on that restart, the function which resulted from evaluating function is called, in the dynamic environment of the invoke-restart, with the arguments given to invoke-restart." obviously the dynamic environment of the invoke-restart includes the restart being invoked and the rest of the restarts in the binding.
<Bike>
that's restart-bind, though.
<phoe>
OK, I see
<phoe>
restart-case is different because it transfers control
<Bike>
right.
lucasb has joined #lisp
<phoe>
thanks!
<Bike>
i guess restart-bind is pretty much a dynamic flet, huh?
jmercouris has joined #lisp
<jmercouris>
let's say I'm in package potato
<jmercouris>
and I execute LOAD
<jmercouris>
will whatever I LOAD be treated as if it is in potato?
<Bike>
yes, unless of course the code changes *package*.
<jmercouris>
I see
<jmercouris>
and how can I go about loading it and asking it to pretend it is in a different package?
<jmercouris>
WITHOUT the code having to do that itself
<Bike>
(let ((*package* whatever)) (load ...))
<jmercouris>
ah
<Bike>
or just (in-package whatever) (load ...)
<jmercouris>
it is that simple huh
<Bike>
*package* is just a variable. it's not magic or anything.
<jmercouris>
I wonder why it did not work for that user...
<beach>
jmercouris: Your code *should* start with an (in-package ..) form though.
whiteline has quit [Remote host closed the connection]
<jmercouris>
it definitely should
<Bike>
although note that load rebinds *package*, so any changes to *package* by the code will be undone once load returns.
<jmercouris>
I can't expect new users to do that though
<jmercouris>
I'm trying to make configuration as simple as possible for them
rippa has joined #lisp
whiteline has joined #lisp
<jmercouris>
Bike: I think that is OK
X-Scale` has joined #lisp
<beach>
jmercouris: You expect your uses to program in Common Lisp, but you can't expect them to type tine (in-package...) form?
emys has quit [Ping timeout: 265 seconds]
<jmercouris>
I give them training wheels
<jmercouris>
all they need to know to start configuring Next is (define-configuration xyz)
<jmercouris>
they shouldn't care about the details
<jmercouris>
as they get more invested, they can start learning Common Lisp
X-Scale has quit [Ping timeout: 265 seconds]
X-Scale` is now known as X-Scale
<beach>
I see.
<phoe>
just load from inside NEXT-USER package
<jmercouris>
phoe even knew what I was trying to do...
* jmercouris
thinks phoe is a mind reader
<phoe>
define a NEXT-USER package that has all the DEFINE-CONFIGURATION macros and such
<Josh_2>
I'm getting some very strange behaviour from one of my functions, here you can see the effect https://imgur.com/wgKlhsg.png calling the same function twice but getting an 8000x speed decrease in one instance..
<Josh_2>
I've seen as bad as 25 seconds for 1 call
gravicappa has joined #lisp
<Bike>
you're going to have to tell us about the code if you want advice, you realize.
<Josh_2>
Yes
<Josh_2>
I'm doing that now, gimme a minute
<Bike>
oh ok.
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
didi has joined #lisp
shifty has joined #lisp
<Josh_2>
I know the cause of the problem but I don't understand why it is happening. Basically I have a function called "download-encrypted-packet" which reads from a byte array from a stream and then decrypts it, which causes no problem. However I have a parser which only accepts a stream as an input so I am attempting to use flexi-streams:make-in-memory-input-stream basically create a stream wrapper around the downloaded and decrypted byte
<Josh_2>
array. Now when I use my parser on the new stream, my function for reading bytes from the stream which is a simple wrapper around read-byte gets all jammed up, as you can see from the imgur link I just posted. The functions are in this paste https://plaster.tymoon.eu/view/1764#1764
emys has joined #lisp
<didi>
Hey! I solved my problem with concatenated streams. Instead of (make-concatenated-stream stream concatenated-stream) I (apply #'make-concatenated-stream stream (concatenated-stream-streams concatenated-stream)). Cool!
<Josh_2>
I don't understand why sometimes the stream is read extremely fast, and the next it'll take half a second per non-block-read-byte call...
<Josh_2>
There is always something to read on the flexi stream so why it would get jammed up is beyond me
<jmercouris>
Josh_2: does it get jammed when you only read and do not decrypt?
<Josh_2>
No
<didi>
All hail `concatenated-stream-stream'!
<jmercouris>
Josh_2: then your answer is in the decryption
<Josh_2>
jmercouris: I don't think you are understanding
<Josh_2>
Let me explain better
<jmercouris>
Josh_2: OK
whiteline has quit [Remote host closed the connection]
<Josh_2>
So I am sending for example 200 bytes which is an encrypted message over a socket using usocket. This arrives on the receiving side very fast, it is downloaded into an array and decrypted, this is not slow at all, I have tested this as an independent system. Now I am using the function (flexi-stream:make-memory-input-stream decrypted-byte-array) to create a NEW stream which is then put into the parser. It is only when the parser has to
<Josh_2>
work with the flexi-stream instead of the socket stream that is gets 'bound up'.
emys has quit [Ping timeout: 252 seconds]
whiteline has joined #lisp
<Josh_2>
But read-byte is the function that is supposed to be used on flexi-stream:memory-input-stream
<Josh_2>
That's why I posted my 3 wrapper functions, which are built on top of (listen.. ) and (read-byte )
<jmercouris>
so the parser works slowly with in memory streams, but not slowly with socket streams?
<jmercouris>
s the parser your own code?
<Josh_2>
Yes
<Josh_2>
the parser is my own code yes
<jmercouris>
does your parser wait for a token or something to proceed causing potential lock?
<Josh_2>
It's the function non-block-read-byte that gets bound up, that is in the plaster link
<Josh_2>
nope
<Josh_2>
it simply reads the correct amount bytes which are basically preprogrammed
<jmercouris>
I'm saying I dont' believe it
<jmercouris>
I don't think that's the problem
<Josh_2>
hmm
<Josh_2>
one sec
jcowan has left #lisp [#lisp]
emys has joined #lisp
emys has quit [Ping timeout: 256 seconds]
refpga has quit [Remote host closed the connection]
logicmoo has joined #lisp
dmiles has quit [Ping timeout: 250 seconds]
emys has joined #lisp
<Josh_2>
as an fyi I have 3 different parsers and each one has the same problem. Each of the parsers relies on those three functions
monokrom has joined #lisp
jmercouris has quit [Remote host closed the connection]
shka_ has quit [Ping timeout: 265 seconds]
Cymew has quit [Ping timeout: 265 seconds]
jmercouris has joined #lisp
<jmercouris>
hello
<Josh_2>
Hey
jayspeer has joined #lisp
phoenixj has quit [Remote host closed the connection]
emys has quit [Ping timeout: 265 seconds]
ayuce has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
ayuce has joined #lisp
libertyprime has joined #lisp
<Bike>
the clhs page on the abort restart mentions the possibility of multiple processes. i ownder if t here's anything else in the standard that does
<Bike>
sldb assumes there's always a restart available, in that you get mildly confusing messages if there's not and you try to sldb-quit
<phoe>
Bike: "mplementors are encouraged to make sure that there is always a restart named abort around any user code so that user code can call abort at any time and expect something reasonable to happen"
<Bike>
right.
<Bike>
what sldb-quit actually does in threads is invoke the last restart returned by (compute-restarts), rather than specifically an abort restart, though.
<Bike>
threads other than the repl thread, i mean
Frobozz has joined #lisp
<Josh_2>
I think I found the source of the problem
<Josh_2>
Yep
<Josh_2>
it was my encryption function...
gko has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 256 seconds]
<Josh_2>
It was this function (ironclad:read-os-random-seed :random *prng*) ...
<Josh_2>
Well that was a frustrating few hours
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
patlv_ has joined #lisp
patlv_ has quit [Max SendQ exceeded]
iAmDecim has joined #lisp
patlv has joined #lisp
emys has joined #lisp
phoenixj has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
jonatack has quit [Ping timeout: 272 seconds]
cosimone has joined #lisp
<phoe>
Bike: that's weird
jayspeer` has joined #lisp
jayspeer` has quit [Remote host closed the connection]
<phoe>
that restart can be RETRY or anything
jonatack has joined #lisp
jayspeer has quit [Ping timeout: 256 seconds]
shukryzablah has quit [Quit: ERC (IRC client for Emacs 27.0.90)]
emys has quit [Ping timeout: 265 seconds]
nwoob has joined #lisp
Intensity has quit [Quit: Ping timeout (120 seconds)]
nwoob_ has quit [Ping timeout: 265 seconds]
jayspeer has joined #lisp
<Bike>
it is kind of weird, but practically speaking it will be a restart to abort the thread.
<Bike>
probably good to standardize that, ofc
v_m_v has quit [Ping timeout: 256 seconds]
joast has quit [Quit: Leaving.]
gravicappa has quit [Ping timeout: 260 seconds]
gravicappa has joined #lisp
buffergn0me has joined #lisp
<jmercouris>
Josh_2: Aha!
joast has joined #lisp
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
selwyn has quit [Ping timeout: 245 seconds]
dale_ has joined #lisp
dale_ is now known as dale
selwyn has joined #lisp
Intensity has joined #lisp
didi has quit [Read error: Connection reset by peer]
emys has joined #lisp
EvW has joined #lisp
z147 has joined #lisp
zmt00 has quit [Quit: Leaving]
emys has quit [Ping timeout: 264 seconds]
rme has quit [Ping timeout: 245 seconds]
rme has joined #lisp
corpix has joined #lisp
zmt00 has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
buffergn0me has quit [Ping timeout: 272 seconds]
jonatack has quit [Ping timeout: 265 seconds]
jonatack has joined #lisp
didi has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
phoenixj has quit [Remote host closed the connection]
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
jeosol has quit [Remote host closed the connection]
buffergn0me has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
Intensity has quit [Ping timeout: 256 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
Necktwi has quit [Ping timeout: 258 seconds]
iAmDecim has joined #lisp
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
tutti has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
wsinatra has joined #lisp
Lycurgus has joined #lisp
bitmapper has quit []
libertyprime has quit [Ping timeout: 240 seconds]
rpg has joined #lisp
bitmapper has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
krid has joined #lisp
libertyprime has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
Intensity has joined #lisp
krid has quit [Remote host closed the connection]
jeosol has joined #lisp
akflcar has joined #lisp
<akflcar>
hi
<akflcar>
is there a notation for writings algorithms, similar to programming languages. but for pure algorithms.
<phoe>
akflcar: pseudocode
<akflcar>
a more formal representation of mathematical expressions.
<akflcar>
theorem checkers tend to use some of those
<phoe>
I think that'll depend on the theorem prover in question
bitmappe_ has joined #lisp
<phoe>
e.g. ACL2 uses some lispy notation
bitmapper has quit [Read error: Connection reset by peer]
bitmappe_ is now known as bitmapper
libertyprime has quit [Read error: Connection reset by peer]
lacroixboy_ has joined #lisp
<phoe>
hmm
<phoe>
usability question: let's assume that we have a form (with-debugger (#'debugger) ...) that intercepts the system debugger and instead calls #'debugger
<phoe>
what should be the value of *debugger-hook* inside the body of that form?
<phoe>
and what should be the value of *debugger-hook* bound around the call to #'debugger?
lavaflow has quit [Quit: WeeChat 2.8]
jayspeer has quit [Read error: Connection reset by peer]
v_m_v has joined #lisp
<jackdaniel>
clim-debugger binds itself (so it assumes that no condition will be /its own/ fault)
jayspeer has joined #lisp
travv0 has quit [Ping timeout: 265 seconds]
<phoe>
I mean, let's assume that I control powers greater than *debugger-hook* itself
<phoe>
which allows me to e.g. control what (break) does
travv0 has joined #lisp
<jackdaniel>
I don't know what that means
<Bike>
invoke-debugger-hook, probably
<phoe>
(with-debugger (#'debugger) (break)) calls #'debugger instead of entering the standard debugger
<phoe>
yes, that
<phoe>
;; except it's called differently and works differently in many implementations, that's why I wanted to avoid calling it by name
<jackdaniel>
clim-debugger binds both
<jackdaniel>
afair
<jackdaniel>
(i'm not saying that's the right or wrong thing to do, just giving a reference point)
<phoe>
yep, I'm thinking about it now
<phoe>
one idea is that *debugger-hook* should stay the same, preferably, since it is allowed to be bound by the user, only if the debugger hook returns, the actual debugger installed by WITH-DEBUGGER is called
<phoe>
that'll also allow for code that, for whatever reason, depends on being able to bind the debugger hook itself?... is that even a thing in practice
<jackdaniel>
it is, portable debuggers do that ,)
sjl_ has quit [Ping timeout: 240 seconds]
<jackdaniel>
but it doesn't matter, if it binds variables inside your own macro, then they will shadow your bindings
<jackdaniel>
so it is not a problem
<phoe>
yes, except portable debuggers can't deal with (break) unless they bind invoke-debugger-hook of sorts
<phoe>
at which point the debugger hook becomes pointless anyway
<jackdaniel>
yes, that's what portability layers are for
<jackdaniel>
(or feature conditions)
<phoe>
yes, I am currently working on such a portability layer
<phoe>
and I'm wondering how I should treat cl:*debugger-hook*
<jackdaniel>
my point is that it is not a rocket science and it is probable that there are other libraries doing exactly that (vide swank, clim debugger and probably more)
<phoe>
I know it's not rocket science, I'm just thinking about what would be a good default
<jackdaniel>
bind both, if someone want to rebind them it is not a problem
<phoe>
OK
<jackdaniel>
by saying that it is not a rocket science I don't mean that it is not a worthwhile project (I don't have opinion on that), I'm only saying that there is no need to think of it as something what other software won't do
<theseb>
Are there any limitations to symbol (variable) names? I mean...could you do stuff like redefine numbers and booleans? That sounds bad
<phoe>
theseb: you cannot redefine numbers
<phoe>
variable names must be symbols
<jackdaniel>
theseb: you may quote the symbol name, i.e '|42|
<phoe>
they also cannot be constant variables and they better not mix with anything defined in the CL package
<jackdaniel>
'cl-user::42 :)
<theseb>
phoe: is that the only limitation.....that they cannot be numbers?
<phoe>
theseb: symbols cannot be numbers in general
<phoe>
they are distinct types
<theseb>
phoe: i imagine you also cannot have a *space* in a symbol name
<phoe>
'|But you can|
<phoe>
A symbol name is an arbitrary string
<phoe>
but the name of a symbol is not the symbol itself
<theseb>
phoe: ok...the name of the symbol...can it have spaces?
<phoe>
a symbol is first and foremost a piece of identity that is eql only to itself; it only happens to have a name because for programming convenience
<phoe>
theseb: yes
<theseb>
phoe: i don't see how you could specify that in lisp code
<phoe>
(symbol-name '|Spaces in the name|) ;=> "Spaces in the name"
<jackdaniel>
symbols are specified to be EQ, not only EQL
<Bike>
the || are escape characters. they say that what's in the middle is a symbol.
<phoe>
(symbol-name 'Spaces\ in\ the\ name) ;=> "SPACES IN THE NAME"
<Bike>
so they bypass the usual parsing rules where space ends a token.
<theseb>
just wow
<theseb>
what would be a good simple rule for a little lisp i'm writing for symbol names?.....I didn't realize distinguishing between strings and symbol names would be so subtle
<phoe>
how little are you thinking?
<phoe>
if it's tiny, you can just have a single global namespace, no packages or anything
<theseb>
I was considering only allowing alphanumerics but then you couldn't do stuff like define + to be add .
<phoe>
also, all of it ultimately depends on your reader algorithm
<theseb>
oy vey
<phoe>
that is what'll decide whether it has just read a symbol or not a symbol.
<Bike>
if you're just playing around, i.d either say there are no signed number literals, or symbols like + or - aren't allowed. CL distinguishes them fine, but it's a bit confusing.
<akflcar>
that is often symbolized by a forward arrow "→". The material conditional is used to form statements of the form p → q
<jmercouris>
ah right, I remember the symbol now
<akflcar>
I know if p then q...
<jmercouris>
yes, bike is correct
<Bike>
p → q is equivalent to ¬p ∨ q, as it says later in that article.
<jmercouris>
true, true
<jackdaniel>
jmercouris: did you look in the cffi source code?
<jmercouris>
I did
<jmercouris>
docstring did not reveal anything obvious
<jackdaniel>
did you navigate to load-foreign-library?
<jmercouris>
I did not
<jackdaniel>
that will lead you to %do-load-foreign-library
<akflcar>
if p is False then why is the output always True..
<Bike>
i don't think any of us are prepared to teach you classical logic.
<phoe>
especially on #lisp
<akflcar>
I already know boolean logic.
<akflcar>
if p then q... ok so if p is true then q... but it says nothing if p is false... so the result is undefined.
<phoe>
akflcar: please move the topic to #lispcafe.
<jackdaniel>
which will lead you eventually to load-foreign-librar-path
<jackdaniel>
which, when you read it, will tell you what is the order
<jmercouris>
I was wondering why it was a single argument passed...
emys has quit [Ping timeout: 265 seconds]
<jmercouris>
if-let, that's so useful!
<jackdaniel>
then there is when-let and when-let*
<jackdaniel>
s/is/are/
<jmercouris>
i see yes
<jmercouris>
i'm now in alexandria
<jackdaniel>
don't get distracted, you are doing a due dilligence by looking for the solution for your problem!
turona has joined #lisp
<jmercouris>
right
<jmercouris>
I'm going to look in parse-directories now...
<jmercouris>
seems that it goes from 0th element to nth element
<jmercouris>
so left to right
<jackdaniel>
bingo, and you did it all by yourself, congratulations
* jmercouris
awaits my award
<jmercouris>
thanks
Jesin has quit [Quit: Leaving]
emys has joined #lisp
v_m_v has joined #lisp
efm has joined #lisp
buffergn0me has quit [Ping timeout: 272 seconds]
Jesin has joined #lisp
emys has quit [Ping timeout: 250 seconds]
bitmapper has quit [Read error: Connection reset by peer]
bitmappe_ has joined #lisp
turona has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 256 seconds]
emys has joined #lisp
emys has quit [Ping timeout: 250 seconds]
sendai_ has joined #lisp
luckless has quit [Ping timeout: 246 seconds]
jasom has quit [Ping timeout: 260 seconds]
bitmappe_ has quit [Read error: Connection reset by peer]
jasom has joined #lisp
bitmapper has joined #lisp
izh_ has joined #lisp
wsinatra has quit [Quit: WeeChat 2.8]
sjl has quit [Ping timeout: 265 seconds]
heisig has quit [Quit: Leaving]
pve has quit [Quit: leaving]
turona has joined #lisp
<_death>
akflcar: look up vacuous truth
narimiran has quit [Ping timeout: 264 seconds]
joshcom has joined #lisp
slyrus has joined #lisp
<_death>
this is why every/notany/and return true and some/notevery/or return false when no items are supplied
iAmDecim has joined #lisp
joshcom has quit [Ping timeout: 264 seconds]
<phoe>
aaaah
<phoe>
some implementations bind the debugger hook to NIL
<phoe>
some implementations bind the invoke debugger hook to NIL
<phoe>
some call the invoke-debugger-hook before debugger-hook
<phoe>
some call the debugger-hook before invoke-debugger-hook
<phoe>
nope, I'm going to sleep
<phoe>
and I'll likely define the debugger to be a function of one argument only - the condition; and say that it is undefined to set or rebind *debugger-hook* within WITH-DEBUGGER
<bitmapper>
i've been contemplating making a opengl backed ui toolkit for common lisp because none of the other options are portable or integrate well with cl
<xristos>
bitmapper: something like Factor's IDE would be great (and not at all like what most opengl toolkits for CL look like, since they're immediate mode and focused on games)
<bitmapper>
yeah i know
<xristos>
but it's a lot of work
<xristos>
i talked to slava years ago, actually spent time doing it myself
lxbarbosa has quit [Remote host closed the connection]