freenode/#lisp - IRC Chatlog
Search
14:10:00
jackdaniel
you may be interested in weblocks (again, not sure how well maintained is it), since it has continuation-based web application model
14:10:13
Grue`
with any luck you'll be able to compile CL to WebAssembly at some point in the future
14:11:40
dwts
I was thinking lisp is a nice choice since even the math can be done with ease when using lists
14:21:02
dwts
thank you guys, I'll share the project here if I come to a non-embarassing prototype :P
14:24:06
Dan1973
Hey guys. A question about standalone lisp excutables(sbcl for example). As far as I understand, the generatedimage contains the compiler, repl and all things. Now, what about the amcros defined in the program ? Lets say I want to describe behaviour trees for some entites in lisp and I use some macros for this description. And I want to keep the behaviours in text for easy modification, load them (they use macros) compile at run time
14:27:44
Dan1973
and lets say I have a mechansim to re-compile the source if it is modified by an external editor on the fly. Will it update in memory the functions while my program is running ?
14:29:16
jackdaniel
keep in mind though, that it is possible, that your function call was inlined somewhere, then changing the function in the memory won't affect the other one
14:29:36
jackdaniel
but if you recompile also the function which calls your updated function, then there shouldn't be a problem
14:30:53
jackdaniel
essentially it is something what many CL programmers use – they use slime (emacs mode) and recompile functions during the development, so they don't have to recompile whole project whatsoever
14:34:24
Dan1973
jackdaniel: yeh, i used it as well in emacs with slime , but I just learn lisp and I wasnt sure if it will still work in a standalone executable which laods code on demand and compiles it
14:35:27
Dan1973
I guess this means that Ill also have a repl in my excutable, which I can expose trhough sockets if I really want to any tools, like sbcl exposes it though slime to Emacs,yea ?
14:36:25
jackdaniel
it is possible – you have to setup swank server in that case (it allows even remote connections) - keep in mind security issues which may arise from such approach though
14:38:29
Dan1973
jackdaniel: yes of course, thank you for reminding abt security. But as far things I build are just toys to learn lisp, I find I learn faster if i create things i like in the language, instead of fooling arround with simple functions in repl
14:39:43
jackdaniel
dwts: ECL runs as Android app (but it is in alpha phase atm) – I'm maintaining EclAndroid
14:40:21
mordocai
jasom: Playing tag here, but per the docs "Using the PARSE function, plump will transform a string, pathname or stream into a document"
14:40:28
jackdaniel
there is not legit cl<->java bridge so far, but I have some ideas how to implement it in a clean way. For now it's java calling lisp
14:41:19
dwts
well I always wanted to write an android app but without the paren fun I wouldn't enjoy it
14:58:06
pipping
|3b|: (uiop:run-program "ls") worked for me on all the platforms I tested ( that would be same list as used here: http://139.162.161.212/asdf/summary.html )
15:21:21
|3b|
pipping: i want to pass untrusted data as specific arguments to a child process, so i need to make sure there isn't a shell interpreting ; or $ or > or whatever in a dangerous way
15:23:46
|3b|
igam: options, not data from the subprocess point of view, and i don't control the subprocess
15:24:49
igam
In bash I do: function quote_shell_argument(){ echo "$1" | sed -e 's,\([^-+=:/_,.~^A-Za-z0-9]\),\\\1,g' ; } # perhaps a little overkill, but it works.
15:30:08
flip214
_death: please take a look at my "master" branch, there are a few commits for you to get "inspired" from.
16:04:38
pipping
|3b|: As you don't interpolate the arguments into a string, the shell will not evaluate them
16:05:05
pipping
|3b|: (run-program '("echo" "$PATH")) will give you "$PATH" on every lisp implementation
17:18:39
holomorph
hi, i'm wondering what a possible use case is for "binding var to nil when evaluating result-form" in do-symbols and friends
17:47:09
holomorph
phoe_: why would one have var in result-form in the first place, as in (do-symbols (var foo var) ...)
18:07:35
White_Flame
holomorph: there's no defined traversal order for symbols in a package, so I think that binding to NIL is just to prevent relying on the last one being something particular
18:07:55
White_Flame
however, I think it would have made more sense if var was simply not bound when result-form is evaluated
18:08:45
flip214
Can I define a class with a :allocation :class slot that has a :initform (error ...)? Seems not. http://paste.lisp.org/display/330141
18:10:59
phoe_
So when you call DEFCLASS STATIC-ERROR the ERROR is called which results in an error.
18:11:34
White_Flame
of course, that error being thrown prevents the class from actually being created
18:14:56
White_Flame
Is there some way to pass in a value of the allocation class slot that prevents calling its initform?
18:17:43
White_Flame
flip214: I think you're going to have to get into the MOP if you want this specific behavior
18:24:36
flip214
phoe_: oh yeah, right. but then I'd need to have a :around in every child class, don't I?
18:25:35
phoe_
the constructor also performs a check whether the allocated object has its most specific type equal to the protocol class
18:45:04
ebrasca
phoe_: Now I have some Context sensitive grammars but I need integrate with my project.
19:32:04
Xach
with-accessors is a very thin wrapper that sets up symbol-macros and nothing else, really.
19:38:59
shrdlu68
If I have a vector with different fields, such as ASN.1 or TLS, I can define a class and methods that access the different fields and return them. The only problem is that it would be something like a function call every time one of the fields is accessed.
20:00:27
ebrasca
The nconc (or nconcing) construct is similar to the append construct, " but its list values are concatenated as if by the function nconc. "
20:02:51
mood
ebrasca: APPEND copies its arguments (except the last), stitching those copies together. NCONC stitches all arguments together. You are creating new lists that are then stitched together using NCONC.
21:26:17
phoe_
I think you grab UIOP and run an application while feeling it a string "blah" as stdin
21:26:39
White_Flame
raydeejay: you need to start 2 processes separately, and configure their stdin & stdout
21:26:44
jasom
mordocai: ah, so it does. And it works with pathnames for me (make sure you are passing a pathname and not a namestring)
21:27:10
White_Flame
oh, n/m, what phoe_ said, because you don't really have 2 meaningful executables
21:27:16
jasom
mordocai: e.g. (cl-whoize #p"/home/jasom/foo.html") will work but (cl-whoize "/home/jaosm/foo.html") will not do what you expect
21:31:22
raydeejay
to answer my own question: (uiop:run-program '("festival" "--tts") :input '("hello"))
21:41:33
pipping
notably, input from a foreign stream is not as portable as input from a file (which is how input from a string is implemented iirc)
21:42:13
pipping
where by foreign I mean: one that the CL implementation's run-program didn't create and hand out
21:48:19
trinque
hi, is a hash table a reasonable data structure in CL if I only care about key lookup? (i.e. have I seen this string before?)
21:49:32
White_Flame
as far as the standard structures go, it's appropriate. there are certainly other data structure libraries around otherwise
22:57:27
jasom
jackdaniel: I'm just curious which utilities in osicat you needed that weren't in uiop?
23:13:52
mrottenkolber
I met a guy last weekend, really nice guy, he works in software testing. Basically, he tortures software products before his employer buys them. When he said he likes C, I joked: “Naturally, since your job is to find bugs.”, when I said I like Lisp he said: “Ah, the language you can write, but can’t read!"
23:16:56
jasom
fiddlerwoaroof_: there is linux/POWER builds of sbcl, and you can run linux on an iSeries
23:22:45
attila_lendvai
yes, it's easier to introduce higher level abstractions in lisp, and if people live with that possibility then code tends to get shorter
23:23:33
raydeejay
* would like to point out that software is not *really* about deadlines, the software "business" is
23:28:08
raydeejay
it's not really obfuscated, but I'm fond of having a 🐟 function somewhere, if possible
23:29:59
White_Flame
The uneducated "Lisp is hard to read!" is just confused by parens. The educated "Lisp is hard to read!" doesn't like the fact that code can be configured to mean other things.
23:30:25
fouric
* literally pasted that snippet into SBCL prompt and it tried to create a function named NIL
23:31:26
_death
Lisp gives greater freedom in expression than many other languages, and so style and good taste become more important.. but the (Common) Lisp community is quite attached to Lisp traditions, and so the style of the Sages of Lisp is passed on
23:32:52
raydeejay
if you're using emacs... http://endlessparentheses.com/manually-choose-a-fallback-font-for-unicode.html
23:35:08
fiddlerwoaroof_
fouric: you can also create functions with an non-breaking space in their names.
23:36:31
fiddlerwoaroof_
With a nbsp, the second word of the function name looks like the first argument
23:37:43
fiddlerwoaroof_
http://www.rubyinside.com/the-split-is-not-enough-whitespace-shenigans-for-rubyists-5980.html
23:37:56
White_Flame
(buffalo (buffalo buffalo) (buffalo) (buffalo buffalo (buffalo buffalo buffalo)))
23:41:28
mrottenkolber
I am not sure what the colocation means, is it one fee for all, or an optional fee to also enter <Programming>
23:43:48
klltkr
In Doric (the dialect of Scots in north east Scotland, where I'm from), the following is a legal sentence: fit fit fits fit fit
23:51:01
raydeejay
some are about actual things happening now, some are about recent years, some date back centuries
23:52:06
mrottenkolber
raydeejay: klltkr: is it true that catalonia is a rich region compared to the rest of spain, and they see spain as a burden
23:53:05
TMA
somehow the idea is that with independence THIS-OR-THAT would be better, but in the end it all depends where is the leadership on the corrupt -- inept scale ... which is a value independent of independence
23:54:46
raydeejay
it's more about how the corruption doesn't matter in relation to the amount of moeny available, for example
23:57:23
raydeejay
but this is really not the place to discuss it, for many reasons too, one being that it is #lisp :)
0:34:48
Xach
mrottenkolber: not really. you can fake it with some functions, but just as easy to do it from scratch.
0:36:09
White_Flame
mrottenkolber: the problem with a standard descending FIND-alike is what to do with NILs. Are they elements to be tested by themselves, or are they empty sublists?
0:37:47
White_Flame
however, lists-of-lists do still count as trees. There's no requirement they be binary trees
0:39:37
White_Flame
right. I've got a version that also processes the last elements of dotted lists, which brings in even more odd cases
1:01:59
mrottenkolber
there is no format directive that accepts a number and repeats the substring that many times, is there?
2:06:37
_death
* is not a good candidate for generic function.. it can be built upon nullary-*, unary-*, binary-*