freenode/lisp - IRC Chatlog
Search
8:11:59
beach
The more I think about it, the more it seems like a really stupid thing to do to use string comparison for checking the type of an object. Why don't they introduce something similar to the class precedence list. Hell, since everything is static, it can be computed at compile time, or at least at link time. Much easier than what CLOS has to do.
8:13:00
beach
Maybe this is additional evidence for my standard phrase: "it is impossible to write a C++ program that is both fast and maintainable".
8:21:27
beach
Now, the main question remains, of course: Why do so many people in the software industry still believe it is possible?
8:23:58
Shinmera
It seems like people can just become infatuated with C++ for some reason. It happened to a friend of mine and I don't know why.
8:25:50
beach
That this can happen to people with no formal training and no budget responsibility may have an explanation, but I can't understand why it happens in a professional setting.
8:26:40
Shinmera
My point is more that personal preferences are highly influencing and people will often do whatever they can to get that preference satisfied.
9:06:47
drmeister
Cleavir+Clasp is only 4x slower than C code with inlining. With type inference and a that one T/NIL optimization it will be even faster. That's the proof-of-concept I was looking for to be able to say that cclasp will be a performant compiler.
9:56:00
beach
sbe: While you are at it, do M-x define-global-abbrev<RET>tyvm<RET>thank you very much<RET>
9:57:28
dmitigr
beach: it's possible to write maintainable code of C++ which is fast (e.g. Node.js runtime)
9:59:17
jackdaniel
well, you can write C in C++, but what's the point of using C++ then? ;) C++, as something distinct, is a mess imo
10:00:00
beach
dmitigr: Since we can't measure maintainability, we could argue that point forever. I'll decline.
10:00:31
jackdaniel
problem with C++ is that when language creators had to choose between two viable solutions, they implemented both
10:05:35
dmitigr
another problem of C++ is ugly template language -- the C++ language unavailable in templates. CL macros much better because the whole host language are available on the compile stage
10:08:16
jackdaniel
don't ceed into me "looking for a difference", comparison isn't method of measuring sophistication
10:09:57
dmitigr
sebbee: C++ templates allow to do some kind of metaprogramming, but the C++ unavailable on the compilation stage. only ugly "template" language are available. you can read The Modern C++ Design by Alexandresku to see what I mean :)
10:14:12
dmitigr
jackdaniel: by primitiveness of CL macros I meant that the programmer can just use the host language i.e. the CL and without any hygiene (e.g. as in Racket)
10:21:19
dmitigr
jackdaniel: nothing prevents. but hygienic macros are less primitive than macros w/o one
10:23:11
dmitigr
jackdaniel: 13:08 <jackdaniel> don't ceed into me "looking for a difference", comparison isn't method of measuring sophistication :)
10:24:02
jackdaniel
it is irrevelant as far as I can process - you claim that hygiene is matter of sophistication, I say it is constraint ruling out many things
10:44:49
scymtym_
Shinmera: re notifying users of upcoming breaking changes: the next SBCL release (or whenever sf recovers) will have a DEPRECATED declaration applicable to functions, variables and types that causes compile-time warnings when deprecated things are used. i think Xach mentioned he would be willing to collect such warnings during quicklisp builds and notify downstream projects. maybe this combination could be a first step towards a
10:47:02
Shinmera
Reminds me to get going on writing a github API lib (unfortunately doing so requires me getting a github subscription) so that things like issue ticket submission on QL build failures can be automated.
10:58:50
pjb`
beach: I think that given the VCS and bug tracker histories we have now available, it should be possible to establish a statistical model of the maintainability, in function of the changes requested (and implemented). A tool could be written to analyse project history and determine a "maintainability" coefficient.
11:00:24
pjb`
jackdaniel: indeed, there are more than half a dozen irc clients on emacs… http://www.emacswiki.org/emacs/InternetRelayChat
11:31:10
pjb`
http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=sr_1_1?ie=UTF8&qid=1437305464&sr=8-1&keywords=dragon+book+compiler
11:33:43
schjetne
loz1: if you just need to change the read-time behaviour there's no need to build a whole compiler or whole new language. Try writing a type-checking reader for Common Lisp.
11:37:57
pjb`
If you had sayd for crazyness, I wouldn't mind, but you won't achieve correctness at read time.
11:39:04
schjetne
Besides, static types isn't a panacea, it prevents type errors, and in my experience type errors is only a small fraction of bugs, at least in the software I write.
11:39:14
pjb`
When you read: (lambda (x) you cannot know the type of x, because you haven't read the body yet!
11:48:08
rritoch
loz1: Clojure already uses non-strict typing by applying metadata. You may want to look at their syntax before you re-invent the wheel.
11:51:07
pjb`
and in anycase, you DO NOT WANT to declare types. You want the compiler to INFER them.
11:55:23
rritoch
pjb`: So how do you do that in a case of defun where your trying to limit, or hint to the compiler, the argument type?
11:57:05
rritoch
pjb`: Doesn't that invalidate your previous statement that Common Lisp already has a perfectly good syntax to declare the types?
11:59:17
rritoch
pjb`: I really can't find an example of it, and I've never seen it done before, which is why I ask. Though I have seen it in Clojure.
12:04:16
rritoch
pjb`: I'm also looking for the methods of reading function metadata in general, such as the documentation sring.
12:14:21
pjb`
rritoch: (with-input-from-string (source "(defun f (x y) (declare (integer x)) \"does something\" (declare (character y)) (+ x (char-code y)))") (multiple-value-bind (docstrings declarations body) (com.informatimago.common-lisp.lisp-sexp.source-form:parse-body :lambda (cdddr (read source))) (declare (ignore declarations body)) (first docstrings)))
12:20:35
pjb`
loz1: you can write a static analyser, that will basically be a compiler that doesn't generate code, but that does all the early phases the compiler does: code walker, environment tracking, type inference. Plus any checking you'd like to do, like global analysis.
12:22:53
lispguy1
SBCL's maintainers did nothing to correct the situations with sourceforge unavaibility. I want to fork to start my own Lisp implementation.
12:23:22
pjb`
loz1: notice that to do that, you will need to read the source like the compiler does it, including macroexpanding toplevel forms, including evaluation of any toplevel form in (eval-when (:compile-toplevel) …), in particular, in-package and setf *readtable* forms, and #. etc.
12:24:59
pjb`
loz1: when I say global analysis, I mean, analysis beyond the compilation-unit boundaries.
12:25:15
pjb`
loz1: compile-file must work on a compilation-unit, and perform separated compilation.
12:26:13
pjb`
loz1: but what one would want, is to save a lisp image, and therefore, perform an analysis on all the code that has been compiled and loaded in the lisp image, to validate the types globally, and possibly eliminate dead code (three shaking).
12:26:41
loz1
you compiled one file, second, and don't get anything you can run until you compiled whole thing
12:27:08
rritoch
pjb`: Yeah, cl:documentation is what I was looking for, at least it is a step forward
12:27:23
pjb`
loz1: So your compiler would have to be able to "compile" compilation units, noting all the info it requires, and then have a global analysis phase once all the compilation units have been loaded, before saving the executable image.
12:28:29
pjb`
Alternatively, it could do both, like ecl is able to process a asd file to generate a library or an executable, but it may be less easy for the user.
12:29:05
pjb`
loz1: you have semantic problems because of the Turing complete evaluations possible at read time, at compilation time and macroexpansion time.
12:37:43
lispguy1
H4ns: William Harold Newman forked CMUCL to create SBCL. I want to fork in that fashion to create LispGuyCl
12:38:07
Shinmera
This channel is for CL. If you don't want to write a CL or write it in CL you are in the wrong place.
12:39:04
H4ns
lispguy1: what is your contribution that warrants putting your own name on something that many smart people contributed to?
12:42:35
rritoch
loz1: In miy experience your not going to be able to find much help with compiler design, there are VERY few people who do it. What I can say is that you seem to be headed directly for a dead-end if your going to write your first language from scratch.
12:42:59
pjb`
jackdaniel: because that's the normal way with github: you fork, you modify your repo, then you send a merge request.
12:43:12
lispguy1
H4ns: I'm not satisfied how SBCL is maintained hence I want to fork. I haven't contributed anything, but what can prevent me to fork?
12:43:51
jackdaniel
pjb`: I believe it's not what lispguy1 wants to do - my question was context-dependant
12:44:15
rritoch
loz1: They build the AST for you, potentially saving you a year+ of development time.
12:45:43
rritoch
loz1: You need to hit the books. If you don't know what an AST is, your not ready to create your own language.
12:48:53
rritoch
loz1: It really depends on what compiler-compiler you use, but either you'll edit the generated AST or you'll extend the generated AST, in most cases.
12:49:43
rritoch
loz1: I like sablecc since it produces java which is easy to work with, you can literally get your first language working within a week.
12:50:46
rritoch
loz1: Just read the documentation of whatever compiler-compiler you use, they explain how to create an implementation from the generated code.
12:50:52
ggole
And to get started you can skip lexing and parsing and write ASTs of some test programs by hand
12:53:07
loz1
rritoch: so the output is some kind of program on my host language which I can use and extend?
12:54:43
rritoch
loz1: You write out the syntax of your language, typically in a BNF grammar file, and it generates half of the code for you.
12:57:24
loz1
I remember one guy on local meetup said 'when you are starting to write program you often don't even know what do you want'
13:01:37
rritoch
There must be since there seems to be this mistaken belief that lisp is the language to write compilers in, even though I've never seen a single compiler written in lisp, other than lisp compilers themselves.
13:04:37
loz1
rritoch: hm, btw, if I write grammar for particular compiler-compiler, does that mean it can be easily ported to different platforms?
13:04:57
rritoch
loz1: Cool, well that would proabbly be a good starting point for you, assuming you can find the documentation.
13:07:26
loz1
and one more, are there any more or less popular languages created using compiler-compiler?
13:09:17
rritoch
loz1: Your confusing languages with implementations. Most, if not all, modern languages can be implemented using a compiler-compiler.
13:10:40
rritoch
loz1: C, Java, and Ruby are languages that I've seen BNF grammars for. There is probably one for lisp also though I immagine it is boring.
13:11:49
rritoch
loz1: I'm not sure how accurate this is, but here... http://cui.unige.ch/isi/bnf/LISP/BNFlisp.html
13:13:09
rritoch
pjb`: I wouldn't say that, it is over-simplified and not-CL compliant, but it is still LISP
13:13:44
beach
rritoch: We don't to LISP anymore. We haven't for decades. Now we do Lisp and that grammar is totally wrong.
13:14:45
beach
rritoch: If you are going to state things with such certainty, I recommend you check your facts first. There are quite a lot of very knowledgeable people here in #lisp, and they would very much appreciate that.
13:15:54
rritoch
beach: myob, I wasn't disrespecting him in any way. But while he may know Lisp, I know compiler design, which is what we are talking about.
13:17:20
rritoch
beach: And that has already been brought up previously, but not helping someone just because it's off topic is elitest garbage, especially in a dying language like lisp that could use as many supporters as possible.
13:17:58
beach
rritoch: But I will remember your domain of competence the day I need to ask questions about the best algorithm to use for PRE that can handle conditional branches in MIR as well.
13:20:03
rritoch
beach: No, can't help you there. I don't deal with compiler optimization, I just care about getting things to work, I don't care much about efficiency due to moore's law.
13:20:51
rritoch
beach: Most of my work is in web development, efficiency is rarely an issue there since the network itself provides most latency
13:22:15
beach
ggole: I will need liveness analysis soon, and that one is still working, modulo a few API changes.
13:22:51
rritoch
Guthur: It isn't ending, and again far off topic. Just google Xion PHI, NVidia Tesla, and AMD firepro
13:23:28
beach
ggole: But the liveness stuff is needed in the type inferencer, and that one I am currently working on.
13:25:13
ggole
beach: so reaching definitions? I'm actually not very familiar with how to infer types in languages like CL.
13:26:06
rritoch
loz1: I'm confidient Xion PHI can run CL since it's intel architecture. The rest I'm not sure about since it would require a micro version of lisp that can fit in a GPU shader.
13:26:08
jackdaniel
rritoch: claiming sloppy design and not carying about optimization is justified by moors law is bs I hear to often
13:26:49
beach
ggole: Define yourself a finite lattice representing some simplified type system and just do a `join' when your flow converges.
13:27:11
jackdaniel
and in a matter of fact experience, when surfing through overdesigned web apps with more js then actual content
13:27:23
rritoch
jackdaniel: Code golf and optimization have it's place, but not wasting your time over-optimizing isn't equivalent to sloppy code.
13:27:46
ggole
beach: do you do anything like path sensitive refinement (eg, (if (consp x) <x is evidently a cons here> ...)?
13:27:54
beach
Guthur`: Strictly speaking, Moore's law is still fairly valid. It is a common misunderstanding that it has to do with performance. It has to do with transistor count.
13:28:55
beach
ggole: In Cleavir HIR, I define an "instruction" called TYPEQ that branches according to a statically known type. That instruction is used by the type inferencer.
13:31:36
Guthur`
it's been in the news a bit recently with IBM doing some nice stuff in the lab, and Intel having trouble at the fab
13:33:23
ggole
I was thinking about introducing explicit refinement instructions and rewriting uses to point to them, eg (if (consp x) (foo x)) becomes (the IR equivalent of) (if (consp x) (let ((_x (presume-type 'cons x))) (foo _x)))
13:34:25
ggole
I think your approach is better. This way makes it very easy for an analysis to know about the refinement, but it's a pain to have to "look through" the additional binding to get to the original definition.
13:39:16
ggole
eg, IR size increase, having to do so-called phi-translation for some algorithms, etc
13:40:53
beach
Which reminds me, I still have to go through the literature and check which algorithms that require SSA actually take advantage of the fact that each assignment occurs only once. I know one, but by doing that, the algorithm is less effective than it could be.
13:49:41
rritoch
Is there any free source for the metaobject protocol specification, or at least a list of the functions provied by implementations that support it?
13:52:18
lispguy1
jackdaniel: why to fork? because concurrency is always good. and because I don't want waste my time to ask mainteiners to commit my desire
13:54:07
jackdaniel
depends on wording, what you call concurrency I call splitting effort, or even reiterate same work in parallel
13:55:25
loz1
I just imagined ORM which looks at your database, checks tables and fields and creates classes to access data and everything
13:57:21
rritoch
loz1: It's a bad idea beacuse it is already patented, in the most illegitamite piece of garbage you'll ever read, if you take the time to read it.
13:58:10
rritoch
loz1: There is technically "prior art" supposedly found by sun, but google paid their way out of their lawsuit.
13:58:51
rritoch
jackdaniel: Possibly, there's no case-law yet to establish it yet as a fact until someone takes it to court and actually uses the supreme court decision as their defense, and that defense is accepted.
14:02:18
H4ns
loz1: actually, now that i think of it, there are not too many that i could recommend to look at.
14:03:01
H4ns
loz1: while the idea is rather obvious, making an orm that actually works is a lot of hard work, and the work becomes much less fun once you recognize that orm's basically suck :)
14:04:05
H4ns
loz1: that said, i think dwim.hu had something that was complete enough to work at some point.
14:04:45
H4ns
loz1: i find postmodern rather nice, too. it just requires giving up on the idea that a language object is a domain object is a database object.
14:06:48
H4ns
loz1: i cannot tell you. i wrote an orm in c++ back in the day and recognized that it sucked.
14:07:57
lispguy1
loz1: all that "nice" ORM propaganda is created to force people do overcomplicated job
14:08:28
rritoch
loz1: I'm with lispguy1 on this one. ORM's are extremly inefficient. Since your already familiar with AST's you can actually create an AST for SQL which makes developing complex queries much easier.
14:11:34
H4ns
lispguy1: the quotes don't make your statement any more valid. you are spreading misinformation. and besides, allegrocache is pretty sucky in my book.
14:16:58
H4ns
lispguy1: it is titled "wrong things that people said in #lisp1". today, i have added three chapters already
14:19:48
H4ns
lispguy1: because allegrocache sucks, there is no usable dbms written in common lisp now?
14:55:02
sandybatman
Hi, does anybody else have a problem with slimv? I connect the first time around and it does nothing apart from displaying all those messages. I can get to work with it only *after* I connect the second time (again)
15:43:33
jackdaniel
lispguy1: a see you are first-class troll, therefore I'm adding you to ignore list of my client. Sorry about that
15:52:22
lispguy1
theos: or get better compilers. For example, GCC :) It's available to download right now, not as sbcl.
15:56:40
therik
Hello, I'm playing with a game I'm making and I want to implement large world map. For this map that contains various entities (moving and stationary), I need a function find-entities-in-rectangle that'd give me collection of entities in rectangle, marked by x1, y1, x2, y2 coordinates
15:57:14
therik
I'm looking at R-trees and R*-trees, BSP methods and so on, any suggestion about which way to go?
15:58:21
p_l
therik: I'd suggest experimenting with few approaches from the area, and see how well they mesh with the rest of your engine
15:59:09
beach
What on earth are all the arguments used for in the MOP function FIND-METHOD-COMBINATION?
15:59:47
therik
ok, so you confirmed that I'm looking in right direction.. I'll definitely experiment with it. Just one more doubt, if you'd be kind to dismiss: Can r-trees or quadtrees handle lot of moving entities on the map?
16:00:34
p_l
therik: IMHO moving or not should not be too much of a problem, though it would depend on how well specific data structure handles updating. It would be one of the things I'd be testing for
16:00:38
lispguy1
** TOPIC Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> <http://paste.lisp.org/new> logs:<http://ccl.clozure.com/irc-logs/lisp/>|contact op if muted| SBCL 1.2
16:01:31
H4ns
therik: maybe https://github.com/hanshuebner/bos/blob/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/web/quad-tree.lisp can serve as inspiration or basis for experiments
16:02:16
H4ns
** TOPIC Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> <http://paste.lisp.org/new> logs:<http://ccl.clozure.com/irc-logs/lisp/>|contact op if muted| SBCL 1.2.13, cl-launch 4.1.3, flexi-streams 1.0.15, Hunchentoot 1.2.34, Drakma 2.0.1
16:07:09
p_l
but I think that noticing that you can change the /topic shouldn't result in immediately changing it to "hahahahaha"
16:09:02
H4ns
** TOPIC Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> <http://paste.lisp.org/new> logs:<http://ccl.clozure.com/irc-logs/lisp/>|contact op if muted| SBCL 1.2.13, cl-launch 4.1.3, flexi-streams 1.0.15, Hunchentoot 1.2.34, Drakma 2.0.1
16:09:47
H4ns
what's it with all these bottom feeders in this channel lately? reddit? something in the drinking water? paul graham republished one of his 2002 essays?
16:12:01
theos
** TOPIC Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> <http://paste.lisp.org/new> logs:<http://ccl.clozure.com/irc-logs/lisp/>|contact op if muted| SBCL 1.2.13, cl-launch 4.1.3, flexi-streams 1.0.15, Hunchentoot 1.2.34, Drakma 2.0.1
16:14:03
p_l
sebbee: sourceforge as a whole is dead - their storage arrays uptime gone like tears in the rain
16:18:15
lambda-smith
marekk: there was a lot of uproar when people were aware that sf bundle adware with the installer and hijack project websites
16:18:38
schjetne
Didn't they start injecting malware years ago? I've always wondered why it took so long.
16:19:04
therik
whoah, I see quad trees are nice simple option, but it seems like if I have full map of items, and I have items that span more than one tile and I can have multiple items per tile... The whole tree is gonna be big
16:19:24
lambda-smith
this seems like a good summary of the (latest) incident http://www.infoworld.com/article/2929732/open-source-software/sourceforge-commits-reputational-suicide.html
16:24:00
minion
joel135: 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).
16:27:20
p_l
lambda-smith: the quote is related to how it used to be that the major way of getting publicity about your project was to be mentioned on lemonodor
16:39:04
p_l
btw, about sourceforge issues: https://www.reddit.com/r/sysadmin/comments/3do9k0/sourceforge_is_down_due_to_storage_problems_no_eta/ct77o49
17:09:09
k-stz
What is the meaning of the exclamation mark as a naming convention: (foo! 1 2) etc. ?
17:11:01
k-stz
nfoo looks bad, I think nobody follows this convention outside the standard function?
17:12:13
jackdaniel
if you start project from scratch, you won't infridge consistency if you'll use "?" and "!"
17:18:54
ghost_runner
On a scale from one to ten, rank SICP. Just curious as to what you Lispers think about the book.
17:28:37
k-stz
from just the first chapter it taught me stuff im grateful to know. I think the problem with rating a book like sicp is to weigh the didactic representation of knowledge with the knowledge present in the book.
18:43:01
phf
is david lichteblau still maintaining closure-html? is there official fork that quicklisp is pulling from? i have a lot of patches, that i produced as a result of running closure-html against a lot of html from the wild, and i'm not quite sure who to send them to
18:46:14
PuercoPop
phf: you could always check in https://github.com/quicklisp/quicklisp-projects/ to see where it is being pulled from
19:16:01
therik
any other way to efficiently store q-tree nodes, that wouldn't involve keeping all the pointers around, together with info about sizes/levels/positions?
19:18:46
therik
I mean, there's this trick with keeping balanced binary tree in an array, where parent node is (floor (/ i 2) and children are on (1+ (* 2 i)) and (+ 2 (* 2 i)), I wonder if there are some tricks for q-trees
19:27:46
ggole
I think you can use the skip trick to represent n-ary trees without pointers (at the expense of making insertions difficult)
19:28:58
ggole
The idea is that you represent a tree node as whatever info it contains, plus the offset to the next sibling
19:35:36
therik
to get to children and siblings would be ok, to get to parent I'd have to move back until I hit something that has pointer to sibling that's after the element I search the parent for
19:37:56
therik
honestly, I'm not quite sure what I need yet, but I'm aiming for a self-expanding map that can potentially get huge, and the first task I decided to tackle was to find set of entities on the map in certain radius from a given point
19:47:57
pjb`
therik: so you will add objects in your map at the bacterial level, then at the atomic level, then at the string level?
19:57:33
therik
pjb, seems like that.. well, at the beginning, all the map is going to be empty, once bit of it is generated, that portion should get indexed. I'll have small tiles, probably 10x10 pixels. Right now, tiles are in leaves of the tree, but I'm thinking of splitting the info from tiles into tree nodes
19:59:43
pjb`
therik: I mean, you should decide from the start the granularity of your game. If you have a grid of 1 meter², then your quadtree will have cells corresponding to 1 meter², and you won't be able to put billions of objects in that square.
20:00:32
pjb`
Remember, planets means moving body, and continents move relative one to another (plaque tectonics).
20:04:27
pjb`
In anycase, you wouldn't grow your tree from the leaves, but from the root. So you could have two levels, one a small quadtree of quadtrees where you use normal nodes with pointers, and big quadtrees of objects of fixed size that you store in arrays without pointers.