red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
akoana has left #lisp ["Leaving"]
lxbarbos` has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
CEnnis91 has quit [Quit: Connection closed for inactivity]
superkumasan has quit [Ping timeout: 245 seconds]
EvW has quit [Ping timeout: 250 seconds]
bitmapper has quit [Ping timeout: 240 seconds]
vms14 has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
ebzzry has quit [Ping timeout: 244 seconds]
adolby has joined #lisp
mindCrime_ has joined #lisp
CEnnis91 has joined #lisp
learning has quit [Remote host closed the connection]
semz has quit [Ping timeout: 245 seconds]
dddddd has quit [Remote host closed the connection]
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
mathrick has quit [Ping timeout: 245 seconds]
antonv has quit [Ping timeout: 276 seconds]
jack-thomas has quit [Remote host closed the connection]
mathrick has joined #lisp
jeosol has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 245 seconds]
datajerk has quit [Ping timeout: 265 seconds]
datajerk has joined #lisp
ltriant has quit [Ping timeout: 265 seconds]
ltriant has joined #lisp
datajerk has quit [Remote host closed the connection]
libertyprime has joined #lisp
mathrick has quit [Ping timeout: 264 seconds]
shangul has joined #lisp
datajerk has joined #lisp
_whitelogger has joined #lisp
Oladon has joined #lisp
ltriant has quit [Ping timeout: 265 seconds]
ltriant has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
ltriant has quit [Ping timeout: 265 seconds]
ltriant has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
refpga has joined #lisp
refpga has quit [Client Quit]
refpga has joined #lisp
abbe has quit [Quit: “Everytime that we are together, it's always estatically palpitating!”]
abbe has joined #lisp
doublex has joined #lisp
nanozz has joined #lisp
nanoz has quit [Ping timeout: 265 seconds]
<beach>
Good morning everyone!
<ebrasca>
beach: Hi!
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
copec has quit [Ping timeout: 246 seconds]
datajerk has quit [Ping timeout: 245 seconds]
refpga has quit [Read error: Connection reset by peer]
datajerk has joined #lisp
refpga has joined #lisp
copec has joined #lisp
Bike has quit [Quit: Lost terminal]
<LdBeth>
good eve
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
mindCrime_ has quit [Ping timeout: 264 seconds]
quazimodo has quit [Read error: Connection reset by peer]
sindan has quit [Remote host closed the connection]
sindan has joined #lisp
sellout-1 has joined #lisp
sellout- has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
quazimodo has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
<beach>
ebrasca: Are you saying McCLIM i slow on Mezzano? I don't think McCLIM is particularly slow in itself. Do you think it might have to do with the fact that CLIM uses a lot of generic functions? Perhaps generic dispatch is not optimized in the Mezzano compiler?
jeosol has joined #lisp
<jeosol>
good morning
<beach>
Hello jeosol.
<jeosol>
Doing great.
<beach>
Either way I think that it might be an over-generalization to say (as vms14 dis) that "clim is slow".
Lord_of_Life has joined #lisp
<beach>
It sounds like what we used to hear (i.e. "Lisp is slow") from people who had no desire to try out Lisp, and who needed an excuse to justify avoiding it.
<jeosol>
CLOS question: is there a way to write a defgeneric that always takes an instance, but occasionally, I want to be able to call the function without arguments -- this case calls another defmethod with globally bound *object*.
<jeosol>
I had one method (defmethod func-name ((obj (eql nil))) ..) but that means I have to do (func-name nil)
<beach>
jeosol: No. What you do in those cases is you define an ordinary function with an optional parameter, and then you call the generic function with the value of that parameter.
<jeosol>
beach: thanks for that
<beach>
Sure. Pretty standard CLOS technique.
<beach>
In SICL, I do that for all the standard functions that take an optional environment parameter, for instance.
<beach>
They just trampoline to a generic function that has a required environment parameter.
<beach>
That way, I can specialize on the class of the optional value.
<LdBeth>
A common pattern witnessed
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
<jeosol>
Sweet. made the change. Interface much simpler and cleaner.
<beach>
Great!
<jeosol>
Will have to reward parts of my functions to use that. So I reduce my need to type the arguments when I am testing.
abhixec has quit [Quit: leaving]
<jeosol>
I read a copy of Object-Oriented Programming: The CLOS Perspective (by Andreas Paepcke). The application examples had some CLOS patterns. Anyone know of this book. Not as common as Sonja's
<beach>
I think I have it somewhere on my shelves.
<jeosol>
It has black cover
orivej has joined #lisp
<beach>
Hmm, maybe not. I can't find it right now.
<beach>
I could have lent it to someone.
refpga has quit [Read error: Connection reset by peer]
<LdBeth>
It’s a series of articles contributed by multiple authors
<beach>
Doesn't ring a bell. Maybe I am confusing it with a French book "Objectif: CLOS".
<jeosol>
That's right LdBeth
Inline has quit [Quit: Leaving]
<beach>
I didn't really "get" CLOS until I read the CLIM specification.
<jeosol>
Chapter 1: An Introduction to CLOS by Linda G. DeMichiel; Chapter 2: CLOS in Context: The Shape of the Design Space by Daniel G. Bobrow, Richard P. Gabriel, and Jon L. White
<beach>
Experienced people.
vlatkoB has joined #lisp
<jeosol>
Chapter 3: User-Level Language Crafting: Introducing the CLOS Metaobject Protocol by Andreas Paepcke. Chapter 4: Metaobject Protocols: Why We Want Them and What Else They Can Do by Gregor Kiczales, J. Michaeal Ashley ... Bobrow
<beach>
I don't think I have read it, so I probably don't own it. I should order a copy.
<jeosol>
I haven't read everything, but Chapter 1 and Sonja's book read that a few times
<jeosol>
Chapter 5: Metaobject Programming in CLOS by Guiseppe Attardi; Chapter 6: The Silica Window System: The Metalevel Approach Applied More Broadly by Ramana Rao
<jeosol>
A section "COMPARISONS WITH OTHER LANGUAGES" compares CLOS and C++, CLOS, Eiffel, and Sather, CLOS and Smalltalk
<jeosol>
beach: What is SICL relationship to SBCL (or other CLs). You must get this question a lot I guess.
<LdBeth>
It’s currently implemented and developed using SBCL
<jeosol>
Maybe you have a link
<jeosol>
I see.
<scymtym>
beach: another explanation for McCLIM being slow (presumably on Mezzano) could be the use of the render backend which does all the drawing itself. i have prototypical changes that speed up backends based on this machinery significantly
<LdBeth>
Is drawing considered slow so it’s better updated in batch?
<beach>
scymtym: Ah, yes, I see.
<beach>
minion: Please tell jeosol about SICL.
<minion>
jeosol: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
<beach>
jeosol: It doesn't exist yet, so don't attempt to install it.
<jeosol>
beach: why is "(perhaps futile)" there. Is this related to the amount of work (man-years) required?
<LdBeth>
Maybe technology changes and people don’t use computers anymore:)
<beach>
jeosol: Yes. But I can see the light at the end of the tunnel.
<beach>
jeosol: A lot of good stuff has already come out of the project, so I am very pleased.
<beach>
jeosol: We extracted the reader as Eclector, that scymtym is now maintaining.
<beach>
jeosol: We are working on a general environment library called Trucler, with heisig.
<beach>
jeosol: We have published around 10 papers on improved implementation and bootstrapping techniques the past 5 years.
thesorton has quit [Ping timeout: 265 seconds]
<jeosol>
Nice. So you have some listings of these different components. I think the effort is nice, anything to improve CL. I get asked why I use CL, most of my colleagues use Python,
<beach>
jeosol: The "Concrete Syntax Tree" library has also been extracted. It is used for source tracking.
<jeosol>
that's very nice. 10 papers.
<jeosol>
Are improvements planned in the OOP area or will be mostly CLOS as is?
<beach>
jeosol: It's a new implementation of the CLOS MOP.
<beach>
I am not planning any changes to the language.
<jeosol>
It has a chapter: object system
<beach>
Sure.
<LdBeth>
jeosol: there’s a implementation of Telos in CL
<beach>
SICL is simpler than other systems, because I can define things like (defclass t () () (:metaclass built-in-class))
<LdBeth>
(The EuLisp Object System)
<no-defun-allowed>
Yes, that details how SICL implements the MOP, which is different to most implementations which borrow Portable..Common LOOPS (was it?), and one of those papers describes how exactly the implementation differs from the usual techniques.
<LdBeth>
Basically you don’t have to struggle in the hairiness of bootstrapping
<beach>
jeosol: If you are really interested, I am often doing a lot of ranting in the #sicl channel.
<jeosol>
of course
<jeosol>
I am browsing through the linked pdf
<beach>
LdBeth: That's not quite true. The code itself is simpler and more straightforward, but I have had to invent an entirely new bootstrapping technique which was not necessarily easy to do.
<jeosol>
I am want to improve my skills. I want to understand things a bit deeper and improve abstraction of the code
gxt has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 240 seconds]
<LdBeth>
beach: where can I find the latest version of the paper “Bootstrapping Common Lisp”?
<LdBeth>
At least newer than the version I kept in my computer
<LdBeth>
2018 June 25
<beach>
OK.
<jeosol>
beach: sicp-spec document is detailed. Just skimmed through it. I am imagine speed and efficiency are part of your design considerations.
<beach>
jeosol: Absolutely. But simplicity, maintainability, and debuggability are even more important.
<beach>
jeosol: I try not to micro-optimize from the beginning.
<beach>
If I had done that, I would have used a lot fewer generic function, since generic dispatch is traditionally not that fast.
<beach>
Instead, I bet that I could improve generic dispatch, which I did.
<jeosol>
beach: I think the layered approach is nice and that other CL implementations can reuse layers to fill gaps or replace systems in the implementations
<beach>
And of course the compiler (based on Cleavir) does things like type inference, inlining, etc.
<beach>
jeosol: That was the original idea, but it is looking harder to do over time.
<jeosol>
type inference as in checking?
<beach>
No, inference.
<jeosol>
ok
<beach>
It is a standard technique in functional langauges such as ML and Haskell, and the SBCL compiler does it.
<beach>
We do it on the intermediate representation.
<LdBeth>
Typed IR
<jeosol>
Another aspect, I'd be interested to discuss, may be later, it large code/module organization. In a chat with Fare in the past, I started using :class :package-inferred-system in my defsystems, a bit more verbose but it did help my code organization, but mostly compilation
<jeosol>
time savings
<jeosol>
sometimes, SBCL hangs, I have to restart. I think I could improve my dependencies and layering a bit more - perhaps time to read about asdf again
<beach>
I don't use package-inferred systems. I don't think I have understood the main advantage.
georgie_ has joined #lisp
<jeosol>
I am not an expert anyway. At the time, I was trying to reduce dependency between my modules, and Fare suggested it.
<jeosol>
I think the SICL effort is very good. You have enough bodies I hope
jlarocco has joined #lisp
<beach>
jeosol: Yes, and very good ones too: Bike, heisig, scymtym, etc.
<beach>
Knowledgeable is more important than raw numbers.
<jeosol>
very nice. I bet I can learn a thing or too from the code design and patterns.
<jeosol>
Yes, I agree
<beach>
Sure, if you have any questions, don't hesitate. Preferably in #sicl then.
mathrick has joined #lisp
<jeosol>
I meant I may have to look at the codes to see code patterns and styles. lately, I am trying to reduce computational resources required for one app I was working on. Made some slots use :allocation :class, and others. Interested in other tricks
<beach>
OK.
<jeosol>
If I look at the code and the document, I will get ideas. I have mostly focused on the application but need to improve efficiency.
<beach>
I see.
Oladon has quit [Quit: Leaving.]
prite has joined #lisp
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
JohnMS_WORK has joined #lisp
Cymew has joined #lisp
Duuqnd has joined #lisp
prite has quit [Ping timeout: 240 seconds]
jprajzne has joined #lisp
flamebeard has joined #lisp
igemnace has joined #lisp
nowhereman has joined #lisp
gxt has joined #lisp
nowhere_man has quit [Ping timeout: 276 seconds]
ltriant has quit [Quit: leaving]
gxt has quit [Client Quit]
dkmueller has joined #lisp
gxt has joined #lisp
femi has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
femi has joined #lisp
vlatkoB_ has joined #lisp
georgie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlatkoB has quit [Ping timeout: 245 seconds]
frgo has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
lemoinem is now known as Guest35797
Guest35797 has quit [Killed (weber.freenode.net (Nickname regained by services))]
<White_Flame>
jprajzne: I skimmed through the transcript, and it doesn't really seem in-depth enough to try to pick out inaccuracies
<beach>
no-defun-allowed: Yes, very appropriate.
frgo_ has quit [Ping timeout: 265 seconds]
frgo has joined #lisp
hhdave_ has joined #lisp
HDurer has joined #lisp
hhdave has quit [Ping timeout: 265 seconds]
hhdave_ is now known as hhdave
frgo_ has joined #lisp
dkmueller has quit [Ping timeout: 240 seconds]
frgo has quit [Ping timeout: 250 seconds]
dkmueller has joined #lisp
raghavgururajan has joined #lisp
schweers has joined #lisp
slyrus has joined #lisp
slyrus__ has quit [Ping timeout: 276 seconds]
jonatack has joined #lisp
<Shinmera>
At least one more part of the text equation is on my near-future todo, namely the layouting part
<Shinmera>
that is, relying on an external system to provide metric information.
<Shinmera>
Not sure if I'll ever attempt a shaping engine.
Inline has joined #lisp
<jackdaniel>
n.b breaking text into lines is implemented in mcclim utils (it is an utility which does not depend on clim itself)
<Shinmera>
I already have UAX-14 for that.
<jackdaniel>
the only missing push would be implementing minimum-raggedness strategy
<Shinmera>
But by layouting I mean more than just line breaking. Meaning bidi, verticality, etc.
<jackdaniel>
uax only presents you with break opportunities, you still need to implement the actual breaking
<Shinmera>
Yes.
<jackdaniel>
so, this utility accepts arbitrary predicate for break opportunities but I gather it may be more enjoyable to implement things from scratch
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
heisig has joined #lisp
dmiles has quit [Ping timeout: 246 seconds]
Ricchi has joined #lisp
frgo has joined #lisp
<remexre>
is there a simple way to load a file as a packed array of 32-bit ieee floats? I tried reading it as bytes and doing horrible hackery with cffi, but I got garbage data out
<Shinmera>
float-features has ways to convert integers to floats and back.
<schweers>
remexre: off the top of my head I don’t know a simple way, but I’d mmap the file and use CFFI. I’ve done this before and it worked fine.
eSVGDelux has quit [Ping timeout: 264 seconds]
<schweers>
I should add, that the file was also created this way, so alignment was not an issue for me.
<beach>
You really need to start thinking about values vs side effects. And you need to distinguish between what your program does and what the REPL does.
<afidegnum>
ok
<beach>
Unless you mean that every other line is blank. Is that what you mean?
<beach>
That is likely due to your data containing newlines.
<beach>
Nah, I take that back.
<no-defun-allowed>
I think it is the blank lines, and the " characters suggest there are no new lines in the strings printed.
<beach>
Yeah.
<no-defun-allowed>
I tested an equivalent program, and it printed without blank lines.
<beach>
I can't think of anything that PRINT would render as a blank line.
<beach>
Unless, of course, this is not Common Lisp.
<asdf_asdf_asdf>
(format t "~%" your-object)
<no-defun-allowed>
...both in SLIME and in a plain terminal emulator. Maybe the printer is confused somehow, but it wouldn't output two Newline characters.
<beach>
asdf_asdf_asdf: Lurk harder please.
<no-defun-allowed>
asdf_asdf_asdf: Just don't.
<no-defun-allowed>
(loop for foo in '("hello" "there" "and" "good" "night") do (print foo)) ; prints as expected
<beach>
Yeah.
gareppa has joined #lisp
<no-defun-allowed>
afidegnum: Are you using the Lisp interpreter in Emacs?
nowhereman has quit [Ping timeout: 276 seconds]
<no-defun-allowed>
I tested that program in IELM, and it did output blank lines. Another indicator is that nil is lowercase, whereas in CL it is usually uppercase.
<afidegnum>
yes
<beach>
afidegnum: That is really not nice. You ask a question in #lisp, pretending that your program is Common Lisp, and asking why the behavior is wrong.
techquila has joined #lisp
<no-defun-allowed>
Though Elisp does have a lot of Common Lisp (like LOOP) ported, it isn't a Common Lisp implementation and thus it is going to act weird.
<beach>
afidegnum: You either start using Common Lisp, or you stop asking questions about your code here.
<afidegnum>
i'm sorry, i m runing some code in lisp
<afidegnum>
CL
<no-defun-allowed>
I reccommend you avoid developing any large projects in Emacs Lisp that aren't extensions for your editor.
<no-defun-allowed>
*recommend - one day I'll spell that right the first time.
<beach>
afidegnum: Anyway, it is impossible to even reproduce your problem if you don't tell us what LP contains.
mindthelion has quit [Ping timeout: 268 seconds]
<afidegnum>
i'm trying to write some code generators, i couldn't find a better way in CL or even racket, that's why i turned to emacs
<beach>
no-defun-allowed: Use C-M-i to fix the spelling error.
<beach>
[assuming you are running flyspell-mode of course]
<no-defun-allowed>
I really wish I was, on my desktop this Matrix client couldn't be any more broken while still being able to send simple messages.
Inline__ has joined #lisp
<beach>
afidegnum: If this code is Common Lisp, you need to tell us what LP contains for it to be possible to explain the behavior you see.
<White_Flame>
I've written tons of code generators
<White_Flame>
the problem usually isn't the output itself. changing languages (cl->racket->el) most certainly is not addressing your issue
Inline has quit [Ping timeout: 264 seconds]
<no-defun-allowed>
I'm quite sure it's an Elisp issue, and the documentation for PRINT agrees with me that there will be blank lines.
<no-defun-allowed>
"Output the printed representation of OBJECT, with newlines around it."
<no-defun-allowed>
Then it's not clear how Elisp is going to be easier than CL at code generation, as they both have the same macro system (defmacro), and CL is generally less broken.
<afidegnum>
i wish there would be an emacs competitor in CL
<beach>
no-defun-allowed: The documentation for PRINT in Emacs Lisp?
<White_Flame>
afidegnum: there's a few
<no-defun-allowed>
This is going to be anti-climactic, but there's a few Emacsen in CL: Hemlock, the one that Clozure has on macOS, first and second Climacs.
<no-defun-allowed>
beach: Yeah, I quote the first line of the documentation there (C-h f print).
<beach>
I see.
mindthelion has joined #lisp
<no-defun-allowed>
So, two newlines between each line, resulting in a blank line between them.
<beach>
afidegnum: So, you were executing code in Emacs Lisp without reading the Emacs Lisp documentation for PRINT, and then, when it does not behave the way you want, you ask a question in #lisp as if this behavior is strange, leading is to think it is Common Lisp.
<beach>
afidegnum: This is really impolite behavoir.
<beach>
behavior.
<beach>
[too late to correct]
<beach>
s/leading is/leading us/
<afidegnum>
my apologies, but my questions went unanswered in #elisp
techquila has quit [Ping timeout: 245 seconds]
<no-defun-allowed>
I've never been on #emacs (the Matrix equivalent was absolutely terrible), but do they take Elisp questions?
<beach>
afidegnum: Like I said, this idea "The people in the appropriate channel didn't answer, so I asked where there are nice people, but in an inappropriate channel" is not acceptable.
<beach>
afidegnum: It is especially unacceptable if you lead people to believe that you are programming in Common Lisp.
<no-defun-allowed>
How long did you wait? IRC can move quite slowly too; #ecl has an average response time of 11 hours in their topic.
<beach>
afidegnum: Either you accept that #emacs will not be helpful, so you start programming in Common Lisp where there is a channel that will answer your questions, or else you look for your answers yourself.
<beach>
afidegnum: Do you really not see how annoying this behavior of yours is?
<beach>
afidegnum: You are basically punishing #lisp participants for being nice and present by wasting their time.
<afidegnum>
i'm really sorry, i'm under pressure
<beach>
And other #lisp participants aren't?
<afidegnum>
it won't happen again
JohnMS has joined #lisp
<beach>
Good.
ralt has quit [Quit: Connection closed for inactivity]
<no-defun-allowed>
Okay, final thought, I think you should also familisarise yourself with the documentation system in Emacs. If you type `C-h ?`, you will be presented with a list of keys you can use to read parts of the documentation, and `f` for function and `a` for apropos (symbol lookup) are probably the most useful for programming Emacs.
<shinohai>
Logged 07:04 afidegnumi wish there would be an emacs competitor in CL <<< I've used vim + vlime for years xD
<shinohai>
Maybe not "competition" but gets the job done.
JohnMS_WORK has quit [Ping timeout: 240 seconds]
<beach>
shinohai: I think that's kind of the opposite of what was wished for.
ralt has joined #lisp
bitmapper has joined #lisp
<White_Flame>
are there any tricks in SLIME to get indentation of a sublist to line up with the head, instead of with the 2nd element of a list?
<White_Flame>
some of my lines are "(foo (bar)\nbaz", and in some instances baz lines up with foo, and in others it lines up with (bar). It's pulling something from the outer context?
<White_Flame>
(in the lisp source code itself)
<beach>
If it is considered code, it is indented as a function call with the arguments aligned vertically.
<White_Flame>
the whole nested thing starts with '(
<beach>
Hmm.
<beach>
If it is considered data, all the elements are all aligned.
<beach>
I guess Emacs just doesn't determine with very good precision whether it is one or the other.
<White_Flame>
yeah, but the fact that the same shaped inner scope behaves differently in 2 different locations is pretty screwy
<beach>
Sure.
maxxcan has joined #lisp
<beach>
Common Lisp indentation with Emacs is very screwy in general.
dkmueller has quit [Quit: WeeChat 2.4]
guna has joined #lisp
EvW has quit [Ping timeout: 245 seconds]
raghavgururajan has joined #lisp
jmercouris has joined #lisp
<beach>
To save horizontal space, I indent MAKE-INSTANCE like CASE, i.e. the class after MAKE-INSTANCE on the same line, but the keyword/value pairs aligned and indented two spaces compared to the MAKE-INSTANCE form itself. But then, the indentation of any slightly complicated form as the value in the key/value pair is wrong.
<beach>
In my opinion, the fact that the value is a form, and not data, should make the indentation rule for it independent of the context in which it is located.
<White_Flame>
it'd be great if there were commented special characters to control the indent mode on a line, like there is for the syntax mode at the top
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<beach>
Sure, that would be a possibility.
<beach>
But even better would be an editor that has a greater "awareness" of Common Lisp code.
<White_Flame>
well, when creating a data list, with lots of things nested & represented in there, awareness of CL itself doesn't help
<White_Flame>
but indentation control would be nice
<White_Flame>
this is a big nested language spec that I'm working on
isBEKaml has quit [Quit: leaving]
nanoz has quit [Quit: Leaving]
doublex has quit [Ping timeout: 245 seconds]
georgie has quit [Remote host closed the connection]
<vms14>
I'm making basic db stuff, I think I should make functions for database access so if I change the database later I'll just need to change only those functions and not the entire set
<vms14>
this is what I have atm, do you have some hints/advices?
<beach>
vms14: Did you get my remark about not mixing units and quantities.
<beach>
?
<vms14>
I've read it, but not got it
<beach>
I see.
<beach>
"tension" is a quantity with "volt" as its unit.
<vms14>
I mean I didn't understand what you meant
<beach>
"current" is a quantity with "ampere" as its unit.
<vms14>
oh
<beach>
"resistance" is a quantity with "ohm" as its unit.
<beach>
I advise against mixing them.
<vms14>
so better to use just ohm volt and ampere
<beach>
And I recommend you use quantities everywhere.
<beach>
No, better use the quantities.
<beach>
Because several quantities can have the same unit.
<vms14>
why?
<beach>
You say circumference = 2π * radius, you don't say inchage = 2π * inchage
<vms14>
then is all about abstraction?
<beach>
If you like.
<beach>
But, the main thing is that units are not unique.
<beach>
You say speed = distance / time.
<vms14>
So it's better to use some sort of "group" to embrace all those units?
<beach>
Then you can measure distance and time and speed with whatever unit you want.
<beach>
If you want miles / hour, then you use miles for the distance and hour for the time.
<beach>
But the formula remains correct if you use meters and seconds.
<vms14>
I see
<beach>
The "group" is called "quantity".
heisig has quit [Quit: Leaving]
<beach>
Typical quantities are tension (not voltage), current (not amperage), resistance (not ohmage), distance (not inchage), time (not secondage).
<White_Flame>
I've always heard it as "potential", not "tension", but different countries
<beach>
mass (not poundage),
<beach>
White_Flame: potential is tension relative to ground.
<vms14>
and how I make quantities work fine with any unit?
<vms14>
just cond and alike?
<beach>
vms14: They do that automatically.
<beach>
vms14: Then you can have conversion formulas of course.
<beach>
vms14: Like between miles/hour and m/s
Duuqnd has joined #lisp
<beach>
vms14: Speed is always distance divided by time whatever unit you use.
<vms14>
I'll try to remember this and apply it in all cases
EvW1 has joined #lisp
<selwyn>
quantites form in fact not only a "group" but a fully-fledged mathematical group which is occasionally of use
<selwyn>
see the 'buckingham pi theorem' and dimensional analysis more generally for an example
superkumasan has joined #lisp
<vms14>
but how I know the user is entering miles or meters?
<vms14>
I must force him to specify the unit?
<vms14>
like a (&key (type :meters))
<White_Flame>
"What's the distance?" "6"
<selwyn>
i imagine so, unless you insist on a choice of units
gareppa has joined #lisp
<White_Flame>
vs "What's the distance in miles?" "6" ... or "What's the distance?" "6 miles"
<dlowe>
"6 what?" "6 _units_"
<selwyn>
i am not familiar with your use case, but sometimes an application can be transparent enough not to impose units on the user
<selwyn>
opengl is like this: you specify all distances in terms of 'arbitrary units' which are normally taken to be metres but this is merely a convention
<selwyn>
*impose a choice of units
<White_Flame>
same with graphing math functions. the axes are unitlesss
<White_Flame>
or, one could consider the unit to be 1
<jackdaniel>
on screen it gets even more complicated
<jackdaniel>
disregarding *what* unit you take you ask the question: relative to what?
<White_Flame>
and the fact that you cannot represent a point or a line, without considering width & coverage
<jackdaniel>
to screen pixels? to physical distances? to angular distance (depending on how far the observant is)?
<selwyn>
angular distance is used in UI?
<jackdaniel>
CSS does specify it
<jackdaniel>
it is not unlikely that McCLIM will use it (with a possibility to set up the distance per frame) in a far future ahead
<selwyn>
i am trying to think of an application which wouldn't involve astronomy
<jackdaniel>
so, you may say: 20cm, you may say 300px or pi/16 and all three make sense
<selwyn>
experimental physicists often write out a factor of 2 pi explicitly in order to distinguish between e.g. frequency and angular frequency
<White_Flame>
of course, pi/16 also assumes radians, while the other 2 are explicit
<selwyn>
well, we assume it is in radians because it involves a factor of pi, but a computer cannot figure this out
<vms14>
jdz: seems a good post, ty
mindCrime_ has joined #lisp
<selwyn>
the alternative is to write (20 cm) (300 px) and then (1/32 (* 2 pi)) which makes clear that we are dealing with an angular quantity that cannot be confused with a genuinely dimensionless quantity, like, say, the percentage of a window that should be coloured in blank
<White_Flame>
it would seem to imply that the unit "2 pi" is "circle"
gareppa has quit [Quit: Leaving]
<White_Flame>
(1/32 circle)
<White_Flame>
s/2 pi/2 pi radians/
<selwyn>
that is a useful effect of the notation, since a circle is 2 pi radians
hjudt has quit [Quit: leaving]
<selwyn>
(defunit circle (* 2 pi))
<White_Flame>
(defunit circle ((* 2 pi) rad))
<selwyn>
this is surprisingly useful in avoiding factor of 2 pi errors in experimental physics (at least for me)
ljavorsk__ has joined #lisp
icov0x29a has joined #lisp
<dlowe>
#u(20 px)
icov0x29a has quit [Client Quit]
mulk has quit [Ping timeout: 240 seconds]
<selwyn>
White_Flame: yes 'angle' is the quantity and radian is the unit, my bad
mulk has joined #lisp
ljavorsk__ has quit [Remote host closed the connection]
ljavorsk__ has joined #lisp
ljavorsk_ has quit [Ping timeout: 268 seconds]
hjudt has joined #lisp
hjudt has quit [Client Quit]
bitmapper has quit [Ping timeout: 265 seconds]
hjudt has joined #lisp
jprajzne has quit [Quit: Leaving.]
ljavorsk__ has quit [Remote host closed the connection]
ljavorsk__ has joined #lisp
Cymew has quit [Ping timeout: 265 seconds]
whartung has joined #lisp
Inline__ has quit [Quit: Leaving]
eSVGDelux has joined #lisp
DGASAU has quit [Ping timeout: 245 seconds]
elinow has quit [Quit: Leaving]
DGASAU has joined #lisp
Inline has joined #lisp
smazga has joined #lisp
lxbarbosa has joined #lisp
mindCrime has joined #lisp
vms14 has quit [Remote host closed the connection]
mindCrime_ has quit [Ping timeout: 240 seconds]
Oladon_work has joined #lisp
mindCrime has quit [Ping timeout: 264 seconds]
papachan has joined #lisp
doublex has quit [Ping timeout: 252 seconds]
mindCrime has joined #lisp
doublex has joined #lisp
scymtym has joined #lisp
kajo has joined #lisp
_paul0 has quit [Remote host closed the connection]
<hjudt>
i can approach the problem from a different angle. thanks though.
<aeth>
I don't even use it for destructuring lists because it does it poorly compared to destructuring bind. Specifically, it doesn't error when destructuring-bind does, LOOP destructuring can't be used for parsing a plist if you want to check for validity of the plist at the same time
doublex has quit [Ping timeout: 240 seconds]
<aeth>
(Although in this particular case, m-v-b won't error, either.)
shrdlu68 has joined #lisp
doublex has joined #lisp
hhdave has quit [Ping timeout: 240 seconds]
jfe has quit [Ping timeout: 240 seconds]
hhdave has joined #lisp
learning has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
lnostdal has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
doublex_ has joined #lisp
bitmapper has joined #lisp
doublex has quit [Read error: Connection reset by peer]
learning has quit [Ping timeout: 240 seconds]
learning has joined #lisp
learning has quit [Ping timeout: 265 seconds]
learning has joined #lisp
igemnace has quit [Ping timeout: 265 seconds]
ym has joined #lisp
gareppa has joined #lisp
doublex_ has quit [Ping timeout: 268 seconds]
mindCrime has quit [Ping timeout: 268 seconds]
gareppa has quit [Remote host closed the connection]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
jfe has joined #lisp
flamebeard has quit []
manualcrank has joined #lisp
bitmapper has quit [Remote host closed the connection]
vms14 has joined #lisp
count3rmeasure has joined #lisp
FreeBirdLjj has joined #lisp
red-dot has joined #lisp
hhdave has quit [Quit: hhdave]
FreeBird_ has joined #lisp
FreeBirdLjj has quit [Ping timeout: 276 seconds]
mindCrime has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
learning has quit []
frgo has joined #lisp
augfab has quit [Ping timeout: 240 seconds]
augfab has joined #lisp
doublex has joined #lisp
gareppa has joined #lisp
m00natic has quit [Remote host closed the connection]
EvW1 has quit [Ping timeout: 245 seconds]
EvW has joined #lisp
matijja has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
bitmapper has joined #lisp
<vms14>
how can I use hunchentoot and have the lisp image available?
<vms14>
I'm using the example in hunch doc about how to subclass acceptors
<vms14>
everything works fine
<vms14>
But I see he creates two acceptors, which I did (hunchentoot:start vhost1)
<vms14>
(hunchentoot:start vhost2)
<vms14>
I'm only allowed to have one working since once I start one slime won't let me put more stuff
varjag has joined #lisp
<vms14>
they work fine, but I don't know how to make both work at same time
spowell has quit [Quit: No Ping reply in 180 seconds.]
<vms14>
; pipelined request... (swank-repl:listener-eval this is what I have once I start one acceptor
Josh_2 has joined #lisp
lxbarbosa has quit [Remote host closed the connection]
<vms14>
I thought making my "own" acceptors wouldn't block the image
spowell has joined #lisp
raghavgururajan has joined #lisp
count3rmeasure has quit [Quit: Leaving]
<Xach>
vms14: Are you using an implementation with threads?
<vms14>
sbcl
<dlowe>
what version?
<Xach>
vms14: Is it compiled with thread support?
<vms14>
how can I look if it supports threads?
<dlowe>
evaluate *features* at the repl
<vms14>
SBCL 1.4.3
ljavorsk__ has quit [Ping timeout: 268 seconds]
<vms14>
I'm not able to see any "thread" stuff in the output of *features*
<vms14>
oh
<vms14>
(member :sb-thread *features*)
<vms14>
nil
* vms14
cries
<Xach>
vms14: it is very easy to build your own sbcl with thread support. 1.4.3 is also Very Old. So upgrading to the latest and compiling yourself will have multiple benefits.
<vms14>
what I see is that threads are disabled by default in non linux systems
<vms14>
threading support in lang/sbcl, which is
<vms14>
disabled by default for systems other than Linux.
<Xach>
vms14: what system do you use?
<vms14>
NetBSD
Ven`` has joined #lisp
<vms14>
pjb: (ql:quickload :bordeaux-threads) is loaded
kajo has quit [Ping timeout: 252 seconds]
<pjb>
then bt:*SUPPORTS-THREADS-P* should tell you if the implementation supports threads.
<vms14>
nil
* vms14
cries
<vms14>
Xach How I compile it
<vms14>
or what option/flag I need to set for threads?
<Xach>
vms14: download the sources, then run "time sh make.sh --fancy >& makelog" in the source directory. --fancy enables threads and some other useful things.
<vms14>
I'm downloading the source and it seems I just need to put make
<vms14>
oh
<vms14>
ty
<vms14>
I'm not sure if will work in NetBSD, but I'll try
<Xach>
vms14: Me neither, sorry. i don't know much about netbsd.
Abrassas has joined #lisp
FreeBird_ has quit [Remote host closed the connection]
papachan has quit [Quit: Leaving]
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Po-ta-to, boil em, mash em, stick em in a stew.]
nostoi has joined #lisp
Abrassas has left #lisp [#lisp]
gxt has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
nowhereman has joined #lisp
superkumasan has quit [Ping timeout: 245 seconds]
shrdlu68 has quit [Ping timeout: 265 seconds]
kajo has joined #lisp
gilez has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
dale_ has joined #lisp
dale_ is now known as dale
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<vms14>
WARNING! Some of the contrib modules did not build successfully or pass
<vms14>
their self-tests. Failed contribs:"
<vms14>
sb-concurrency sb-introspect
* vms14
cries
<Josh_2>
sad face
bitmapper has quit [Ping timeout: 268 seconds]
nostoi has quit [Quit: Verlassend]
hiroaki has joined #lisp
Abrassas has joined #lisp
<dlowe>
I thought I remembered a setting in slime where you could set swank to use SIGIO instead of threads
<asdf_asdf_asdf>
no-defun-allowed. Thanks for link. "is implicit." <-- Did mean, that low level in language Lisp is implement reference, but high level is not needed, becuase is implicit? If really can, that using "hacks", no?
<no-defun-allowed>
You cannot manipulate pointers in Lisp portably.
<vms14>
p_l: I cannot arge too much, but It seems to be right, Lisp is one of the best languages I've seen
<no-defun-allowed>
In SBCL, you can get the address of an object, but it's useless because I don't think you can get the object back by dereferencing it, and it uses a moving garbage collector that will invalidate that address.
<vms14>
but I need to get used to fp and macros
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aruseus has joined #lisp
<asdf_asdf_asdf>
no-defun-allowed. Like (gensym) invalidate that address?
<no-defun-allowed>
What does gensym have to do with the garbage collector?
<no-defun-allowed>
It could though, if SBCL runs out of space and decides to collect to free some space.
<aeth>
vms14: CL's a good middle ground between "angry compiler" languages like C++ and Java, and interpreted languages like Python that won't tell you that you're creating a new, unused "fooabr = 42" when you wanted to set foobar to 42
xkapastel has joined #lisp
quazimodo has joined #lisp
Bike has joined #lisp
<asdf_asdf_asdf>
no-defun-allowed. Is it possible to take references from the object?
<no-defun-allowed>
No it isn't. Stop trying to treat Lisp like C.
Aruseus has left #lisp [#lisp]
<asdf_asdf_asdf>
Any compiler hacks or tricks?
<aeth>
no-defun-allowed: afaik asdf_asdf_asdf is trying to directly translate C or C++ into CL
<aeth>
which obviously isn't going to work
<no-defun-allowed>
asdf_asdf_asdf: Stop it.
<aeth>
(at least, not as directly as literally translating idioms like &foo or whatever)
<vms14>
aeth: but how to get money with cl?
<aeth>
from what I've seen, asdf_asdf_asdf doesn't seem to understand the difference between CFFI and literally trying to 1:1 write C in CL
<no-defun-allowed>
(defstruct money) (make-money)
<vms14>
I feel forced to learn other languages just to get hired
<vms14>
no-defun-allowed: oh
aindilis has quit [Remote host closed the connection]
<vms14>
and it's sad because I could invest this time in cl instead of learn random languages
<asdf_asdf_asdf>
No. I know, that it's not possible translate identical code from C to SBCL, but my question is... How hacks or tricks get reference and change value variable?
<vms14>
the only way seems to be mounting startups, anyway there are some jobs for lisp
aindilis has joined #lisp
<aeth>
asdf_asdf_asdf: You can't do that for any arbitrary thing because the garbage collector might move its memory location around. There are certain things that are in unmovable memory, though. e.g. https://github.com/sionescu/static-vectors/
<no-defun-allowed>
I'm telling you, you can't get references to objects.
<Bike>
asdf has been doing this for what, months now? and i already told them what aeth did
<Bike>
they do not care
<aeth>
at least May, I checked logs
<aeth>
not only is asdf_asdf_asdf doing it the wrong way, but borodust at the time offered to wrap the headers automatically in (his estimation) 15 minutes... so this whole 4-month (at least) adventure could've been over then.