freenode/#lisp - IRC Chatlog
Search
8:57:17
elderK
I've been working on a system that'll allow me to do, like, the kind of work I wanna do.
8:57:52
elderK
I've been working on "binary structures" for most of the day today. It winds up being a much more uh, detailed, problem than it first appears. Taking a peek at other such systems, many sidestep some tough stuff.
8:58:21
elderK
Or doing most of their stuff by way of type info at runtime, rather than actually generating efficient "readers" with the important stuff baked i n
8:58:41
elderK
Of course, you also want to be able to have structures in structures, or arrays of structures in structures :P
8:59:13
elderK
And be able to correctly parse them. Conceptually, it winds up pretty straight forward. But, I have not yet been able to implement it in a way I feel happy with.
9:00:07
elderK
I erased what (little) I wrote for define-binary-structure. Instead, I just wound up documenting the core ideas.
9:00:22
jackdaniel
actually no, minimal cases which illustrate the problem which are well formated increase likehood of someone looking at them
9:00:45
jackdaniel
brettgilio: also it is the minimum level of politeness to prepare clean example if you request help/review
9:01:49
jackdaniel
and people who count on approachable people will lose big because non-approachable (yet kind) experts won't bother to look at that
9:04:41
jackdaniel
(and I understand your point of view - it is very kind one, hard to criticize it, I've just provided argumentation, that "dirtier the better" may wrong headed if you think about consequences)
9:06:48
elderK
Well, I'd like to discuss the design as it were, but I'd prefer to do that in private with someone. I came here earlier hoping to chat with someone about it all but I was shot down for it.
9:08:07
_death
elderK: the issues you talk about are both about design and implementation.. in this case, I suggest you figure out the right syntax describing the binary structures, sketching a simple implementation and leave the efficiency issues for later
9:08:53
elderK
_death: I know /exactly/ what I want to generate. That hasn't been the problem. The problem has simply been that each implementation I've written to do what I want to do, feels horrible :P So, I have cycled over and over trying to do it differently, do it better.
9:09:31
elderK
I'm happy with the simpler parts of my system so far. Just, structures, atm are the interesting thing. Mostly because I want to allow stuff as mentioned earlier.
9:11:29
elderK
_death: I have been. And for the most part, everyone here has been extremely useful. I appreciate it.
9:24:59
fiddlerwoaroof
elderK: fwiw, if you already know what the generated code should look like, you should build up your higher-level interface incrementally
12:40:20
jmercouris
eg. instead of make-hash-table only allowing eql equal and equalp, I could pass my-special-equal, that compares the two objects
12:41:45
shka__
jmercouris: well, there is trivial-hashtable that allows you to use implementation hashtable with your own comparator function
12:45:11
shka__
i have my own library called cl-data-structures with HAMT implementation so you can also use that
12:48:41
gypsydave5
here's the project if that's any help: https://gitlab.common-lisp.net/parenscript/parenscript
12:50:11
gypsydave5
I don't see what I'm doing wrong that's the difference between the two commands - I've tried a few variations on the 'parenscript.tests' name - is there some subsystem syntax or detail that I'm missing)
12:53:42
gypsydave5
sorry - I should have said - I've been using (asdf:load-system ...) not (asdf:load ...)
12:56:45
gypsydave5
So (load "parenscript.tests.asd") comes up with a compiled program error, illegal function call
12:57:02
jackdaniel
(asdf:load-asd "parenscript.asd") ; to be ASDF3-conforming (asdf since version 3 says, that it is best to leave (in-package asdf-user) at the beginning, so load won't do)
12:57:40
jackdaniel
I personally always put (in-package asdf-user) to allow cl:load, but not all developers do that
13:00:10
jackdaniel
that confirms, that this "asd" file doesn't have (in-package asdf) or (in-package asdf-user) at the top
13:00:25
jackdaniel
gypsydave5: correct way of loading it would be (asdf:load-asd "file.asd") without changing package in your repl
13:00:58
jackdaniel
in principle asdf may introduce its own reader at some point and load simply won't cut it (even from asdf package)
13:02:32
jackdaniel
I wouldn't be very suprised, if one day defsystem will start to expand to (progn (unless *load-asd* (error "boo")) (do-defsystem …)) ;-)
13:05:16
gypsydave5
jackdaniel: just wondering why the first system load worked - (asdf:load-system "parenscript") - and the second didn't. I can't see what the significant difference is between the two.
13:07:41
gypsydave5
So ASDF already _knew_ about the parenscript system, but not about the parenscript.tests system
13:10:37
jackdaniel
thodg: why should it be patched? parenscript.test is defined in its own file parenscript.test.asd, so it conforms to asdf requirements
13:12:09
jackdaniel
try (ql:quickload 'parenscript.test) ; (if you have QL) - that will fetch dependencies for you
13:14:43
gypsydave5
OK - I am now less stupid than 20 minutes ago - success. Thanks jackdaniel and thodg!
17:58:17
Xach
rk[ghost]: well, sort of. a favicon is just responding to a request for "GET /favicon.ico" So a handler that matches that will return the result that the browser displays.
17:59:04
pjb
Add those head tags: <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
18:00:58
rk[ghost]
also, someone mentioned that my text files are being given as octet stuff, so their browsers defaulting based on memetypes is trying to make 'em download
18:01:14
rk[ghost]
which, mostly on their end as i see it, but.. if i have a file.. can i choose how it is served?
18:01:35
rk[ghost]
i don't fully understand mimes and browsers, so my questiosn may be murky at best
18:02:04
pjb
Yes, you should specify a "Content-Type: text/plain; charset=utf-8" or something like that.
18:02:13
rk[ghost]
pjb: i appreciate you showing me that, because i would rather organize the location myself as, i have multiple pages that use the same base /var/www/
18:03:11
pjb
So searching for Content-Type and hunchentoot on google, and searching for Content-Type on w3.org, should give you all the info.
18:05:55
rk[ghost]
sorry that this isn't lisp specific, but since i changed the topic to www.. (XD) is there a suggest size for the favicon?
18:12:20
tumdum
I followed instructions from https://lispmethods.com/libraries.html and got bobbio working, but when I try to do those steps for my own project something (most likely trivial that I fail to spot) fails: https://gist.github.com/tildecat/0ad15a773327946defedf62d7f85c1cf any ideas?
18:16:03
jackdaniel
tumdum: ah, also another thing may be wrong. your symlink doesnt' seem to point to a directory, notice that /home/t/dev/euler vs /home/t/dev/bobbio/ (latter is a directory)
18:16:46
jackdaniel
so you should `ln -s /home/t/dev/euler/` instead of `ln -s /home/t/dev/euler` (I think this may be important wrt symlink following)
18:18:14
jackdaniel
symlinks are nasty (especially if you try to depend on them with code which is meant to run on different implementations)
18:24:45
Xach
It is entirely related to the timestamp of the directory vs the timestamp of the index file.
20:07:17
slaterr
using such a long name for a one-off function written in lambda form is not warranted
20:08:42
confusedwanderer
slaterr: maybe you can steal some code from https://lispcookbook.github.io/cl-cookbook/cl21.html#shorter-lambda
20:09:40
slaterr
I can't think of an example where naming a single element would be necessary. if verbose name is warranted, list of those things already has such a name in plural form
20:21:19
_death
I guess it's hard to unlearn clojure aesthetics because you consider it part of the same family.. but really, it's not idiomatic CL
20:21:29
slaterr
pjb I am implementing clojure's # reader macro in CL. I don't know syntax of CL equivalents well
20:23:45
confusedwanderer
i think the freedom to change these things is part of what makes lisp fun. you shouldn't introduce notation like that in someone else's projects without asking, but for your stuff it's your choice
20:23:48
dlowe
I assume map to stand in for any number of mapping things that takes a function and a sequence
20:23:52
pjb
A lot of lisp code is packaged into libraries distributed thru quicklisp. A lot of problems with those libraries come from bad handling of reader macros in the source code of those libraries.
20:24:28
pjb
(second bad problem, is nickname collision! Fucking don't use short package names or nicknames!)
20:32:35
dlowe
It doesn't bother me when people want to tinker in weird ways with lisp syntax. I love it. Why program in lisp, otherwise? However, I am annoyed when a stylistic opinion is asserted forcefully as an obvious and irrefutable fact with which only a moron could disagree.
20:37:59
drmeister
Hi - does anyone like programming in assembly language and want to contribute to an open source Common Lisp project?
20:39:32
drmeister
LLVM can be used to create function invocations with a fixed number of arguments.
20:39:40
slaterr
dlowe if you scroll up, it wasn't me who started challenging "stylistic opinions" of others. it was you and _death
20:40:46
drmeister
But creating a call with variable number of arguments assembled from a fixed argument call where the last argument is either a Common Lisp list or a va_list (C++ ism).
20:41:02
sjl_
slaterr: #() already means something in Common Lisp. Changing it would be confusing, even if you managed to make it work. If you pick a different character, and use the named-readtables library to make sure not to pollute unsuspecting readtables, it should be possible to implement.
20:42:16
slaterr
dlowe yeah? it seems like you did get butthurt, protecting 15 minutes after discussion ended
20:42:57
slaterr
sjl_ I mean it doesn't matter to me. I am fine using something other than #. redefining # would be bad, assuming it is even possible
20:43:03
dlowe
slaterr: I wanted to make sure you were pushed back on a bit. Anyway, it might not have been about you.
20:45:20
_death
I guess every Lisper has this phase of experimentation and fascination with microsyntactic "optimizations" at some point.. then you grow up
20:45:25
slaterr
dlowe, you should have pushed back when I shot down your silly widget-count example. but, because you didn't (and couldn't), we are still discussing this 45 minutes later