freenode/#lisp - IRC Chatlog
Search
12:28:18
no-defun-allowed
You are allowed to download it, maybe you aren't allowed to redistribute it unless some specific rules are met, it's probably not compatible with the other licenses of Portacle components, but IANAL and neither is anyone working on Portacle.
13:35:25
eigenhombre
Morning again. Did some more research on my CFFI / SBCL / problem yesterday following up on your suggestions and captured my findings here: https://stackoverflow.com/questions/57906498/installing-sbcl-ffi-packages-on-mac-via-quicklisp . Any hints on SO or here would be greatly appreciated!
15:51:04
thijso
I've been fixing a number of c-inline stuff in ECL and usocket these past couple of days.
15:52:20
thijso
However, I now seem to have a state where I can actually use one of the logging packages I tried earlier. log4cl and verbose both ended up having the same issue, but now that I've gotten my patches merged I can try using one of them again. (<- Shinmera )
15:53:49
thijso
pjb: well, I'm "forced" to do that, otherwise what I'm actually working on wouldn't work (or get nice UNKNOWN_ERROR's sprinkled everywhere...)
15:55:05
thijso
asdf_asdf_asdf: what do you mean? I've found the (or, at least some) issues and fixed them. Now I can go back to what I was originally working on
15:56:25
thijso
I'm actually a little shocked at how unfinished a lot of stuff seems in relation to ECL. In ECL code itself, but also supporting code in for example usocket and bordeaux-threads
15:57:02
thijso
asdf_asdf_asdf: problem already solved. This, for example: https://github.com/usocket/usocket/pull/55
15:58:21
asdf_asdf_asdf
Someone know which instruction in aliens instructions is void* and null from C?
16:00:06
thijso
Comments like ";; really big FIXME: This whole copy-buffer thing is broken." in SBCL sockets.lisp also doesn't really inspire a lot of nice fuzzy feelings...
16:01:16
Shinmera
thijso: I think in ECL's case it's because it didn't recieve a lot of love until jackdaniel picked up as maintainer.
16:02:48
thijso
Yeah, not complaining. It's just that I usually work in SBCL and haven't had the experience of these kinds of issues before. However, I'm stuck with ECL for now. Unless anyone knows of other ways to build android apps in Common Lips (that don't cost money).
16:03:10
thijso
But, on the other hand, seeing that comment in the SBCL source code... maybe I've just been lucky ;)
16:05:29
pjb
thijso: ecl is basically a one-man operation. The miracle, is that there has been one man for so long to make releases so far…
17:55:09
jackdaniel
pjb: that might have been true for some time, but right now we have two regular maintainers and a steady stream of 3rd party contributions
18:59:38
aeth
whartung: I think the main difference is that CL's type system is typical in that deftype is just a renaming, but afaik in Ada if you ask for a Foo you must get a Foo even if it's just defined as a range 10 .. 20 or a mod 24 (both of which CL has an equivalent for). That even wouldn't really work in CL. How would you make 13 be specifically of type foo in CL? Doesn't really work well without full static typing.
19:03:11
aeth
One thing I see here in Wikipedia (and I think I've mentioned this here once before!) is that there's pretty much a CL equivalent for every example here except the second subtype. You can represent weekdays as '(member :monday :tuesday :wednesday :thursday :friday :saturday :sunday) but you can't then do (range :monday :friday) as working-days. https://en.wikipedia.org/wiki/Ada_(programming_language)#Data_types
19:03:28
aeth
member types are, afaik, unordered, although the implementation will probably test them in the order you defined them.
19:04:43
aeth
There also isn't a defsubtype, just a deftype. I guess the difference is that a defsubtype would have to determine that your definition is a subtype of a provided type in addition to defining the type. This could get complicated (or impossible?) if you provide arguments to the deftype or hypothetical defsubtype
19:05:29
aeth
whartung: And those are all of the differences I can get from public information on Ada without knowing Ada. There are probably more.
19:06:34
sjl_
Bike: can you rely on (check-type foo '(and t1 t2)) to check that foo is of type t1 before t2?
19:06:50
sjl_
> For example, the type specifier (and integer (satisfies evenp)) denotes the set of all even integers.
19:08:49
sjl_
I suppose. Seems odd that they would choose an example that would be broken if used with typep or check-type...
19:08:56
pjb
Bike: it is not structural: (deftype p1 x y) (deftype p2 x y) (p2-x (make-p1 :x 1 :y 2)) is not conforming!
19:11:09
Bike
well what i mean is that the deftype mechanism doesn't add any type names that affect resolution of type system questions. it is true you can name different struct types
19:13:45
pjb
Lisp is a generic programming language. Meaning that most code you write is just not typed, it's "template code" or "generic code". It can transport data of any type. It's usually left to the client code to determine what gets in, and what it gets out.
19:14:17
pjb
Take for example sort. sort can work on sequences of anything, you just give it a lessp function.
19:16:01
pjb
On of the tests to know if a person will be able to become a programmer, is to check if that person is able to reason with boxes, abstracting the contents. Trying th re-introduce restrictions on boxes such as boxes that can hold only numbers or only shoes doesn't help!
19:17:01
pjb
Of course, typing gives a lot of work to searchers and PhD students. It gives a lot of diplomas and university budgets…
19:20:12
sukaeto
as others have mentioned, you can have e.g. distinct range types which are incompatible with one another
19:25:59
sukaeto
in Ada, defining types is a large part of programming. The type system in Ada can help you make sure you're not making semantic errors (for a simple e.g. trying to multiply a speed and a distance when you meant to multiply a speed and a time)
19:27:18
sukaeto
it's a lot different from Lisp, where you (at least if you're me :-) ) just kind of grow code organically at the REPL
19:34:47
aeth
sukaeto: I was saying what I said under the assumption that it would apply even if you (with ordinary semantics) DECLAREd every variable in your functions/bindings, Ada-style, and even used an Ada-syntax reader macro, what would differ.
19:35:14
aeth
Of course, with that many macros, you could probably cons up additional type-tracking data structures to match Ada more precisely...
19:36:32
aeth
sukaeto: as for your specific problem (speed vs. distance), I wouldn't be surprised if Ada (or an extended Ada) had units in its type system
19:47:40
sukaeto
aeth: it doesn't provide them in the standard library, but they're easy enough to declare on your own
19:48:09
sukaeto
and I think GNAT (which is pretty much defacto Ada) provides a library that will generate the matrix for you
19:49:11
sukaeto
and yeah, of course you *could* implement such rich type level programming in Lisp. I mean, look at what the Qi/Shen team has done!