freenode/lisp - IRC Chatlog
Search
23:01:13
aeth
It might not run faster. launch.lisp after first run will be compiled and placed in the cache at ~/.cache/common-lisp/your-implementation-name/path/to/script/launch.fasl (if not SBCL, the extension won't be fasl)
23:01:41
aeth
I mean, for a one-liner it might still be faster to just eval it, but that's kind of a microoptimization
23:02:01
nullnullnull
so at first time will be normal but second run: the load will be faster because it's saved on cache right?
23:02:22
aeth
For a large enough file. There might be an upfront overhead that makes eval faster for simple enough commands.
23:03:54
nullnullnull
why im asking u this: because in javascript for example they used to convert code to onliner script to load page faster (it's like a production code)
23:06:01
aeth
With typical CL, after the first compilation you won't see the text again and will just load the FASL, unless the dependencies have changed or you delete the cache or you upgrade your implementation. Although, I'm actually not sure if launch.lisp would experience that because this might be done through ASDF. The vast majority of your program would be an ASDF system defined in an asdf:defsystem in a foo.asd file, though.
23:09:18
aeth
You'll probably have four files at a minimum if you're going for a script with this approach, which isn't the only approach. (The shell script that launches it from the shell, the launch.lisp that it calls, the your-project.asd that defines your project, and the script.lisp... but there would usually be at least one more, called package.lisp, where you do the defpackage... especially if there's more than one file that shares one package)
23:11:38
aeth
In development, you'd usually use the REPL directly and skip the first two steps, which is part of the reason why you'd want to have the separate files.
23:12:37
aeth
If you can't expect the target machine to have CL, you can build a binary which bundles the implementation with it, which would make the deployment process different. There are portability libraries that handle this use.
23:13:29
nullnullnull
yeah, I'm only worrying about the packages atm (need to install on every development machine)
3:06:06
torbo
Does slime have reader macro support? I notice that I'm able to use reader macros in sly but not slime. Is there something I need to configure or does slime just not support reader macros?
3:10:47
Oladon
torbo: it'd be helpful if you'd tell us what you're trying to do and what (exactly) is happening
3:12:36
torbo
If I try to run the code at the bottom of this page: https://gist.github.com/chaitanyagupta/9324402
3:13:26
torbo
By loading it directly into sbcl, and type {"a": 1} into the console, I get a hashtable object back.
3:17:30
torbo
Here's a direct link to the code in json-reader.lisp: https://gist.githubusercontent.com/chaitanyagupta/9324402/raw/54359d3f2d19b78c603cf011304a741410a873ae/json-reader.lisp
3:18:07
torbo
Nice. Maybe my configuration is broken somewhere. I'll have to investigate. Thank you for checking for me, I really appreciate it.
3:18:40
Bike
the slime repl just passes things to sbcl's read and eval. it should behave almost exactly the same as sbcl at a terminal, other than like formatting stuff.
3:24:37
torbo
Ah, yes, you're right, it does work. The reason it's broken is because I've loaded up another package before running that command and I called (in-package :other-package) first, and I think that in that package, I'm loading up other reader macros that may be affecting the readtable in some way.
3:26:55
torbo
I've been able to replicate the problem, and the expressions that cause the inconsistent state are the following:
3:32:26
loke
I was sure there was a way to export a symbol from one package into another package and a different name... I.e. so that (eq 'foo:a 'bar:b) ⇒ T
3:37:52
mfiano
Well you could use package-local nicknames, but it's non-conforming and only available on 5 implementations.
3:46:27
mfiano
Right, he's looking to map different symbol-names for a symbol internal to one package to another. READ would need to be modified for that behavior as to know which package's LUT to reference for the mapping.
4:03:47
loke
mfiano: The question originates from a larger question as to whether it's possible to create consistent aliases in Common Lisp. I.e. something where (fpp
4:04:17
LdBeth
But it might be more useful to let the compiler/eval handle that, if aliasing/renaming is desired
4:06:26
LdBeth
For example a macro involves the aliased function has been loaded before the aliasing definition
4:11:02
loke
LdBeth: If the same symbol could have different names, that would have solved that problem. Then symbols FOO and BAR would literally _be_ the same thing.
4:12:16
loke
I thought some variant of symbol aliasing was used as an argument why some people use keywords for loop commands?
4:13:16
loke
I'm OK with SYMBOL-NAME returning a name that is not consistent with its name in a package, and I thought that was possible. But apparently not.
6:07:34
afidegnum
i m trying to build a drop-n-down html builder a la dreamweaver with Js support, but i am confused with what GUI toolkit should i use, i read about McCLIM, Slip but i am a bit perplexed,
6:08:03
afidegnum
the GUI will have an internal browser engine to preview the page intead of opening an external browser,
6:09:40
loke
afidegnum: CLIM is quite opinionated in how you build your applications. If your design matches CLIM's idea of interaction (or if you're willing to adjust your ideas to match) then it's a good choice.
6:10:25
loke
You _can_ build anything of course. It's just that CLIM won't help you as much if you choose to go certain routes.
6:10:59
loke
I'm comitted to CLIM right now myself, as I help out with maintaining (and evolving) it.
6:11:49
afidegnum
Drag-DOwn feature of vectors which will generate DOM nodes which can be previewed in a customed web browser, so will be the Js
6:16:53
LdBeth
afidegnum: afaik qtwebengine is licensed under a BSD-3 clause style license which doesn’t prohibit either modify or redistribute
7:39:14
p_l
afidegnum: you might be also interested in running chrome or firefox in debugger-driven mode with external debugger (your application)
8:09:13
jackdaniel
fun stuff, one asdf function has 184 arguments (combineds, with default initargs included)
8:15:14
jackdaniel
I don't know, I'm working with ECL's argument stack now and it is one of diagnostic messages done with "printf"
8:16:08
jackdaniel
if I had to guess I'd bet on one of make-instance methods from asdf's mixin-spaghetti
8:17:44
no-defun-allowed
oh well, nice to hear that there aren't any functions that require 184 arguments at least