freenode/#lisp - IRC Chatlog
Search
14:10:11
phoe
cuso4: you might want to ask around #lispgames - they're much closer to the GPU than #lisp
15:46:23
jmercouris
Hey everyone, just made my first blog post on /r/programming : https://www.reddit.com/r/programming/comments/7vfkoe/tabs_suck_use_buffers_next_browser/
15:46:52
jmercouris
I'm thinking about making more technical articles in the future, any feedback/upvotes welcome
15:56:47
jackdaniel
I don't necessarily agree with the statement, but I wouldn't put negative message there
15:57:50
jmercouris
I can see that point of view yeah, to briefly explain my reasoning, I wanted to make it a provocative/eye catching title
15:58:14
jmercouris
As I try out a few more technical articles, like exploratory case study articles, this shouldn't be a problem I don't htink
15:59:18
jmercouris
yeah, it's best to convince the other individual that the idea is theirs for maximum engagement
15:59:49
jmercouris
my goal though was to make it to the top of /r/programming to give it some visibility, so that those who are interested in the project may discover it
16:00:48
jmercouris
I feel like there is a lot of room for growth here, I just need to figure out how to reach those who would be interested, and would benefit from using a productiivty browser
16:01:46
jmercouris
anyways though, all good lessons, I assume you as users represent a good demographic for people on /r/programming, so I will keep thse things in mind
16:55:05
p_l
I was actually thinking of using nghttp2 in HTTP2 path while reusing Drakma code (initially) for HTTP1 path
17:00:53
rme
If you use CCL at all, please fill out my little survey at https://goo.gl/forms/xy3oRIazSIo46iCL2 if you are willing to do so (and thanks if you've already filled it out). I'll be closing the survey soon.
17:11:07
rme
I just want to get an idea of what OS and cpu combinations people use. This is partly because I am wondering how much longer I should support 32-bit x86.
17:11:30
jmercouris
If you want to know how many people are using it, abruptly drop support and see how many emails you get
17:13:17
rme
By "support 32-bit x86" I mean "support in future releases". The current version isn't going to stop working all of a sudden.
17:13:22
jasom
jmercouris: actually at one place I worked we sort of did that. We didn't stop supporting it, but we stopped shipping it, with a note to call us if you want it.
17:15:01
jmercouris
do they literally forge themselves new CPUS? or are they hoarding a stockpile of them do you think?
17:15:28
jasom
I don't know, but we started buying workstations off of ebay so we could run tests...
17:15:29
rme
One survey respondent said that he was still using ccl on a PowerPC Mac running OS X 10.5.7.
17:16:20
jmercouris
there was someone on #lisp a few weeks ago asking about it getting an implementation running on a very old version of OSX
17:16:21
jasom
ACTION booted up his G4 a couple months ago because his wife's christmas card list was in an appleworks DB...
17:17:02
jasom
there is literally no software that can import an appleworks DB, you need to export from appleworks to open it :(
18:07:17
pjb
jasom: yes, if it's a database file, the probability its format being supported is lower than for a word processor file.
18:09:32
pjb
jasom: that said, it's often rather easy to reverse-engineer file formats. I recently did that for a MIDI sysex dump. While it may look puzzling at first, if you let pass a couple of nights over it, you can often find the clue.
18:10:13
pjb
That is, if you use lisp to do it: it's very easy to experiment and try systematically various options.
18:26:03
phoe
You can do a trick, though, and make a new thread, and from that thread, fetch the value of *standard-output* - it should be the console output that you are looking for.
18:29:55
stacksmith
G'day! Is there any portable way to get at lambda-lists of type declarations? like sb-introspect:deftype-lambda-list?
18:32:19
stacksmith
I've been trying to figure out how swank does it, but all that accomplished is making me feel like a moron.
18:35:20
Shinmera
stacksmith: grepping swank sources for deftype-lambda-list only shows sbcl as having it
18:36:05
Shinmera
So either other implementations don't offer that or the Slime people haven't implemented it for them.
18:36:58
Bike
there's certainly no requirement for implementations to save it. for the semantics you only need the function
18:39:01
fourier
Xach: yep i've added a comment now. besides osicat itself fails on clisp and ecl on travis on amaster branch.
18:42:16
stacksmith
Interesting. Is anyone here using slime with anything other than SBCL? Could you check that typing "(declare (type (integer " in REPL does not show the type lambda-list?
18:53:56
phoe
you won't be able to do full verification in general case anyway, because of SATISFIES that is able of arbitrary computation
18:55:17
Bike
stacksmith: you mean you want to look at type declarations and decide if they're valid?
18:55:40
phoe
oh, you don't want to check types, you want to see if a thing is a valid type specifier
18:59:20
stacksmith
I need to detect structural defects with forms, without any semantics. Just that required parameters are there, keywords are not out-of-whack, etc. A lint of sorts.
19:00:00
Bike
i see. i'm not sure if that can be done portably. i don't think ccl even saves the lambda list.
19:02:40
Bike
really, i'd think it would be pretty tricky in general since macro expansions can of course involve arbitrary code execution.
19:03:27
shrdlu68
I'm doing some micro-optimization and wondering - is #'= optimal for comparing bits for equivalence?
19:03:56
stacksmith
Bike: True enough. I don't need an absolute assurance, just elimination of obvious errors.
19:10:18
stacksmith
Is it logical to assume that standard CL type declarations in conforming implementations must have similar-enough lambda-lists? Is there anything wrong with extracting lambda-lists for all standard types and using them with any implementation?
19:12:23
Bike
the standard cl types have defined lambda lists. that's why swank has a database of them that works on all implementations, as aforementioned.
19:30:56
billitch
stacksmith: have you taken a look at common lisp type checkers ? i know Qi/Shen has one
19:37:32
sukaeto
jmercouris: FWIW, there are extensions for the most popular browsers that give you that functionality. For example, I've been pretty happy with this one in Chrome: https://chrome.google.com/webstore/detail/quick-tabs/jnjfeinjfmenlddahdjdmgpbokiacbbb?hl=en
19:39:02
stacksmith
billitch: I have not (and probably should). However I have little interest in actually checking types, reading the forms in question, or interning any symbols. Just a structural check on a source representation of a representation of lisp code.
19:41:25
stacksmith
not representation of representation , just representation. billitch: What are you referring to? A type-checker?
19:42:24
stacksmith
billitch: ah. Well, there is not much there. Swank does some things that may be not so good, like &any which is not as useful as it should be...
19:44:40
stacksmith
billitch: It may be hard as apply and &rest kind of work together, pretty low down...
19:46:38
stacksmith
billitch: I've thought about many things like that, and generally after much thinking find many reasons to not do that...
19:47:19
kdridi
Hey guys! I’m working on a small lisp interpreter in c++. With lisp-like-fully-featured language is the easiest to implement?
19:50:17
stacksmith
billitch: CL syntax is a local minimum that is pretty hard to beat. Hierarchies of packages for instance introduce many ambiguous situations, some quite bizzare.
19:52:11
billitch
plus it seems to be a way to think and organize persistent data that almost every human is OK with
19:52:51
stacksmith
What makes it a hierarchy as opposed to a bunch of names with / or . 's in them?
19:52:53
billitch
maybe the only transcendental thing about operating systems and programming languages is they all reimplement the hierarchical file naming system as a core component
19:55:25
billitch
many lisp students come at one point where they reimplement lisp, but very few C programmers get to a point where they just recode VFS features, unix is well accepted now i think
19:57:00
billitch
I've trolled the OpenBSD mailing lists in the past to advocate Common Lisp now the other way around
19:57:13
stacksmith
billitch: while I applaud your effort, unix file systems have some unbearable issues with links, searches and general fucklery...
19:58:09
billitch
stacksmith: i do not know any open source project not primarily targeting the unix/ftp/vfat filesystems as persistence database
19:59:23
billitch
we as programmers tend to underestimate the filesystem because we already attribute historical functions to it and is core to our historical understanding of computers
20:00:29
billitch
i would lay out every lisp function as a file and a directory with all introspection informations available
20:03:24
stacksmith
billitch: gah. Seriously, consider what it means to have a hierarchy of packages. Do packages contain other packages? Is there a search mechanism that uses the hierarchy? Is there a dynamic 'path' mechanism? what happens to symbols that collide? This is a serious tarpit.
20:05:35
billitch
cat /home/dx/package.lisp/my-package/my-function :- prints out function definition
20:07:24
billitch
we early on intuited the rule that a hierarchical pathname is a slow interface because it has to be on disk but it is not true it is just an addressing scheme
20:09:03
pjb
billitch: also, somebody implemented a FUSE giving access to a lisp image. So CL functions are accessible to the shell as commands found in directories corresponding to packages.
20:10:57
stacksmith
billitch: what you are describing is not a hierarchy. Packages are flat. You are talking about a shell-like interface for the REPL, which can be useful but linux command semantics are rather different than lisp functions...
20:12:34
billitch
stacksmith: yes but at the very least i should be able to use the same interface to list packages, functions, generics, ...
20:14:12
billitch
i think the only trouble is that by the time we teached hierarchical file naming systems we mostly teached slow operating systems and databases
20:15:25
stacksmith
I mean, I think I understand what you want (and I want something similar, I think). But many of us consider filesystems a somewhat necessary evil, do not appreciate their semantics, consider graphs superior to trees, feel that Lisp should not be contaminated by the underlying OS, etc.
20:16:10
billitch
yes well i was concerned with easy representations of graphs and tried to survey what naming schemes were good, and there is mostly : Flat, and Hierarchical
20:16:57
billitch
Hierarchical completely winning over the persistent and transactional data with URL and UNIX and MS VFS
20:19:16
stacksmith
Filesystems hierarchies completely miss the mark in that there is a pretense that files are things that are inside other things. That worked for Mac Plus and a floppy to show people that 'computers are simple - store your recipes in a 'recipe' folder'. The mess with hard and symbolic links... Well, I don't want to preach. let me know when it works.
20:20:20
billitch
stacksmith: well I come from the Web2 crowd and they did an awesome work upon the RESTful URIs basically replacing the UNIX vfs
20:22:31
billitch
but in CL a symbol can have a function and data so it is more a namespace than an actual data structure
20:22:41
stacksmith
I stay as far away from the Web2 crowd, and will avoid Web3 crowd just as I did with Web1 crowd. With any luck I will live long enough to avoid Web4...
20:26:11
billitch
stacksmith: I host most services on UNIX with hard and symbolic links part of the core features I use
20:26:30
stacksmith
You are still not talking about hierarchies or containment or inheritance or dynamic search mechanism or anything other than calling packages "directories" for no reason. A brilliant part of Lisp is separating symbols from other things, and defining very simple rules about how symbols are found.
20:29:03
billitch
question is why data is not more like its addressing scheme to exhibit functional programming primitives
20:29:20
stacksmith
I prefer finer tools. C is a hammer. CL can be used as a hammer, much like keyboard, with varying results. I can think of many reasons for a hierarchy of packages, but to make it more like Unix is far from any of them.
20:29:55
jackdaniel
I don't think many people here are as enthusiastic as you with unix (I mean - most of us probably use Linux or Unix on daily basis, but that's far from being overjoyed how things are on these systems)
20:30:34
Xach
Shinmera: Do you ever have trouble connecting to api.twitter.com for chirp stuff? I'm not getting any rate limiting errors, but my cron job keeps timing out just trying to make an SSL connection.
20:31:37
stacksmith
But files are an abstraction that some of us consider unfortunate, and others have proven to be unnecessary.
20:35:14
stacksmith
Well, you may be confusing a package with other things... There are good reasons for packages containing symbols, and not systems.
20:35:58
billitch
well ls could come with a schematic contains-types method to only have symbols and packages
20:37:14
billitch
there would be good reasons for (contains-type #<package> 'asdf:system) to return NIL
20:45:23
billitch
I'm actually surprised these big computing paradigms did not mix more by themselves
21:09:16
jmercouris
I want to be able to say (gethash "key" parent-hash) and already have it have a hash table that I can edit
21:11:14
Bike
(defmacro ensure-gethash (key table default) `(multiple-value-bind (value presentp) (gethash key table) (if presentp value (setf (gethash key table) default))))
21:12:37
Bike
it's like gethash, except that if the key wasn't already in the table, it evaluates the default and puts it in the table (and returns it)
21:13:12
Bike
if "key" is already in the table, it returns the value; otherwise it makes a hash table and inserts it under "key"
21:14:44
stacksmith
alexandria:ensure-gethash "Like GETHASH, but if KEY is not found in the HASH-TABLE saves the DEFAULT
21:15:27
jmercouris
I remember so many times in python writing convoluted branching code to ensure the existence of something
21:15:39
jmercouris
I see how it could have been replaced with a macro or function so much easier now
21:23:50
stacksmith
There is always a way to do a given thing in any language. The questions are: how ugly is it? can you do it once and never think about it again?
21:25:06
stacksmith
More importantly: can you change your language to do it for you, using the same language?
21:26:06
krwq
does anyone perhaps have or know some good setup for swig lispification? (i.e. constants in format +foo-bar+ etc)
21:27:55
jmercouris
I'm having a strange error trying to compile my code with ensure-gethash https://gist.github.com/f5cc42b6d8d663df4e387684746c8ca1
21:28:19
dlowe
can you add features to your language without having to wait for the blessing of the language maintainers?
21:29:59
Bike
incidentally, i'd probably abstract it a little more and (defun hook-hash (name) (ensure-gethash hook-name *available-hooks* (make-hash-table ...)))
21:41:14
jmercouris
Is there a way to remove a hash key? other than just setf'ing it's value to nil?
21:44:00
aeth
jmercouris: Setting to NIL doesn't remove it. It makes it (values NIL T) while removing it makes it (values NIL NIL)
21:45:39
Bike
you need out of band signaling, yeah. nowadays there are a couple languages that use option types for it
21:48:30
Shinmera
Whether it's the right time or not all depends on your confidence / decision about how fixed your test is.
21:49:11
stacksmith
jmercouris: Many different opinions on that... I would just make functions you can test from REPL, and when things get out of hand, write tests. I find that I change things around too much in the beginning to bother with formal tests.
21:49:30
Shinmera
If you have a public interface that users should use and you don't want to break compatibility -- that's a perfect indicator that they should be test-covered.
21:49:51
jmercouris
Shinmera: Well, there is a public interface that users use, but I don't mind breaking their compatibility in the name of progress
21:50:13
jmercouris
I'm sure linus would scream at me until he is blue in the face, but I have at most 20 real useres
21:50:29
jmercouris
and it is not that I want to make them regret using next, but that we need to improve the api, and I'm sure they'd understand
21:51:12
jmercouris
I really want to improve my interface to the GUI, this is something I've been thinking about for months and months
21:51:33
jmercouris
I'm too tired to explain now though, I'll talk about it tomorrow, and hopefully someone has some good ideas
21:51:55
jmercouris
aeth: I don't worry too much about that, I only want to test the core CL only parts
21:54:56
Shinmera
While all of my published projects have docs, most of them don't have tests. Which is unfortunate, but yeah.
22:00:05
jmercouris
the restarts you get are kind notifications from the system that you've discovered a feature
22:00:28
jmercouris
they let you know "by the way, doing action x results in this", and then you may decide whether you want that feature or not
22:03:11
_death
there are Lispy references to developing a program in a debug session.. they remind me of writing programs using debug.exe
22:05:41
stacksmith
_death: design decisions are mostly wrong in my case. Heck, more often than not I find out that the problem I am solving is not _the_ problem in the first place...
22:06:50
stacksmith
I've been careful to avoid making design decisions and 'listen to the wind'. When things get too complicated, I find that I was just very wrong about my model, and wind up replacing gobs of code with 10 lines...
22:07:34
Shinmera
I usually get smaller libraries done first try, but bigger systems always need at least 3 rewrites before they're adequate.
22:08:22
Shinmera
Radiance had, if we count previous framework iterations, 6 rewrites, most of those complete from-scratch new starts, including everything I wrote to work with it.
22:10:04
jmercouris
as you learn more you think "ah, I could have done it that way" and that changes the way you think
22:10:17
Shinmera
Iteration is part of any design process, and with code you need to be so detailed that there's at one point nothing else to do but to write the actual code for it, which in turn becomes part of the design process.
22:10:44
stacksmith
The more you can actually act on the 'ah', the more likely you will come up with the right solution.
22:11:13
stacksmith
I've been involved in too many stupid projects that were done a certain way because the cost of rewriting was too high.
22:12:18
Shinmera
Not to say that rewriting is always a good idea, it's often not, but it sometimes is.
22:12:35
_death
I found rewriting to be beneficial in many cases, but I guess it depends on who does it ;)
22:12:45
stacksmith
It's like optimization, except the other way around. Premature rewriting is much cheaper.
22:18:32
stacksmith
Only if it makes sense. In some cases you need to guarantee that some commands do exactly what they always do...
22:21:53
Bike
I thought this was already emacs like so you can just redefine all the key bindings/actual interface.
22:23:21
jmercouris
you could redefine whatever you like, but maybe you just want to do something really trivial
22:25:05
stacksmith
Then you need a way to remove your hooks, seach hooks, and otherwise manage them...
22:25:51
jmercouris
I already have spent time thinking about all those faculties, and they noe exist in my program
22:26:24
stacksmith
jmercouris: With all due respect to emacs, I would be careful using it as a shining beacon of a scalable user-interface...
22:27:02
jmercouris
I have all the time reasons to be angry at it, but I don't think hooks is one of them
22:28:03
stacksmith
Well, the entire problem of a pile-up of features from various sources is an issue. The interaction of hooks along with their sequence makes for very painful bugs.
22:28:33
jmercouris
if I am feeling really ambitious I can do a :depends-on type thing for each hook
22:29:10
stacksmith
But for tasks that are entirely unrelated to others, like your *on-page-visit* hook is useful.
22:29:55
Shinmera
Deeds, an event system I wrote, allows priority between event handlers via a dependency scheme.
22:32:47
_death
jmercouris: plans may be modeled as dags.. usual plan for make is the plan of building a system
22:33:10
jmercouris
I wish I had someone who was a CL professional to just say "here, don't do that, that's a stupid design, do this"
22:33:29
jmercouris
I kind of do, via this channel, but it involves me thinking first of many stupid designs and then asking people their opinions
22:34:18
_death
jmercouris: making stupid designs is one path to forming opinions about what's stupid ;)
22:35:19
jmercouris
perhaps thats because I set out to make emacs as browser, maybe I should have just set out to make emacs like UI as a browser
22:38:04
jmercouris
Shinmera: The only way to motivate people and to make sure they have time is if they have money mostly
22:38:20
jmercouris
or if you are just somehow a super passionate leader that can convince people of something, or you can trade social capital or some other such asset
22:38:38
jmercouris
like if I was the leader of the WWF or something, I'm sure people would be more open to working on some project
22:39:08
jmercouris
actually, even if you are employeeing people via cash, you still have to make them passionate about a project
22:39:54
_death
Shinmera: as clothing helps in covering a wart, so do programming languages help in covering deficiencies in programs, the process of writing them, and the persons involved.. Lisp is more like water (maybe murky water ;), intimate and personal, leaving the programmer naked with quirks, creativity, deficiencies, ups and downs, for all the world to see
22:48:15
jmercouris
yes, I could have chained them in one long function, but package maintainers from different packages will not expect that
22:48:51
jmercouris
I see no other magical mechanism, unless they are to override every single function in some sort of chain
22:50:57
stacksmith
If there is a class you expose, say 'browser', an advanced user can subclass it and make modifications - minor or major.
22:52:07
jmercouris
you may be right, I might strip the hook functionality out later in favor of your design
22:52:47
jmercouris
that's not the point, I just want them to be able to hook into any point in my program
22:52:49
stacksmith
Including writing complicated systems to make sure that the limited functionality does not interfere with other parts of itself.
22:53:04
_death
hooks tends to be just a simple mechanism where the hook functions are usually independent of each other.. for more elaborate mechanisms there's advice (say in emacs, where they have depth) or indeed generic functions, or event systems like Shinmera's
22:53:57
stacksmith
By jail I mean limit to something reasonable perhaps. Providing a set of hooks is a way of limiting the user to those hooks instead of rewriting...
22:54:48
stacksmith
jmercouris: I've been doing a lot of rewrites! not worthy of pull-requests if that
22:55:41
jmercouris
I'm just saying, you have some opinions, if you think you can do it better, I would be glad to accept your code
22:56:05
jmercouris
I'm not a good developer, at least not in Lisp, I know that, so I'm always interested in other takes
22:57:17
jmercouris
It was just a friendly suggestion, if you are interested, I am open to PRs, and always looking for contributors, that is all
22:58:08
stacksmith
I've been breaking my brain with my own code... I'll take a look when I get a chance.
22:58:46
jmercouris
Don't worry about it, if you like it you find the time, if you don't, I won't be offended, I understand that our own projects are always most interesting
22:59:43
jmercouris
I found a porter-stemming implementaiton already, but now I'm looking for lemmatization to do a more sohpisticated semantic matching
23:00:52
jmercouris
I see this: https://github.com/eslick/cl-langutils looks pretty abandoned though
23:04:39
shrdlu68
i.e (loop with n fixnum = 0...) works but (loop with n (unsigned-byte 64) = 0...) doesn't work.
23:25:54
phoe
...geez, I types "actually useful" and immediately though of #'ARRAY-ACTUAL-USEFULNESS
23:51:59
stacksmith
Hey, is anyone using defconstant? I keep trying every so often but it always ends with tears.