lisp123 has quit [Remote host closed the connection]
semz_ has joined #commonlisp
semz has quit [Ping timeout: 252 seconds]
Bike has joined #commonlisp
semz_ is now known as semz
yauhsien has joined #commonlisp
Guest74 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Bike has quit [Quit: Connection closed]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<lisp123>
JZON is nice
hashfunc1729 has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
poselyqualityles has quit [Ping timeout: 272 seconds]
pranavats has left #commonlisp [Error from remote client]
yauhsien has joined #commonlisp
Guest74 has quit [Ping timeout: 246 seconds]
lisp123 has quit [Remote host closed the connection]
pranavats has joined #commonlisp
lisp123 has joined #commonlisp
Mandus has quit [Ping timeout: 272 seconds]
Mandus has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
occ has joined #commonlisp
Mandus has quit [Ping timeout: 246 seconds]
Mandus has joined #commonlisp
s-liao has joined #commonlisp
occ has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
occ has joined #commonlisp
s-liao has quit [Ping timeout: 250 seconds]
lisp123 has quit [Ping timeout: 260 seconds]
rotateq has joined #commonlisp
ebrasca has joined #commonlisp
lisp123 has joined #commonlisp
hashfunc1729 has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
notzmv has quit [Ping timeout: 260 seconds]
notzmv has joined #commonlisp
zachel has quit [Quit: DIsconnected: v7+nano]
igemnace has joined #commonlisp
zachel has joined #commonlisp
nature has joined #commonlisp
<contrapunctus>
o/
<beach>
Hello contrapunctus.
<contrapunctus>
hey, beach
<contrapunctus>
In today's episode of porting Elisp to Common Lisp...I've got mixin with slot `foo` . A class inheriting this mixin redefines `foo` with `:initform <default value>` . Now, when I `(make-instance 'my-subclass ...)` I get an object with _two_ slots called `foo` , one of which is nil and the other has the <default value> ...what's going on and what can I do here?
<contrapunctus>
got * a mixin
<beach>
Do the two slots have names in different packages?
<beach>
There can't be two slots with the same name in CLOS.
<contrapunctus>
Ah, yes, these classes are defined in different packages...
<contrapunctus>
I'm trying to define a default value of `foo` for all instances of the subclass...IIRC the recommended way to do that is to make a constructor, right?
<beach>
I am no longer in favor of constructors. It is often the case that the class I like to instantiate depends on context, and a constructor fixes the class once and for all. But they work fine for simpler cases.
<beach>
Then, what is wrong with an :INITFORM?
<lisp123>
package-a:slot-name might do the trick?
<lisp123>
where package-a is the package holding the class that is being inherited
<beach>
Also, a better technique than to redefine the slot might be to use :DEFAULT-INITARGS.
dra has joined #commonlisp
<rotateq>
beach: I remember what you told me, one can change the superclass with using :DEFAULT-INITARGS in subclasses.
<rotateq>
lisp123: I see more into not exporting slot names in packages but their accessors.
<lisp123>
rotateq: i see
<rotateq>
And I adapted this style of prefixing slot names with #\%.
<rotateq>
So let's pray nobody defines accidentally a reader macro for #\%. :)
<lisp123>
lol
<hayley>
(set-macro-character #\% (lambda (s c) (declare (ignore s c)) (error "You posted abstraction violation, prepare to lose subscriber")))
<jackdaniel>
CodeBitCookie[m]: not far from implementing the specification; otoh many improvements in the codebase were made towards that goal
<jackdaniel>
I think that using slot-value already voids the warranty, so I wouldn't bother with using symbol other than the "main" accessor
<beach>
CodeBitCookie[m]: I don't mind questions about LispOS at all.
<jackdaniel>
re constructors (make-foo foo-class foo-initargs) may look like a silly duplicate of make-instance but when objects are immutable then you may memoize results so the same arguments will return eq objects
<jackdaniel>
(mind that this constructor takes the class as one of its arguments)
<hayley>
The SICL hash table library extends MAKE-HASH-TABLE to take a :CLASS argument.
<jackdaniel>
of course it is not always desireable
<jackdaniel>
interesting
<hayley>
e.g. (make-hash-table) would use the default class, whereas (make-hash-table :class 'your-hash-table:super-duper-magic-table) makes an instance of that class.
<contrapunctus>
lisp123: thanks, exporting and importing the slot symbol did the trick
<beach>
contrapunctus: But that is a very bad idea, given that slot names are implementation details.
<beach>
contrapunctus: I should have said: But that is a very bad idea, given that slots are implementation details.
<contrapunctus>
Hm...constructors, then, I guess. I'm not sure `:default-initargs` suits this situation...
<beach>
Why wouldn't it?
<beach>
The purpose of redefining the slot seemed to be to give it an initial value in the subclass.
<contrapunctus>
beach: there are multiple subclasses, each with its own default value for the slot...
<beach>
Why is that a problem?
lisp123 has quit [Remote host closed the connection]
<jackdaniel>
when you have default initargs in a subclass, then they take the precedence over superclass's ones
<rotateq>
contrapunctus: That's the intention for using :DEFAULT-INITARGS, it gets overridden and the next subclass takes that new one as a default. :)
<contrapunctus>
oh, I see...I misunderstood 😅️ great, I'll try using `:default-initargs` . Thanks!
<rotateq>
jackdaniel: Sorry I had it typed and then checked better before saying in the slime buffer with a simple example, but it totally makes sense even by logic.
pranavats has left #commonlisp [Error from remote client]
<rotateq>
I remember not long ago I didn't really get it and wasn't aware.
MajorBiscuit has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
attila_lendvai has joined #commonlisp
shka has joined #commonlisp
s-liao has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
pranavats has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
yauhsien has joined #commonlisp
cosimone has joined #commonlisp
s-liao has quit [Quit: Ping timeout (120 seconds)]
Oddity has quit [Ping timeout: 272 seconds]
amk has quit [Remote host closed the connection]
amk_ has quit [Remote host closed the connection]
amk has joined #commonlisp
x88x88x has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 260 seconds]
lucie22 has joined #commonlisp
s-liao has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
knobo has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #commonlisp
nature_ has joined #commonlisp
nature_ has quit [Client Quit]
artchad has joined #commonlisp
knobo has quit [Ping timeout: 250 seconds]
<artchad>
Are there some guides on how to set up an allegro-serve server? I'm kinda fumbling my way around.
<lisp123>
i am suprised allegro doesn't have documentation on it
<lisp123>
check their website, they usually have the best documentation
<artchad>
ok, let me see. I plan on proxying tor traffic to the server, so yeah. Also remotely interacting with the repl with tramp is also something I need to learn. xD
<lisp123>
so, I started using tramp a few days ago
<lisp123>
its pretty good. this was on AWS, Google Compute gave me too many issues
<lisp123>
But apparently, many like to install Terminal Emacs on the remote machine for long-lived work...which is a bit annoying (even after setting up emacs well). So now I just do everything in localhost and then will FTP over the files to the server
<artchad>
I've already installed emacs-nox, I'm trying to figure out all this stuff by just getting started.
<artchad>
but programming would be done on my main machine, while commiting or updating the repl on the remote machine somehow.
<artchad>
At least that's a workflow I would like to have.
<lisp123>
Yeah (I did local machine --> github private repo <---- pull from remote machine)
<artchad>
that seems like the most straight forward choice for me. The tricky part will be integrating allegro serve with the hidden service.
mzan has joined #commonlisp
<lisp123>
Good luck!
<artchad>
yeah, let's see. I've already played around with it and managed to make requests over Tor using drakma. How hard can it be to receive requests?
<hayley>
I don't recall it being too hard.
<hayley>
From memory, it's like any other reverse proxy, you just tell the Tor daemon(?) that you have a server on this port, and it'll work.
<artchad>
I'll give you an update once I get it working.
<hayley>
The only "issue" is that IP blocking will not work, for an obvious reason, and you risk blocking your Tor daemon by mistake.
MajorBiscuit has joined #commonlisp
nature has quit [Quit: leaving]
nature has joined #commonlisp
s-liao has quit [Quit: Client closed]
<rotateq>
hayley: Nice docu for your OMRN btw!
nature has quit [Quit: leaving]
MajorBiscuit has quit [Ping timeout: 256 seconds]
nature has joined #commonlisp
Psybur has quit [Ping timeout: 240 seconds]
Psybur has joined #commonlisp
random-nick has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Dynom has joined #commonlisp
<hayley>
Thanks!
tyson2 has joined #commonlisp
<hayley>
Should mention that one can now get one-more-re-nightmare from Quicklisp, if that is something one wants to do.
<CodeBitCookie[m]>
Hello Everyone!
<CodeBitCookie[m]>
I have a question; How can I read a binary file according to some rules?
<hayley>
"rules" as in you have some grammar to parse with? But, indeed, you will want to provide :element-type '(unsigned-byte 8) in the arguments to WITH-OPEN-FILE.
<beach>
Se the :ELEMENT-TYPE option.
<CodeBitCookie[m]>
Oh, thanks, let me try that.
<CodeBitCookie[m]>
It worked! Yayyyyy, thanks guys (*no-defun-allowed* ,beach )
<CodeBitCookie[m]>
* It worked! Yayyyyy, thanks guys (no-defun-allowed, beach)
<beach>
Pleasure.
<hayley>
Sure.
<beach>
CodeBitCookie[m]: Like I said before I don't mind questions about LispOS at all.
<CodeBitCookie[m]>
beach: Oh yeah, so:
<CodeBitCookie[m]>
beach: If I intend to create an application for LispOS, lets say a file manager, What GUI framework would I use?
<CodeBitCookie[m]>
I saw A version of McCLIM you guys were trying to make
<beach>
McCLIM.
Inline has quit [Remote host closed the connection]
<CodeBitCookie[m]>
Although that lacks presentation types.
<CodeBitCookie[m]>
So I would first have to complete making that version of CLIM 3
<hayley>
I'd suspect CLIM is the only framework you could use (as it would have to be entirely written in Lisp). But it isn't essential for a Lisp operating system, per se.
<beach>
It does not lack presentation types. Those are the very basis of CLIM.
<hayley>
I've certainly used presentation types with McCLIM.
<beach>
You can safely forget about CLIM 3.
<CodeBitCookie[m]>
With all due respect, if that's the case, your OS would look quite ugly.
<hayley>
The particular graphical style of McCLIM is also not essential to the CLIM protocol.
<beach>
CLIM 3 was an attempt by me to do something simpler when it looked like there would not be enough maintainers for McCLIM. But that changed when jackdaniel took on the maintenance of McCLIM. So CLIM 3 is dead.
<beach>
CodeBitCookie[m]: The way McCLIM looks is relatively easily fixable by anyone who knows a bit about graphic design (I am not one of those) but the program interfaces of other GUI frameworks are intrinsically broken and can't be fixed.
<CodeBitCookie[m]>
hayley: So is beach not using McCLIM?
<beach>
I am using McCLIM.
<CodeBitCookie[m]>
beach: Oh, I thought it was the other way around.
<hayley>
He is using McCLIM, but I mean using CLIM will not doom your applications to look as McCLIM currently does.
<beach>
CodeBitCookie[m]: The advantages of CLIM to Common Lisp programming are so great that I can't imagine using anything else.
yauhsien has quit [Ping timeout: 260 seconds]
<CodeBitCookie[m]>
beach: Wow, you are really sold on CLIM, Well, me too, but the non-cross-platform ability does it for me.
<CodeBitCookie[m]>
Or is that just a McCLIM thing?
* hayley
is not in #lispcafe, so cannot borrow gilberth's desk
<CodeBitCookie[m]>
Huh?
<beach>
CodeBitCookie[m]: You keep bringing up issues that are relatively easily fixable, many of which are being worked on. But there is no alternative for me. Other GUI frameworks are just a pain compared to CLIM. By the time LispOS is a reality, McCLIM will have all those minor issues fixed.
<beach>
CodeBitCookie[m]: For one thing, most other frameworks are written in something other than Common Lisp, so that's just not an option for LispOS, or let's call it CLOSOS to be more specific that I am talking about my own design.
<CodeBitCookie[m]>
So beach, according to you, cross platformability is not a big issue? Or are you saying "minor" because they are easily fixable.
yewscion has joined #commonlisp
<hayley>
There is a joke in #lispcafe, where we swap desks for faceplanting into, and then say "Desk is fine, thanks".
<CodeBitCookie[m]>
beach: It should Work on Atleast Windows and Apple devices for it to be called that. BSD is a plu
<CodeBitCookie[m]>
s/plu/plus/
<beach>
CodeBitCookie[m]: OK, let's see [takes a big breath]...
<hayley>
I think there is some amount of a Windows port for McCLIM. There is another CLIM implementation, but I don't know how portable (and/or useful) it is.
<CodeBitCookie[m]>
hayley: I know, although it isn't there yet.
<rotateq>
So that just depends on the backends it supports to keep things modular and on what the real CLIM abstractions build independently.
<CodeBitCookie[m]>
and I personally don't think that's a minor issue
<hayley>
"What platforms do you support?" "Oh, we got both platforms, we got GNU/Linux and the Lisp machine!"
<jackdaniel>
I have sdl port in the oven, it will be the second part of backend writing tutorial (concerned about input)
<beach>
CodeBitCookie[m]: There is nothing about CLIM or McCLIM that makes it impossible for it to work on all platforms. I don't care whether it does so know, because I don't work on other platforms.
<jackdaniel>
the output part will be published in days (I'm nailing details before letting it get proofreaden)
<jackdaniel>
so if sdl works on windows then there you will have it
* jackdaniel
gets back to family time
<CodeBitCookie[m]>
jackdaniel: Wow, that would be amazing! I am so excited for that.
<jackdaniel>
s/ugly/retro/ ;-)
<jackdaniel>
ciao
<rotateq>
jackdaniel: Enjoy. :)
<CodeBitCookie[m]>
I just can't
<beach>
CodeBitCookie[m]: I am a researcher, and I don't have the time or qualifications to create a finished product. I can just demonstrate the feasibility of my suggestions, and then I have to count on other to make products, if the so desire.
<CodeBitCookie[m]>
jackdaniel: ^
<beach>
CodeBitCookie[m]: I certainly would not even imagine using a commercial operating system myself.
<CodeBitCookie[m]>
beach: I would be ready, but again, (aside from my studies) I can takeout some time if it stand out (CLOSOS)
<CodeBitCookie[m]>
s/stand/stands/
<CodeBitCookie[m]>
beach: True, although the majority of the world does.
<beach>
I don't care.
<CodeBitCookie[m]>
And if I make applications for the majority, I can't.
<CodeBitCookie[m]>
Maybe you don't, I can now see why.
<CodeBitCookie[m]>
beach: ;)
<CodeBitCookie[m]>
beach: Well, if you aren't aiming for the majority, who are you aiming for?
<hayley>
I write libraries for Common Lisp. Most people aren't programmers. Most programmers aren't Common Lisp programmers.
<CodeBitCookie[m]>
beach: Also, if you aren't using McCLIM, then what are you going to use?
<hayley>
Those are unfortunate observations, but I have observed them, and it does not bother me too much.
<CodeBitCookie[m]>
Or, are you using McCLIM?
<rotateq>
hayley: And most Common Lisp programers aren't designers. :)
<beach>
CodeBitCookie[m]: I am not in the game to make it easy for you or anyone else to write applications for Windows. Again, I am a researcher, and my aim is to show that my ideas are feasible.
<CodeBitCookie[m]>
hayley: Interesting argument, can't argue with that.
<hayley>
rotateq: Hey, I like to think I can make nice looking websites.
<CodeBitCookie[m]>
rotateq: That is also true.
<beach>
CodeBitCookie[m]: I am using McCLIM for all my GUI programs.
<hayley>
But I don't get along with designers too well.
<rotateq>
CodeBitCookie[m]: The big advantage of McCLIM is that it's a free implementation of CLIM2 and with CLX it doesn't need any 3rd party dependencies to talk to an xserver.
<CodeBitCookie[m]>
hayley: Why?
<CodeBitCookie[m]>
beach: I see.
<hayley>
I don't think I have a good answer for why. It's not relevant for #commonlisp anyway.
<random-nick>
mcclim also runs on mezzano
<CodeBitCookie[m]>
beach: So are you saying, your goal, and everyone else who is working on the project is for YOU to prove that your ideas are feasible?
<CodeBitCookie[m]>
hayley: Hmmm.
<beach>
CodeBitCookie[m]: I can't speak for others. Many people just pitch in because they think it's fun.
<random-nick>
it's very slow though, probably because all the drawing is done by mcclim and mezzano's clos implementation is just closette
<rotateq>
hayley: I don't doubt you can! :) As I like to think being able to let TeX typeset some nice documents for others (and me) but of course much work that is done automatically has been done by people who know this stuff very well. Or the font design not to forget.
<CodeBitCookie[m]>
beach: I mean, I don't think you have a strong enough argument to make people work on this.
<hayley>
There might be a tale for #lispcafe, still.
<hayley>
Is "this" referring to McCLIM or CLOSOS?
<CodeBitCookie[m]>
hayley: CLOSOS
<beach>
CodeBitCookie[m]: Apparently, I don't seem to need any arguments. People just show up. However, many of the applications I suggest are independently usable. That's why I showed you that page. But then you became interested in the OS part instead.
<hayley>
Well, I was convinced because I don't enjoy debugging operating systems. There are many different ways to probe at things, and some things just can't get probed at all too easily. But Common Lisp is quite uniform in doing that.
lisp123 has quit [Remote host closed the connection]
<CodeBitCookie[m]>
beach: I do, because, first of all, I am more of a systems-programmer and second, if i am making a file manager of an OS which doesn't have files and objects instead. My effort would be wasted.
<CodeBitCookie[m]>
* beach: I do, because, first of all, I am more of a systems-programmer and second, if i am making a file manager of an OS which has objects instead of files.. My effort would be wasted.
<CodeBitCookie[m]>
* beach: I do, because, first of all, I am more of a systems-programmer and second, if i am making a file manager of an OS which has objects instead of files. My effort would be wasted.
<hayley>
Similarly, I don't enjoy implementing persistence. So having persistence automatically saves a lot of hair-pulling for me.
<CodeBitCookie[m]>
* beach: I do, because, first of all, I am more of a systems-programmer and second, if i am making a file manager of an OS which has objects instead of files.
lisp123 has joined #commonlisp
<beach>
CodeBitCookie[m]: You are definitely welcome to work on parts of CLOSOS if you like.
<mfiano>
CodeBitCookie[m]: Please don't edit your messages.
<hayley>
I also like the goals of the SICL project, too.
<beach>
hayley: Thanks! :)
<CodeBitCookie[m]>
Also, beach I think crashing is basically a non-existant problem on some OS's like NixOS, which I have used for more than an year and have had NO crashes at ALL.
<beach>
CodeBitCookie[m]: Great!
<CodeBitCookie[m]>
mfiano: Why?
<hayley>
beach: Sure, but I hope that was implied when I went to work on it.
<mfiano>
CodeBitCookie[m]: The result is a flood of each edit being sent to IRC.
<hayley>
beach: Sorry. Must be too late for humour for me.
<hayley>
I'd recommend writing edits the olde way, as to not flood.
<CodeBitCookie[m]>
beach: beach: My point is not to mock your idea or anything, but to point out some things I had in mind, which seemed interesting and didn't have a reason I could think of which would be that important.
<hayley>
.oO( 24 hours ago, it was 11pm, now it is 10pm. Universal greeting time is a leaky abstraction )
<CodeBitCookie[m]>
the message was also for you to check out some ideas from NixOS since it has that database type thing you talked about in your paper.
<beach>
CodeBitCookie[m]: Let me assure you that I don't take anything you say as "mocking".
<CodeBitCookie[m]>
beach: Thank you.
<CodeBitCookie[m]>
hayley: Oh, well will try to avoid that.
<CodeBitCookie[m]>
beach: Also, even if a computer crashes, as you said in your paper:
<jackdaniel>
CodeBitCookie[m]: McCLIM is independent from SICL project and has an ambition to be a goto solution for cl gui developers
<CodeBitCookie[m]>
> Some programs, such as web browsers, compensate somewhat for this problem by
<CodeBitCookie[m]>
remembering the open windows and the addresses that were associated with
<CodeBitCookie[m]>
each window.
<beach>
CodeBitCookie[m]: That is way too lame.
<CodeBitCookie[m]>
Haha
<beach>
CodeBitCookie[m]: I guess it works for people who do nothing but surf the web. I am not one of those.
<CodeBitCookie[m]>
But is that lame fixing worth the effort
<hayley>
YES!
<CodeBitCookie[m]>
And for an OS which hasn't crashed in an year?
<beach>
CodeBitCookie[m]: If you think the crashing problem is the main issue, you have missed a lot.
<CodeBitCookie[m]>
so for a thing that happened once in an year, and caused about a minute of inconvenience, worth the effort for decades?
<hayley>
Yup.
<CodeBitCookie[m]>
beach: I don't
<beach>
CodeBitCookie[m]: The main issue is the application interface and the safety.
<CodeBitCookie[m]>
And I haven't
<hayley>
Also keep in mind that it's "a thing" that occurs for every computer ever created.
<CodeBitCookie[m]>
beach: I again, was not referring to it as the main reason for LispOS.
<CodeBitCookie[m]>
beach: as I said in this message:
<CodeBitCookie[m]>
<CodeBitCookie[m]> "beach: My point is not to mock..." <- ^
<beach>
CodeBitCookie[m]: Let me say this again: I am a researcher, and it is my job to see whether we can produce better stuff. It can take decades if that is required, and it can fail, if it turns out the ideas are bad. That's still what I do as a researcher.
<hayley>
But, for what it's worth, I do not like writing code to implement persistence, and I also do not like having to page in and out stuff from disk myself.
<jackdaniel>
bknr.datastore for the rescue
<rotateq>
CodeBitCookie[m]: Erlang systems are even more intended to not crash. So may depend what you really want to have/do.
<CodeBitCookie[m]>
hayley: Can you explain a bit more?
<hayley>
File systems are famously awful for performing transactional/atomic updates. The best option for transactional updates are often relational databases, but they exacerbate the problem of writing persistence code.
<CodeBitCookie[m]>
beach: Well, personally, I think that people should focus on researching something that would produce better, but have a lower limit on what better means.
<CodeBitCookie[m]>
I think LispOS is a valid point of making
<CodeBitCookie[m]>
but considering the time and effort, for something that would probably be proved wrong and bad on some things like you did for Unix.
<CodeBitCookie[m]>
s/wrong and bad on some things like you did for Unix./obsolete/
<hayley>
Perfection is the enemy of good. But "good enough" is the enemy of what we actually need.
<CodeBitCookie[m]>
Hahaha
lisp123 has quit [Remote host closed the connection]
<rotateq>
beach: I would say we all can be happy you have the time, money and motivation to be a researcher on those topics as we profit in the long run by that.
<beach>
CodeBitCookie[m]: I have the luxury of being able to work on whatever I see fit, and getting paid for it, and that's what I plan to continue doing.
<CodeBitCookie[m]>
beach: Okay, can't argue with, I will do whatever I want.
<beach>
rotateq: Thanks. Either way, that's how (public) research works.
Inline has joined #commonlisp
<hayley>
beach: Forgive me for asking, but didn't you say some time ago that you would have retired by now?
<beach>
Fair enough. I no longer get paid to do research. I get paid no matter what I do.
<CodeBitCookie[m]>
Haha
<hayley>
Oh, I see.
<rotateq>
Yes but someone (else) must see a benefit of it to pay for. Much money, time and brain power was/is wasted on many aweful things, not just computer science.
<CodeBitCookie[m]>
beach, *no-defun-allowed*: Well, what I am saying is trying to find out problems of LispOS and trying to fix that might be more fun for you.
<CodeBitCookie[m]>
It might also be more fun for other people.
<CodeBitCookie[m]>
Like you tried to fix the problems of UNIX, why don't you try to fix the problems of your theoritical CLOSOS?
<CodeBitCookie[m]>
Again, as you said beach, you'll do whatever you want.
<beach>
CodeBitCookie[m]: So far, I don't have enough experience with CLOSOS to see what the problems might be.
<CodeBitCookie[m]>
I think, sometimes, thinking about the problem might be better than even experience.
<beach>
That's what I do. Full time.
<CodeBitCookie[m]>
Well, you were saying you don't have "experience" with CLOSOS, why don't you think about as if you have it.
<CodeBitCookie[m]>
like what you do.
<CodeBitCookie[m]>
just do it more.
<CodeBitCookie[m]>
Because, I think testing with a product is being an engineer more than a researcher.
<CodeBitCookie[m]>
s/with a/a/
knobo has joined #commonlisp
<CodeBitCookie[m]>
beach: Well, I think I have gone a bit too far. Anyways.
<beach>
I am not smart enough for that.
<rotateq>
CodeBitCookie[m]: Maybe.
<knobo>
I have som probloems getting company completion to work with sly. If I type something, and press <tab> (for example i type "(ql" and press tab), the first suggestion is %make-simd-pack-256-double
<CodeBitCookie[m]>
beach: I don't think so, but smart is subjective. That's why people collaborate more. I mean that would also further benefit CLOSOS and you. Do as you please.
<rotateq>
knobo: And with "(ql:"?
<knobo>
I'd like company to check if there is any packages that starts with "ql" and give me completion suggestions based on that.
<beach>
CodeBitCookie[m]: I am really puzzled by how much you care about what I do and how I do it. Maybe one day I will understand.
<knobo>
"(ql:" gives completion suggestions from the ql package
<rotateq>
And that's not what you want? :)
<knobo>
no
<mfiano>
knobo: You are looking for simple-completions instead of flex-completions. The relevant setting to tweak is in the manual somewhere.
<CodeBitCookie[m]>
beach: Haha, well I don't care about what you do, I care about CLOSOS, and thus it's creator, you.
<knobo>
As I wrote, without the ":" I'd like company to suggest which packages are available
<CodeBitCookie[m]>
CodeBitCookie[m]: beach: I care more about the idea than you, but to change the idea, I would have to consult with someone who knows more about CLOSOS than anyone, and I think that would be you.
<mfiano>
knobo: (or maybe its flex. I forget which one does what; check the manual.)
<CodeBitCookie[m]>
My suggestion instead of action suggests that maybe I don't have the skill to research furthur, and so I suggest my ideas to you. To that you respond with a "I will do whatever I want". That seems interesting to me.
<CodeBitCookie[m]>
you keep sending random stuff here.
<hayley>
lucie22: stop posting cringe
<CodeBitCookie[m]>
*no-defun-allowed*: Agreed.
<CodeBitCookie[m]>
Anyways,
<CodeBitCookie[m]>
How do I loop through the entire file and turn that into bytes.
<rotateq>
hayley: like (for me) yesterday evening :D
<hayley>
You could use alexandria:read-file-into-byte-vector.
<hayley>
Alternately, use FILE-LENGTH to get the length of the file, make a suitable vector, and then READ-SEQUENCE. But I like not having to write the loop.
<CodeBitCookie[m]>
Okay, but the loop is good for more control
<hayley>
Which reminds me of the C++ class at university that I don't have to take. The poor students haven't learnt how to copy arrays without writing the loop explicitly, and they are not allowed to use any techniques that weren't covered in classes.
<rotateq>
hayley: Lucky you!
<mfiano>
Might need to specify an encoding, too. UTF-32 is evil, SBCL.
<hayley>
mfiano: It is a binary file, so there shouldn't be an encoding.
<knobo>
The manual does not explain how to add packages to the completion result
<CodeBitCookie[m]>
mfiano mfiano, *no-defun-allowed* is right.
<hayley>
I can't think of anything to control for reading a file. But generally I don't like having to write more code, since I can mess more up. And a friend wrote something like "for (int x = 0; x < N; x++) for (int y = 0; y < N; x++)", which would loop forever, and we needed to stare at it for a few minutes to find the bug.
<hayley>
...for C++ homework. DOTIMES or LOOP in Common Lisp lets one avoid the bug systematically, though it might still be possible with DO.
<CodeBitCookie[m]>
Hahahaha
<mfiano>
An encoding specifies how binary data is represented, but fair enough. I don't use that alexandria function to know what it does without checking.
<hayley>
It reads a file, and returns a vector with element type (unsigned-byte 8) containing the contents of the file. No decoding is performed.
<CodeBitCookie[m]>
*no-defun-allowed*: So technically, mfiano the enoding would be a unsigned byte 8
<CodeBitCookie[m]>
so *no-defun-allowed*, each number is stored as 8 bytes?
<CodeBitCookie[m]>
since I have to get to the bits.
<CodeBitCookie[m]>
Ohhh, > The type (unsigned-byte 1) is also called bit.
<CodeBitCookie[m]>
inside the CLHS
<hayley>
The integer is the number of bits used. So 8-bit "bytes".
<CodeBitCookie[m]>
so that means one byte.
Psybur has quit [Ping timeout: 240 seconds]
<hayley>
And hence you don't have to worry about endian-ness, since you're already working at the level of bytes.
Psybur has joined #commonlisp
<CodeBitCookie[m]>
hayley: I mean, do I?
<CodeBitCookie[m]>
since I have to parse the binary as follows:
<CodeBitCookie[m]>
- each number is stored as a 16-bit little-endian pair (low byte, high byte)
<CodeBitCookie[m]>
I mean that's the binary format
<hayley>
You have to care when parsing, but not while reading the bytes into a vector.
<CodeBitCookie[m]>
Well, okay thanks, now, how do I parse?
<hayley>
rotateq: They let me skip C++ class, as I had already done it at another university. But they decided the computation models class at that other university was too easy. Go figure.
<rotateq>
hayley: As you would have never done anything of way more difficulty.
yewscion has quit [Ping timeout: 246 seconds]
<CodeBitCookie[m]>
*no-defun-allowed*: Is there any more manual way without a library?
<hayley>
It was odd, as I also handed in my work on the SICL compiler, and on regular expressions, for supporting evidence. But I've never published any C++ code (I think).
<hayley>
There is the NIBBLES library too, for reading larger integers from byte streams, but the way without a library would be to write something like (defun read-16-bits-little-endian (stream) (+ (read-byte stream) (ash (read-byte stream) 8)))
<CodeBitCookie[m]>
*no-defun-allowed*: Thanks!
<pjb>
I prefer to use (dpb (read-byte steam) (byte 8 8) (read-byte stream))
<CodeBitCookie[m]>
pjb: Can you explain that please?
<hayley>
Well, I prefer to not, but I was asked for how to do it without libraries.
<CodeBitCookie[m]>
*no-defun-allowed*: is dpb in a library?
<hayley>
No, dpb is a standard Common Lisp function. I mean that I would usually use NIBBLES.
<CodeBitCookie[m]>
Oh, I see.
<pjb>
CodeBitCookie[m]: ldb and dpb let you manipulate bit ranges in integers directly. You don't have to worry about mask and shifts, you just specify the range with (byte size position).
yauhsien has joined #commonlisp
<CodeBitCookie[m]>
I seae.
<CodeBitCookie[m]>
* I see.
<CodeBitCookie[m]>
Thanks pjb
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
rotateq has quit [Ping timeout: 260 seconds]
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
notzmv has quit [Ping timeout: 260 seconds]
MajorBiscuit has joined #commonlisp
lucie22 has quit [Quit: Connection closed]
john-a-carroll has joined #commonlisp
s-liao has joined #commonlisp
ski has quit [Quit: Lost terminal]
s-liao has quit [Quit: Client closed]
knusbaum has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
lisp123 has joined #commonlisp
knusbaum has joined #commonlisp
s-liao has quit [Client Quit]
notzmv has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
psf has quit [Ping timeout: 272 seconds]
psf has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
john-a-carroll has quit [Quit: Connection closed]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
yauhsien has joined #commonlisp
Bike has joined #commonlisp
Bike_ has joined #commonlisp
Bike has quit [Quit: Connection closed]
Bike_ is now known as Bike
Psybur has quit [Ping timeout: 240 seconds]
Psybur has joined #commonlisp
orestarod has joined #commonlisp
jmiven has quit [Quit: reboot]
jmiven has joined #commonlisp
Guest74 has joined #commonlisp
dra has quit [Quit: Leaving]
russe``` has quit [Quit: ERC (IRC client for Emacs 26.3)]
admich1 has joined #commonlisp
Psybur has quit [Ping timeout: 240 seconds]
<Bike>
how do people usually include a resource/data type directory with their systems? i know there's asdf:system-relative-pathname, do people just use that?
attila_lendvai has quit [Ping timeout: 240 seconds]
john-a-carroll has joined #commonlisp
Psybur has joined #commonlisp
VincentVega has joined #commonlisp
<lagash>
Whatever happened to LispForum.com? Hosting costs? Lack of interest?
<artchad>
Should I run the webserver REPL as root? Otherwise I get a permission denied error when trying to bind port 80.
<artchad>
I was hoping I could isolate the http server with a user called "lisper"
<Guest74>
Bike: I tend to use xdg dirs. I prefer settings/resources to be stored with each other and away from the code. Saves you the trouble of finding out where you are currently living.
<lagash>
artchad: what OS?
<Nilby>
artchad: A typical thing is to run a proxy with privieges, which forwards it to your lisp on another port.
<lagash>
artchad: and no, you shouldn't, that's a terrible security idea
<lagash>
if you're running Linux, there's some permission you could grant.. but yeah, a privileged proxy is a good idea
<artchad>
lagash:Alpine
<artchad>
oh, there is a tor HTTPTunnelProxy
<artchad>
thansk for the pointer
<artchad>
I'm trying to make aserver play with a Tor hidden serivice.
<lagash>
the dark web eh? :)
<artchad>
no need to pay the DNS mafia
<Bike>
xdg, huh... maybe...
<artchad>
I'm running a raspberry pi which will serve a minimalists website. I outsource the heavy media files and e voila a webserver practically for free.
Psybur has quit [Ping timeout: 272 seconds]
<scymtym>
Bike: do you want to load the data at compile/load time or at runtime?
<random-nick>
asdf also has the :static-file component
MajorBiscuit has quit [Ping timeout: 252 seconds]
<lagash>
Can anyone recommend a "streaming" XML builder/writer? xml-emitter is somewhat wnat I'm looking for
<Bike>
scymtym: prrrrrobably just load time?
MajorBiscuit has joined #commonlisp
<scymtym>
Bike: i would just use something like (defvar *data* (alexandria:read-file-into-byte-vector (make-pathname :name "data" :type "bin" :directory '(:relative :up "data") :defaults *compile-file-pathname*)))
<Guest74>
I was a bit disappointed to see that nibbles doesn't seem to have a way to deal with nibbles. Or anything larger than 64bits.
<Bike>
simple, could work, thanks you two
wyrd has quit [Ping timeout: 240 seconds]
wyrd has joined #commonlisp
VincentV` has joined #commonlisp
VincentVega has quit [Ping timeout: 256 seconds]
treflip has joined #commonlisp
simendsjo has joined #commonlisp
knusbaum has quit [Ping timeout: 272 seconds]
knusbaum has joined #commonlisp
attila_lendvai has joined #commonlisp
<Nilby>
I feel like no REPL respects ‘print’ or the old lisp way of printing.
john-a-carroll has quit [Quit: Connection closed]
<Nilby>
e.g. there's always a useless blank line
<semz>
Nilby: What do you mean?
<Bike>
Nilby: PRINT does a newline before writing out the object
cosimone has quit [Remote host closed the connection]
<Guest74>
You want a repl that 'corrects' the standard?
<Nilby>
Guest74: No. Not at all.
<Nilby>
it seems like everyone gave in to the W.I.B. unix tty driver
Psybur has joined #commonlisp
<Nilby>
the part I have issue with is how repls read, and echo the input
<contrapunctus>
Is there any SQL generator in Common Lisp which does not have a hardcoded set of keywords it accepts? Similar to `emacsql` , and the opposite of SXQL or CLSQL.
<contrapunctus>
(Thinking of writing one if there isn't.)
cosimone has joined #commonlisp
Psybur has quit [Ping timeout: 260 seconds]
Psybur has joined #commonlisp
mon_aaraj has quit [Ping timeout: 260 seconds]
mon_aaraj has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 246 seconds]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
karlosz has joined #commonlisp
Psybur has quit [Read error: Connection reset by peer]
Psybur has joined #commonlisp
treflip has quit [Quit: Quit]
simendsjo has quit [Ping timeout: 260 seconds]
knobo has quit [Quit: Client closed]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
VincentV` has quit [Ping timeout: 256 seconds]
poselyqualityles has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
poselyqualityles has quit [Ping timeout: 260 seconds]
waleee has joined #commonlisp
poselyqualityles has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
cosimone has joined #commonlisp
admich1 has quit [Quit: Quit]
Brucio-61 has quit [Read error: Connection reset by peer]
scymtym has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
akoana has joined #commonlisp
Oddity has joined #commonlisp
karlosz has quit [Quit: Client closed]
ted_wroclaw has joined #commonlisp
cosimone has quit [Remote host closed the connection]
Psybur has quit [Read error: Connection reset by peer]
Psybur has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
Brucio-61 has joined #commonlisp
yauhsien has quit [Ping timeout: 260 seconds]
Volt_ has joined #commonlisp
ted_wroclaw has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
tyson2 has quit [Remote host closed the connection]
dudek has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.4]
morganw has joined #commonlisp
rawley has joined #commonlisp
jeko has joined #commonlisp
mon_aaraj has quit [Ping timeout: 260 seconds]
jeko has quit [Remote host closed the connection]
mon_aaraj has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
triffid has quit [Quit: triffid]
artchad has quit [Read error: Connection reset by peer]
jeko has joined #commonlisp
triffid has joined #commonlisp
poselyqualityles has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
jeko has quit [Ping timeout: 256 seconds]
shka has quit [Ping timeout: 260 seconds]
jeosol has quit [Quit: Client closed]
cosimone has joined #commonlisp
jeko has joined #commonlisp
jeko has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
dstein64- has joined #commonlisp
karlosz has joined #commonlisp
dstein64 has quit [Ping timeout: 240 seconds]
dstein64- is now known as dstein64
yauhsien has quit [Ping timeout: 260 seconds]
wyrd has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
wyrd has joined #commonlisp
orestarod has quit [Ping timeout: 260 seconds]
pillton has joined #commonlisp
Psybur has quit [Ping timeout: 260 seconds]
Psybur has joined #commonlisp
jeko has joined #commonlisp
occ has quit [Ping timeout: 260 seconds]
dudek has quit [Quit: Leaving]
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
jeko has quit [Ping timeout: 246 seconds]
igemnace has quit [Remote host closed the connection]
cosimone has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
<hayley>
Does anyone use, say, more than 1024 return values?
<pjb>
hayley: you never know what may happen, but it wouldn't make sense to have more than call-arguments-limit return values.
<pjb>
note: it may be big, eg. #+ccl 65536
<hayley>
Interesting. I don't know what call-argument-limit will be on SICL. But SBCL is quite bold with those limits.
<mfiano>
No multiple-values-limit
<mfiano>
Which iirc is 20
<mfiano>
(at least)
<mfiano>
Using less than that is implementation-dependent
<hayley>
Right. Can anyone imagine using more than 1024?
<pjb>
50
<pjb>
hayley: I can.
<hayley>
Another data point is that the Glorious Glasgow Haskell Compilation System only allows 62 elements in a tuple, which can be used like multiple values.
<hayley>
pjb: Would you really use more than 1024?
<pjb>
hayley: those cases occur often in generated code.
<hayley>
How often is "often"?
<pjb>
more often in generated code than in code written by hand.
<pjb>
Can you write even more than 20 return values by hand? You'll start writting macros long before that!
morganw has quit [Remote host closed the connection]
<hayley>
Sure.
<pjb>
hayley: but again, why do you ask? If you're writting an implementation, you just set cal-argument-limit to the value you want, as low as you wish (but no lower than 50), and that's it.
<hayley>
Because I want to know what a good value would be.
aeth has quit [Ping timeout: 246 seconds]
<pjb>
hayley: also, you have at your disposal a big body of code, in quicklisp, so you can easy grep or progress the source sexps to do statistics.
<hayley>
I could set the value to 50, but it might hinder use. I believe McCLIM uses more than 50 arguments, due to all the default initargs.
<pjb>
50 is a good value!
aeth has joined #commonlisp
<pjb>
Honestly, if it wasn't such a high value, we could expect a smaller limit, adjusted to the number of registers… 50 is optimistic in this respect.
<hayley>
And my current idea is to set aside a few pages for extra return values. The least I can set aside (well, I can use fractions of a page, to be fair) would be 1 page * 4096 bytes/page / 8 bytes/word = 512 values.
<pjb>
So, once you go over the number of registers, you may reserve a page for that, and hence, 1024 or 512 can be good values. Or you can do it purely dynamically, and then have a call-argument-limit = most-positive-fixnum as in sbcl.
<pjb>
hayley: note that: (values (values 1 2 3) (values 4 5 6) (f) …) so a single page may not be enough: you need a stack of them.
<hayley>
VALUES only consumes the primary values of each argument, since it is a normal function.
<hayley>
Another option would be to heap allocate and store additional return values in a simple vector, but that adds indirection.
<pjb>
what if foo calls functions using values and use them?
<saturn2>
mapping pages that never get used should be very cheap on a 64 bit machine
<hayley>
What about it? The multiple values are only materialised after FOO returns.
<pjb>
You need a stack of multiple value registers.
<hayley>
saturn2: Yes, it should. But I'd still like to make a fair few threads, and I could run out of virtual memory.
eddof13 has joined #commonlisp
<hayley>
I'm pretty sure only one set of multiple values is produced and consumed at a time, still. VALUES is only called after FOO returns, so no need for multiple sets of multiple values.
<hayley>
n.b. Cleavir has SAVE-VALUES and RESTORE-VALUES, but they will stash the multiple values elsewhere. Which, I guess, is like a stack of multiple values, but not really.
occ has joined #commonlisp
<pjb>
hayley: Again: (values ((lambda () (values 1 2 3))) ((lambda () (multiple-value-bind (a b c) (values 4 5 6) (+ a b c)))) (values 7 8 9))
<pjb>
hayley: stashing 1024 values can be costly…
<hayley>
You have a count too, no? You'd only stash 1024 if there were 1024 to stash.
<pjb>
hayley: depends on how you implement them.
<hayley>
The only hard one here is desugaring MULTIPLE-VALUE-BIND to MULTIPLE-VALUE-CALL. Yet I can still show that none of the lifetimes of the multiple value buffers will overlap.