<aeth>
Actually, the de facto Scheme standards are the SRFIs, and Schemes care about (some of) those.
<aeth>
Which is strange because it's the opposite in the CL world, where the CL equivalent of SRFIs are pretty much entirely ignored
<aeth>
But I would disagree about no one caring about the rnrs. People care about the r5rs so much that r6rs was rejected and r7rs has to basically be compatible with r5rs.
<aeth>
A modern Scheme is essentially extensions to r5rs or r7rs-small (and r7rs-small contains an r5rs compatibility mode... so I can just say "extensions to r5rs")
<_death>
in the unlikely case of a new CL "standard", I'd give up programming
<aeth>
_death: The only way a new standard would work is if it took things that basically every popular implementation has and standardized them. e.g. gray streams.
<aeth>
It would have to be very conservative.
<Xach>
/win 3
<_death>
aeth: then there's no point to it
<aeth>
_death: It would be useful to have a new baseline for a standard CL, though. Because a "standard CL" without support for the de facto standards is useless.
uuplusu has joined #lisp
<_death>
besides, Gray streams suck
<aeth>
_death: But it would also be nice to up the minimums, and to have set minimums for each bit size. e.g. fixnums for 64-bit implementations should be at a minimum 60-bit signed-byte integers. Nearly every implementation will pass this. I think CLISP's is 48 or something, and only it will fail.
<aeth>
It would enable assumptions that probably every makes to actually be portable.
<aeth>
Afaik, CL standard sizes for things are made to be safe for 16 bit implementations. So... keep those for 16-31 bit implementations, have new minimums for 32-63 bit implementations, and have new minimums for 64+ bit implementations. Now you can make assumptions.
<aeth>
Right now, any CL application with strings longer than 1024 is technically not going to run on every possible standard CL implementation.
<aeth>
(any array at all, actually)
<_death>
I don't think you appreciate the weight of my statement.. since you seem to throw technical arguments at me :)
uuplusu has quit [Ping timeout: 256 seconds]
<aeth>
For the most part, no implementation would have to change except for ones that really go out of their way to not follow de facto standards, like CLISP. e.g. single-float and double-float and (unsigned-byte 8) arrays aren't guaranteed to exist. Only bit and character. But almost every implementation has these. (CLISP doesn't have them for floats, though.)
<aeth>
A ton of libraries assume these de facto standards that are technically not required by the standard.
__main__ has joined #lisp
uuplusu has joined #lisp
<aeth>
Depending on how conservative the extensions part is (not the same as the minimums part), SBCL might not have to change at all. It has almost all of them already.
<aeth>
Other implementations would benefit, though, because they could rely on programs that are essentially written on and for SBCL.
igemnace has quit [Ping timeout: 260 seconds]
igemnace has joined #lisp
sjl has joined #lisp
uuplusu has quit [Remote host closed the connection]
uuplusu has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
sjl has quit [Ping timeout: 264 seconds]
<Xach>
aeth: I was thinking of documenting some of those de facto standards
<Xach>
aeth: like that writing (unsigned-byte 8) stuff does what you expect
<aeth>
Xach: That would be a useful project.
<_death>
CL is a haven of stability, where not only your programs will still work in 20 years, but also the values and aesthetics of fellow programmers will remain palatable.. your code, way of writing code, way of thinking about problems won't turn "legacy" just because some committee out there put out a new document, or some dude made a bunch of commits.. CL is flexible enough to remain relevant without change.. that is why CL will never be
<_death>
successful in the professional world of programming
<aeth>
Sizes of things (e.g. fixnum size), which specialized arrays are supported, which extensions are supported, etc., would make a useful table. Perhaps also some popular library support as well (e.g. bordeaux-threads, cffi, etc.)
<aeth>
_death: A successful extension to the CL standard makes new paradigms implementable in libraries, rather than directly implementing those new paradigms. e.g. things like this should stay as libraries: https://github.com/markcox80/specialization-store/
<aeth>
But making sure that things like that *can* be implemented as libraries would be good
<Xach>
sbcl and asdf will break your code in a few months
<_death>
Xach: asdf is one thing and sbcl is another.. in sbcl we trust; in asdf, not so much
fikka has quit [Ping timeout: 248 seconds]
<_death>
(to clarify, I meant "successful" in the usual way it is used by professionals, i.e. "popular")
<aeth>
_death: Popularity doesn't have anything to do with quality, or really anything that a language can control. Languages have network effects, just like Facebook does. You can make a better social network, but that doesn't mean people will go there.
<aeth>
_death: But on the flip side, that doesn't mean CL will never be popular among programmers. What tends to work with programming languages is the "killer app" concept that works with platforms in general, except instead of "app" it's more about the ecosystem. e.g. Rails is the reason why most people use Ruby (or at least initially used Ruby, even if they switched to something else later)
<Xach>
_death: I feel the same way but I'm not sure why.
<Xach>
_death: is it because the priests of SBCL are interpreting the oracular utterances of the spec?
<aeth>
Unfortunately for Lisp, the killer "app" that drove its use was traditional-style AI.
<aeth>
(The really healthy languages like C++ and Python have multiple, very different things that draw people to the language.)
<_death>
Xach: they are also guardians of the Common Lisp Law
<_death>
aeth: I think we're miscommunicating..
<aeth>
_death: probably
smurfrobot has joined #lisp
<__sigjuice__>
what drives the disruptive changes in crucial things like asdf?
holycow has joined #lisp
<_death>
I think it's sufficient to consider just the age of SBCL (incl. its origin) vs. the age of ASDF
* |3b|
suspects most of it is difficult problem domain
<stylewarning>
__sigjuice__: every so often asdf is made “better” by introducing a small backwards incompatibility that fundamentally breaks 1–2% of the ecosystem but propagates transitively to a larger percentage.
<aeth>
Ah, I think I have the right way to get fixnum size. (integer-length (- most-positive-fixnum most-negative-fixnum))
atgreen has quit [Ping timeout: 248 seconds]
<aeth>
(- most-positive-fixnum most-negative-fixnum) should be a bunch of 1s, and integer-length should give the exact length of that bunch of 1s
<aeth>
CLISP's is 49, not 48
<|3b|>
aeth: should be able to just use positive or negative instead of both
<__sigjuice__>
stylewarning: are these sorts of breaking changes known ahead of time via cl-test-grid perhaps?
<|3b|>
if you need both, the configuration is probably odd enough that a single 'size' number would be misleading anyway
smurfrobot has quit [Ping timeout: 272 seconds]
<aeth>
|3b|: well 1+
<stylewarning>
__sigjuice__: Xach has been a great defender. He sees all of QL breaks.
<aeth>
|3b|: (1+ (integer-length most-positive-fixnum)) should give the same number
<|3b|>
right
makomo has quit [Ping timeout: 252 seconds]
xrash has joined #lisp
red-dot has joined #lisp
markong has quit [Ping timeout: 272 seconds]
dddddd has quit [Remote host closed the connection]
damke has quit [Ping timeout: 265 seconds]
damke has joined #lisp
EvW has quit [Ping timeout: 246 seconds]
<rme>
The last time we (ccl hackers) talked about an ARM64 port, we were considering using high tags. This would mean a fixnum would be a (signed-byte 56).
<|3b|>
could you still do the usual trick of dedicating 1/2 or whatever of the tags to fixnums to get some of the bits back?
<rme>
I think we were talking about tagging fixnums with sign extension so that fixnump would be quick (like 3 instructions).
<|3b|>
though fixnum size matters much less on 64bit than on 32... 24-bit fixnum is small enough to limit the size of bit-arrays on a reasonable system, 56 probably isn't :)
<|3b|>
seems like most of the time i get close to 64 bits i need all 64 bits, so doesn't really matter if fixnum is 56 or 63
<rme>
array-total-size-limit is already 56 on 64-bit ccl, so that wouldn't be a change
<fiddlerwoaroof>
Is there someway to do something like an "integer pool" so that integers don't need to be tagged?
<fiddlerwoaroof>
i.e. something like setting aside a certain chunk of memory for integers and telling the garbage collector to ignore addresses in that area?
safe has joined #lisp
EvW1 has joined #lisp
<Bike>
that would depend on a lot of implementation details
<|3b|>
fiddlerwoaroof: doesn't help with putting them in registers
<Bike>
tags aren't only used by the garbage collector, either
<|3b|>
and pretty much the point of a fixnum is that you /don't/ put it in some separate memory
Bike_ has joined #lisp
<|3b|>
though if that was just a general question unrelated to fixnums, specialized arrays are pretty much that
<fiddlerwoaroof>
|3b|: didn't think of that, I was just wondering if there was some way to use all 64 bits without running into problems like integers being mistaken for pointers
smurfrobot has joined #lisp
<Bike_>
it's possible, but usually it would be in some dynamic extent
<Bike_>
like if you had (let ((x (the (unsigned-byte 64) whatever))) ...) and x doesn't escape, sbcl can maybe do that, like it does for floats
<|3b|>
bignums let you use 64bits inefficiently, declared types let some compilers deal with 64-bit values directly, usually within some limited scope (like you probably still have to tag/box them to pass between functions)
Bike has quit [Ping timeout: 260 seconds]
Bike_ is now known as Bike
<fiddlerwoaroof>
bignums are boxed, right?
<fiddlerwoaroof>
+ have magic to combine several words into a single number?
smurfrobot has quit [Ping timeout: 252 seconds]
pransninja has joined #lisp
<pransninja>
Hello
<pransninja>
is there a version of hyperspec somewhere that doesn't look like a joke?
<pransninja>
Or maybe you have a userstyle script that you don't mind sharing?
<pransninja>
might have to write one, if there isn't any.
<_death>
pransninja: does text look like a joke to you?
mjl has quit [Read error: Connection reset by peer]
alms_clozure has quit [Read error: Connection reset by peer]
<pransninja>
_death: Are you kidding me, right? it is the interface, the content seems okay from a lisp novice point of view.
<_death>
try Common Lisp, the Picture Book
mjl has joined #lisp
alms_clozure has joined #lisp
<Bike>
fiddlerwoaroof: yes re bignums
<Bike>
though it's not very magical
<_death>
pransninja: do you think I'm kidding you because IRC is text? :)
shrdlu68 has quit [Ping timeout: 240 seconds]
<pransninja>
_death: Haha, come on, those script text in pictures and a layout that I still haven't figured out after two days of clicking around is absurd.
<pransninja>
The documents also lack a clear structure, not arguing that it is not there, typography that needs decipher defeats the purpose of typography.
<pransninja>
_death: VIM.
<Bike>
what layout is there to figure out? you get to the table of contents and click chapter titles
* pransninja
hides away
<fiddlerwoaroof>
It's a standard, not novice documentation
<pransninja>
neovim actually, but the point stands.
<Bike>
neo new vim
snits_ has quit [Quit: leaving]
<fiddlerwoaroof>
If you use mac/linux, something like Dash or Velocity makes it easier to refer to the relevant sections, but CLHS's license prevents people from modifying it.
<pransninja>
fiddlerwoaroof: Thank you, the franz one is much better.
<pransninja>
I like that it makes sense, you go to index, you go to articles, you repeat. No other nonsense.
<_death>
pransninja: so when you pick up emacs, you can download an offline copy of the clhs and just use eww or emacs-w3m to browse it, and your concerns about typography and pictures will evaporate
varjag has quit [Ping timeout: 272 seconds]
<pransninja>
_death: If my uncle had some extra bits she would be an alien.
<pransninja>
But I should give Emacs try sometime, for now, I am more keen to learn lisp.
<fiddlerwoaroof>
If you want to learn CL, it's probably better to start with something like Practical Common Lisp, Gentle or some other document
<fiddlerwoaroof>
tell pransninja about pcl
<fiddlerwoaroof>
minion: tell pransninja about pcl
<minion>
pransninja: please see pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<pransninja>
Yeah, reading that just about now.
<fiddlerwoaroof>
minion: tell pransninja about gentle
<minion>
pransninja: please look at gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
<fiddlerwoaroof>
I think PCL is one of the best introductions to a programming language that I've read, but some people have found it too verbose and its tone irritating
Bike has quit [Ping timeout: 260 seconds]
<pransninja>
fiddlerwoaroof: I am on the second bandwagon, the core content is pretty good so far though.
Bike_ has quit [Ping timeout: 260 seconds]
<pransninja>
Really like that it is "practical" but there is something about the language that makes me want to chew my nails.
<pransninja>
the language of the book, not lisp.
snits has quit [Quit: leaving]
snits has joined #lisp
<pransninja>
So far I love the whole idea of "live" programming with a REPL along with your text editor.
<pransninja>
Makes iterative programming so much nicer.
<pransninja>
I am already worried how bad going back to my "everyday" language would feel like. lol
<fiddlerwoaroof>
Yeah, I find CL so much nicer than other environments: and very few other programming languages have a similar experience: of the popular ones, only Clojure comes close and it's a bit annoying in some respects.
snits has quit [Client Quit]
snits has joined #lisp
<pransninja>
fiddlerwoaroof: I am on learn languages journey, after finishing PCL I will finish Real World OCaml, then learn F# maybe, or possibly Clojure.
<fiddlerwoaroof>
Yeah, I've finished that journey :), I think I'd suggest Haskell rather than ocaml, but this is getting off-topic;
<_death>
the "mainstream" CL environment is still a long way from satisfactory in many ways.. there are lessons from emacs, jupyter, R, matlab.. but that requires a ton of work, and we're all busy doing Something Else(TM)
<fiddlerwoaroof>
Yeah, beach and froggey sometimes seem like the only people doing something about that.
<fiddlerwoaroof>
I've wanted to, but it doesn't really pay the bills, and I don't have much free time :(
jmercouris has joined #lisp
<pransninja>
fiddlerwoaroof: I like the idea of Haskell, trust me it is on my list of to learn languages, but probably right before I want to learn Rust properly.'
d4ryus has joined #lisp
<_death>
pransninja: reading a book is one thing and learning a language is another..
<pransninja>
fiddlerwoaroof: I want to learn OCaml becuase I think ReasonML is going to be big in my industry.
<pransninja>
_death: Sure, but I can say with utmost certainty that reading a book is part of learning a language.
<pransninja>
But feel free to correct me if I am wrong; I will eat my cucumber if I am wrong.
cpape` has quit [Ping timeout: 272 seconds]
<fiddlerwoaroof>
It's often better to have some moderately complicated project to do in each language you learn and then use books and other materials to help you to implement your project in the language
d4ryus4 has quit [Ping timeout: 240 seconds]
sjl has joined #lisp
<fiddlerwoaroof>
I learned CL by reading like 2/3rds of PCL and then trying to implement a RSS reader in CL
<pransninja>
fiddlerwoaroof: For sure, I have some ideas in my mind, I actually have a project in back of my mind for years that requires understanding multiple languages to execute it well, along with a solid understanding of type theory.
<pransninja>
But back to lisp, given things like `(with-open-file (out filename ....))` how do I differentiate a function call from a list passed as a parameter?
<fiddlerwoaroof>
You can't in the general case: a macro determines the semantics of its arguments
<pransninja>
For a second I thought out was a function called with filename.
EvW1 has quit [Ping timeout: 240 seconds]
<pransninja>
That makes sense, thought I was missing something obvious.
<fiddlerwoaroof>
So, you have to read the documentation for the macro
<pransninja>
Makes sense, thanks.
<fiddlerwoaroof>
Generally, there are two or three common macro patterns: with-* define-*/def* and do* and, within each pattern, the arguments are treated in fairly consistent ways.
<_death>
you always need the context... (+ 3 5) may look like a function call, but it's not, because surrounding that form is (quote ...)
<pransninja>
good hint. so `with-*` generally takes a list?
sjl has quit [Ping timeout: 248 seconds]
<pransninja>
_death: Hmmm, I thought + operand was a function, what is it?
<pjb>
it's a symbol.
<pjb>
(type-of '+) #| --> symbol |#
<pjb>
The context is not only the surronding form, when you read it, it's the *readtable*, the *package* and other *read-…* variales.
<pjb>
+b
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pransninja>
well, if I do `(defun x ())` then `(type-of 'x)` gives me symbol too.
<pransninja>
I don't understand.
<pjb>
(defun x ()) (list (quote x) (function x)) #| --> (x #<Compiled-function x #x302002FFC72F>) |#
<pjb>
pransninja: symbol is a type of lisp objects.
<pjb>
function is another type of lisp objects.
<pjb>
Some functions can be named with symbols.
<pjb>
Some other functions are named with lists of 2 symbols, the first being CL:SETF, and some functions are unnamed.
<pransninja>
Cool.
<pransninja>
What I want to understand is that if `(+ 1 2) is not a function call, then what it is?
<pjb>
In general, some objects can be used to name some other objects.
<pransninja>
I understand that + is a symbol tho.
<pjb>
It is a symbolic expression.
<pjb>
(type-of '(+ 1 2)) #| --> cons |#
<pransninja>
But isn't it still a function?
<pransninja>
What does " Declared type: (FUNCTION (&REST NUMBER) (VALUES NUMBER &OPTIONAL))" means?
<pransninja>
I would have thought that it is a FUNCTION.
<pjb>
It's the type of a function that takes 0 or more numbers and returns a number and perhaps something else.
<pransninja>
Yeah, that is from (describe '+)
<pransninja>
:)
<_death>
pransninja: so + _names_ a function, but it is not a function
<pransninja>
yeah, of course.
<_death>
pransninja: and what `(+ 1 2)` is depends on the context.. it can be a function call, or it can be a list of 3 elements, or it can be the textual description of such a structure, for example..
<pjb>
pransninja: there are a lot of levels here, and some abuse of speech.
<pransninja>
I think I get it now.
<pjb>
pransninja: (+ 1 2) is a sequence of character. This is represented as a string in lisp, and a string is represented with the sequence of characters "(+ 1 2)" `(+ 1 2)` doesn't represent anything in lisp. More precisely, it is read as `(+ 1 2) and ` the later being incomplete and provoking an end-of-file error
<pransninja>
Given the flexibility of lisp and the fact that is uber-meta, anything could be anything?
<pjb>
"(+ 1 2)" is a string, it is also a sexp. It is read as the sexp (+ 1 2) : (read-from-string "(+ 1 2)") #| --> (+ 1 2) ; 7 |#
<pransninja>
But I suspect like how overloading could be abused in C++, it is likewise froward upon in Lisp to redefine "common sense" semantics?
<pjb>
Then the sexp (+ 1 2) can be processed by various functions. When it is processed by EVAL, it is interpreted as a function call: (eval '(+ 1 2)) #| --> 3 |#
peterpp has quit [Ping timeout: 240 seconds]
<pjb>
But if it is present in the context of other sexps, it can be interpreted differently: (eval '(quote (+ 1 2))) #| --> (+ 1 2) |#
<pransninja>
I think I will come back to this convo once I am done with PLC.
<pransninja>
PCL even.
<pransninja>
I must forge about PLCs for now.
<pjb>
(defpackage "ADD" (:use "CL") (:shadow "+")) (defun add::+ (&rest args) `'(let us add ,@args and have fun)) (let ((*package* (find-package "ADD"))) (eval (read-from-string "(+ 1 2)"))) #| --> '(let us add 1 2 and have fun) |#
<pjb>
In that context, + is just a symbol, and is interpreted by the macro LET as the name of a variable. (3 and 4 too, since the current read base is two).
smurfrobot has joined #lisp
<pjb>
But notice that in (+ + 3 4) the first occurence of the symbol + is interpreted as the name of the function +, while the second occurence is interpreted as the name of the variable + bound by the surrounding LET form.
mlau has quit [Ping timeout: 240 seconds]
<_death>
+ is also a fixed-point function when used in the repl... to see that, type + RET a few times and see how it converges
<pjb>
pransninja: everything is explained in chapter 2 and 3.
<pjb>
That's because it's defined to be a special variable that is bound to the last form that is evaluated in the REPL.
<pjb>
See also ++ +++ * ** *** / // /// and -
<parjanya>
is there a way to mark if I want a symbol to be interpreted either as a variable or a function?
<parjanya>
or is it just based on the syntax?
<_death>
you can have a symbol be interpreted as any form using symbol macros
varjag has joined #lisp
<_death>
(define-symbol-macro now (get-universal-time)) then type now RET a few times
cpape has joined #lisp
<pjb>
parjanya: it's based on the syntax. In the first position of an applicative list, it's interpreted as the name of an operator (function, macro or special operator). In other positions, as the name of a variable (or depending on the macro or special operator).
<parjanya>
I mean, if I (defun a-test (lalala) lalala) and (defparameter a-test "a string") and do (a-test a-test)
<pjb>
And then of course, as mentionned by _death, there are symbol macros, but also reader macros that can distort your senses.
<parjanya>
if I do (a-test a-test) the first one will be the function, the other one the variable, but I wonder if there is a way to say that explicitly, like when one uses 'a-test to just get the symbol
<parjanya>
pjb: I see!
nika has joined #lisp
<_death>
you can use the FUNCTION operator to designate a function.. (function +) ... a shorthand for this operator is the reader macro #' .. so #'+ will also work
<_death>
so try (a-test #'a-test)
smurfrobot has quit [Ping timeout: 260 seconds]
<pjb>
parjanya: not really in general. In the case of global special variables, you can get the value with (symbol-value 'a-test) and for global functions, you can get it with (symbol-function 'a-test), so in that specific case, (a-test a-test) can be replaced by (funcall (symbol-function 'a-test) (symbol-value 'a-test))
<pjb>
But this wouldn't work for local lexical functions and variables.
varjag has quit [Ping timeout: 268 seconds]
<parjanya>
that’s so neat
<parjanya>
I’m still to understand *why* I do like lisp this much, hah
<pransninja>
Talking to a friend about lisp and he ask "does it has a GC?" har har har.
<pransninja>
Yeah, it sure does. John McCarthy is OG GC.
jmercouris has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
leo_song has joined #lisp
<fiddlerwoaroof>
Lisp, for me, was eye-opening because it disabused me of two things: (1) compiled languages need to be statically typed and (2) compiled languages have to have a slow feedback loop.
<fiddlerwoaroof>
It was also very satisfying to find a language where I could actually write concurrent programs, since most of the other languages I've used have some form of GIL to make one's life difficutl
<fiddlerwoaroof>
<C-e><C-t>
kupad has quit [Ping timeout: 272 seconds]
damke has quit [Ping timeout: 264 seconds]
earl-ducaine has quit [Remote host closed the connection]
<beach>
Good morning everyone!
<beach>
fiddlerwoaroof: There is no such thing as a "compiled language".
earl-ducaine has joined #lisp
<beach>
fiddlerwoaroof: And it is a bad idea to pretend there is, because it gives people the wrong idea.
<beach>
fiddlerwoaroof: Then they will think like this: Lisp => interactive => interpreted => slow.
<fiddlerwoaroof>
Yeah, I should have put that in my list of things :)
damke has joined #lisp
<beach>
fiddlerwoaroof: It is very important to let people (especially your typical ignorant programmers) that most modern Common Lisp systems compile on the fly, so that the resulting speed is comparable to that of compiled C.
<fiddlerwoaroof>
Yeah, I like taking something like (defun foo (a b) (+ a b))
<fiddlerwoaroof>
and then disassembling it for someone
<fiddlerwoaroof>
and then I recompile the function with (declare (speed 3) (safety 0)) and show the difference in the disassembly
<beach>
Those ignorant programmers will of course always have an excuse to stay away from Common Lisp, but making sure they understand this issue gives them one fewer reasons to do so.
damke_ has quit [Ping timeout: 264 seconds]
<_death>
you can also mention printf vs. FORMAT, and C's lack of compiler macros and of FORMATTER :)
mlau has joined #lisp
<fiddlerwoaroof>
Also, emacs macrostep expander is pretty cool when people complain about debugging macros
<pransninja>
beach: Compile on the fly is called JIT and it is not exactly on par with native code.
<pransninja>
There is still compiling involved.
<pransninja>
It is really fast, true, but it is no native code.
<fiddlerwoaroof>
No, this is different
<pransninja>
Please explain? :)
<beach>
pransninja: Most modern Common Lisp systems compile to native code.
<fiddlerwoaroof>
Common Lisp implementations generally have a compiler that turns your lisp code into machine code
<pransninja>
right
<fiddlerwoaroof>
In fact, sbcl has its own assembler and disassembler
<pransninja>
then it is not on the fly?
<fiddlerwoaroof>
Well, when you evaluate something in a REPL, it's compiled and executed
damke has quit [Ping timeout: 264 seconds]
<_death>
pransninja: you can also compile things on the fly, the language is available at all times..
<pransninja>
What does on the fly means?
<beach>
pransninja: Perhaps you are one of those programmers I referred to who think that interactive implies interpreted.
<pransninja>
Huh?
<fiddlerwoaroof>
So it's "on the fly", but not in the way a tracing JIT compiles on the fly: e.g. it doesn't take execution patterns into account to determine the compilation
damke has joined #lisp
<pransninja>
no need to get personal, buddy.
<loke>
pransninja: It means "automatically when needed". As opposed to the user having to go through a manual compilation phase.
Bike has joined #lisp
<pransninja>
fiddlerwoaroof: Right, but does every JIT has to be tracing JIT?
<loke>
fiddlerwoaroof: That definition does get a bit muddy in the case of ABCL though. :-)
<beach>
pransninja: It means that between the time you validate an input expression and the time you see the result of executing it, the Common Lisp system has turned it into real native code.
<pransninja>
So it is compiled, what does "on the fly" technically means?
<beach>
Since it *IS* native code, it is by definition "on par" with native code.
<pransninja>
I understand that REPL is powerful, but if it compiles, then it compiles.
<beach>
It does.
mlau has quit [Ping timeout: 260 seconds]
<beach>
... in most modern Common Lisp implementations.
<pransninja>
So "on the fly" means nothing?
<beach>
pransninja: It means that between the time you validate an input expression and the time you see the result of executing it, the Common Lisp system has turned it into real native code.
<pransninja>
And how is that different than "offline compiling"? in contrast to your "on the fly"?
<pransninja>
Just trying to understand here.
<beach>
pransninja: If you define "offline compiling" I may try to explain.
<pransninja>
it means nothing.
<pransninja>
It just means compiling.
<beach>
Then I can't explain the difference.
<pransninja>
I just wanted to see how "on the fly" is different than your standard compiling.
<pransninja>
Look, I think REPL is sexy, I am loving it, this is my first experience with such a "live" coding way.
<pransninja>
I have used REPLs before, but this level of integration with text editor and such is dope.
<Bike>
using a repl is a different way to program from writing a program and throwing it at gcc or whatever, as you've already seen
<_death>
pransninja: port my program to C
<Bike>
that's about it, probably
<beach>
pransninja: Most people think of compilation as a batch compiler producing files containing object code that then has to be linked in order to produce an executable. I use "on the fly" as a contrast to that.
<pransninja>
I just want to understand what "on the fly" means?
<beach>
pransninja: I am more interested in why you think the Common Lisp compiler produces something that is not "on par" with native code. Can you elaborate on that?
<loke>
pransninja: As I said earlier, "on the fly" means that it's done automagically, without you having to go through a compilation phase (like in C, when you have to run "make" separately before testing the program)
<pransninja>
beach: The common meaning of "on the fly" is JIT, which is on par with native code, but not quite.
<beach>
What makes it not on par with it?
<pransninja>
JIT is not free.
<pransninja>
The compiling, and often the tracing involved, takes CPU cycles.
<beach>
pransninja: Maybe you have a different concept of "native code" that most people here do.
<loke>
pransninja: Actually, JIT can (and has been shown to) produce more efficient code than static compilation. That said, most Common Lisp implementations does not use a JIT (only ABCL does, as far as I know)
<beach>
pransninja: That is why what the Common Lisp compiler does is not JIT as you were told.
<pransninja>
In contrast to "offline" compiling where you just have native program, and maybe a runtime, and you CPU just deals with that.
<_death>
pransninja: in Lisp we can have things compiled JIT or AOT, as we please
<pransninja>
loke: "efficient" doesn't mean fast.
<beach>
pransninja: What is your definition of "native code"?
<loke>
pransninja: I meant fast.
mlau has joined #lisp
<pransninja>
loke: For some problems JIT can be faster, but JIT is not free.
<pransninja>
beach: CPU native instruction sets? huh.
<loke>
pransninja: True. But it's mostly irrelavent in the discussion of Common Lisp, since most CL's does not use a JIT anyway.
<beach>
pransninja: Then, the Common Lisp compiler produced native code.
<pransninja>
loke: Yeah, so calling it "on the fly" compile is bullcrap.
<pransninja>
It is compiled. simple stuff. :)
<loke>
pransninja: Not really... Let me show you. Do you have SBCL in front of you?
* beach
just lost interest in this discussion.
<pransninja>
I am actually running it with vlime to go through PCL book.
<pransninja>
So yes.
<pransninja>
If it is not JIT it is not "On the fly".
<loke>
pransninja: OK, type the following into the REPL: (defun foo (x) (declare (optimize (speed 3) (safety 0))) (1+ x))
<loke>
pransninja: Then type the following:
<loke>
pransninja: (disassemble #'foo)
<pransninja>
Is that a fork bomb? lel.
<loke>
pransninja: No. it just declares a function which adds 1 to the argument.
<loke>
The decond command prints the code that the compiler generated.
asarch has quit [Quit: Leaving]
<pransninja>
loke: Yeah, so I got to run disassemble with my text editor, I see the disassemble.
<pransninja>
disassembly.
<loke>
pransninja: Exactly. But you never invoked the COMPILE function, did you?
<pransninja>
lol
<pransninja>
That doesn't make a difference.
<loke>
pransninja: That's what "on the fly" means.
<pransninja>
It is still compiled and not JITed.
<pransninja>
What is so confusing about that?
<loke>
pransninja: Correct. No one said it's JIT'ed
<_death>
pransninja: you can have it JITed if you want
<parjanya>
what’s difficult about "on the fly" meaning "without having to invoke make and then execute"?
<pransninja>
Many IDEs allows you to do see "disassembly" or even "run" compiled languages with "invoking compile" directly.
<pransninja>
That doesn't change the fact that the language you're using is compiled.
<loke>
pransninja: Indeede. But none (or at least very few) of those languages allow you to recompile code _while_the_program_is_running_
<parjanya>
why should it "change that fact"?
<pransninja>
loke: Shall I repeat, "on the fly compile" means "JIT".
<parjanya>
to whom?
<beach>
There is no such thing as a "compiled language". That has to do with the implementation strategy.
<pransninja>
beach: Yeah, which is why I said "the language is compiled" not that "you're using a compiled language".
<pransninja>
Huh?
<pransninja>
parjanya: To whom it does not mean JIT?
shrdlu68 has joined #lisp
<pransninja>
Searching for "on the fly compiler" and see what your fav' search engine brings up: Just-in-time Compiling.
<pransninja>
You guys are ludicrous.
damke has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof>
pransninja: languages aren't compiled. Almost any language can be implemented by a compiler or an interpreter
<fiddlerwoaroof>
for example, there are C interpreters that execute C without compiling it
<pransninja>
Let's not split hair please.
<pransninja>
You could argue the semantics of English with me and I will lose.
<beach>
Oh, that's a good one.
<_death>
pransninja: here is a program: (defvar *program* '(lambda (x) (1+ x))) .. it is not yet compiled
<loke>
pransninja: You're arguing sematics now. You have some very specific definitions of certain words that does not exactly match the definitions everybody else is using. Now, you may think that our definitions are wrong, but that doesn't matter. I think you have a rough uinderstanding of the way Lisp does things, and it doesn't matter what you or I call it, no?
<pransninja>
But calling anything "on the fly compile" that is not "JIT" is bullshit.
<fiddlerwoaroof>
This isn't, though, gcc is a compiler, but C isn't a "compiled language"
<pransninja>
I am done. :)
<pransninja>
I will come back if I have lisp question tho.
<fiddlerwoaroof>
havefun :)
<_death>
pransninja: now we have arrived at the moment to compile it, so we compile it, just in time: (compile nil *program*) and call it (funcall * 123)
damke has joined #lisp
smurfrobot has joined #lisp
<pransninja>
_death: It doesn't matter what. On The Fly Compile is a synonym for JIT, and JIT is basically dynamic translation, if you're not doing dynamic translation, you're not compiling on the fly.
<pransninja>
What is so hard to understand about that sentence?
<loke>
pransninja: OK, fine. But what would you call the SBCL method then?
<_death>
pransninja: you seem to be hung up on your own private language
<loke>
pransninja: We need to call it SOMETHING, and if you're not happy with our definition, what do you suggest instead?
<pransninja>
_death: I said, search for "on fly compiler" in whatever search engine you like and see what the first result is. If it is not JIT, I will eat my banana.
<pransninja>
loke: It is called REPL?
<parjanya>
the funny thing is you decreeing the meaning of an expression and saying that we shouldn’t argue semantics ; )
<pransninja>
I am not decreeing, I have read "on fly compile" refereed JIT that I struggle to see how anyone would think it could mean anything else. :P
<loke>
pransninja: No. The REPL means read-eval-print-loop. It's just the commandline interface. Even fully interpreted implementations have a REPL.
<pjb>
and even fully compiled implementations have a REPL.
shrdlu68 has quit [Ping timeout: 264 seconds]
<pransninja>
now we have a new term "fully compiled".
<pransninja>
Jebus Cries.
Arcaelyx has joined #lisp
<pjb>
Some implementation compile when load but not in the repl.
<loke>
pransninja: That artcile discusses calling the C# compiler dynamically, in a way that is not too disimilar from the Common Lisp way of doing it.
smurfrobot has quit [Ping timeout: 256 seconds]
<pjb>
Some implementation just perform minimal compilation, not "full" compilation.
<_death>
pransninja: there is ambiguity in the world
<fiddlerwoaroof>
"on the fly" is sort of a colloquialism, so one generally figures out what it means by looking at the context it's used in, not by forcing a certain meaning onto the phrase wherever you find it.
<pjb>
A minimal compilation still involves an "source-level" interpreter for execution.
<pjb>
A compiler may still involve a byte-code interpreter or some other form of interpreting for execution.
<pransninja>
loke: I somehow feel like "Just-in-time compilation" Article on wikipedia is also not "Java" related.
<_death>
pransninja: but you're a programmer! so we can resolve the ambiguity using code.. so please, tell us what you mean using code
<pransninja>
But whatever floats your goat.
<fiddlerwoaroof>
Common Lisp implementations will often call the compiler "automatically" when trying to evaluate a chunk of code and, on the fly is a reasonable way of talking about this. In a JIT, the compiler is called at runtime in response to observed patterns of execution, which is another thing to reasonably call "on the fly" compilation.
<loke>
pransninja: I added -java to the google search term
<fiddlerwoaroof>
Anyways, whatever :)
<whoman>
^_^
<loke>
pransninja: But this all very “whatever” since you have made your point clear, and while we don't agree with you, I think we understand what you mean.
<loke>
pransninja: Perhaps after using Lisp for a while, you can start to understand why we feel it's important to make these distinctions. Even if you refuse to use our terminology, it will help you explain things to us.
<pransninja>
Look, my first comment after asking a question when I got here was that I love this whole "live" programming with a REPL + editor setup.
<pransninja>
So it is not that I don't see the value;.
raphaelss has quit [Ping timeout: 240 seconds]
<pransninja>
I even expressed my concerns about how my everyday programming language envs would feel like after this.
<pransninja>
So not arguing that.
<pransninja>
But there is no point in repeating that "on the fly" means JIT pretty much just about anywhere I have read it.
<loke>
pransninja: All right. So let's just drop the terminology discussion, and focus on the important points: How to ensure that you feel confortable with Lisp.
<pransninja>
If lispers have a different meaning, all good with me.
<loke>
pransninja: I wouldn't say Lispers have a very “different” definition. More nuanced perhaps.
<pransninja>
fair enough
<whoman>
nevermind lisp, english is all macros
<loke>
pransninja: And if you want to twist your head even further, remember that ABCL is an implementation of Common Lisp whose compiler generates Java bytecodes, at runtime.
<aeth>
"on the fly" can be used to implement JIT, right? Is it possible that a language that compiles to CL could be JIT even when the implementation itself is AOT? Or do CL implementations not have enough introspection?
<loke>
pransninja: ...which is then executed by the JVM which does... well... JIT. :-)
<whoman>
how many wings are on the fly
<_death>
JIT flies like an arrow
<loke>
pransninja: So as you can see, at that point it simply doesn't make sense to even talk about the distinction, because ABCL is pretty much “all of the above”.
__sigjuice__ has quit [Quit: Page closed]
<aeth>
Fruit flies like a banana
<whoman>
for each dictionary entry linking to other entries, forever. how do we even resolve that macro ?
smurfrobot has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
<aeth>
_death: Ime, for technical subjects Wikipedia is good at explaining things, but bad at teaching things. It's okay to read the article on Foo if you already learned about Foo from somewhere else.
zaquest has quit [Read error: Connection reset by peer]
smurfrobot has quit [Ping timeout: 265 seconds]
<fiddlerwoaroof>
What's the best way to get bindings for a C library? wrapping the types with the groveler than manually writing bindings for the functions?
smurfrobot has joined #lisp
igemnace has joined #lisp
<fiddlerwoaroof>
Also, is it possible to extend slime-selector?
shrdlu68 has joined #lisp
<beach>
Or you can write a Common Lisp version of the library that would then benefit the entire Common Lisp community.
smurfrobot has quit [Ping timeout: 248 seconds]
schoppenhauer has quit [Ping timeout: 248 seconds]
joga has quit [Ping timeout: 248 seconds]
spoken-tales has quit [Remote host closed the connection]
schoppenhauer has joined #lisp
spoken-tales has joined #lisp
shrdlu68 has quit [Ping timeout: 256 seconds]
Ukari has joined #lisp
<fiddlerwoaroof>
I'm experimenting with osx, so that would sort of defeat the purpose
<fiddlerwoaroof>
My goal is to figure out the objective-c runtime well enough that I can fix the beagle backend for clim
<fiddlerwoaroof>
s/clim/mcclim/
<beach>
I see.
<fiddlerwoaroof>
And, hopefully, remove the dependency on CCL
<whoman>
i would imagine at least most of slime is extensible
<beach>
whoman: Is that a new discussion topic, or is it somehow related to what fiddlerwoaroof is doing?
<fiddlerwoaroof>
Yeah, I just discovered slime-selector-methods
<fiddlerwoaroof>
beach: no, I asked if slime-selector is extensible
<beach>
Oh, right, missed it.
<fiddlerwoaroof>
because I wanted an easy way to jump to the asd file
attila_lendvai has quit [Read error: Connection reset by peer]
parjanya has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
holycow has quit [Quit: Lost terminal]
turkja has joined #lisp
shrdlu68 has quit [Client Quit]
spoken-tales has quit [Remote host closed the connection]
spoken-tales has joined #lisp
uuplusu has quit [Remote host closed the connection]
spoken-tales has quit [Client Quit]
kupad has joined #lisp
spoken-tales has joined #lisp
PuercoPop has quit [Quit: Page closed]
uuplusu has joined #lisp
spoken-tales has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
uuplusu has quit [Ping timeout: 260 seconds]
_whitelogger has joined #lisp
uuplusu_ has joined #lisp
uuplusu has quit [Read error: Connection reset by peer]
dieggsy has quit [Ping timeout: 252 seconds]
White_Flame has joined #lisp
LocaMocha has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smurfrobot has quit [Ping timeout: 264 seconds]
Ukari has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
JuanDaugherty has joined #lisp
safe has quit [Read error: Connection reset by peer]
gravicappa has joined #lisp
uuplusu_ has quit [Remote host closed the connection]
uuplusu has joined #lisp
aindilis has quit [Ping timeout: 264 seconds]
aindilis` has joined #lisp
aindilis` has quit [Remote host closed the connection]
smurfrobot has joined #lisp
aindilis has joined #lisp
raphaelss has quit [Remote host closed the connection]
khisanth_ has quit [Ping timeout: 252 seconds]
shka has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
rippa has joined #lisp
pierpa has quit [Quit: Page closed]
<shka>
good morning
<shka>
i need boxed value, what is the smallest box possible?
khisanth_ has joined #lisp
<shka>
would that be cons cell?
<Bike>
you could make a struct with one slot.
<shka>
would that be smaller?
megalography has joined #lisp
megalography has left #lisp [#lisp]
megalography has joined #lisp
megalography has quit [Client Quit]
<Bike>
maybe
smurfrobot has joined #lisp
<beach>
shka: I am pretty sure that depends on the implementation. What do you need it for?
<Bike>
but maybe not, who knows
<shka>
Bike: right
<White_Flame>
I've used the cons cell for the purpose. It tends not to be just the smallest in memory footprint, but in code too
<White_Flame>
used it for a locative slot container, basically
Kevslinger has quit [Quit: Connection closed for inactivity]
<shka>
beach: i need to track ownership for shared objects, owner can mutate his object, rest has to copy, i figured that i can stick gensym into box and then add this box to every object. Finalizer of owner will set content of box to nil to indicate that ownership can be taken by any other object.
smurfrobot has quit [Ping timeout: 248 seconds]
<shka>
act of ownership acquisition should be atomic
<beach>
Sounds complicated, but a CONS cell should do.
<beach>
You probably need either CAS or a lock for that.
<shka>
yeah, i would use CAS
<shka>
and OFC there is no trivial-atomic-ops
mishoo_ has joined #lisp
Ukari has joined #lisp
<shka>
beach: anyway, it is not that complicated, and all it boils down is to side effect containment. Combined with lazy approach it gives optimized functional containers.
<beach>
shka: Thanks. Some other time. I am busy right now.
<shka>
cl-ds has something like this, but my current approach is semi-broken
shrdlu68 has joined #lisp
<shka>
(that is: it does not prevent code from working, but it is a little bit pointless at certain point)
<shka>
beach: by right now, you meant all the time? :D
<shka>
anyway, i really need to go
smurfrobot has joined #lisp
parjanya has quit [Remote host closed the connection]
Bike has quit [Quit: Page closed]
smurfrobot has quit [Ping timeout: 252 seconds]
conceivably has quit [Remote host closed the connection]
dddddd has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
vydd has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
shka has quit [Ping timeout: 272 seconds]
shrdlu68 has quit [Ping timeout: 265 seconds]
smurfrobot has joined #lisp
vydd has quit [Ping timeout: 256 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
smurfrobot has quit [Ping timeout: 252 seconds]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
Ukari has quit [Ping timeout: 264 seconds]
hexfive has quit [Quit: cant touch this]
smurfrobot has joined #lisp
damke has joined #lisp
raphaelss has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Ping timeout: 272 seconds]
fourier has joined #lisp
t0adst00l has joined #lisp
isoraqathedh has quit [Quit: Verhatenad!]
isoraqathedh has joined #lisp
smurfrobot has joined #lisp
fourier has quit [Ping timeout: 272 seconds]
borei has joined #lisp
_cosmonaut_ has joined #lisp
nostoi has joined #lisp
makomo has joined #lisp
shrdlu68 has joined #lisp
nika has quit [Remote host closed the connection]
nostoi has quit [Read error: Connection reset by peer]
fourier has joined #lisp
nostoi has joined #lisp
nostoi has quit [Read error: Connection reset by peer]
nika has joined #lisp
nostoi has joined #lisp
msb has quit [Ping timeout: 268 seconds]
nika has quit [Ping timeout: 246 seconds]
nika has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
mishoo_ has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
vaporatorius__ has joined #lisp
vap1 has quit [Ping timeout: 252 seconds]
damke has quit [Ping timeout: 264 seconds]
Ukari has joined #lisp
nostoi has quit [Quit: Verlassend.]
Ukari has quit [Ping timeout: 240 seconds]
msb has joined #lisp
Ukari has joined #lisp
codesine has joined #lisp
<codesine>
Hi all
<beach>
Hello codesine.
<codesine>
Anyone here atm?
<beach>
Of course. Plenty.
<codesine>
What’s a good book or single point of entry for Common Lisp programming especially from a math background
<beach>
It depends on whether the person already knows some other programming language.
<codesine>
C++ / matlab
<beach>
Most people here would recommend PCL then.
<codesine>
Especially from a functional aspect
<beach>
minion: Please tell codesine about PCL.
<minion>
codesine: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<beach>
codesine: Common Lisp is not considered a particularly function language in that sense.
<beach>
codesine: So you are going to have a hard time finding a book that does functional programming only in Common Lisp.
<beach>
"functional programming only" as opposed to "both functional, imperative, and object-oriented programming"
<beach>
codesine: I should have said: Common Lisp is not considered a particularly functionAL language in that sense.
<codesine>
Ah
<beach>
codesine: Modern Common Lisp code uses CLOS-style object-oriented programming a lot.
<codesine>
Friend with heavy mah background interested in lisp or scheme maybe
<Zhivago>
CL is procedural. :)
<codesine>
math*
shrdlu68 has quit [Read error: Connection reset by peer]
<beach>
codesine: Well, since this channel is dedicated to Common Lisp, the opinions here are biased.
<beach>
codesine: Functional programming is one of the paradigms that Common Lisp supports, but I think it will be hard to find a book that uses Common Lisp and that is all or even mostly about functional programming.
fourier has quit [Ping timeout: 265 seconds]
codesine has quit [Ping timeout: 260 seconds]
<beach>
codesine: One important use of functional programming in Common Lisp is in macro expanders, because you typically don't want macro expanders to have side effects. Therefore, a book like On Lisp mostly uses functional programming, but it is a very special use case for that style.
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
<beach>
Scheme is also not particularly functional, but maybe Scheme books emphasize that style more often.
<Zhivago>
I think it's more that recursion looks more functional than iteration, to people who don't realize that iteration is recursion.
<_death>
that cons is a recursive data structure helps
<Zhivago>
Well, by that token, so are C strings.
<_death>
but those are bounded
<Shinmera>
What's a little buffer overrun between friends
<Zhivago>
Doesn't change that you can recursively decompose them by pointer arithmetic.
<_death>
and char needs to be your main data type then
<Zhivago>
Well, you can generalize it to sequences of data within arrays.
<_death>
and you can't use 0 without breaking that abstraction
<Zhivago>
And since all data in C is effectively in arrays ...
<_death>
and since you have to maintain explicit ownership of objects..
SqREL has joined #lisp
<_death>
C isn't terribly convenient for such style
<loke>
s/ for such style//
<Zhivago>
Well, C isn't convenient for anything, so ...
<Shinmera>
It's somewhat convenient for getting a simple app running "directly" on every major OS
<_death>
C is great for greeting worlds
<_death>
plus it's another language whose community cares about stability
Vicfred has quit [Quit: Leaving]
<sigjuice>
C is syntactic sugar for memory :p
<Shinmera>
So's everything in the end
<_death>
it's useful in helping (read "practically forcing") people think about representations that may not be immediately obvious
shrdlu68 has joined #lisp
<_death>
especially in comparison to Lisp..
shrdlu68 has quit [Quit: Lost terminal]
<whoman>
C is close to the ... von neu? wait.. asm? x86? way of doing things. close to how the machine works, more so with our current machines than lisp afaik
<_death>
maybe it's close to how really old machines used to work
wigust has joined #lisp
<whoman>
C or Lisp ?
<_death>
which one do you think
<whoman>
well lisp is older, and it needs a vm.
Kaisyu has quit [Quit: Connection closed for inactivity]
Karl_Dscc has joined #lisp
<p_l>
C requires a VM that simulates PDP-11 ;)
kozy has quit [Quit: No Ping reply in 180 seconds.]
<p_l>
VM is just a catch-all for the environment specified to be used by language so you have simple replicated target to write your applications against
kozy has joined #lisp
<whoman>
or could i say, the unoptimized disasm of C more closely resembles the machines instructions than for Lisp ?
<_death>
maybe these machines were more optimized towards C..
SqREL has quit [Ping timeout: 260 seconds]
<whoman>
yea..
Ukari has quit [Ping timeout: 240 seconds]
SqREL has joined #lisp
<whoman>
would that be the same for GPUs as their shading languages are kinda like C?
* whoman
knowns nothing of their disasm, stuck on opengl 2.1 for life
<whoman>
no lambda cpu or cons chips ?
<p_l>
nope. unoptimized output of C also tends to not look very modern, though compilers kinda cheat there by not implementing truly unoptimized form in output
<whoman>
yea ? cuz that part is a bit of an obstacle for me with lisp as i grew up with C, but i really dont see how lisp is any different, if i grew up on that instead
<p_l>
C gives an illusion of being very low level, but I think it hasn't been true since it left PDP-11
<p_l>
"standard" C, among other things, disallows direct access to memory
<_death>
that's why no one wrote "standard" C
<p_l>
_death: I know one person who trolled C programmers with standard-compliant C-in-Perl implementation
<p_l>
quite a lot of software even ran on it
<_death>
unsigned char far *screen = (unsigned char far *)0xB800; // fun times
<beach>
So in fact, for applications, C is inconvenient, and for "system programming", you have to write nonconforming code to do what you want.
<p_l>
yeah, also known as "UB" and "compiler is allowed to do anything, including murdering your pet goat, upon encountering that line"
<whoman>
hmm. c is still a bit low level though ?
<p_l>
It's low level in the sense of making you worry about irrelevant (to application you're writing) concerns
manualcrank has quit [Quit: WeeChat 2.0.1]
<p_l>
which is, I think, best description of what low-level is
<_death>
beach: the code can be conforming but still use implementation defined behavior
* whoman
ruminates on that
fourier has joined #lisp
<p_l>
for popular definition of "systems programming", the code is pretty much always full of non-conforming bits, or at least "uses a VM implemented in nonconforming code" as runtime
Karl_Dscc has quit [Remote host closed the connection]
<_death>
I think C, Forth, and assembly are prime candidates for an embedded program.. of course, you could use Lisp to generate the code ;)
<beach>
_death: Fair enough.
wheelsucker has quit [Ping timeout: 240 seconds]
dmiles has quit [Read error: Connection reset by peer]
* p_l
points to Roomba
uuplusu has quit [Remote host closed the connection]
logicmoo has joined #lisp
<p_l>
_death: assembly doesn't count, since it's essentially an intermediate form of a program generated by something else
<JuanDaugherty>
it is?
<Shinmera>
hand_written.asm
<_death>
p_l: I generated a lot of assembly by myself
<p_l>
_death: yeah, but you weren't writing opcodes manually to be executed :)
<JuanDaugherty>
i know it seems that way these days
<_death>
p_l: I sure did..
<p_l>
that's not assembly then, just programming the way before assemblers gave us useful intermediate
<_death>
p_l: especially when the assembler didn't support some new instructions :)
<p_l>
I mean that assembler, in its typical form, doesn't count as essentially an intermediate for talking native language of the chip
<p_l>
Yes, you can handwrite it
attila_lendvai has quit [Read error: Connection reset by peer]
<p_l>
hell, PDP-10 bootstrap was handled by handwriting opcodes into registers then swapping them with memory
<_death>
p_l: right.. you could use Lisp to generate the machine code, not the assembly text
<p_l>
_death: and arguably every lisp compiler that generates native code does something like that, though they sometimes happen to not show it directly
<beach>
If anyone wants to help out with the machine description(s), feel free.
varjag has joined #lisp
<p_l>
btw, does anyone know a single place where I could read about R. Scott McIntyre's CL libs?
nika has quit []
logicmoo has quit [Read error: Connection reset by peer]
dmiles has joined #lisp
_cosmonaut_ has quit [Ping timeout: 248 seconds]
damke has quit [Ping timeout: 264 seconds]
damke has joined #lisp
_cosmonaut_ has joined #lisp
mathrick has quit [Ping timeout: 256 seconds]
xrash has quit [Ping timeout: 264 seconds]
t0adst00l has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 268 seconds]
SqREL_ has joined #lisp
Guest97394 has quit [Quit: WeeChat 1.7.1]
SqREL has quit [Ping timeout: 272 seconds]
DeadTrickster has quit [Read error: Connection reset by peer]
quazimodo has joined #lisp
DeadTrickster has joined #lisp
<phoe>
What's the standard function for checking if STRING1 is a continuous part of STRING2?
<phoe>
SEARCH. Thanks.
quazimodo has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
<cess11>
'''''''''''''''
<cess11>
Right, cat talk.
atgreen has joined #lisp
quazimodo has joined #lisp
fourier has quit [Ping timeout: 264 seconds]
atgreen has quit [Client Quit]
nirved has joined #lisp
atgreen has joined #lisp
vaporatorius__ has quit [Ping timeout: 240 seconds]
vaporatorius__ has joined #lisp
zaquest_ has quit [Quit: Leaving]
markong has joined #lisp
JuanDaugherty has quit [Quit: Ex Chat]
raynold has quit [Quit: Connection closed for inactivity]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
makomo_ has joined #lisp
makomo has quit [Ping timeout: 256 seconds]
Kevslinger has joined #lisp
mishoo_ has joined #lisp
zaquest has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
gabot has quit [Ping timeout: 272 seconds]
scymtym has joined #lisp
gabot has joined #lisp
Amplituhedron has joined #lisp
random-nick has joined #lisp
pedh has joined #lisp
wxie has quit [Remote host closed the connection]
wigust has quit [Ping timeout: 272 seconds]
pedh has quit [Client Quit]
SqREL has joined #lisp
EvW has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
zaquest has joined #lisp
SqREL_ has quit [Ping timeout: 256 seconds]
Tobbi has joined #lisp
orivej has joined #lisp
Amplituhedron has quit [Ping timeout: 260 seconds]
makomo_ has quit [Quit: WeeChat 1.9.1]
makomo has joined #lisp
makomo has quit [Client Quit]
LiamH has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
zulu_inuoe has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
vydd has quit [Ping timeout: 265 seconds]
EvW has joined #lisp
zaquest has joined #lisp
Karl_Dscc has joined #lisp
damke has joined #lisp
warweasle has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
SaganMan has joined #lisp
Tobbi has quit [Remote host closed the connection]
Tobbi has joined #lisp
jack_rabbit has quit [Quit: Leaving]
uuplusu_ has quit [Read error: Connection reset by peer]
_cosmonaut_ has quit [Quit: Leaving.]
varjag has quit [Remote host closed the connection]
varjag has joined #lisp
varjag has quit [Ping timeout: 272 seconds]
peterpp has joined #lisp
red-dot has joined #lisp
dec0n has quit [Read error: Connection reset by peer]
EvW has quit [Ping timeout: 246 seconds]
brendyn has quit [Ping timeout: 252 seconds]
fourier has joined #lisp
al-damiri has joined #lisp
turkja has quit [Ping timeout: 263 seconds]
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
fourier has quit [Ping timeout: 240 seconds]
Cymew has quit [Remote host closed the connection]
jmercouris has joined #lisp
<jmercouris>
Is it more expensive to pass around a large list as an arugment instead of a boolean? or is the cost the same?
<Xach>
jmercouris: it is the same.
<jmercouris>
Xach: Ok, good to know, thank you
Cymew has joined #lisp
<Shinmera>
Why would anything cost more to pass than anything else
<jmercouris>
Shinmera: You should question all assumptions
<jmercouris>
Otherwise you'll never be good at debugging :)
<Shinmera>
You should also try to answer your own questions
<jmercouris>
Shinmera: IIRC this is a community designed to help and support each other
<jmercouris>
Whenever someone has a question here that they ask, I always answer, refraining from saying RTFM
<jmercouris>
Additionally, my question is complex and implementation dependent, what am I to do, spin up an instance of each implementation and test it?
<jmercouris>
I don't pretend to be an expert, and I know when it is smarter to ask, rather than to fumble around
<Shinmera>
You still haven't answered my question
<jmercouris>
Shinmera: If you want to be real smart about it, consider an implementation that copies memory addresses when making a new caller
<jmercouris>
s/memory addresses/the contents of memory at addresses
<beach>
jmercouris: That would not be allowed.
<jmercouris>
beach: Well, I have no way of knowing that as I've never implemented a CL system from scratch
<beach>
You need to know that in order to be an application programmer.
Cymew has quit [Ping timeout: 268 seconds]
<jmercouris>
beach: There are most definitely implementations of programming languages that copy the contents of memory when making a call
<beach>
You need to know when EQ must return true.
<beach>
jmercouris: Yes, but the Common Lisp standard is very precise about it.
<jmercouris>
Well, this is just one example of how it MAY be more expensive, I see now very obviously why that is not the case in CL, but there are other scenarios I can think of
<beach>
Name two.
Cymew has joined #lisp
<Shinmera>
There are cases when passing a value /at all/ is more expensive than not passing it. Such as when a value can be immediate within a block, but needs to be boxed across boundaries.
<jmercouris>
Consider an implementation that does some checking of the contents of arguments before calling them in a new function
<jmercouris>
This would likely increase with the size of the data structure being sent
<jmercouris>
Why might it be checking the arguments? Maybe it is checking that they have not been corrupted, perhaps the code is running on some lunar probe that is subject to solar radiation
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<dim>
it's ok to be lost in your own code and ask “stupid” questions to help debugging, we can be your rubber duck!
<jmercouris>
Consider a situation in which invoking a new caller will require the machine to begin paging memory on the hard disk, this means that now some amount of memory, entirely OS and implementation dependent will have to be moved to the HDD, how does the system decide? will one of the arguments be on disk while another is still in ram?
<dim>
(I know I tend to use this channel as a rubber duck, and hope that's still ok)
<jmercouris>
beach: I have provided two very plausible scenarios in which the size of the argument may cause strange behavior depending on the caching strategy of the implementation
<jmercouris>
The CL implementation is supposed to be a black box as far as I am concerned, I'm fairly confident that the spec does not say something along the lines of "function calling execution time shall not depend on the size of the arguments contained within the call"
SqREL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach>
jmercouris: With few exception, all arguments are the same size in Common Lisp.
Cymew has quit [Ping timeout: 260 seconds]
<beach>
jmercouris: Otherwise, you couldn't store them in a simple vector.
Cymew has joined #lisp
<jmercouris>
beach: So, my situations are plausible then :P
<beach>
No, you keep referring to the size of the argument as being variable. But it isn't.
<jmercouris>
Ok, let me rephrase, the size of the data represented by the argument
<beach>
But that data is not sent as an argument.
<jmercouris>
It is not, hence why no "performance" impact
<jmercouris>
But! We do not know what the implementation is doing with that data
<jmercouris>
Why might it not be doing parity checks as I suggested above?
<jmercouris>
If the safety of the system is important, and there is random solar radiation, it may be important
<Shinmera>
For all we know an implementation might just randomly insert SLEEP wherever it wants just to screw with you. How are we supposed to answer your question?
Jesin has joined #lisp
<jmercouris>
Shinmera: Xach answered it just fine, in a practical manner, effectively he said "no, it will not cause a slow down"
<jmercouris>
if there was some catch, like "on ECL it will be slow due to some xyz" he would have said it I assume
<jmercouris>
I'm not asking about the CL spec, I'm asking about a reasonable CL implementation whether it will have an impact in real life
<jmercouris>
These questions might seem stupid, but I've seen a lot of counter-intuitive things that have made me question my sanity, so I prefer to be safe than sorry
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
<jmercouris>
sorry for the off-topic rant
red-dot has joined #lisp
<Xach>
jmercouris: it's not a stupid question, but one that displays deep ignorance.
<Xach>
An ignorance that needs correcting if progress is to continue.
<Xach>
And it has everything to do with the CL spec and the semantics of CL.
Cymew has quit [Ping timeout: 260 seconds]
Karl_Dscc has quit [Remote host closed the connection]
fourier has joined #lisp
makomo has joined #lisp
<Xach>
Not every question is so revealing.
raphaelss has quit [Remote host closed the connection]
ebrasca has joined #lisp
<ebrasca>
Hi, how to decode 2-byte characters from octet array?
<Xach>
ebrasca: there are several ways. i like to use (logior (ash (aref array i) 8) (aref array (1+ i)))))
<Xach>
swapped if necessary.
<warweasle>
Xach: Is that better than parse-integer?
<Xach>
ebrasca: ok, then perhaps babel or similar would be better, with the appropriate encoding.
<Xach>
warweasle: parse-integer seems like it is for a different purpose to me.
<Xach>
ebrasca: but underneath, babel or anything else will take two octets, create a 16-bit integer from it, and look up that integer in a table that maps to characters. you can do the steps yourself if you wish.
<Xach>
code-char is the table lookup function in CL. it will de facto (but not de jure) do what you want.
<ebrasca>
I am implementing fat32 for mezzano OS.
<Xach>
In that case, you may need to provide your own table.
* warweasle
might play code golf later.
dieggsy has joined #lisp
<ebrasca>
Xach: with code-char give someting like "l
<Xach>
ebrasca: code-char returns a single character
<Xach>
you can accumulate those into a string.
vaporatorius__ has quit [Ping timeout: 250 seconds]
vaporatorius__ has joined #lisp
josemanuel has joined #lisp
<ebrasca>
mezzano have babal and flexi-streams
<Xach>
ebrasca: what is the encoding of the 16-bit character codes?
dieggsy has quit [Remote host closed the connection]
Jesin has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
orivej has joined #lisp
dieggsy has joined #lisp
fourier has quit [Remote host closed the connection]
<pjb>
(string (code-char 65)) #| --> "A" |#
<ebrasca>
pjb: Is code-char only for 1 octet character?
<pjb>
Nope.
<pjb>
(string (code-char 8712)) #| --> "∈" |#
Arcaelyx has joined #lisp
<ebrasca>
pjb: I have 2 octet numbers, I have do it with (flexi-streams:octets-to-string vector :external-format :utf16)
dieggsy has quit [Remote host closed the connection]
gabot has quit [Ping timeout: 240 seconds]
Jesin has joined #lisp
wigust has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
gabot has joined #lisp
<ebrasca>
Xach: Are you Zach Beane?
<beach>
ebrasca: He is.
jmercouris has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
jmercouris has joined #lisp
<ebrasca>
Xach: Do plan to make suport for mezzano in quicklisp?
<jmercouris>
Xach: I've only been working with CL for about 6 months now, it's not that I did not assume the answer to my question, it is rather that I do not want to assume anything
<jmercouris>
Xach: So no, it is not a deep ignorance, merely ignorance :D
attila_lendvai has joined #lisp
<Xach>
jmercouris: Your defensiveness displays many assumptions about the types of answers that you consider acceptable.
<Xach>
ebrasca: No. But I would gladly accept patches to support it.
<Xach>
ebrasca: I don't think it's too hard to do - there are example patch sets in older pull requests.
<jmercouris>
Xach: I will admit, I am defensive, but that's because I don't like feeling like an idiot all the time
<Xach>
ebrasca: for e.g. clasp or mkcl
<beach>
jmercouris: That is part of the learning process. You might as well get used to it.
<ebrasca>
Xach: Maybe I make it after I end making fat32 suport
<jmercouris>
beach: The docs do it for me already, more than enough :D it is rather that I don't wish it from others. There are good and bad ways of instructing, and maybe I took things the wrong as is the nature of written text, but I felt attacked
spoken-tales has joined #lisp
<beach>
jmercouris: You are also observing the fact that IRC must necessarily be brief and to the point. It's the nature of the medium. That can be interpreted the wrong way sometimes.
<pjb>
It can help, but it's been observed too that some discussion last days.
<whoman>
mental brain spam filter is useful for the outside world anyway
<whoman>
so lvl that skil'
<jmercouris>
pjb: Can you rephrase? I'm not sure what you are trying to say
<pjb>
It may start like this, and we could still be at it next year.
<beach>
You mean Monday?
<jmercouris>
I still don't get what you are trying to say
<pjb>
Yes.
<jmercouris>
What happened on Monday?
<pjb>
Next year.
<jmercouris>
Still be at what? What do you mean?
<beach>
jmercouris: You are not being attacked. It is all for the purpose of making you understand. Don't take it the wrong way.
<pjb>
jmercouris: The opposite of being brief and to the point.
<random-nick>
on some implementations, like SBCL, you can see that by looking at printed representation of *standard-output* with and without SLIME
AxelAlex has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
whyNOP has joined #lisp
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
rumbler31 has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manualcrank has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
<jmercouris>
interesting, good to know
EvW has quit [Ping timeout: 255 seconds]
EvW has joined #lisp
random-nick has quit [Quit: quit]
random-nick has joined #lisp
Tobbi has joined #lisp
<beach>
jmercouris: Now here is the thing I found the most amazing: If you treat the ignorant person with great respect, then learning does not seem to progress very quickly, but if you are a bit harsh (not insulting) I have discovered that newbies here stick around more often.
<beach>
Not a very scientific study, I admit.
smurfrobot has quit [Remote host closed the connection]
<beach>
To a professional educator like me, that observation is a bit strange. I don't know how to incorporate it into my teaching.
<Xach>
beach: I have observed that as well, but also mixed in with pointless or destructive harshness - it seems like a fine line that attracts sadists too
<beach>
I totally agree.
fikka has quit [Ping timeout: 248 seconds]
<Xach>
In a controlled, supportive environment it seems much safer to apply harsh lessons than in an open environment where people view it as license to abuse
attila_lendvai has quit [Read error: Connection reset by peer]
kajo has joined #lisp
attila_lendvai has joined #lisp
<Xach>
This is applicable to lisp in the sense that lisp has attracted its share of helpful and hurtful harshness
vaporatorius__ has quit [Remote host closed the connection]
peterpp is now known as pagnol
EvW has quit [Ping timeout: 246 seconds]
kajo has quit [Ping timeout: 272 seconds]
<beach>
Fair enough.
vaporatorius has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
vap1 has joined #lisp
attila_lendvai has joined #lisp
fikka has joined #lisp
Karl_Dscc has joined #lisp
spoken-tales has quit [Ping timeout: 268 seconds]
varjag has joined #lisp
EvW1 has joined #lisp
Tko has joined #lisp
<Xach>
Why does sbcl have size hints in make-package? Inherited from cmucl?
gravicappa has quit [Ping timeout: 256 seconds]
drcode has joined #lisp
drcode has quit [Remote host closed the connection]
LocaMocha has quit [Ping timeout: 248 seconds]
drcode has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
foom has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
<beach>
Could be. The optimization considerations were so different at the time.
foom2 has quit [Ping timeout: 265 seconds]
randomstrangerb has joined #lisp
<Xach>
there are no comments in dpans sources discussing the options
kajo has joined #lisp
fikka has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
<dmiles>
ABCL makes hints as to how many symbols will exist
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
EvW1 has quit [Ping timeout: 252 seconds]
spoken-tales has joined #lisp
hexfive has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
<jasom>
a form of harshness that I deem unnecessary that I've seen particularly in the lisp community is to leave no mistake uncorrected. Someone new will ask an imprecise question and get told that their question is wrong, when it should be obvious what the question meant. Even just reversing the order of CORRECTION, ANSWER to ANSWER, CORRECTION would soften things up quite a bit.
<parjanya>
on the other hand, some people ask basic questions and still manage to be quite arrogant... the discussion about "on the fly" yesterdey shocked me a bit
<parjanya>
s/dey/day/, urgh
damke_ has joined #lisp
<jasom>
parjanya: I missed that one, just read through the logs and ... wow
<dmiles>
I try to not talk down to people... If my explaination leads to more questions then i expect to have to answer those questions as well.
EvW has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<parjanya>
jasom: if there ever was a pointless discussion ; ))
<warweasle>
parjanya: What's this?
* warweasle
is curious now.
makomo has quit [Ping timeout: 248 seconds]
smurfrobot has joined #lisp
<Xach>
warweasle: check past logs for pransninja
<dmiles>
The other day someone asked me a question that was to tesg my knowledge of common lisp "How much do you know about how common lisp does make-instance?" I had know idea that was their agenda .. I thought they were asking me "what do you do differntly from common lisp?"
<dmiles>
know/no
Acherontius has joined #lisp
<dmiles>
well i thought the question was "how does your implementation vary from the normal ways impls make an instance and set slots?"
smurfrobot has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
randomstrangerb has quit [Ping timeout: 260 seconds]
<dmiles>
(rather than a basic IQ test)
smurfrobot has joined #lisp
randomstrangerb has joined #lisp
<stylewarning>
Are any folks in here generally interested in topics like writing, documentation, and community involvement; sort of like Steve Klabnik?
<Xach>
stylewarning: i don't know who steve klabnik is, but i am generally interested in those things
<stylewarning>
He's the Rust guy
vaporatorius has quit [Quit: Leaving]
fikka has joined #lisp
<warweasle>
I usually only interested in documentation when I need it.
<dmiles>
for a shop to run well oiled it usualy takes two non-programmer people to document and interface to the community per programmer
smurfrobot has quit [Remote host closed the connection]
makomo has joined #lisp
<dmiles>
i had a programming job where one day a week i had to be interviewed by someone who wrote documentation and translated what i did to english, we had annother person who would get on a mailing list and fight for the design him and i agreed on. i am sure they wished i was all three people.
<dmiles>
but then the project would have taken 6-7 years instead of 3
<dmiles>
oops instead of 2
<dmiles>
however in the end, there other two people became the only two experts anyone ever heard of
smurfrobot has joined #lisp
eudoxia has quit [Quit: Leaving]
<warweasle>
dmiles: That reminds me of an incident I had a few years ago. I had done pretty much all the work a part of a project, and I had another programmer who insisted it would not work because it wasn't object oriented. She said "I've worked on billion dollar projects..." I wish I had said: "I work on thousand dollar projects."
Acherontius has quit [Quit: Acherontius]
<warweasle>
dmiles: Anyway, I need to get my projects done quickly too.
<dmiles>
warweasle. hah "worked" vs working on
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<warweasle>
dmiles: I've heard that "perfect" is the enemy of "done" but I think that "done" is the enemy of "profit".
red-dot has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
<dmiles>
warweasle: admittedly since we adopting the comprimise bettween perfection and getting it done.. we tend to take on much bigger and complex projects (so they might still seem to take a longer time.
smurfrobot has joined #lisp
<dmiles>
a longer time than would have been obvious)
EvW has quit [Ping timeout: 265 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<warweasle>
dmiles: I found the system from "Thinking Forth" works best for me. I create a dictionary of Nouns and Verbs. (Functions and data structures). Then I create a library of functions and tools to solve similar problems to what I am eventually going to solve.
<dmiles>
warweasle: that is kind of brilliant
<warweasle>
dmiles: I learned that from learning lisp.
<warweasle>
I can "walk through" a problem and figure it out.
smurfrobot has quit [Ping timeout: 240 seconds]
<warweasle>
No need to plan it out ahead of time. Soon I have something to copy to C.
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<dmiles>
planning things out ahead of time exposes a problem i had (I dont know if i still have, i wont tempt fate to find out either).. When i was very young i'd make text adventure games.. I'd get out graph paper and design the dungions and mazes first. all the neat riddles.. then all was left was boring grunt work i didnt feel like doing
<White_Flame>
sure, do it "on the fly" ;)
<dmiles>
So now i realize i have to do the design *durring* in order to have the mental orgasms to keep the work going
<warweasle>
dmiles: What's fun is doing it backwards..."RunTheProgram()" -> "Step01() && Step02() && ..." -> "TurnServoMotor(degrees);"
<warweasle>
dmiles: I think that's using the computer to help write the code. You can't keep it all in your head.
<warweasle>
dmiles: And you can't anticpate all the roadblocks.
smurfrobot has quit [Ping timeout: 260 seconds]
<parjanya>
hah, that reminds me of a friend who wrote his entire programs before testing anything... he gave up programming quite quickly
<warweasle>
parjanya: There are two ways to write bug free code: 1) Test until there are no obvious bugs or 2) Make it so simple there are obviously no bugs.
<warweasle>
I'm lazy so I just use other people's code.
smurfrobot has joined #lisp
EvW1 has joined #lisp
<dmiles>
warweasle: indeed, "using the computer to help write the code" :)
<warweasle>
dmiles: One time I used flex and bison to do a large portion of my project. They hated the code it produced...but other than that there were no issues.
<aeth>
parjanya: That can sometimes work, even in CL. "Okay, now let's see what the compiler tells me I need to fix." followed by "Okay, now let's see what the runtime errors are."
<aeth>
You need to know what you're doing ahead of time, though.
orivej has joined #lisp
<White_Flame>
regarding the text adventure stuff, that's where data-driven programming is nice
<dmiles>
the approach i use to avoid ever having to feel like i am doing "testing" is to use test driven development.. For every functionality i need i start a loop that continually (brutally) calls on what i need to happen but in a differnt window .. as i am typing the code out.. that test window is griping at me
<White_Flame>
simple code, all the craft goes into the data
<warweasle>
White_Flame: Isn't that similar to prolog?
<White_Flame>
sometimes, but not necessarily
<White_Flame>
it's basically DSL without a language
<dmiles>
what White_Flame is saying sounds very simular to "Thinking Forth"
<White_Flame>
literal data structures to define your world, then code which defers to the data
<dmiles>
(Like in prolog, we write in our Noun/Verb language, sometimes going in and explaining (in code) what we meant with our noun/verbs)
varjag has quit [Ping timeout: 252 seconds]
brendyn has joined #lisp
<dmiles>
(the DSL is that noun/verb description)
smurfrobot has quit [Ping timeout: 260 seconds]
<dmiles>
(oops, that data is encoded in that DSL which was from the noun/verbs)
<dmiles>
keeping as much design/redesign possible for the data phases
<White_Flame>
for games, nested lists of strings & magic enums can go a long way
varjag has joined #lisp
<White_Flame>
magic keys for when to perform tests on which game item, etc, and you can do your game logic right in the literal data without any hoops, just a few extra tests in the data processor
<dmiles>
So in other words "nested lists of strings & magic enums" and then making sure the interpreter you are writting supports all the features that you have been backfilling
<White_Flame>
I would consider it more of a world description graph than a programming language.
warweasle has quit [Quit: happy friday!]
<White_Flame>
while there's not much of a techincal difference there, the view on it keeps it well contained and avoids general purpose programming feature sprawl
<dmiles>
as someone writting in prolog 24/7 i do see what you mean
smurfrobot has joined #lisp
<dmiles>
i think lisp is the only other language that i can do that comfortably in. Though i used to try to do that still in several other languages. It just becomes crazy with all the extra typing
* White_Flame
buries dmiles in a pile of BASIC DATA statements
<dmiles>
"Typing" was a double entendre
emaczen has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
AxelAlex has quit [Read error: Connection reset by peer]
<emaczen>
given a C pointer ptr what would be the equivalent CFFI call to pass &ptr as an argument to a function?
<White_Flame>
dmiles: very boilerplatey
smurfrobot has quit [Ping timeout: 240 seconds]
<|3b|>
(with-foreign-object (p :pointer) (... p ...))?
<White_Flame>
dmiles: I'm sure you could either generate or infer all that from within prolog, from much simpler & more straightforward representations
<emaczen>
|3b|: will p be a pointer to a pointer then? Like (type** p) ?
<dmiles>
White_Flame: well that is what Prolog uses to generate the program .. the program is redesigned from that file
* White_Flame
throws an Inception DVD at dmiles
<|3b|>
more like void**, though you could replace :pointer with (:pointer type) if you wanted... cffi will currently completely ignore it either way as far as i know though :)
<emaczen>
|3b|: Cool, I'll try this out
<|3b|>
as far as cffi cares, P is a pointer to a pointer-sized chunk of foreign memory. any further interpretation happens on access
<|3b|>
(and even knowing it is pointer-sized only really applies to the allocation, it doesn't keep it around to range check your accesses)
<dmiles>
stuff like "completelyAssertedCollection(tRegion)." means the program should forward chain (pre-create) the world map
zulu_inuoe has quit [Read error: Connection reset by peer]
<dmiles>
though what i am saying is that when you mix data with your programming language you get an exponential number of features for free
scymtym has quit [Ping timeout: 240 seconds]
<dmiles>
and the nice thing happens that stylewarning says in his video about somone complaining about his code: "I cant look at your code and see that it is doing anything"
<dmiles>
That is exactly the point!
<dmiles>
(his reply)
earl-ducaine has quit [Remote host closed the connection]
earl-ducaine has joined #lisp
smurfrobot has joined #lisp
EvW1 has quit [Ping timeout: 240 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
smurfrobot has quit [Ping timeout: 265 seconds]
EvW has joined #lisp
SqREL has joined #lisp
Ven`` has joined #lisp
smurfrobot has joined #lisp
scymtym has joined #lisp
mlau has quit [Ping timeout: 256 seconds]
smurfrobot has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
smurfrobot has joined #lisp
mishoo_ has quit [Ping timeout: 248 seconds]
mlau has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cromachina_ has joined #lisp
cromachina has quit [Ping timeout: 256 seconds]
wigust has quit [Ping timeout: 240 seconds]
kozy has quit [Ping timeout: 272 seconds]
kozy_ has joined #lisp
White_Flame has quit [Remote host closed the connection]
Tko has quit [Read error: Connection reset by peer]