freenode/lisp - IRC Chatlog
Search
7:57:22
flip214
you calculate the "real" power for the generator, and use the magnitude to dimension the conductor
7:57:43
flip214
Posterdati: yeah, for virtual loads you use VA, but that's just to differentiate in writing
7:59:46
pjb
It would be a very bad idea, in a computer system, to encode any meaning into different unit names.
8:00:06
pjb
If you have to encode some physical meaning, do it explicitely, not by the name or factorization of the unit!
8:01:52
Posterdati
pjb: V*A is not J/s if you consider a sinusoidal circuit, infact you can have work only by the real part of the complec power not the magnitude!
8:05:03
pjb
Again, you cannot represent a physical system by a mere unit expression, or even by a mere mathematical expression.
8:06:13
pjb
units are like types, they're only there to CHECK the consistency of a mathematical expression!
8:07:29
pjb
It's just per chance, that the relationship between physical grandeurs in a lot of (simple) physical phenomenon have a unique mathematical form, and therefore a unique unit consistency checking form.
8:08:53
pjb
Is this the electromotrice force of a battery? Is it a tension at the ends of a resistor? Is it something else?
8:09:18
pjb
It's not the calculation that gives physical meaning. It's the description of the physical system!
8:10:06
Posterdati
ofcourse, but the calculation give you an indication on the phenomena, you need it
8:10:17
pjb
Even better: you can describe physical systems, and measure physical grandeur from an actual instance, and not being able to compute them because you may not know the mathematical relationship between those grandeurs.
8:10:58
pjb
You need it if you want to do engineering work. But physical experiments can be done (and usually are done) without having any mathematical theory about it first.
8:11:43
Posterdati
yes, but this is not the case, I have a mathematical model which reppresent my physical system, with a nice degree of accuracy, but no units to represent the numbers it spits out... Seems odd!
8:13:28
pjb
Again, you're making a mistake. You should not encode anything into VA vs W, because VA = W they're identical.
8:15:11
pjb
And it's better to use internally normalized units such as kg·m2/s³ instead of VA or W, to be able to check unit consistency more easily.
8:17:35
pjb
You should use something like: (apparent-power 12 ((kg 1) (m 2) (s -3))) (real-power 12 ((kg 1) (m 2) (s -3)))
8:21:02
Posterdati
pjb: so to distinguish A from P you use 1VA not 1W which is indeed the real part of complex power!
8:22:51
Posterdati
so to no mix the both when you say 1 VA your meaning a complex power or its magnitude, when you say 1 W you are meaning the real part of complex power which is the active power, the same one that can do work
8:24:18
Posterdati
the reactive power VAR is intended to model the magnitude of electromagnetic energy which is bounced from generator to loads (in the steady state condition)
8:24:56
Posterdati
in fact if you consider the transient condition, all these units are meaningless and only J and W are present
10:20:03
easye
In the interests of adding as little complexity to the ABCL implementation, I was thinking of allowing the CL:MAKE-ARRAY :INITIAL-ELEMENTS arg be a specialized type for the implementation. I think this is worse than adding another keyword argument :NIO-BUFFER to specify an initial elements to be taken from this specialized type.
10:22:19
easye
The new type allowed for :INITIAL-ELEMENTS would be disjoint from the ANSI allowances.
10:22:49
easye
Which is why I think this is a bad way to save adding another implementation-dependent keyword argument to CL:MAKE-ARRAY
10:31:10
heisig
easye: That sounds messy (but I haven't fully understood what you mean with 'a specialized type for the implementation'). Adding an implementation-dependent keyword sounds better.
10:35:09
easye
RE: a symbol that... No, I mean that the argument will be a wrapped reference to an underlying Java type ("java.nio.ByteBuffer")
10:36:01
easye
phoe: thanks for the opinion. With you and Marco indicating uncertainty, I am definitely not currently planning on changing this for abcl-1.7.0.
10:42:12
pjb
Still, too bad this doesn't work: (make-array '(2 3) :initial-contents #2A((a b c) (d e f)))
10:56:12
jackdaniel
array with such non-coforming fill-pointer would wrap accordingly, that is row-major-aref 3 would reference the element 1, 1
12:30:06
francogrex
Hi, I have a very long many lines of a text file and I know that in one line it has a faulty data an extra tab char that should not be there. can i indentify the offending line without reading the whole from A to Z? i know i can use random access and file position but I don't know exactly which position is the error
12:41:18
francogrex
phoe: well each newline has only one tab in addition to other characters, however one line contains two tab characters, don't know which one, i would like to inspect that line
12:42:08
jackdaniel
francogrex: you may write few esrap rules to parse such file and signal a condition when you reach that particular line
13:21:50
jmercouris
looking at the stacktrace it seems all of the data is properl getting passed, is there something I am missing here?
13:24:07
Bike
i don't think gdb works too smoothly with lisp, but you could, sure. and in this case you have C++ code running, and gdb knows how to deal with that.
13:24:46
jmercouris
I have a feeling it has something to do with the thread not being able to return or something
13:25:34
Bike
well, just to be clear, getting a SB-SYS:BREAKPOINT-ERROR should mean your process recieved SIGTRAP.
13:27:00
Bike
i don't think sbcl uses sigtrap internally, so i couldn't tell you what's giving it that.
13:27:05
phoe
"The SIGTRAP signal is sent to a process when an exception (or trap) occurs: a condition that a debugger has requested to be informed of – for example, when a particular function is executed, or when a particular variable changes value."
13:28:54
francogrex
it's easy but you should know very well how to deal with assembly in addition to the src code for debuging
13:29:53
jackdaniel
traps are very useful for debugging actually, and they often have support from the processor
13:30:23
Bike
maybe it's one of those things that can only run in the main thread. thought that was a mac graphics thing though.
13:30:39
jmercouris
perhaps since GTK is on the main thread it doesn't like to get commands from a different thread
13:32:01
drmeister
I'm interested in accessing google sheets directly - I was looking for some pointers.
13:34:41
jackdaniel
I'm sure it is tagged because it is an immediate type! but then it is not really a pointer, so, well, what Bike said
13:35:39
Bike
jmercouris: googling "webkit sigtrap" turns up some results that may or may not be relevant. lots of stuff about timers...
13:36:44
jmercouris
and silly me, I forgot bordeaux uses actual threads instead of lightweight threads
13:37:13
Bike
it's just a wrapper for the implementation's threads. i don't know if any current implementations have green threads tho
13:55:19
drmeister
jackdaniel, phoe: Those pointers both gave me segmentation faults - what kind of crap are you pushing here?
13:58:25
jackdaniel
here, take a moving square for consolation: https://turtleware.eu/static/paste/401f3fbb-fbuf.webm
14:06:08
drmeister
Alright - that's cool - I'll accept your moving square. Don't let it happen again.
16:56:52
max3
pjb what's the point of that? i don't have much experience but i thought relying on currying was an implementation detail? ala all of haskell's function are actually curried
16:57:20
max3
but the syntax doesn't need to explicitly show it (you can parens wrap -> in type defs for functions)
17:00:50
pjb
And of course, it's worse when you combine that with arrays, functions, structures, etc.
17:02:04
max3
i'll move to scheme in a second but - is currying the only way to define multi param functions in mit scheme? do you know?
17:03:40
pjb
(define (((a x) y) z) b) = (define ((a x) y) (lambda (z) b)) = (define (a x) (lambda (y) (lambda (z) b))) = (define a (lambda (x) (lambda (y) (lambda (z) b))))
17:03:51
max3
pjb yes of course but that's my point about haskell - the effect is multiparam functions
17:04:03
pjb
contrarily to some other functional programming languages, functions returning functions are not curried at call time.
17:18:37
phoe
(a 1) returns a function, this function is then applied to 2 and this application returns another function; that another function is then applied to 3
17:39:07
rpg
Do we believe that cl-json is no longer maintained? or am I just not finding the authoritative git repo. What I see on github.com/hankhero hasn't had any commits in 6 years.
17:44:47
theseb
Bike: I've never hard of "image based programming" until this channel from phoe...It bugs me that programmers all over the world can go their entire careers w/o ever learning about it
17:45:27
theseb
Bike: it isn't something that shows up enough that someone can even accidentally stumble upon it
17:45:30
phoe
there's ton of other things that many Lispers can never hear about and have satisfying programming careers