dieggsy has quit [Remote host closed the connection]
<Bike>
So like, if you see a jock mocking a nerd for reading fantasy novels, say, you're like "ah, this is a healthy community interaction, these people are friends"
fikka has quit [Ping timeout: 240 seconds]
<babylisp>
I actually introduce myself as "full time nerd".
<babylisp>
In work circles.
<Bike>
that's pretty normal, yes
<Bike>
but not actually the situation to which i was referring
<babylisp>
But then again, I am not exactly a typical nerd. I don't have exactly a type.
<Bike>
no, immediately linking george carlin makes you fit a type, i assure you.
<babylisp>
Bike: Please help me understand.
<Bike>
Has nobody ever made fun of you in a hostile fashion?
<Bike>
Like, back in high school, maybe? At any time?
<babylisp>
Everyone has.
<babylisp>
It is shit, but I find pity worst than that.
<Bike>
And you think not doing that is pity?
<babylisp>
Not exactly.
<Bike>
You said that if you DON'T mock people for stuttering, they'll feel left out and pitied.
<babylisp>
No, if we never have a joke about people who stutter while joking about just anyone else, it is patronizing.
<Bike>
We weren't joking about anything. You just spontaneously brought this up.
fikka has joined #lisp
<babylisp>
We were talking about being funny.
<babylisp>
And I was just reading the hyperspec on Accessors.
<Bike>
Good jokebook.
<babylisp>
Get the memo?
<babylisp>
You need to lightin' up buttercup.
<Bike>
Yeah, I used to get told that when people stole my backpack and shit.
<Bike>
It's just a joke, man. Have a sense of humor.
<babylisp>
I am sorry you had to deal with that.
<Bike>
You really aren't.
<babylisp>
That is terrible. Bullying is not on in my book.
<babylisp>
I actually am, trust me.
loofee has quit [Ping timeout: 255 seconds]
<Bike>
You aren't, because you're doing the same thing. Some stranger makes a joke at the expense of nerds and fucks with me. You make a joke at the expense of stuttering strangers.
smasta has quit [Ping timeout: 256 seconds]
<babylisp>
I think there is a fine line between being abusive and just whack.
<babylisp>
And I am not discounting your feelings about the topic, I understand you have a strong stand against anything that could constitute bullying, and that is fair.
<Bike>
Of course you're not being _abusive_. You're not the guy taking the backpack. You're the guy in the background making jokes at the expense of the guy being bullied.
<babylisp>
Nah. Never.
fikka has quit [Ping timeout: 260 seconds]
<babylisp>
Quite the opposite.
<jmercouris>
Bike: I think you're assuming quite a lot from a short interaction
<Bike>
You're, what, making jokes at the expense of the bully?
<babylisp>
You need to see my point of view, I am not even for making people excluded or less than others, let alone leave them abused or worst yet make fun of that.
<jmercouris>
It is not so easy to judge a character so thoroughly from one comment
<Bike>
I know you aren't making a conscious effort to exclude people. You just do it anyway and conceptualize it as hilarious.
<jmercouris>
anyways, I have to go for now, guests are over, let's all be kind to each other
<babylisp>
Bike: Look, I won't make jokes at the expense of bully, someone being physically harassed is not funny. I have actually got myself in big trouble many times in school over that.
<Bike>
Verbal harassment is okay though. Is that the line?
<babylisp>
There is a line.
<babylisp>
words are just that, words, it is the intention that counts.
<babylisp>
Many many people tell you nice sounding things while screwing you over hard.
<babylisp>
And there are people who crack a joke but has your back.
<babylisp>
Human interactions are not super simple.
ebzzry has joined #lisp
<Bike>
of course they aren't simple. it's not as simple as intention counting.
<babylisp>
I think you're being quick to label me as a bully just for a joke.
pagnol has quit [Ping timeout: 248 seconds]
<Bike>
i said, you're not a bully. you're just contributing.
<babylisp>
So, are we getting to the whole idea of Bullying Culture? Cause I think that is total bullshit.
fikka has joined #lisp
<Bike>
i don't know what that is.
<babylisp>
But I am dropping it. No use for this conversation, this is #lisp.
<Bike>
fine. use some discretion and don't crack random jokes at unrelated groups' expense.
<babylisp>
So no joke about people who stutter, short people, white people, black people, kids, elders, people with short fingers, and no joke about humans.
<babylisp>
Man, that would make life so boring.
orivej has quit [Ping timeout: 255 seconds]
<babylisp>
And mind you, I am in at least three or four of that categories.
<Bike>
as part of human relations not being simple, categories are not all the same.
<babylisp>
And oh, no Asian jokes, no Middle Eastern people joke, no Arab joke, no vegan joke, no joke.
<rme>
why not try talking about lisp?
smurfrobot has joined #lisp
<babylisp>
rme: Is there a nice book on writing a lisp compiler?
<babylisp>
Or rather, a book on compilers, that implements a lisp compiler?
<Bike>
lisp in small pieces.
ebzzry has quit [Ping timeout: 256 seconds]
<babylisp>
Bike: Noice, I am gonna grab that once I finish PCL.
fikka has quit [Ping timeout: 256 seconds]
<rme>
I think Norvig has some material about compiling as well, and it's a great book for learning CL generally.
<rme>
Paradigms of Artificial Intelligence Programming (PAIP), I mean.
<Bike>
the one in paip is simplistic. probably good if you have noe xperience
<babylisp>
jmercouris: I have been using IRC forever and I have never come across that guide, learn many of those over time though, but good sauce.
Bike has quit [Quit: leaving]
<rme>
I found Steele's thesis describing his RABBIT compiler to be a good read.
<beach>
jmercouris: And I just download them all so that I can use `grep'.
fikka has quit [Ping timeout: 276 seconds]
<jmercouris>
beach: It was a good paper yeah, but I was also very sleepy when I read it
<jmercouris>
so I didn't absorb all of it
<beach>
I understand.
<jmercouris>
very interesting concept
<jmercouris>
I didn't even realize that was a thing within lisp, on some level i know lisp is a compiled language, but mentally I am always still thinking of it as evaluated, so I don't think of the same techniques being applied
<beach>
Thanks!
<stylewarning>
Hey friends
<jmercouris>
also hello
<beach>
Hello stylewarning.
<beach>
jmercouris: Oh, the same techniques are definitely applied. But they can become messier than what is documented in the literature, simply because the traditional languages used in the compilation literature are simpler, C-like, languages.
<beach>
And of course, we need a few more, like type inference.
<jmercouris>
beach: Yes, I imagine there is a much more straightforward path, especially because already so much time has been invested in c compiler development for example
<beach>
Indeed.
fikka has joined #lisp
SaganMan has joined #lisp
krasnal has quit [Ping timeout: 256 seconds]
<rme>
It beats me why ccl-logbot is not working. When I'm over the flu, I'll try to investigate more.
mathrick has quit [Ping timeout: 276 seconds]
<jmercouris>
rme: Feel better!
<beach>
jmercouris: One purpose of the SICL project is to implement as many of the documented optimization techniques as possible. For that, we use an intermediate representation called HIR. Many of those techniques need to be adapted to the special case of Common Lisp, hence my research.
<jmercouris>
beach: So basically is SICL a demonstrator project or do you intend to turn it into a full fledged implementation?
<beach>
The latter. But it is not imminent.
<SaganMan>
Good Morning!
<beach>
I am also attempting a very novel bootstrapping technique.
<beach>
Hello SaganMan.
<jmercouris>
beach: Yeah I saw it bootstrapping off of sbcl, that confused me
<jmercouris>
What is the reasoning for that?
<jmercouris>
SaganMan: guten morgen
<beach>
Yes, it confuses many people, and I have no idea why.
<jmercouris>
beach: Well, it seems strange to me that CL should boot off of CL, I'd expect a lower level language
<beach>
Many people do, and I have no idea why.
<jmercouris>
The difference being that in CL we have multiple implementations, so it makes sense
<beach>
jmercouris: GCC is written in C.
<SaganMan>
jmercouris: ach desutch eh, Guten Morgen
<beach>
I don't see why a Common Lisp implementation can't be written in Common Lisp.
<jmercouris>
to boot another implementation off another, I guess this luxury is not afforded in other languages, which is why it seems so strange
<beach>
jmercouris: It happens all the time.
mitc0185 has quit [Ping timeout: 240 seconds]
<beach>
jmercouris: Pascal was written in Pascal.
<jmercouris>
beach: How could pascal be written in pascal? surely some code must exist in binary somewhere to load this pascal
fikka has quit [Ping timeout: 256 seconds]
<beach>
In fact, it is standard practice, just to demonstrate the power of a new language to write the compiler in itself.
<beach>
jmercouris: Some initial steps may require some simpler language, but once you have a first compiler, you are set for life.
<jmercouris>
beach: What if this first compiler introduces some performance penalties of a sort that require a rewrite of the language or vice versa?
<SaganMan>
how is common lisp written beach?
<beach>
jmercouris: I am planning an article on bootstrapping Common Lisp, and it will contain an analysis of this strange thinking that you need to write a Common Lisp system in something other than Common Lisp.
<jmercouris>
beach: I look forward to it, it's a question I've actually been wondering for a while
<copec>
learn x86 assembly with the art of assembly level programming
<beach>
jmercouris: Performance is not a problem. It can be fixed. Code generation bugs are more delicate.
<copec>
It uses a language invented by the author... "high level assembly"
<jmercouris>
copec: x86 is like tears in rain, hopefully we'll be rid of it when windows provides an arm build
<copec>
it's really easy to see how you could build up to common lisp
<rme>
x86 is more like tar on your shoe
<jmercouris>
copec: I already know assembly, I don't see how that explains building cl in cl
<beach>
SaganMan: Like I said, many people self-impose strange constraints which influences the way they write their Common Lisp systems.
<jmercouris>
rather, I know A assmebly
<beach>
SaganMan: So it varies a lot.
nika has joined #lisp
<copec>
jmercouris, well when I learned HLA it made the path to bootstrap higher and higher level languages in the language itself clear
<jmercouris>
rme: I guarantee it, in 50 years, we will no longer use ARM
<copec>
lisp style
<jmercouris>
copec: human leukocyte antigen?
<copec>
"High Level Assembly"
<beach>
copec: That's typical thinking in implementing Common Lisp, i.e. that one has to start with a low-level language. But that is absolutely not necessary.
<aeth>
jmercouris: ARM will definitely be disrupted by somethign cheaper, e.g. RISC-V
<copec>
well, no
<aeth>
s/somethign/something/
<jmercouris>
aeth: My vote is on powerpc making a comback :D
<copec>
If you have a running CL then of course you could build all the compilation in CL
<beach>
And we do.
<jmercouris>
copec: I've also implemented Lisp in both Python and CL, so I'm aware of how making languages work, I don't see how learning another assembly language will help me conceptualize this
<beach>
... have a running Common Lisp.
<jmercouris>
copec: s/cl/c
<copec>
perhaps it is just how I think then
<copec>
I got used to seeing lisp defined in lisp, etc.
<jmercouris>
maybe it just needs time to sink in or something
<beach>
What I find amusing is that a person who wants to implement a Common Lisp, presumably wants to do that because he or she thinks that Common Lisp is a good language, but then often that same person goes right ahead and writes the system in some other language.
jack_rabbit has quit [Ping timeout: 256 seconds]
<jmercouris>
that is pretty funny isn't it, they end up spending so much time in the other language
<beach>
Exactly.
<jmercouris>
I don't see how it would be possible for something like ecl though to not be written in C
<aeth>
I'm guessing the reason is that they think they can get better performance from C or C++ as the implementation language
<jmercouris>
is ECL written in C?
<beach>
jmercouris: Partly, yes.
<pjb>
About half of it. Like clisp.
<beach>
jmercouris: It would be foolish to attempt to write the Common Lisp compiler in anything other than Common Lisp, for instance.
<beach>
But even the SBCL compiler is written without using generic functions and standard classes.
<jmercouris>
so I assume the basic stuff is in C? Like reading tokens from a file?
<copec>
SBCL still uses C for the bottom layer
<beach>
It must be like working with one hand tied behind one's back.
<aeth>
copec: Afaik, the C is mostly the GC in SBCL
<pjb>
Actually, a typical step in bootstrapping a language written in itself, is to implement an interpreter of that language (in another language).
<pjb>
On the assumption that implementing an interpreter is simplier than a compiler, so using a lesser language may be doable.
<aeth>
pjb: CL doesn't need bootstrapping, though, except I guess to target other architectures? Although maybe you can cross-compile?
<beach>
pjb: Only for the first implementation.
<jmercouris>
pjb: So you mean you implement none of the standard libs, just the core features?
<aeth>
How would someone go about porting CL to RISC V?
<pjb>
And indeed, bootstrapping only occurs once for ever.
<copec>
It compiles a skeleton in C as the first phase binary
<pjb>
aeth: cross-compilation.
<copec>
essentially that is how they implement the ABI
fikka has joined #lisp
<jmercouris>
So theoretically, since ECL should run anywhere C can run
<copec>
then that loads the core
<aeth>
pjb: Then CL never needed to bootstrap since it predates pretty much everything except Fortran, and was never written in Fortran
<jmercouris>
you should be able to boostrap any CL onto any system that can run C?
<pjb>
I would argue that a compiler that doesn't include cross-compilation in its core is necessarily of lesser quality than one that does.
<aeth>
pjb: You would just write CL in its direct predecessor Lisp
<pjb>
aeth: yes, LISP was implemented in 7090 assembly
<jmercouris>
pjb: at least it's not x86
<beach>
jmercouris: It is much more complicated than that. It is not about porting the system, but about retargeting the code generator.
<jmercouris>
beach: code generator? what does that mean?
<beach>
jmercouris: ECL generates C so that is fairly straightforward.
<beach>
jmercouris: What the compiler generates.
<aeth>
(Okay, CL itself doesn't predate most languages, but it's mostly compatible with historic Lisps, so it shouldn't be hard to bootstrap CL from an historic Lisp. I should clarify before someone corrects me.)
<jmercouris>
ah, ok, so the actual binary
<copec>
SBCL generates its own object code segments
<copec>
but it gets there from the compiled C skeleton
<beach>
jmercouris: Sort of. What the compiler generates when you type a form at the REPL.
<rme>
Historically, it has taken 3 or 4 wizard-months to add a compiler backend for a new architecture to CCL.
<jmercouris>
Okay, so the representation changes on a per system basis?
<jmercouris>
Why would that be?
_sebbot has quit [Quit: Lost terminal]
<beach>
jmercouris: Different processors.
<rme>
Other implementations may, of course, differ.
<beach>
jmercouris: Different system calls.
<jmercouris>
so you tailor the representation to the instruction set?
<jmercouris>
or to the system calls available?
<pjb>
I mean, it is way easier to write a generator for a binary file format to be loaded on a new system, than to try to bootstrap on that new system.
<beach>
jmercouris: Er, yes. The compiler often generates native code.
<jmercouris>
maybe I should try writing a simple compiler
<jmercouris>
instead of just an interpreter
<pjb>
and writing a compiler backend for a new processor still remains easier than bootstrapping on that new processor.
<pjb>
jmercouris: actually, IMO writing an interpreter for a high level language is more difficult than writing a compiler!
fikka has quit [Ping timeout: 256 seconds]
<jmercouris>
pjb: that's interesting, doesn't it take more time to write a compiler though?
<pjb>
jmercouris: but you're right, the key word is "simple" here. Writing a simple compiler is simple. Writing a highly optimizing compiler is more difficult.
<aeth>
pjb: Fortunately, there's lots of room for improvement.
<pjb>
An easy solution is to write a simple compiler targetting a VM specially designed for the language.
<aeth>
As long as the fastest language is C or C++ or Fortran with only Rust coming close, there's lots of room for compilers to catch up.
<pjb>
VM are simple to write, simple compilers are simple to write. Win-win.
mathrick has joined #lisp
jack_rabbit has joined #lisp
<copec>
beach: What I was trying to communicate is not that I would write a CL implementation starting in HLA, but that the HLA language itself uses a lot of elegant abstractions for writing assembly that all could easily map into CL
<beach>
OK.
<copec>
So instead of a traditional compiler that lex's, parses, intermediate, etc.
loli has joined #lisp
<copec>
I could imagine a building up to CL written in CL
<copec>
If that makes sense
<beach>
Not quite, but it's early in the morning and I am not quite awake yet.
<beach>
In a Common Lisp system, the machine code would be processed by Common Lisp code, so there would be no need to write much assembly at all.
JonSmith has joined #lisp
loli has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
<beach>
I guess I don't know what abstraction that "map into CL" means. Nor do I understand what "building up to CL written in CL" means.
<aeth>
Afaik, pretty much every abstraction can be expressed in CL, that's what makes it so great.
<aeth>
In other languages, syntax gets in the way.
<beach>
But I am notorious for having difficulties understanding what other people mean.
<loke>
beach: It's not just you. I read the scrollback, and I'm not entirely sure myself.
fikka has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<beach>
loke: Ah, OK. Thanks!
fikka has joined #lisp
loli has joined #lisp
<aeth>
copec: Could you provide an example in a pastebin?
vancan1ty has quit [Ping timeout: 255 seconds]
pierpa has quit [Quit: Page closed]
fikka has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
vancan1ty has joined #lisp
damke has quit [Read error: Connection reset by peer]
fikka has joined #lisp
loli has quit [Quit: WeeChat 2.0.1]
jack_rabbit has quit [Read error: Connection reset by peer]
SaganMan has quit [Quit: WeeChat 1.6]
SaganMan has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
nullniverse has joined #lisp
<jmercouris>
I have a hash-table that uses a struct as a key. I use equalp comparison as the test for my hash table. My struct is composed of a field "character" which has a value of a character that may be upper or lowercase. Currently, my hash-table cannot distinguish between an upper and lower case character, how can I fix this?
fikka has joined #lisp
<loke>
jmercouris: Yes. You have discovered one of the worst parts of CL.
gigetoo has quit [Ping timeout: 276 seconds]
<loke>
jmercouris: What you want to do can't be done with hashtables as defined by the spec. Most CL implementations however implement support for custom hashes. You can use those.
<loke>
jmercouris: Or, you can use an alternative hashtable implementations. There are several on QL.
gigetoo has joined #lisp
<rme>
can't you use an equal hash table instead of an equalp hash table?
<jmercouris>
I was hoping to avoid something like that, but it may be necessary it seems
<loke>
jmercouris: If you're OK with sticking to a given implementation of CL, you can always use vendor extensions
vancan1ty has quit [Ping timeout: 255 seconds]
<loke>
Otherwise, the third-party implementations are good.
<jmercouris>
I have to support sbcl and ccl, so that adds some complexity
<loke>
I think cl-containers has one
<jmercouris>
I may have to use a third party implementation, or add a struct slot "uppercase-p" or something
<loke>
jmercouris: You'd need one mer character. :-)
<loke>
per
<loke>
You could also save the strings as UTF-8 encoded byte arrays
<loke>
(horrific, I know)
<jmercouris>
loke: I'd need one more character? what do you mean?
<loke>
jmercouris: You' dneed to store the upper/lowercase state for each character.
Oladon has quit [Quit: Leaving.]
<loke>
You can't distinguish between FOO Foo and foo using only one bit.
<jmercouris>
loke: My struct only supports a single char
<loke>
I see
<jmercouris>
so I can distinguish between a and A using only one bit
<loke>
jmercouris: Store it as a numeric code (CHAR-CODE) then.
fikka has joined #lisp
<loke>
The thing is, upper/lowercase is actually a uch more complicated concept than you might think, and the CL spec is so weak on the subject that you can't rely on it.
<loke>
(mainly because CL was designed before Unicode)
<jmercouris>
I think char-code is good actually
<jmercouris>
I'll actually truly have to convert to a char, then a char code, but that makes sense
<jmercouris>
it is actually a string of length 1 currently, but char-code it is
<rme>
loke: thanks; you're quite right
<jmercouris>
what's the reverse of char-code?
<jmercouris>
(code-char?)
<jmercouris>
wow, it actually is that
jack_rabbit has joined #lisp
<jmercouris>
thank you for your help
<jmercouris>
do I have your permission to repost this in my github issue?
<jmercouris>
loke: that is
<loke>
jmercouris: Permission? WHat? I don't know what you need permission for, but whatever it is you want, you have it :-)
<jmercouris>
loke: Thank you once again, I'd forgot about char-code, and wouldn't have thought of it
<jmercouris>
though, code-char is new to me, it seems obvious now
<jmercouris>
are there any functions in the spec that use the arrow operator like code->char ?
<rme>
nope
<loke>
No
<loke>
You can create your own (defun code→char (c) (code-char c))
<loke>
We have Unicode. Why not use it? (that said, I have only used non-ASCII characters in symbols once... and that code has been subsequently removed)
fikka has joined #lisp
<jmercouris>
are you saying we could write emoji functions?
<loke>
I used it in a reader macro to add special syntax to the ≡ symbol
<loke>
jmercouris: That is exactly what I'm saying
<jmercouris>
this could be a great way to get teenagers into common lisp instead of other languages
<jmercouris>
"javascript is great and all for unifying server/client side, but can you make emoji functions?"
<jmercouris>
I mean you can use that as a follow up on literally anything "yeah, that's great, but can you use emojis for X"?
reinuseslisp has joined #lisp
<jmercouris>
loke: What a waste of human intellect
<loke>
😀 🔤Howdy, pThis is a string🔤
<aeth>
jmercouris: emoji encourages people to support Unicode
<aeth>
which is a good thing for nearly every language that isn't English
<loke>
🔤 is apparently used for strings, and 😀 is print
<loke>
That is hillarious :-)
<reinuseslisp>
#x01F524
<reinuseslisp>
language?
itruslove has joined #lisp
<jmercouris>
aeth: I'm not interested in supporting non-english programming languages, I like that everything is unified in one language
Guest37104 has joined #lisp
<loke>
aeth: Even English speakers sometimes needs to talk about € or ¥. Or they might was to say it's 20° outside.
<jmercouris>
the last thing we need is programming languages in every language, that sounds like a nightmare
fikka has quit [Ping timeout: 256 seconds]
<jmercouris>
I know non-english programming languages exist, thankfully they are not well adopted
<reinuseslisp>
as a non-english speaker I support jmercouris
<loke>
jmercouris: If I recall correclty, Microsoft VBA used to be language-deendent... In the swedish version of VBA you'd wrote SKRIV "Test" to print something.
<loke>
And of course, if you had Swedish VBA in a document, that document wouldn't work right if loaded into an English version of Office... Because of course... This is Microsoft we're talking about.
<jmercouris>
reinuseslisp: Can you imagine editing source code written in Mandarin?
<jmercouris>
that would be something :D
<reinuseslisp>
I would have to decode it first
<aeth>
This sounds fairly trivial to do in Lisp
<loke>
jmercouris: Take a look at code written by Japanese programmers some day
<reinuseslisp>
when you get out of words, Mandarin works like a charm though
<jmercouris>
I'm sure it would make for very compact source code
<jmercouris>
I guess then, why not program in emojis, since that is also a glyph language
giraffe has joined #lisp
<aeth>
You should be able to write translations of Common Lisp that can run portably on Unicode-supporting implementations.
<jmercouris>
imagine trying to keep in mind symbols for every variable
<beach>
Multics Pascal had an option for using French keywords.
<loke>
I recall way back in the 90's when I was working for Sun, I was supporting Java. We had a bug report where one developer couldn't compile his code on Windows... Turns out all his class names were in Japanese, and Windows doesn't use unicode to store files (they use some weird mash-up of encodings based on the language of the Windows installation)
<jmercouris>
literally how would you make up variable names in a language with no alphabet
<loke>
None of that worked in the Java compiler
<reinuseslisp>
aeth: something like #:common-lisp-es #:common-lisp-jp packages
<reinuseslisp>
?
<aeth>
reinuseslisp: exactly
<aeth>
reinuseslisp: and the best part is you can mix them!
<aeth>
Your French Lisp could use both "and" and "et"
<jmercouris>
but why?
<aeth>
They'd both ultimately be "and"
<loke>
jmercouris: What do you mean? Nothing prevents you from naming a variabe 大
fikka has joined #lisp
<jmercouris>
loke: Wouldn't that be confusing using variable names that may not be representable by a character that doesn't exist?
<reinuseslisp>
「大」と
<jmercouris>
Think about new concepts that need to be represented
<jmercouris>
In english, you'd invent a name, write it down, document it, and it would be pronouncable
<loke>
jmercouris: right. Why can't you do it in other languages?
<jmercouris>
in chinese, the reader would know literally nothing about the meaning of a character
<jmercouris>
NOR could they even look it up
<jmercouris>
if it was said out loud for example
<loke>
jmercouris: that's not how Chionese works.
<jmercouris>
I know chinese dictionaries exist
<jmercouris>
but they are a joke
<aeth>
jmercouris: If you can't express a concept as a word in one language, you can just use a phrase instead
<loke>
jmercouris: You don't invent new characters. Each symbol has a specific pronounciation in the given dialect, and is a single syllable. You make multi-syllable words by stringing them togteher.
LocaMocha has joined #lisp
<jmercouris>
loke: I'm familiar with this, but that doesn't mean anything, there are inconsistencies all over the place
<jmercouris>
and MANY words are single symbols
<loke>
jmercouris: yes, of course. Just like there are many words in English that are single syllables.
<jmercouris>
I think as a rule from most to least acceptable english -> language with alphabet -> language with pseudoalphabet -> language with glyphs
<loke>
I mean, I can write "wen", or I can write "文".
<jmercouris>
loke: And which one is easier to distinguish on a small display? which one can be looked up in a dictionary?
<aeth>
jmercouris: I want to write a programming language in Egyptian hieroglyphs now
<reinuseslisp>
Japanese is not in your categories
<loke>
jmercouris: No. You are using thw wrong terminilogy here. "gryphs" are just the things you write. 文 is a glyph, but A is a glyph too.
<jmercouris>
loke: Okay, I mean glyphs with a 1:1 word glyph mapping
<reinuseslisp>
jmercouris: you are talking like if you can't copy and paste it to read it
<loke>
You are thinking of logographic languages, but there are no true logographic languages in use today.
<jmercouris>
reinuseslisp: Can you copy and paste in real life?
fikka has quit [Ping timeout: 255 seconds]
<loke>
Chinese is mostly syllabic
<jmercouris>
If I give you a document can you physically copy and paste a sheet of paper?
<loke>
All logograph languages evolved to be syllabic
<reinuseslisp>
well, we were talking about programming, didn't we?
<jmercouris>
reinuseslisp: Lots of times programming docs are printed out
<jmercouris>
loke: and yet, some of them are more sucky than others
<jmercouris>
I believe there are better and worst languages for given applications
<aeth>
Things aren't set in stone enough to print out these days
<jmercouris>
I don't pretend that english is suitable for all applications, but for programming certainly
<aeth>
Language specs are pretty much it
<loke>
jmercouris: How many languages with non-latin writing systems do oyu know?
<reinuseslisp>
this is like a 80-column discussion
<jmercouris>
loke: depends on your definition
<jmercouris>
what is a non-latin writing system?
<jmercouris>
my first language has a non latin alphabet
<loke>
jmercouris: You calearly haven't studies russian if you think that English is ideal for programming.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<loke>
jmercouris: Cyrillic is significantly better than Latin.
<jmercouris>
loke: Is it though? I don't think so
<jmercouris>
I speak Greek, and I don't for a second think it is more suited
<loke>
jmercouris: It has a much better mapping between sounds and symbols.
<jmercouris>
and the cyrillic alphabet is just modified Greek alphabet
<aeth>
loke: English is ideal for programming... because in UTF-8, it's (almost) entirely ASCII
<jmercouris>
the same is true in greek
<jmercouris>
any written word is literally pronouncable as written
red-dot has joined #lisp
<aeth>
loke: Spanish has a really good mapping between sounds and symbols and uses the Latin alphabet
<reinuseslisp>
así es
<loke>
jmercouris: Right. It's likely greek is even better. I don't want to discuss that since I don't speak a word of greek... (wait, no. I know one word: efharisto)
<aeth>
loke: The problem is that languages evolve and certain languages (especially English and French) don't like doing reforms to their spelling.
<aeth>
French preserves some spellings that last made sense in the time of *Latin*
<jmercouris>
I'm trying to remember, there is this southeast asian language where the spelling is completely unrelated to the pronouncation because it is just so old
<jmercouris>
maybe it is cambodian I am thinking of
<loke>
jmercouris: You're thinking of Tibetam
<loke>
Tibetan
<aeth>
I know a word of Greek. και
Guest37104 has quit [Read error: Connection timed out]
<reinuseslisp>
I know some dated names
<jmercouris>
aeth: lol nice, I'll teach you one more πατατα
fikka has joined #lisp
<jmercouris>
it means potato
<aeth>
I guessed
<aeth>
I can *read* Greek, I just don't know what it means.
<aeth>
I know the full alphabet
<beach>
To get back to the topic: Would anyone be interested in implementing the GraphViz algorithms in Common Lisp?
<beach>
I think it would be great to have such an implementation, and the algorithms are well documented.
<jmercouris>
aeth: alright, here's a string guess the following words: τηλέφωνο. σούπα. τηλεόραση. σουβλάκι. πόλη. πολύ.
<aeth>
telephono (telephone?)
yeticry has quit [Ping timeout: 255 seconds]
<aeth>
ugh, the new antialiasing is terrible for non-Latin so I might miss a few of these
<beach>
Shinmera has plans to implement some graph-layout algorithms, but for the specific case of flow charts.
<aeth>
soupa? soup?
<loke>
I jits thought of a good reason why cyrillic would be great for programming. There is as far as I know no confusables. In Latin, l and I look very similar.
<loke>
I can't think of any such issues in Russian
<aeth>
loke: l and I look very different if you use a monospace font designed by and for programmers
<loke>
You can't always control the font somehting is displayed in
<jmercouris>
aeth: yeah, that is: telephone, soup, tv, kebab (kind of), city, a lot
<aeth>
I will look like H turned on its side and l will look strange, but distinct from I and 1. In my case, it looks like a lambda but without the left / at the bottom
<beach>
Can we *please* try to get back on topic?
yeticry has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<loke>
И and л are very different.
<reinuseslisp>
Graphviz is what is used to represent inheritance in GTK+ (for example)?
<beach>
For example, in SICL and Clasp, there are many representations that are best understood in the form of a graphic representation (ASTs, HIR, MIR, generic-dispatch automata, etc). Currently, we generate a `dot' file, then turn that into PDF, then start a viewer, with varying degrees of success.
fikka has joined #lisp
<beach>
It would be great to just open a window with the graphic representation directly from the Common Lisp REPL.
nullman has quit [Ping timeout: 276 seconds]
<reinuseslisp>
maybe a shell call?
nullman has joined #lisp
jmercouris has quit [Ping timeout: 255 seconds]
<beach>
reinuseslisp: My long-term plan is to have as much software as possible in Common Lisp, so having a Common Lisp implementation of the GraphViz algorithms would be a step in the right direction.
<beach>
reinuseslisp: Also, if we do this in Common Lisp, then I could draw it in McCLIM so that the graphic elements would be presentations that are clickable.
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
jmercouris has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
<pjb>
Exercice for a lazy week end: write a CL reader macro to read expressions from such ascii-art representations.
<pjb>
If you've finished by this evening, follow up tomorrow (assuming it'll be a raining Sunday) with a reader macro to interpret ascii-art graph diagrams into state machine functions.
smurfrobot has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
pedh has joined #lisp
itruslove has quit [Ping timeout: 276 seconds]
loofee has quit [Remote host closed the connection]
smurfrobot has joined #lisp
loofee has joined #lisp
mo` has joined #lisp
<mo`>
Hi #stumpwm is not active so I will ask here
<mo`>
is there a way to prevent emacs from blocking stumpwm when I call emacsclient for the mode-line, is there a way to do a timeout for the stumpwm:run-shell-command function ?
sonologico has quit [Ping timeout: 260 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mo`>
I have (:eval (string-trim '(#\Newline #\") (stumpwm:run-shell-command "emacsclient -e \"(emms-track-description (emms-playlist-current-selected-track))\"" t))) for my mode-line
smurfrobot has quit [Ping timeout: 268 seconds]
loofee has quit [Remote host closed the connection]
<tazjin>
is there a built-in macro for using `(in-package)` in a limited scope? Something like `(with-package ...)`? Failing to google for it.
smurfrobot has quit [Remote host closed the connection]
<mfiano>
(let ((*package* ..)) ..) ?
<tazjin>
is that all in-package does? I guess that makes sense, thanks!
fikka has joined #lisp
<Shinmera>
It won't change the package of the symbols read in the expression however.
<Shinmera>
Because the reader needs to read a full expression, long before things are evaluated.
Karl_Dscc has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
<Shinmera>
So a "with-package" cannot possibly work, unless the package change should only influence package and read operations at run time.
pedh has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 255 seconds]
pedh has joined #lisp
smurfrobot has joined #lisp
damke_ has joined #lisp
fikka has joined #lisp
damke has quit [Ping timeout: 264 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
fikka has joined #lisp
krasnal has quit [Remote host closed the connection]
snits has joined #lisp
smurfrobot has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 276 seconds]
SaganMan has joined #lisp
loofee has quit [Remote host closed the connection]
pedh has quit [Quit: pedh]
fikka has joined #lisp
puchacz has joined #lisp
<Bike>
you could have a reader macro that does something similar. a couple implementations allow package::(form...) syntax which i think basically just binds *package*
<Bike>
but it's nonstandard
fikka has quit [Ping timeout: 256 seconds]
<puchacz>
hi, is it a good idea, guys? (setf (symbol-function 'alphanumericp) (symbol-function 'lispworks:unicode-alphanumericp))
<puchacz>
it works, for example now I can query (alphanumericp (code-char 322)) and it returns T
<puchacz>
without the "fix" it would incorrectly return false
<Bike>
oh, it's standard? you can't modify it then
<Bike>
kind of unfortunate that lispworks doesn't just use unicode alphanumericp as regular alphanumericp
<phoe>
"alphabetic n., adj. 1. adj. (of a character) being one of the standard characters A through Z or a through z, or being any implementation-defined character that has case, or being some other graphic character defined by the implementation to be alphabetic[1]. "
random-nick has quit [Remote host closed the connection]
<puchacz>
well, 322 is a letter, "this is what sbcl says" (TM)
<Bike>
"LATIN SMALL LETTER L WITH STROKE" sounds pretty alphabetic, it's true.
<puchacz>
so sbcl falls into "or being some other graphic character"
<phoe>
this actually sounds like an inconsistency in LispWorks.
<Bike>
it sounds like lispworks restricts alphanumericp to be only ascii or something
<phoe>
yep.
<Bike>
maybe for some weird backwards compatibility reason
pedh has joined #lisp
<phoe>
(setf (symbol-function 'alphanumericp) ...) is undefined behaviour though.
<Bike>
oh, i see unicode-alphanumericp has an extra keyword argument
<Shinmera>
Never rely on CL's character set tests if you're working against any kind of specification.
JenElizabeth has joined #lisp
<Shinmera>
It's almost never what you want.
<phoe>
I'd rather go for #+lispworks unicode-alphanumericp #-lispworks alphanumericp if anything
<puchacz>
yeah. but cl-ppcre fails to recognise some letters because of this (it uses alphanumeric-p), and hell knows what else does not work with unicode
JenElizabeth has quit [Remote host closed the connection]
<puchacz>
so instead of rewriting the whole quicklisp, I wanted to try this hack
random-nick has joined #lisp
<puchacz>
(setf (symbol-function 'alphanumericp) ...) may be undefined but it works under current LW
fikka has joined #lisp
<puchacz>
however it asks me to continue (it uses restart)
<puchacz>
how can I always use restart and put it into .lispworks file pls?
<Bike>
does ppcre recognize it? i can imagine that function being inlined or suchlike
<Bike>
you can use a restart automatically with handler-bind
<Bike>
also, you should consider asking lispworks support about this
<puchacz>
if I put it into .lispworks and remove my .cache/common-lisp, it should recompile cl-ppcre with new function
<phoe>
puchacz: either ask lispworks for a workaround or file a bug on CL-PPCRE asking for special-casing LispWorks.
<Bike>
i kind of thought ppcre already special cased lispworks by using some regex engine lispworks provides
<puchacz>
so if I re-assign these functions and recompile, do some testing, it should work
<puchacz>
"like sbcl" ;)
<Bike>
okay. just be aware that this reassignment is undefined behavior and lispworks could change it without warning (though they're probably not that mean)
<puchacz>
of course. if they do, I will kindly ask them to restore or merge these functions :-)
fikka has quit [Ping timeout: 256 seconds]
<puchacz>
thanks :)
<phoe>
puchacz: you can link their answers to a ticket on CL-PPCRE.
<phoe>
and possibly write a LispWorks-specific test case in CL-PPCRE's unit test suite to make sure it works and keeps on working later.
<puchacz>
ok - I will have a look. test case is simple, anything like this (scan "\\w" (format nil "~a" (code-char 322)))
<puchacz>
either gives match (correct) or gives no match (incorrect)
<puchacz>
by the way, I thought I could coerce character to string
<|3b|>
does (char-upcase (code-char 322)) return a different character?
<Bike>
the ppcre docs already include a note that \w has different behavior by implementation on superascii characters, so they might not care
<phoe>
...this is interesting
<puchacz>
|3b|no. another problem
<phoe>
"or being any implementation-defined character that has case..." - so says the spec.
<|3b|>
nah, no problem in that case
<phoe>
So if unicode characters have case, they *should* be alphabetic.
<Bike>
no lowercase numbers allowed
<Bike>
phoe: if char-upcase doesn't work, as reported, it's still consistent
<Bike>
just with a kind of daft idea of "case"
<phoe>
oh, it doesn't work.
<|3b|>
they defined their implementation characters to not have CL case, so consistent with not being alphabetic
<phoe>
then LispWorks is weird with its unicode support.
<puchacz>
well, (char-upcase (code-char 322)) returns different character on SBCL
<puchacz>
#\LATIN_CAPITAL_LETTER_L_WITH_STROKE
<Bike>
because on sbcl the functions are all unicode consistent
fikka has joined #lisp
<Bike>
on lispworks they're only good for whatever more basic repertoire
<puchacz>
I will try to overwrite functions and see how it works
<puchacz>
for what I understand, CL should be able to support almost all unicode, except for cases where a small letter has more than one capital equivalents, or a capital letter more than one small equivalents
<|3b|>
yeah, both seem like reasonable choices to me... sbcl gives you something that probably works well enough to trick you into filling over some edge case, while lw makes you do the extra work to start with (assuming the other API would actually handle the edge cases better)
<puchacz>
|3b| - why trick me?
<Bike>
there's stuff like unicode characters that don't round trip through case conversions, i think
<|3b|>
puchacz: ok, maybe just trick me (and other people who don't use those characters with odd up/downcase rules) :)
<puchacz>
I thought SBCL philosophy is to treat unicode incompatibilities as bugs, except for these roundtrips myself and Bike mentioned
<Bike>
"There are different case mappings for different locales" okay yeah
<puchacz>
Bike: what is the quote from? I am interested in "proper" unicode support
<Bike>
"case mapping can change the number of code points and/or code units of a string," "is context-sensitive (a character in the input string may map differently depending on surrounding characters)" jesus
<Bike>
some library. let me find the actual unicode guidance
<puchacz>
about changing of code points, it is true even for German
<puchacz>
heh. Lispworks has no unicode char-upcase :(
<puchacz>
I guess I can write my own upcase / downcase :(
<puchacz>
exporting data from SBCL
<puchacz>
O-M-G
<puchacz>
can I iterate through all characters...?
<Shinmera>
Sure, will just take a while
<puchacz>
Shinmera: only once on SBCL, to generate a function for LW
<puchacz>
how do I do it pls?
<|3b|>
cl-unicode seems to have some functions for case
<Bike>
iterate up to char-code-limit, maybe?
dddddd has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<Bike>
and then define your upcase as (aref very-long-vector (char-code char)), i guess
<puchacz>
cl-unicode:uppercase-mapping is what I wanted
<puchacz>
just need to rename standard CL function
orivej_ has joined #lisp
<porky11>
when I use hunchentoot, can I get the uri as variable instead of automatically dispatching?
superjudge is now known as _mjl
dddddd has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
<Shinmera>
porky11: You can add a function to hunchentoot:*dispatch-table*. It should get the request object as an argument, from which you can get the URI.
fikka has quit [Ping timeout: 255 seconds]
<puchacz>
FYI: this is working hands-off: (let ((lispworks:*handle-warn-on-redefinition* :quiet)) (setf (symbol-function 'alphanumericp) (symbol-function 'lispworks:unicode-alphanumericp)))
<Bike>
and there's no more particular warning for redefining a cl function? huh.
<Shinmera>
Overriding existing bindings in the CL package is ub though, so
<puchacz>
Shinmera: any dangers you see?
<Shinmera>
Well with ub anything goes.
<puchacz>
what is ub
<Shinmera>
undefined behaviour
<Bike>
basically just what i said, lispworks can change the behavior with no warning.
<puchacz>
I just hope unicode-char-equal does not fall back to char-equal internally :)
<Shinmera>
Could mean it steals your credit card information
<puchacz>
but actually what it does internally does not matter, as it is already compiled
<puchacz>
am I right?
<Shinmera>
Some internal machinery could depend on the previous behaviour of the function and then do very bad and hard to debug things if you change it
<Bike>
what was does internally
<Shinmera>
So no, you are wrong.
nsrahmad has joined #lisp
fikka has joined #lisp
<puchacz>
grep/find/replace textually in quicklisp....?
<Shinmera>
Submit PRs to the affected systems to special-case LW behaviour.
<puchacz>
slime who-calls shows functions usage - unless somebody passes it as 'alphanumericp instead of #'alphanumericp, so again it is not reliable way to find
fikka has quit [Ping timeout: 256 seconds]
varjag has joined #lisp
<pjb>
puchacz: there are also the case where one lower case letter is upcased to two uppercase letters.
<pjb>
puchacz: and also notice that this capitalization may change with time!
<puchacz>
pjb: yes, but I can't do anything about that. exactly - the German example I mentioned
<puchacz>
pjb: I want as good multilingual support as I can get, but if I can't, well, I skip this case
drewc_ has joined #lisp
<pjb>
puchacz: well then first skip CL functions. Use packages such as babel etc.
<pjb>
And be prepared to implement your own.
<puchacz>
pjb: I can use them :) it is the rest of quicklisp and lisp itself that might not play well
drewc has quit [Ping timeout: 256 seconds]
<pjb>
And people rarely think about this history problem…
<pjb>
Things change!
<pjb>
And we have to deal with objects that have been created or defined in the past, that still exist and need to be processed now (and in the future).
<pjb>
So either the program remains neutral (don't try to process the data fields), or it has to include a lot of complexity.
fikka has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
Karl_Dscc has quit [Remote host closed the connection]
loofee has joined #lisp
loofee has quit [Remote host closed the connection]
nydel has quit [Read error: Connection reset by peer]
<puchacz>
how can I coerce string designator to a string pls?
<shrdlu68>
Pretty much. I have nothing against invertebrates, though.
fikka has joined #lisp
smurfrobot has quit [Remote host closed the connection]
spoken-tales has quit [Ping timeout: 255 seconds]
<flip214>
fiddlerwoaroof_: well, I can argue that the northbridge-southbridge connection connects the "thinking" parts with the "change the environment" parts, so there's not that much difference
oleo has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<Bike>
other chordates in the room look away in disgust
nowhere_man has quit [Ping timeout: 248 seconds]
dieggsy has joined #lisp
fikka has joined #lisp
nowhere_man has joined #lisp
BitPuffin has quit [Remote host closed the connection]
zaquest has joined #lisp
_mjl has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 255 seconds]
zaquest_ has quit [Read error: Connection reset by peer]
yomanwazap has joined #lisp
fikka has joined #lisp
<yomanwazap>
I had a dream last night
<yomanwazap>
It had a green alien with multiple eyes in it that was holding a sign calling "Lern Lisp" with his trunk.
<yomanwazap>
Is it a sign?
<fiddlerwoaroof_>
Yes
<yomanwazap>
I would be blessed by their holliness (eval) now?
<yomanwazap>
On the path of (car)?
shifty has quit [Ping timeout: 276 seconds]
smasta has joined #lisp
Ven`` has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<phoe>
yomanwazap: (eval) is an error
<phoe>
so is (car)
<phoe>
wake up, this is a fake Lisp alien
<yomanwazap>
I knew I were misguided by the forces of eval i mean evil
<phoe>
EVAL expects an argument, so does CAR
<yomanwazap>
I have commied a sacrilage!
<yomanwazap>
*commited
<yomanwazap>
I deserve a flogging with all my parenthesis
* phoe
flogs yomanwazap all the way to #lispcafe
* phoe
then flogs self there as well
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fikka has joined #lisp
spoken-tales has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo has quit [Quit: Leaving]
raynold has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
oleo2 has joined #lisp
<tetrachlorides>
"I'd like to learn Russian but I have no time to memorize this funny alphabet." - Someone wrote a blog post complaining about that remark. :/
<Bike>
wrong channel?
smurfrobot has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
<tetrachlorides>
the original commenter was on #lisp, and he had a point too.
<tazjin>
Bike: there was some very brief talk about eastern european languages yesterday, maybe tetrachlorides is referring to that.
<Bike>
i see.
<Bike>
i think learning the alphabet is probably not the longest time investment of learning any language?
<tazjin>
unless you're talking about mandarin ...
<Bike>
well technically han characters don't constitute an "alphabet", therefore
<tazjin>
tetrachlorides: do you have a link to that post? I'm not sure if you're referring to my remark about learning Russian (which wasn't about the alphabet) but it sounds interesting anyways
<phoe>
the lack of a complete and featureful Lisp editor that isn't emacs or vi has been a topic of many debates on #lisp so far
<yomanwazap>
since when vi is a lisp editor? :P
<phoe>
yomanwazap: slimv, vlime.
<tazjin>
evil ;-)
<tetrachlorides>
vi has an "-l" option for lisp mode, parenthesis matching
<phoe>
plugin for atom is incomplete and buggy, plugins for other editors don't exist afaik. I remember that jasom has been working on a geany plugin AFAIR
<tazjin>
has paredit ever been fully ported to anything else?
TCZ has joined #lisp
<phoe>
I think that Clojure has an IDEA plugin with paredit.
<phoe>
Surprisingly.
pagnol has joined #lisp
nirved has quit [Quit: Leaving]
Oladon has joined #lisp
<Shinmera>
tetrachlorides: I don't know if I want to take someone to heart that unironically calls themselves "a darn good web developer" on their website.
<yomanwazap>
If he develops those webpages in assembly he probably is
<yomanwazap>
or she
<yomanwazap>
or they
<yomanwazap>
or whatever
<shka>
i don't understand the point
<tetrachlorides>
good point. emacs is a pain at first but a cheat sheet would do
<Shinmera>
Portacle has a cheat sheet
<Shinmera>
included and always open
<yomanwazap>
to think havinf cheat sheets was shamed during all my school years
<tetrachlorides>
i actually couldn't figure out how to install add-on...
ckonstanski has joined #lisp
TCZ has quit [Quit: Leaving]
red-dot has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
fikka has quit [Ping timeout: 256 seconds]
bms_ has joined #lisp
fikka has joined #lisp
<tetrachlorides>
hey @dmiles is here in #lisp! tell us how you ported lisp500 to prolog
Ven`` has joined #lisp
<mo`>
is there a way to prevent emacs from blocking stumpwm when I call emacsclient for the mode-line, is there a way to do a timeout for the stumpwm:run-shell-command function ?
<dmiles>
Hi tetrachlorides, yup I am #lisp and ##prolog all the time.
<mo`>
tetrachlorides: thank you. someone replied to me on #stumpwm (which is not very active)
<mo`>
tetrachlorides: as he said the mode-line code is synchronous so I have to spawn a new thread to solve this I think
smurfrobot has joined #lisp
<dmiles>
Well I switched from Lisp500 do to problems with it's definitions of things liek incf/rotatef and it was not fully Common Lisp
<tetrachlorides>
dmiles: as far as i can tell lisp500 used integer tags on "iref" boxed objects, but init500.lisp extends that with bit twiddling! that seems like cheating
<dmiles>
so now i am using a hybrid of ECL, SBCL, ABCL
<dmiles>
Well I get to cheat quite a bit as well .. i use a Object/Prop/Value store
<tetrachlorides>
i saw wam-cl had a full object model and everything and was impressed! but there was some other prolog/lisp something in there... *shrug*
<dmiles>
in the asserta database (normal to prolog) but for allow modification of Conses and other objects i use the Prolog blackboard
QualityAddict has quit [Ping timeout: 276 seconds]
<tetrachlorides>
i keep daydreaming of replacing iref integer tags with a pointer to a slot-descriptor table of some sort lol
<dmiles>
yeah.. the object system stuff was actually the easiest to write
<dmiles>
say easier than the immediate value system
<tetrachlorides>
that way if you invent a new builtin type, the garbage collector instantly knows how to find internal references ;)
<dmiles>
well one modification i been making is that for every "place" i am making a base-porter with is a refernce to a prolog compound .. then also an offset that i can use getarg/3 , b_starg/3 or nb_setarg/3
wxie has joined #lisp
<dmiles>
base-porter/base-pointer
<dmiles>
how i do GC, yes does work with this notion of compound+offset
smurfrobot has quit [Ping timeout: 256 seconds]
<dmiles>
though the compound+offset sometimes adds an extra indirection when i use it for immediate values
<dmiles>
so i been putting off going to compound+offset fully
<tetrachlorides>
is there a good way to do builtin function/interpreted function?
<dmiles>
right now i take the rought if one adds an interpreted function i compile it .. but i might keep the original source with it and let the user pretend its interpreted until they compile
<dmiles>
route*
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phoe>
borei: what is the error message? Use pastebin if necessary.
<borei>
ADD (2)> takes 2 required arguments; was asked to find a method with specializers (MATRIX-R)
<borei>
it's only one line
shka has quit [Ping timeout: 255 seconds]
<tetrachlorides>
i hate how you can iref a symbol and crash the boot interpreter because the function pointer segfaults
<phoe>
borei: obviously your defgeneric accepts two arguments, not one.
<dmiles>
oh though in this case i treate macros as special functions
<borei>
even if it with &rest ?
asarch has quit [Quit: Leaving]
<tetrachlorides>
so, i thought instead of overlaying function pointer on a cons, turn the car of cons into a tag!
<tetrachlorides>
been too lazy to try it yet... :/
<dmiles>
(i mean i suppose the differnce between an interpred function and a compiled function for me is whether or not i have used macroexpand on the body of the function)
<phoe>
Try (fmakunbound 'add) and reevaulating the DEFGENERIC.
<dmiles>
tetrachlorides: you are using lisp500 right?
<dmiles>
tetrachlorides: what would be so awesome is if it was made to be a true CL
<borei>
ohh, ic ic
<tetrachlorides>
i play with it sometimes but hard to make sense of the whole thing. lisp800 helps
<dmiles>
oh is 800 slightly fuller than lisp500 ?
<borei>
need to reload asdf system completely there will be a lot of such
<dmiles>
I had assumed it was just slightly more comment
<tetrachlorides>
it's documented to a degree but not fully...
fikka has quit [Ping timeout: 265 seconds]
<dmiles>
i wonder if incf doent double evalute places
spoken-tales has quit [Remote host closed the connection]
<dmiles>
oops i meant (incf (aref foo (incf i)) 3) will increment i twice
spoken-tales has joined #lisp
* dmiles
didnt need to add that 3
<borei>
odd, reloaded everything - no luck
<dmiles>
it be a nice project to have a lisp500/800/5000 that used ideal setf expanders and real CLOS (like from PCL)
<phoe>
borei: specifically, if you already have methods on a GF, you can't change the GF's arity.
<phoe>
(defgeneric foo (bar baz)) (defmethod foo (bar baz) 3) ;; at this point (defgeneric foo (bar baz quux)) is an error.
<borei>
you mean that i have situation that defmethod was executed first ?
<dmiles>
though by the time i am done is sorta expect to have that but it'll be a hodgepodge of ECL,SBCL,ABCL,GCL,SICL etc
<dmiles>
( all in one giant file called lisp5000.lisp :P )
<borei>
seems like i found
<tetrachlorides>
i'm kind of a lisp newbie though interested, setf expanders?
<aeth>
dmiles: GCL?
<borei>
i have one more defmethod add with explicit 2 args
<aeth>
dmiles: The ones that appear to be alive (ish) are SBCL, CCL, ECL, ABCL, Clasp, CLISP, CMUCL, MKCL
<dmiles>
tetrachlorides: setf expanders is sort of a institionalized hack to ease the use of trampolines (host C functions) on places
<dmiles>
aeth: why i liked GCL is it isnt as alive and sometimes straighter forward
oleo has joined #lisp
<dmiles>
( aeth: since i am many pilfering lisp code )
harmaahylje has quit [Quit: leaving]
oleo2 has quit [Ping timeout: 255 seconds]
<aeth>
Careful, not every license is compatible with the GPL
<dmiles>
( GCL claims to be well moderated ECL but i dont think its better than ECL )
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Shinmera>
GCL isn't even ANSI compliant so
<Shinmera>
It's one of the worst choices out there, really
<dmiles>
Shinmera: mainly GCL is good to find a defmacro that didnt use loop
<dmiles>
but yes a poor choice to do anything other than cherry pick a handfull of functiuons
<aeth>
dmiles: loop is just so convenient for "loop ... collect ..." or "loop ... append ..." when generating lists
<aeth>
You can go without using loop, but you're probably going to get something that's both slower and less readable
fikka has joined #lisp
<aeth>
And I say this as someone who usually avoids loop
<dmiles>
*nod* well my thing agaist loop is when sometimes it was totally done by someone who looks for every reason to use loop
<aeth>
I've seen some loops that are essentially 20+ lines with no parentheses in sight
<aeth>
scary things
<dmiles>
but also of course my avoidance is sometimes it makes it harder to decompile my code afterwards.. since prolog vars and not be written more than once i have to make lots of helpers
<tetrachlorides>
i was researching lisp500 history earlier, i can't find when it was first shared (on irc?) your name comes up as interested in it
<dmiles>
"avoidance is sometimes it makes it harder to decompile my code afterwards.." / "sinc eprolog variables once a value is stored cannot be changed"
fikka has quit [Ping timeout: 276 seconds]
<dmiles>
tetrachlorides: yeah every once i a while i ask if there is a minimalist primordial CL someplace other than lisp500 :P
mariari has joined #lisp
<tetrachlorides>
CL is pretty complicated so hard to figure out what elements required :/
<rme>
By modern standards, CL is tiny, but it's still a big language.
<dmiles>
SICL is is close to that at least according to everyone, though as beach once explained its a bit over circular to be considered that
<Shinmera>
SICL needs a CL to run, so
<dmiles>
yeah i wish that there was some 185 or some 387 or so trampolines that get us all the way to the level of doing what SBCL does
fikka has joined #lisp
<dmiles>
(emphases on *wish)
smurfrobot has joined #lisp
puchacz has quit [Quit: Konversation terminated!]
<aeth>
You could build CL from a subset of CL, ignoring loop and CLOS and format and other things that seem mostly added on
<dmiles>
that wouild allow hostlang.[c|pl|js|java|hs|scala|etc] + libs.lsip
<aeth>
(Although ignoring loop in macros would make it harder to generate lists because, as I said, collect is pretty much it)
<Shinmera>
aeth: Yeah but beach discovered that doing so is immensely painful and stopped.
<aeth>
Shinmera: I think it probably depends on your programming style
<tetrachlorides>
should NIL be a NULL pointer, or a symbol, or a special cons cell with both halves pointing to self?
<Shinmera>
Bootstrapping is not going to make any code look pretty
<Shinmera>
Or make it in any way easy to maintain.
<aeth>
Shinmera: It's easy to avoid FORMAT and CLOS just in normal Lisp
<aeth>
CLOS offers a lot of nice things, of course. And format is more concise than alternatives.
smurfrobot has quit [Ping timeout: 256 seconds]
<aeth>
You could probably come up with a macro that just does the subset of loop that's hard to do elsewhere (e.g. collect)
<Shinmera>
aeth: Get back to me when you've written a system as large and involved as CL
fikka has quit [Ping timeout: 256 seconds]
<phoe>
CLHS somewhere has a list of all symbols exported from the CL package. Does anyone know where exactly to find it?
<aeth>
Shinmera: I'm writing a game engine, it's extremely large and involved.
<dmiles>
tetrachlorides: historically everyone jsut loves to comendeer NIL to mean lots of things.. NULL,0,:FALSE .. about 70% of their way in they decide it was a bad idea
<Shinmera>
aeth: I'm aware, so am I. It still doesn't compare to a CL implementation.
<dmiles>
tetrachlorides: but felt soo good their first 69%
damke has joined #lisp
<rme>
But there are tons of CL implementations to build on. What's the benefit of implementing a limited subset of CL for bootstrapping given that you could use an existing CL for bootstrapping?
<aeth>
Shinmera: I don't use format, I use CLOS in ways that make things simpler but could be avoided if I had to, and I only use loop when alternatives are much uglier (primarily loop collect)
<aeth>
Well, I think I might use format in a few places that don't matter
<pjb>
When you write C compiler, you don't bootstrap them with B anymore!
<Shinmera>
aeth: Good for you
<phoe>
(incf Shinmera)
<aeth>
Shinmera: I don't think a game engine is easier than a language implementation because a game engine has to implement half of a language, several times over, in order to be efficient.
<aeth>
Although, yes, I'm only about 5% in
<Shinmera>
Whatever you say
damke_ has quit [Ping timeout: 264 seconds]
<Xach>
how embarrassing!
quazimodo has joined #lisp
* Xach
has said multiple times that there are 976 symbols, though he should have remembered it as 978 because it is massachusetts's second area code
<aeth>
One day, kids will learn all 978 symbols in school.
<Shinmera>
It's less than the standard 2'000 Kanji for Japanese.
<dmiles>
oops eralier i said 378 i meant 978
fikka has joined #lisp
<aeth>
pjb: I don't think C is a good example because of how different C is from CL.
<Xach>
I think it would be interesting to be a lisp company with 978-796-2657 as the number
<Xach>
978-SYM-BOLS
<rme>
heh
<dmiles>
hehe
<tetrachlorides>
maybe NULL pointers could redirect to symbol NIL... :/
MrBismuth has quit [Ping timeout: 276 seconds]
<aeth>
Xach: You might be able to get that with Google Voice
<aeth>
(if Google Voice still lets you pick a number)
<Shinmera>
tetrachlorides: Pointers are a separate concept.
<Shinmera>
tetrachlorides: They should have their own type.
<Xach>
Hmm, it's a standard exchange in Ayer, MA
<flip214>
+978 is not allocated yet
<flip214>
+978 – unassigned – originally assigned to Dubai, now covered under 971
<flip214>
perhaps you could get that from UAE
<Xach>
flip214: I am speaking only of the united states in this case
MrBusiness has joined #lisp
<aeth>
flip214: Xach is talking about 1-978-796-2657
<flip214>
I understood as much, but why not think globally?
<aeth>
So what you're saying is claim Antarctica for Lisp and take the country code 978?
<aeth>
Only problem is that by treaty the US or the Soviet Union have the right to claim parts of Antarctica, so if you build a town there the US or Russia might try to claim it.
<flip214>
well, there are quite a few small islands, one of them might be cheaper
<aeth>
Every single island is claimed by a country
<dmiles>
rme: the reason i am not using an existing CL impl to bootstrap is that i dont compile to x86
<aeth>
And if you build an island, it will be claimed by the nearest country
<flip214>
well, wait a bit, perhaps Catalan needs a new phone code
<flip214>
aeth: Mars has no phone number registry yet!
<aeth>
If #lisp officially backs Catalonian independence, can Common Lisp be the official programming language of Catalonia? And does that mean we'd need to do the whole Lisp localization thing where Catalan words are used instead of English words in symbols?
smurfrobot has joined #lisp
<flip214>
aeth: top-level-domains can be bought nowadays, so I guess that a (now unused) phone prefix should be available too
<dmiles>
rme: i sorta wish that there was a compiler that translated lisp to say javascript and had no missing parts
<dmiles>
rme: (i mentioning that since even with existing lisp systems that still cannot be done)
<dmiles>
aeth: *nod* its the missing parts thang
fikka has joined #lisp
<dmiles>
i am not sure if in the end i will have actualyl acomplished things without totally cheating as much as possible
smurfrobot has quit [Ping timeout: 276 seconds]
<rme>
dmiles: Your new implementation (written using CL running in the bootstrapping implementation) can generate whatever code it wants. It doesn't matter if the bootstrapping CL generates x86 or 68000 code.
<dmiles>
though technically the source of the wam_cl could be able to be translated from prolog to lisp.. meaning i could then gernate my system on SBCL
<dmiles>
rme: so you might be right
fikka has quit [Ping timeout: 255 seconds]
<dmiles>
oh, the benefit of implementing a limited subset of CL for bootstrapping is that you your initial subset (say hosted as python) would allow the rest of CL to be a translation of that python code
<aeth>
dmiles: counterargument time
<dmiles>
(so if you can compile your python code you can compile trhe rest)
<aeth>
dmiles: the disadvantage of implementing a small subset for portability in targeting very different platforms is that the way to write efficient code varies wildly depending on the platforms, especially if the platforms are so different (like source-to-source compilation between languages)
<aeth>
Even efficient CL is written completely differently than efficient Emacs Lisp
fikka has joined #lisp
<aeth>
Almost all of my CL code is "portable", but it's not really portable if it's unusably slow in many environments where it could theoretically run
<aeth>
And I'm not writing things like CLOS
jmercouris has joined #lisp
<dmiles>
aeth: yeah anohte rexample of what you are saying.. is actualy i run collector loops must slower than i run compleetly recursive function spiting out (values .. ) as a collector
<jmercouris>
how do you guys feel about (defparameter) setting performing calculations in a top-level form?
<jmercouris>
like (defparamaeter fish (calculate-fish-default-value))
<jmercouris>
is there a valid reason to not do it?
<aeth>
Threads.
<jmercouris>
aeth: Can you elaborate what you mean?
<aeth>
defparameter and defvar might not behave as you think they should when threads are involved
<jmercouris>
What if none of my defparameters depend on any others?
<jmercouris>
they only depend on one function that has a constant return value
<aeth>
Have you tried using alexandria:define-constant?
<jmercouris>
aeth: I have not, why might I use that instead?
<aeth>
If it's really a constant
<rme>
why write a few lines of code when you can import a library? it's the modern programming way!
<jmercouris>
aeth: It is a constant, but I'd like the user to be able to change it, so it's kind of not a constant...
<jmercouris>
basically the defparameters represent configuration file paths
<jmercouris>
and 99.99% of the time, the user will not change them after startup
<yomanwazap>
what would be an effect of taking LSD and browsing LISP code? Dancing parens?
<aeth>
rme: some libraries don't count because you probably are indirectly using them even if you have just one dependency
<jmercouris>
but if for some strange reason, a user wishes to, they might
<jmercouris>
I believe one of my dependencies is already pulling in alexendria
fikka has quit [Ping timeout: 276 seconds]
<jmercouris>
I only have like 3 dependences or so
<phoe>
yomanwazap: #lispcafe please
<jmercouris>
I take that back, I have 8 dependencies
quazimodo has quit [Ping timeout: 256 seconds]
yomanwazap has left #lisp [#lisp]
marusich has joined #lisp
<jmercouris>
aeth: Anyways, do you think I will still encounter issues with threads if it is as I described?
<aeth>
jmercouris: where is this value used?
<jmercouris>
aeth: The value is used anywhere a function requires access to a configuration file
<aeth>
jmercouris: and, yes, I wouldn't rely on a user setting *foo* to actually be realized in another thread
<jmercouris>
like I said 99% of times at startup it will be set, and that will be it
<aeth>
what's the type of this value?
<jmercouris>
aeth: it is a path
<jmercouris>
let me just link you to github so you can see
<aeth>
Personally, I'd put them in a struct or object and would not directly expose them, so you can check that the proposed new value is valid
QualityAddict has joined #lisp
fikka has joined #lisp
<aeth>
That has the added advantage that if defparameter doesn't work, you can change where they're stored
<jmercouris>
hmm, sure, but I'd like to give my users the opportunity to mess things up, it is an emacsy like program after all
<jmercouris>
I would be limiting their freedom in a way
<jmercouris>
I can always change it in the future
<aeth>
Yeah, but later on you could e.g. create a closure
<jmercouris>
I mean we are not at even version 1.0 yet, so people should not expect their configs to work forever
<aeth>
Nothing's stopping you from putting a let over defuns
marusich has quit [Ping timeout: 276 seconds]
<jmercouris>
aeth: true true... instead of solutions, just more questions
<rme>
just do it. you are making a huge fuss over a totally trivial problem.
<aeth>
jmercouris: If you just expose an accessor (calling it returns the value, setf'ing it changes the value) then you have a lot more flexibility with the API and can change it to be pretty much anything
<jmercouris>
rme: The way I proposed?
<aeth>
I love accessors
<rme>
yeah, just stick it in there and carry on.
<aeth>
jmercouris: but I would personally test modifying it at runtime in another thread, if your browser runs in a background thread from SLIME like a lot of graphical CL apps do
<jmercouris>
ok, your approval is good enough for me :D
<jmercouris>
I'm only single threaded at the moment
<aeth>
ah
<jmercouris>
when that time comes, that will be a big change, and the UI will live in its own thread
<jmercouris>
but we are not yet there
<aeth>
well, don't overcomplicate it, then
<jmercouris>
there's a lot of work to be done first in the internal API
<aeth>
Just make it clear that you might have to change that part if you go multithreaded
<aeth>
imo
<jmercouris>
I'll make a note, yes
<jmercouris>
thank you for explaining the pitfalls
<aeth>
I should have asked first, I just assumed your web browser would be multithreaded
<jmercouris>
I'm sure you've saved future me a ton of time :D
<jmercouris>
it is asynchronous, but not yet multithreaded
<jmercouris>
the transition will hopefully be not too painful
fikka has quit [Ping timeout: 255 seconds]
bgardner has quit [Read error: Connection reset by peer]