freenode/#lisp - IRC Chatlog
Search
14:25:04
chrnybo
phoe: thanks for the hint on base-char, I'll resort to utputting to a file that I open with additional keys :external-format '(:utf-8 :eol-style :lf) :element-type 'character
16:03:44
tychoish
are there implementations that have reasonable cross-compiulation support/tooling, if I wanted to, say produce a darwin build on a linux system?
16:08:39
phoe
tychoish: it's an answer to an orthogonal question, but I use Travis to actually build my stuff for me on three OSes - see https://github.com/phoe-trash/furcadia-post-splitter/blob/master/.travis.yml
16:21:23
adlai
it'd be awesome if anyone is able to confirm whether my fix works on their system as well
16:25:33
tychoish
phoe: yeah, that's sort of the fall back solution, but I have an old laptop that I can hook up
16:27:10
adlai
if anyone wants to test: the official repository [in zkat's github account] still has the buggy code, and my version https://github.com/adlai/chanl/commit/a030296 has the fix
16:30:19
tychoish
adlai: I just used chanl for the first time last week, and really liked it (also hillariously zkat when to college with my partner, so its all very small world)
16:30:55
adlai
hilariously enough, zkat abandoned common lisp, and left me to maintain the projects >:(
16:32:35
adlai
ACTION ponders whether to attack the part of chanl that uses :arguments, or first see how difficult it'll be to get this working on ECL
16:33:32
adlai
this specific part of chanl is, as far as I can tell, not yet used anywhere else; it implements a method combination that builds a call to chanl's select macro, out of the applicable methods
16:36:05
adlai
ehehe yes, it is defined and used in https://github.com/adlai/chanl/blob/master/src/actors.lisp
16:37:17
adlai
The code in that file is intentionally in a separate package, and it has not yet been documented, because the tests are quite rudimentary.
16:40:52
adlai
I've been using an earlier version of this in scalpl for a while. Maybe I should first update that to use the latest version.
17:00:56
Bike
like a macro to classify the methods without using the define-method-combination mechanism?
17:01:47
adlai
at this point, The Right Thing is probably to have a separate chanl/actors system, that depends on closer2mop
17:03:54
adlai
hmm, no, it's in a different library: https://github.com/sellout/method-combination-utilities/blob/master/src/definition-helpers.lisp
17:18:41
adlai
ahh, wonderful, it is deterministic, just has an implementation-dependent failure probability
17:20:08
phoe
(defvar *failure-probability #+sbcl 0.1 #+ccl 0.3 #+ecl 0.02 #-(or sbcl ccl ecl) (error "Failures not supported."))
17:22:08
adlai
wonderful, adding a (sleep 0.5) before the failing test causes it to pass 100/100 times on both implementations
17:22:55
adlai
I'm quite certain that this specific test should pass even without that sleep, though. It should not matter in this case which thread is started first, because they should synchronize.
17:23:39
adlai
jackdaniel: I glanced at SBCL's code for the :arguments feature, and it is quite gnarly
17:23:59
jackdaniel
method combinations as specified are (suposedly) impossible to implement fully, i don't remember details
17:24:41
specbot
Define-method-combination Arguments Lambda Lists: http://www.lispworks.com/reference/HyperSpec/Body/03_dj.htm
17:25:05
adlai
the one and only place where 3.4.10 lambda lists can appear, is in the :arguments argument
17:27:12
adlai
well this is a nasty gotcha: &whole means slightly different things in d-m-c and defmacro lambda lists
17:30:23
Bike
you also can't just hand the list of arguments to a destructuring-bind or anything, it does different things depending on the generic function's lambda list
17:57:30
Harag
lonjil: thanx, I figured it out eventually... my confusion came from doing stuff in the repl and not a package, I clobbering sbcl's print-object for hash tables, and got print functions it to run my version, which then decided if it wanted to deal with it or pass it on to sbcl... ecl would not let me clobber the method.
20:11:39
theseb
SICP made an interesting point...I was wondering why i don't see the use of DSLs being more widespread......SICP said if you look more carefully....many programs in other languages can be interpreted as evaluators and/or DSLs.....So the whole world may not being doing DSLs in lisp but roughly speaking they *are* creating lots of DSLs in an ad hoc manner in all kinds of languages yes?
20:14:48
phoe
all the way to symbolic macro systems that have made their way into Nim and Rust and wherever else
20:15:16
phoe
What Made Lisp Different makes a decent list, if you can stand pg's proselytizing approach
20:21:55
theseb
phoe: how many developers will say...."doing DSLS sounds unwise and weird"...but then not realize every time they make a python/Rust/C/C++/Java program that processes structured inputs...they are themselves making all manner of "DSLs"
20:22:50
phoe
theseb: I kind of don't think that approaching this issue from the position of superiority where Lispers know what they're doing and non-Lispers don't know what they're doing is going to achieve much
20:23:11
phoe
it might be beneficial to write some informative blogposts, or perhaps give a talk on the topic
20:23:39
phoe
but starting the argument with "they don't know what they're doing" is IMO borderline delusional
20:24:56
phoe
it's true that the tools define what's possible with them, but I wouldn't treat all programmers who achieve amazing things with Rust/Python/Java++ as blind, nor I would disregard all the work that goes into perfecting their tools and knowledge
20:27:47
theseb
phoe: i didn't mean they weren't smart and didn't know stuff....i just meant they weren't *self-aware* of the fact they were doing DSLs as well
20:36:01
theseb
phoe: ah yes...nice observation.....it is true i've heard about "frameworks" all my career
20:36:35
phoe
a framework is a construction built atop the base language to ease some frequently used functionalities and make some other functionalities possible at all
20:36:43
phoe
while a DSL is a construction built atop the base language to ease some frequently used functionalities and make some other functionalities possible at all
20:37:19
phoe
it's just that the two terms are often used in culturally exclusive environments, so it is not trivial to make the parallel
20:46:45
scymtym
a DSL built within/on top off a general purpose programming language is often called an internal DSL. this is in contrast to DSLs that are built with specialized tools such as language workbenches
21:14:37
tychoish
adlai: I ran the chanl tests locally from your branch, a few RACING cases failed, but they also maybe failed on master, so I'm not sure :/
21:29:39
adlai
tychoish: (format () "~{~^~A~}" (mapcar 'funcall '(lisp-implementation-type lisp-implementation-version machine-type machine-version)))
21:31:50
adlai
tychoish: thank you for the report, though. I'll take a closer look at the issues tomorrow... perhaps I'll write a test case that reports the exact state of the deadlock
21:42:50
tychoish
https://gist.github.com/tychoish/77e28c3696a276ef671a2eb0ee2b570f it's 4 logical cores, I think 2 real cores (it's a laptop 2017 lenovo x1 carbon running arch linux)
22:48:13
Harag
defsetf arranges for the temporary variables to be optimized out of the final result in cases where that is possible.