<Bike>
you can also try (macroexpand-1 '(setf (gethashes foo "two") 2)) to see why that didn't work out.
Oladon has joined #lisp
<Bike>
if you're still thinking about pointers, keep in mind c has lvalues as a distinct concept. you can't get the address of a register variable but you can assign to it no problem.
lnostdal has quit [Ping timeout: 268 seconds]
<johnnymacs>
(defun puthash (x y z) (sb-kernel:%puthash x y z))
<johnnymacs>
seems 2 work
<Bike>
sure, but %puthash is an internal function, and sbcl specific.
<Bike>
setf gethash is the right way to do it.
<jasom>
johnnymacs: you know how you can doo foo[bar] = baz in C, in this case SETF is like the = and gethash is like foo[bar]
<johnnymacs>
I could port the function to common lisp probably
<Bike>
sure. watch. (defun puthash (x y z) (setf (gethash x y) z))
<johnnymacs>
ah perfect
<Bike>
but using gethash means it works with other operators.
<Bike>
you can do (incf (gethash foo bar)), for instance, to increment a value in a hash table
<Bike>
incf works by using the same mechanism as setf gethash
<jasom>
or (setf (car (gethash x y) z) w)
<stacksmith>
johnnymacs: unlike forth, where cells are pointers and @ and ! read and write to them, in Lisp mentioning a variable fetches it by default. setf sets it. setf can set a lot of complicated forms like gethash. You can also write a function to let setf know what to do with your gethashes.
vtomole has joined #lisp
fikka has joined #lisp
mishoo has quit [Ping timeout: 260 seconds]
<johnnymacs>
It seems to me like gethashes is not returning the @ and the ! value
<Bike>
yeah cos lisp doesn't have pointers
<Bike>
which is what that says
<johnnymacs>
So you've hacked setf into behaving like pointers
<Bike>
no
Fare has joined #lisp
<Bike>
you can do assignments without having pointers
<Bike>
in C, as I gave you an example of
<johnnymacs>
In c you can get the pointer to anything
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<Bike>
you cannot.
<johnnymacs>
false
nowhere_man has joined #lisp
<rme>
how about "register int i; int *p = &i"
<johnnymacs>
The string?
<Bike>
int main(void) { register int x; &x; return 0; }
<Bike>
error: address of register variable 'x' requested
<johnnymacs>
this is one reason why c is a poor language
<Bike>
because it lets you put things in registers?
<johnnymacs>
how can one have a pointer to a register?
<Bike>
indeed, you can't
<Bike>
and so, c doesn't let you
<Bike>
but doing x = 4 or something is fine
<johnnymacs>
Thats like saying c doesnt let you have a pointer to my cousin
<Bike>
my point is that in C you can assign to things without getting pointers to them
<johnnymacs>
true
<Bike>
because pointers and assignment are not the same thing
<Bike>
so, lisp has assignment, but it is not pointers, and it is not "hacked to behave like pointers" or whatever
<johnnymacs>
Well I don't believe lisp is implemented entirely in named lambda calculus
<Bike>
it isn't
<Bike>
but the implementation details aren't relevant to the semantics
<johnnymacs>
the implementation details are getting in the way of my code
nowhereman_ has quit [Ping timeout: 248 seconds]
<Bike>
they aren't! all you're trying to do is set values in a hash table! that is easy to do with setf gethash, you just want to deal with pointers instead for some reason
<johnnymacs>
I dont want to type (gethash foo bar ( gethash foo bar (gethash foo bar)))
<johnnymacs>
I want to (gethashes "foo" "bar" "baz")
<Bike>
yeah, and you already wrote that. now you just need to write a (setf gethashes) that does a loop the other way or whatever.
<johnnymacs>
Wouldn't that add a conditional to the definition of setf?
dieggsy has joined #lisp
<Bike>
what? a conditional?
<johnnymacs>
If I am going to modify setf to handle gethashes the only way I can do that is with an array/hash table of functions or nested conditionals
<Bike>
no, setf is extensible.
<Bike>
you can just write a function called (setf gethashes) and setf will expand into it.
<Bike>
or if you need more control there's other things you can do.
<johnnymacs>
There's no way to do it without a macro?
<Bike>
this gethashes thing, it's defined so that (gethashes table a ...) = (gethashes (gethash a table) ...), right?
<Bike>
what's wrong with macros
<johnnymacs>
Well what happens to the speed of setf as the number of cases setf can handle increases
pcell has quit [Read error: Connection reset by peer]
pagnol has quit [Ping timeout: 240 seconds]
<stacksmith>
johnymacs: it's great that you jumped in and are coding, but you have a bit of a learning curve. Rather than fighting it, you need to get to the point where CLHS makes sense. Also not bitch that CL is getting in your way. It is your brain that's in the way of accomplishing tasks, not CL.
pcell has joined #lisp
<johnnymacs>
once I get my hash tables working I can continue with my research
fikka has joined #lisp
warweasle has quit [Quit: Leaving]
<stacksmith>
Bike's code should pretty much to the basics. Also read about Lisp macros - I think you may not fully appreciate them. They are kind of like Forth immediate words - they run at compile time and transform the code to your wishes.
<jeosol>
anyone encounted (sb-vm::tal-call-symbol ....) error while running multiple threads. My code runs okay when I run serial, but I switch to parallel, I get that (sb-vm::tal-call-symbol ...) error and then says a function (defined by macro) is undefined
<jeosol>
First of all, I will say I am not an expert lisp programmer, but I am writing an application in Lisp using SBCl for an optimization challenge with deadline in a few weeks
nika has joined #lisp
<Bike>
and what do you do to get the error?
<jeosol>
things run serial without problems, but when I switch to parallel to gain some speed up, I get problems with GET-CPG-CELL-FACE-X- not being defined.
<pierpa>
jeosol: is this challenge public? (if so, please link, I'm curious)
<jeosol>
I just simply abort. I have never been able to run the code in parallel lots of macro generated functions.
<jeosol>
hahaha.
<Bike>
i mean, what do you run to induce the error
<jeosol>
yes, it is public, but it is domain-based challenge in fluid flow modeling.
<jeosol>
@bike, I am using lparallel library to do a bunch of parallel function evaluations
pcell has quit [Ping timeout: 264 seconds]
<Bike>
in itself this code looks fine to me.
<jeosol>
the problem is an optimization problem. I am doing a bunch of F(X), where X is a vector of solutions. There can be many solutions in one iterations (think stochastic optimization algorithms), I can evaluate serially, but can get good speedup
<pierpa>
ok. Now I'm a lot less curious :)
<jeosol>
if I do things in parallel. Serially evaluation runs okay, but when I switch to parallel, I get some that SB-VM issue. I am using lparallel library
<jeosol>
@pierpa what is background/domain? the data for the challenge is not public in the sense that a request has to be made to get the data
<jeosol>
and solving the problem needs access to some other black box modeling tools. I can provide more details offline if needed
<Bike>
so, the problem is probably elsewhere
fikka has quit [Ping timeout: 260 seconds]
wowaname has quit [Quit: i'm never coming back]
dieggsy has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
<Bike>
how about a backtrace?
<pierpa>
jeosol: Thank you, but no problem, really
<jeosol>
the calling function is defined in the same package as the function that it is complaining about, except that the latter is defined by a macro
<jeosol>
i meant to say generated by a macro
ebzzry_ has quit [Read error: Connection reset by peer]
<jeosol>
@Bike, it is weird, runs okay, when serial, but with parallel it blows up. there is something in the code base, that is not correct. I thought it was race condition related so I ran parallel option but with one worker per batch, same error
bms_ has joined #lisp
ebzzry_ has joined #lisp
<jeosol>
@pierpa, the problem is really challenging, each function takes 14 mins on my machine. and I need to run hundreds or thousands of function evaluations, so parallel is definitely the way to go
<stacksmith>
jeosol: are there any global variables in play? They may not be the same in a different thread...
<stacksmith>
Like *get-cell-p-functions*...
<jeosol>
Thanks @stacksmith, appreciate the help. That defvar is in the same package. It is a vector of other functions defined by a macro.
<stacksmith>
I don't know if that's sufficient to be in the same package... I would print it and make sure...
<Bike>
whether it's in the same package probably is orthogonal
<jeosol>
I posted an earlier problem, I got recommendations (I think it was @Bike, not sure) to use that instead of constructing function names dynamically using intern and format ..
<jeosol>
I posted an earlier problem, I got recommendations (I think it was @Bike, not sure) to use that instead of constructing function names dynamically using intern and format ..
<jeosol>
I see
<stacksmith>
It's fine to use an array, it's just that it's global. So when a new thread starts, it is probably nil.
<stacksmith>
Inside that thread that is. You may need to rebind it in whatever function that starts a new thread in lparallel.
ebzzry_ has quit [Ping timeout: 256 seconds]
ebzzry_ has joined #lisp
<jeosol>
@stacksmith, do you mean rebind the global variable? It is fixed and doesn't change.
<jeosol>
in the debugger I get this error: COMMON-LISP-USER::GET-NORMAL-CPG-CELL-FACE-X-1 is undefined
<jeosol>
Not sure why it is looking for that function in the CL-USER package when I run in parallel?
<jeosol>
Let me try to those suggestions
foom2 has quit [Read error: Connection reset by peer]
PlasmaStar has quit [Read error: Connection reset by peer]
foom has joined #lisp
PlasmaStar has joined #lisp
benny has quit [Ping timeout: 276 seconds]
benny has joined #lisp
<stacksmith>
jeosol: If you create a new thread and output to *standard-output* you will crash, because inside the thread *standard-output* is nil (or maybe unbound, I can't remember).
<Bike>
maybe you compiled it in the wrong thread by mistake.
<Bike>
in the wrong package, i meant.
<stacksmith>
Bike: do packages have anything to do with thread globals?
<Bike>
not directly, but if it's looking for a symbol in the wrong package that seems like a good place to start looking for problems
<stacksmith>
Honestly, the first thing to do is print the array and see if it has functions in it...
fikka has quit [Ping timeout: 240 seconds]
marusich has joined #lisp
milanj_ has quit [Quit: This computer has gone to sleep]
dmiles has joined #lisp
vtomole has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
<pierpa>
jeosol: wait, "defined by a macro" means that your macro is creating the symbol you use as the function name?
<jeosol>
@stacksmith, my application runs and writes statement to the *standard-output*, e.g., results from computations, etc.
dmiles[m] has quit [Read error: Connection reset by peer]
<jeosol>
yes, @pierpa, I write a macro to generate some of the functions automatically
ramus has quit [Ping timeout: 240 seconds]
<stacksmith>
Are you sure that the output comes from inside the thread - or from main thread after the computations are done?
ramus has joined #lisp
<pierpa>
ok. Then, of course, the mistake is at this point
<stacksmith>
Also, if you put the whole program into a thread, it's possible that some intialization function causes macros to expand inside the thread, with CL-USER as the default package...
<stacksmith>
I know you think I am wrong, and perhaps I am, but it all kind of makes sense.
<jeosol>
@stacksmith, no, I am not saying you are wrong or anyone. I need suggestions on what the problem could be
<stacksmith>
jeosol: if you want to rule out the issues I proposed, just output the values of *package* and your array from inside the thread...
<stacksmith>
Bordeaux-threads docs state "Global bindings are shared between threads: the initial value of a global variable in the new thread will be the same as in the parent, and an assignment to such a variable in any thread will be visible to all threads in which the global binding is visible." - but I always have to rebind *standard-output* or it does not work.
<Bike>
well, in slime standard output is specially bound in the repl thread.
<stacksmith>
Right.
<stacksmith>
So if any of the globals at thread startup happen to be bound, the values are lost.
<stacksmith>
Hence, I suspect that package may be bound, and inside the thread it's what it was originall - CL-USER.
<stacksmith>
The array is probably set, so it should be ok.
<pillton>
I'm not sure how bordeaux-threads can make such a claim given that it is up to the implementation to decide what happens with the environment when a new thread is created.
marusich has quit [Ping timeout: 276 seconds]
<Bike>
bordeaux threads is/was also an attempt to define what implementations should do
<stacksmith>
Do any implementations not do that?
<stacksmith>
I would imagine that threads are started way deep, in a place where bindings are not in scope.
<stacksmith>
I think you'd have to go out of your way to make it behave differently.
marusich has joined #lisp
energizer has quit [Remote host closed the connection]
<stacksmith>
Threads get a clean stack, so no dynamic bindings...
<Bike>
you could have all special bindings be in thread local storage. then there'd be no global bindings.
damke has quit [Read error: Connection reset by peer]
damke has joined #lisp
<stacksmith>
How would you do that? Keep a pointer to a TLS value as the symbol's value slot?
shka_ has joined #lisp
<stacksmith>
Then you would have to keep track of all special bindings separately. Do implementations do that?
<Bike>
or have no "value slots" to begin with.
<Bike>
i don't think any implementations do that.
orivej has joined #lisp
fikka has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<stacksmith>
Well, whatever way symbols are associated with values - you would need to keep a separate list and upon thread creation recreate it in the new TLS buffer - and you would still wind up with the initial global values...
<stacksmith>
Or maybe not...
<Bike>
i'm saying have no global symbol-value association at all.
vtomole has quit [Ping timeout: 260 seconds]
<stacksmith>
How would you resolve global values?
<Bike>
you don't have global values.
<Bike>
in this hypothetical alternate implementation.
<stacksmith>
Oh, I missed that.
<stacksmith>
I would go for that.
nydel has joined #lisp
<stacksmith>
Except, the outer bindings would contain the entire rest of the system, requiring a full recompile every time anything is changed - at least the way SBCL currently works...
<stacksmith>
I think I am missing something, probably the TLS bit...
<rme>
Typically, implementations make certain special variables thread-local (such as *print-base*, etc.). Other special variables see a global value. In CCL, there's a form called defstatic which is like defparameter, but asserts that the symbol in question will never be given a thread-local binding.
doesthiswork has quit [Quit: Leaving.]
doesthiswork has joined #lisp
<Zhivago>
Imagine having the symbols contain an index relative to a TLS offset.
<Zhivago>
Or imagine having the symbols look up a sparse map stored in TLS.
<Zhivago>
Personally, my preference is to use (possibly very light-weight) processes rather than threads, so that this problem doesn't exist.
<Zhivago>
Shared memory just doesn't scale and introduces lots of problems.
<stacksmith>
I see. The new thread gets a copy of the original TLS and all is well...
asarch has joined #lisp
<jeosol>
This is a pain, not resolved, yet, but may be I have to rethink how I structure things
<jeosol>
it is just something to do with the thread calls, and not recognizing that function.
Bike has quit [Quit: Lost terminal]
<jeosol>
I will keep hacking at this as I need the parallel functionality. Thanks for all your comments. I am monitoring the chat for hints ... :-)
<stacksmith>
jeosol: have you tried to output *package* from the environment in which your macro runs? Is it possible that you have an (eval-when ...) initialzation that somehow winds up inside the thread?
djinni` has quit [Quit: Leaving]
<jeosol>
@stacksmith, I have the macros in (eval-when ...) statements
patrixl has quit [Read error: Connection reset by peer]
<jeosol>
this is the problem?
patrixl has joined #lisp
<jeosol>
the macros are defined in the (eval-when ...) statemetns
<stacksmith>
I think so, if the thread initialization is around the macros. They run in a new context in CL-USER package
dmiles[m] has joined #lisp
djinni` has joined #lisp
<stacksmith>
Also, if you bind *package*, your binding is lost...
<stacksmith>
Also, if you start the threads in eval-when, who knows what happens.
<stacksmith>
I try to spawn new threads after the system is loaded and all compilation and expansion is done...
tomsen has quit [Ping timeout: 276 seconds]
wigust has joined #lisp
emaczen has joined #lisp
energizer has joined #lisp
<emaczen>
How can I get the amount of milliseconds elapsed in a program?
<emaczen>
stacksmith: do you just (/ (- time2 time1) internal-time-units-per-second)?
<emaczen>
Then multiply by 1000
<stacksmith>
I think so, but you may want to decide if you want to truncate or deal with floats or fractions, etc.
dieggsy has quit [Remote host closed the connection]
earl-ducaine has quit [Ping timeout: 240 seconds]
dieggsy has joined #lisp
cyraxjoe has quit [Quit: No Ping reply in 180 seconds.]
earl-ducaine has joined #lisp
cyraxjoe has joined #lisp
ghard` has quit [Read error: No route to host]
ghard` has joined #lisp
<jeosol>
@stacksmith, I don't start the threads in eval-when. I use that to define the functions when I load the system. I think the problem is related to *package*
<jeosol>
I am doing (export 'name *package*)
<pierpa>
duh
<pierpa>
when you export the symbol you have already created it in the current package
<jeosol>
For some that are used in a different package.
<jeosol>
My application is very large so I am using asdf:package-inferred-system for all my files and I have to manage things carefully. See the updated repo as of January 2018 https://www.youtube.com/watch?v=sgdiRh-alfQ
<pierpa>
that EXPORT will not make the symbol accessible in any package apart than it's home package
ramus has quit [Ping timeout: 260 seconds]
<stacksmith>
Do you need to have the macros in eval-when? It may not be the issue, but is there a reason?
<jeosol>
I see your point.
<stacksmith>
Do the threads start up at some defined point?
ramus has joined #lisp
<stacksmith>
Pretty!
<jeosol>
@stacksmith, I only use the threads for the function evaluations. Multiple calls SIMD type, F(X), where my X's are different CLOS objects
<pierpa>
jeosol: your system is the one shown by the video, or your system is the thing which produced the video?
<stacksmith>
Well, I still think that the first thing you should've done a couple of hours ago when we started this - print or stick the value of *package* somewhere and look at it.
<jeosol>
@pierpa, the visualization is made by GOURCE tool to visualize my git repo
makomo has quit [Ping timeout: 276 seconds]
<stacksmith>
What is the thing you are working on?
<pierpa>
ok. I didn't knew GOURCE. Very cool tool.
<jeosol>
There is a visualization for SBCL code base with GOURCE on youtube but not sure how updated it is. There are others for LINUX, python, etc
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<pierpa>
will look for them :)
doesthiswork has quit [Quit: Leaving.]
schoppenhauer has quit [Ping timeout: 263 seconds]
<jeosol>
The tool shows evolution and complexity of GIT repo. I was just fooling around with options to GOURCE and added elasticity to the branches etc
<jeosol>
@stacksmith Thanks.
sjl has joined #lisp
schoppenhauer has joined #lisp
<jeosol>
@stacksmith. The code base does not focus on a single problem but a series of interrelated problems in a domain. The part on optimization is focused at that challenge I mentioned. There are parts doing some small ML type workflows, etc
<jeosol>
but my focus for the last few moments is in the optimization part to get it to work for that challenge problem.
BlueRavenGT has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 264 seconds]
<jeosol>
I asked a question yesterday here about web frameworks in CL to use. I wanted to build a web application to have public access. I know a bit of hunchentoot and cl-who, html, javascript, etc, I will do this later, but for now, I just run within slime
<jeosol>
@stacksmith, like I said before, I am not an expert on a lot of things. The part of Cl I understood the most is CLOS part because my code is essentially OOP which is easier to manage for me. How things work internally, is not all clear to me so I learn as I go
<stacksmith>
jeosol: I've been up for two days and getting fuzzy, but if your export is in the macro definition, you probably want (export 'name ,*package*), no? Splice in the package as it exists at expansion time, not when the macro was defined...
<jeosol>
@stacksmith, that is what I am doing .Probably a typo in my initial answer
<jeosol>
in the ,*package* part
<stacksmith>
Wait, that's backwards. You want no comma, the package at expansion time, not at definition time. Can someone look at this because I am getting cross-eyed...
<jeosol>
@stacksmith, thanks for the suggestions, you can get some rest man. I will go through the messages to review the messages again
makomo has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
<jeosol>
@stacksmith, *package* name is replaced correctly when I do macroexpand
<stacksmith>
Wait, it is right there. Without a comma it expands to *package* and gets its value then and there, with a comma it spliced in the package at macro definition time.
<stacksmith>
You happen to be in the right package so it looks right.
<stacksmith>
Try expanding it in another package.
<pierpa>
you should either create the symbol in the right package with (INTERN "NAME" the-right-package), or IMPORT the symbol in the right package later. Your EXPORT does nothing.
<beach>
Good morning everyone!
<pierpa>
'morning
<stacksmith>
pierpa: right.
<jeosol>
Morning beach
deng_cn has joined #lisp
<jeosol>
@pierpa, thanks for that.
<stacksmith>
Top of the morning, beach
<jeosol>
Since I use asdf:package-inferred-system and essentially one-file defsystems, I usually import the functions one.
<jeosol>
For the error I am getting the caller and called function are in the same package. Everything blows up when I go parallel function evaluation, otherwise, it runs without problems.
<stacksmith>
jeosol, just to be clear, macroexpanding your macro in REPL and having it expand in its eval-when environment during startup is likely very different. That's why I've been urging you to figure out a clean way to see what *package* is, at that point and go from there...
<jeosol>
in the functions are evaluated serially.
<pierpa>
I suggest reading carefully the packages chapter of CLTLII, or alternatively the relevant parts of CL recipes.
<jeosol>
@stacksmith, ok let me do that. You men when I am running the application, to print the value of *package*
<stacksmith>
yeah, but be careful about when you do it. You want to modify your macro to push the package onto a global, I think - because it might expand more than once....
<jeosol>
Thanks @pierpa, I need to get a copy of that book for sure. When my system got large, after a chat with Fare and switching to one-file system, it is painful but manageable
<stacksmith>
I'm outta here.
<jeosol>
Thanks @stacksmith, appreciate the help.
sellout- has joined #lisp
sellout-1 has quit [Ping timeout: 268 seconds]
pierpa has quit [Quit: Page closed]
fikka has quit [Ping timeout: 256 seconds]
smokeink has joined #lisp
mathZ has joined #lisp
dented42 has joined #lisp
pierpa has joined #lisp
sauvin_ has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
didi has joined #lisp
<didi>
Does anyone know a lisp syntax for defining dates?
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpa has quit [Ping timeout: 260 seconds]
<beach>
Use ISO 8601.
<jeosol>
@didi, are you using one of the time libraries
<didi>
beach: I was thinking of something more lispy.
fikka has joined #lisp
<didi>
jeosol: Nope. Any indication?
<jeosol>
ok, I asked because it you are working with time and dates, it is easier to use one of the time-date librarieis
<didi>
oic
<jeosol>
Which one you use depends on what you are doing, time resolutions, if you want to track local-time, etc
<didi>
Thanks. What I am looking for is a language for defining dates.
<jeosol>
so they have functions to create a date-time for instance
pierpa has joined #lisp
DataLinkDroid has quit [Quit: Ex-Chat]
d4ryus1 is now known as d4ryus
dented42 has joined #lisp
dieggsy has quit [Ping timeout: 276 seconds]
shifty has quit [Ping timeout: 264 seconds]
dented42 has quit [Client Quit]
Oladon has quit [Quit: Leaving.]
dented42 has joined #lisp
sellout-1 has joined #lisp
sellout- has quit [Read error: Connection reset by peer]
blt has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
tempestnox has quit [Quit: WeeChat 1.6]
JuanDaugherty has quit [Quit: Ex Chat]
makomo has quit [Ping timeout: 276 seconds]
energizer has quit [Disconnected by services]
energizer has joined #lisp
<didi>
I mig
energizer has quit [Remote host closed the connection]
<didi>
*ht try to write my own.
energizer has joined #lisp
mathZ has quit [Remote host closed the connection]
<flip214>
myrkraverk: Javascript got a lot of flak for the _optional_ semicolon
<flip214>
because long lines that get broken might be interpreted as first line + syntax error or, worse, two individual lines
<jackdaniel>
nobody said cancer is a good thing
nsrahmad has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
sjl has joined #lisp
sjl has quit [Ping timeout: 276 seconds]
Ven`` has joined #lisp
<dim>
hi
<dim>
what would you recommand to a retiree using windows who wants to hack some common lisp, in terms of setup? I'm thinking ACL or LispWorks might make sense in that case, right?
<dim>
(unless the guy knows Emacs already of course)
schweers has joined #lisp
<shka>
dim: though luck here!
<Shinmera>
dim: Portacle?
<shka>
how to set up proper versioning for quicklisp?
<shka>
just use git tags and quicklisp projects will pick it up?
<jackdaniel>
isn't portacle basically emacs + cl / ide integration?
<Shinmera>
It is.
<dim>
yeah I told the guy to use Emacs if he already knows how to, or if he's ready to take on the learning curve
<Shinmera>
My retired dad was able to get going with Portacle well enough.
<dim>
the other options are for if he wants a windows native IDE for CL, I guess, where you can click and discover things
<dim>
Shinmera: with some luck this guy will to, but I just don't know him and won't be able/willing to offer any guidance other than an email sometimes, so...
<jackdaniel>
being able and willing two are two different things. if I had a choice I'd dump emacs today despite knowing it reasonably well
<jackdaniel>
s/willing two/willing to/
<dim>
oh? for me Emacs embeds my whole workflow, tailored the way I like it… I think the only reason I can work from a mac laptop is because I have Emacs and the underlying Unix tools easily available
<jackdaniel>
I agree it is a powerful tool etc etc, and when I'm installing Windows VM to test ECL usually I'm hacking from inside Emacs too
<jackdaniel>
still I really dislike it (not that I've found something better)
<dim>
fair enough I suppose
<runejuhl>
dim: maybe spacemacs? I've only tried it briefly, but it seems like a good introduction to emacs with a pretty sizable community
<dim>
I sent the email now, saying Emacs/SLIME first, then maybe ACL or LispWorks for having a windows like experience
<dim>
me personnaly, my setup is pretty well ingrained in my fingers anyway ;-)
<dim>
jackdaniel: oh and I think for hacking lisp I would like having a McCLIM based environement with some kind of graphics support and things, really, but well, it's not there yet
wigust has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
xantoz has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
chens has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
oldtopman has quit [Ping timeout: 276 seconds]
HeyFlash has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 264 seconds]
wxie has joined #lisp
schoppenhauer has quit [Ping timeout: 264 seconds]
oldtopman has joined #lisp
hhdave has joined #lisp
thodg has joined #lisp
copec has quit [Ping timeout: 246 seconds]
schoppenhauer has joined #lisp
tomlukeywood has quit [Quit: tomlukeywood]
copec has joined #lisp
adlai has joined #lisp
<dim>
(and to be fair I don't have enough time to help) :/
_cosmonaut_ has quit [Ping timeout: 240 seconds]
nika has quit [Remote host closed the connection]
nika has joined #lisp
_cosmonaut_ has joined #lisp
nika has quit [Ping timeout: 256 seconds]
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
safe has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
dented42 has joined #lisp
dented42_ has joined #lisp
pagnol has joined #lisp
dented42 has quit [Ping timeout: 276 seconds]
dented42 has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
dented42_ has quit [Ping timeout: 240 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dtornabene has quit [Remote host closed the connection]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Satou has joined #lisp
shrdlu68 has joined #lisp
wxie has quit [Remote host closed the connection]
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
clog has quit [Ping timeout: 246 seconds]
<myrkraverk>
flip214: (I honestly don't know much about the optional ; in JS, and the flak it's gotten) and that is precisely why I was surprised to learn Go doesn't have semi colons.
<_death>
Go also has optional semicolons, but gofmt removes them
<myrkraverk>
That doesn't surprise me.
<myrkraverk>
Go also inherits the dangerous 13 is thirteen and 013 is eleven; from C.
<_death>
never thought it "dangerous"
<myrkraverk>
Well, it's surprising enough for newbies, and sometimes people just want to align numbers with zero instead of space.
<_death>
who cares about newbies
<myrkraverk>
Good question.
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<_death>
newbies make tons of mistakes and this would just be another one.. and I doubt it's a very common mistake anyway
<loke>
In maclisp, 13 is 11 and 13. is 13
<myrkraverk>
I thought the idea behind Go (and Rust for that matter) was to create a language that'd be safer than C. Apparently Go has already failed in my opinion; not that I'm likely to learn much more of Go.
<loke>
That one's really fun
<myrkraverk>
loke: lol, yes.
<loke>
myrkraverk: As I said on Mastodon some time ago, “Go is the Visual Basic of systems programming”
<myrkraverk>
Oh, great.
quazimodo has joined #lisp
<_death>
Go fixes some C stupidities, though it lacks C's ABI.. it also has a nice and readable standard library.. but it's also kind of the antithesis to Lisp, so..
igemnace has joined #lisp
<myrkraverk>
*nod*
<myrkraverk>
Lisp is my go-to language for many, many tasks now; a lot of it has to do with quicklisp.
<jackdaniel>
I've heard the opinion, that it is an improvement over C (so basically that it is better C). But do we want to get stuck with another (albeit better) C for next 40 years? :-)
<myrkraverk>
jackdaniel: even better question.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<_death>
it's an improvement in some respects, but not others.. also, why would we be stuck? we use CL :)
<myrkraverk>
I've seen a recent advertisement/comment/opinion that people need programmable programming languages for today's tasks -- and my thought was "we already have had that in lisp for centuries now"
<jackdaniel>
dim: agreed, McCLIM is not there yet :)
<runejuhl>
Go is a decent language IMO, it's beginner friendly (good stdlib, highly opiniated wrt style making source easy to ready), the (weak) type system saves some errors, but the main attraction @work is that we can compile a statically linked binary that's relatively small and efficient
<runejuhl>
I'd love to replace it with something lispy though, but haven't found a good fit.. And I'm sure my coworkers would object a bit, since they have just gotten fairly procient in Go...
pagnol has quit [Ping timeout: 240 seconds]
markong has joined #lisp
fikka has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
<beach>
When I give talks to industry, I always point out that I think a project leader or manager who chooses a programming language without an independent standard should be fired. Such a choice may very well require substantial maintenance work in the future, and in some cases complete rewrites (when the single implementation is no longer supported).
<beach>
Actually, I give them one more possible choice, namely to also hire an entire team of compiler experts that are able to keep the language they chose going even when it is abandoned.
<shka>
you must be very popular in the industry :D
<beach>
I am actually.
<shka>
oh, ok
fikka has quit [Ping timeout: 264 seconds]
<beach>
I was just (re-)invited to give another talk to a company that already invited me.
<shka>
well, this is exactly opposite of what i think they would want to hear
<beach>
I am not hired to tell them what they want to hear.
<shka>
and from my expirence, being popular is 99% of saying things they want to hear
<beach>
I am hired as an expert consultant to tell them things they should know.
<myrkraverk>
beach: that's a very good point.
<beach>
myrkraverk: Which one? :)
<shka>
ALL OF IT!
<shka>
;-)
<myrkraverk>
"when I give talks to the industry ..."
<beach>
Thanks.
<myrkraverk>
beach: but basically all of it, too.
milanj has joined #lisp
<beach>
Thanks. I have given this a lot of thought actually, so I am glad that my work is recognized.
troydm has quit [Ping timeout: 240 seconds]
<myrkraverk>
That rules out both Rust and Go, afaict, still leaves CL and C
<myrkraverk>
Not sure about Java, though.
<beach>
In a talk like that, I talk about "risk analysis", and if they had done one of those, they would have seen the light. Unfortunately, most project leaders and managers don't even know what a risk analysis is.
<beach>
myrkraverk: Ask Google about Java. They were sued by Oracle after having chosen Java, thinking it was free.
<beach>
It also rules out Microsoft proprietary stuff like C#.
fikka has joined #lisp
<myrkraverk>
Yeah.
<shka>
actually, Google is conflicted with Oracle about garbage collector in JVM now
<_death>
these languages have "standards", but they have new of them every couple of years
<shka>
google does not want G1 GC
<beach>
I require the standard to be "independent", i.e., not from the supplier of the implementation.
<_death>
since there is a clear divide between the users of the language and the designers (and implementers) of the language
<myrkraverk>
beach: Google also complained about "the community" dropping the JVM implementation that was formerly an Apache project; not ever mentioning that it was Oracle's move to make it cost real world money to maintain.
<beach>
myrkraverk: I see.
<myrkraverk>
I don't remember the specifics, but Oracle made the test suite cost real world money, if it wasn't used for OpenJDK and/or GPL licensed; something along those lines.
<_death>
and there are also nontechnical reasons that make deprecating yesterday's stuff with tomorrow's deprecated stuff a thing
<myrkraverk>
Right now I don't even remember the JVM implementation's name.
<myrkraverk>
shka: what's G1 GC?
<dim>
beach: the risk analysis certainly weights in the expected life time of the project at hand and the cost of a rewrite, either for using a new programming language, a new version of a non-standard programming language (PHP/Python I'm looking at you guys), or maybe even for architectural changes (micro services, distributed network / serverless / k8s and such)?
<dim>
with Golang, I kind of like the default tooling, wherein you don't have much to think about before you can build a project and have a program to run, static binary, it's quite easy
<dim>
I've head roswell does about the same thing for CL, but I didn't try it yet
fikka has quit [Ping timeout: 240 seconds]
<_death>
dim: in Lisp, you have the REPL
<dim>
go fmt, go run, go build, go test, etc, that's nice
<dim>
_death: that's good for the developer, not for the user
damke has quit [Ping timeout: 264 seconds]
<dim>
it seems to me, more and more so, that my use case for CL is pretty unusual
<_death>
dim: depends on the identity of said user
<dim>
I mean, I use CL to ship a program to people who are not expected to hack it, just use it, and they know nothing about CL
<dim>
in go, you go build and shipit
<dim>
no questions asked, it just works, reliably, from the default toolset
attila_lendvai has joined #lisp
nsrahmad has quit [Quit: Leaving]
<dim>
I wish we had something like that for CL, including support for shared libs, or even better, having CL implementations of common libs so that you don't need the .so at all
<shka>
dim: so you are shipping application
<dim>
shka: yeah
<dim>
pgloader, pgcharts, pginstall, those are applications that happen to be written in CL; the REPL is awesome for me as a developer, totally useless for the users
<runejuhl>
dim: that sounds like what I've been looking for -- if you do find something, I'd love a heads up
fikka has joined #lisp
<shka>
lack of libraries for niche tasks is certainly painful
<_death>
it's only useless because you chose not to make your app repl-based ;)
troydm has joined #lisp
<dim>
runejuhl: try roswell?
<runejuhl>
dim: yup, just had a look at it, looks interesting
<dim>
_death: hacking a good REPL is lots of work, I have choosen other problems to solve
copec has quit [Ping timeout: 276 seconds]
<_death>
dim: think psql in lisp
<_death>
dim: then you could have your pgbuilder be an extension to it
<dim>
for pgloader, my whole goal is “Continuous Migrations”, that is, a way to automate a task and do it again and again, unmanned
<dim>
why would I have a repl for that?
<dim>
psql is lisp is SLIME, basically
<dim>
s/is/in/
pcell has joined #lisp
<_death>
a repl doesn't exclude it.. I won't elaborate on the advantages, expect them to be obvious to people here ;)
<jackdaniel>
slapping REPL on top of some complicated software gives you nothing - not much different than attaching gdb to running C process
<schweers>
beach: do you intend to add anything thread related to WSCL?
<dim>
yeah I agree, but it doesn't help solve the problems I mentionned in any way that I can see :/
<_death>
jackdaniel: I didn't suggest that.. "make your app repl-based" is a design choice
<schweers>
or is is “merely” a cleanup of things mentioned already, but not well specified?
<_death>
jackdaniel: also, it does give you something.. like gdb gives you something
<jackdaniel>
I very much dislike this phrase, but here it fits perfectly: "less is more"
<jackdaniel>
I hate interfaces which give me too much choices
<jackdaniel>
(that's one of the reasons why I don't like Emacs btw)
<_death>
jackdaniel: what about Lisp?
<jackdaniel>
if I'm interested in flushing the toiled I don't need 8 buttons for that
<jackdaniel>
Lisp is a programming language not an application afair
<_death>
Emacs is also a(n implementation of a) programming language
<Shinmera>
It's an application to write programs with :)
<_death>
and Autocad?
<jackdaniel>
maybe that's why I don't like Emacs. I'm interested in editing files, not programming them.
* jackdaniel
has presented his point of view, nothing more to add from his side.
<Shinmera>
I meant Lisp is an application to write programs with.
<dim>
lisp is programmable, go and C are not
<jackdaniel>
if we assume that Lisp is an application to write programs with, then I have to conclude that it is a very crappy application
<dim>
I'm not sure I would say that lisp is an application
<jackdaniel>
still a very good programming language
BlueRavenGT has joined #lisp
<Shinmera>
dim: What's the difference? You're using an interface (text) to make the computer do things (evaluation).
<dim>
I don't use Emacs as an application either, it's an interactive environment that I can program to my desires, I like that
<jackdaniel>
my computer is an application too then. I press keys and it does *magic*
* jackdaniel
backs off this discussion, later
<dim>
Shinmera: I would say that for me, an application implements a solution to a use-case, or a set of use cases, it's not open-ended and supposed to be evolved by the user into something else
<jackdaniel>
s/off/off of/
<dim>
Emacs is supposed to be grown by its user into something specific
<dim>
Lisp is supposed to be grown by its user into something specific
<dim>
pgloader is not, it only does a limited number of things
<Shinmera>
dim: Sure, a language is a solution to turing-complete problems.
<dim>
when you're given lisp, nobody knows what kind of problem you're going to solve with it
<Shinmera>
My point is that the distinction between what people see as an "application" or not is very arbitrary. Whether you're pushing buttons or writing text is hardly consequential.
fikka has quit [Ping timeout: 240 seconds]
<dim>
when you're given an application, I'd argue that people know what kind of problem you might want to solve with it
<dim>
what I know for sure is that everytime a pgloader user sees the lisp REPL / prompt with the useful restart values, they feel like I didn't do a proper job at writing an application that just works
<dim>
they don't want to know how pgloader works, they want to use it, full stop
<dim>
anyway, semantics are hard
<Shinmera>
I think that's more a question of presentation than a question of anything else.
<dim>
it began with comparing Golang and Lisp in several dimensions, including the default tooling, and I think the default tooling for Golang makes a lot of sense
<stacksmith>
Modern idiocy is to create a lot of declarative layers like CSS or crap in Emacs. Once it gets big, there is no way to figure out who sets a color or responds to a message...
copec has joined #lisp
<_death>
dim: both CL and Elisp provide abstractions useful for particular domains (abstractions for creating abstractions, or abstractions for manipulating buffers and windows and points and marks and...).. this suggests to their users the kind of things they may be used for
<dim>
CL users are expected to... write lisp programs, right?
<Shinmera>
CL isn't ideal for everything and pretending otherwise is folly.
<dim>
I feel like the comparison we're making is different tho
fikka has joined #lisp
<dim>
like saying that having gcc and the libc is preferable to shipping cat, it's a coupld open and dup calls anyway
attila_lendvai has quit [Ping timeout: 260 seconds]
<dim>
some users want to be able to use /usr/bin/cat without having to know how simple it is to write the C code behind it, that's my argument in favor of the go build default tooling vs the immense flexibility we have in CL with the REPL, I guess
<dim>
not sure if that makes much sense, I hope it clarifies the message somehow
<_death>
dim: it's more like saying that a Lisp with a properly designed CAT function can be nicer than UNIX cat
<myrkraverk>
I get dim's message here; not sure about any other messages.
<myrkraverk>
And shipping a cat can be painful if it's not in a good enough box. They have claws.
<dim>
the unix box comes with a good enough REPL for most users, because they know nothing else, mainly, but that's not the point
<dim>
so default golang tooling is pretty good at targetting the Unix user experience, I guess?
<dim>
whereas the CL default tooling is meant for something else entirely, which means that using CL to target the unix user experience is full of traps, uneasy, and frustrating as hell
<Shinmera>
myrkraverk: My messages are: whether something is or isn't an application is entirely arbitrary, and: whether people are comfortable with something or not is almost entirely a question of presentation.
<myrkraverk>
fair enough.
siraben has joined #lisp
<jackdaniel>
that's pure sophistry, you can bend many terms like that
<myrkraverk>
dim: for my lisp code, I've settled on SBCL; which can be painful enough to handle, when shipping to many boxes.
<jackdaniel>
that's not why we have "terms" for things though
<jackdaniel>
and yes, language is arbitrary
<Shinmera>
jackdaniel: Realising that there is no distinction can be a useful lens.
<jackdaniel>
imho not in this case - it just introduces noise which (once again - imho) misses the point yet redirects people attention
zbir has joined #lisp
<_death>
dim: since you have built pgloader in Lisp, are your designs in it REPL-friendly?
fikka has quit [Ping timeout: 260 seconds]
Bike has joined #lisp
pagnol has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
python476 has joined #lisp
siraben has quit [Quit: ERC (IRC client for Emacs 26.0.91)]
<_death>
I suspect many of them are.. and this is why pgloader may be much more useful (hackable, extensible, maintainable) than a go-pgloader.. maybe 99.9% of your users don't care, but that is the target audience you picked :)
tomlukeywood has joined #lisp
pagnol has quit [Ping timeout: 240 seconds]
Ven`` has joined #lisp
EvW1 has joined #lisp
pcell has quit [Ping timeout: 240 seconds]
doesthiswork has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
sjl has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
<beach>
schweers: I haven't decided that. Perhaps how special variables are handled in the presence of threads. But that's a good point.
<schweers>
is there any thread aware implementation in which threads don’t inherit the root binding of the main thread?
deng_cn has joined #lisp
<beach>
In all implementations I know of, the global binding is shared between all threads and every subsequent binding is thread specific.
<beach>
And of some implementation doesn't do it that way, it would have to change in order to be WSCL conforming.
<schweers>
by global binding you mean the root binding, not the binding active when the thread is spawned, right?
<beach>
Right.
fikka has joined #lisp
<beach>
dim: Yes, and as the article by Hudak and Jones shows, the cost of learning a new programming language is minuscule compared to the potential savings in productivity of choosing a language that is adapted to the task at hand.
<schweers>
there are proper studies on that?
<myrkraverk>
By CL's default tooling, are we talking about the compiler/interpreter environment, or quicklisp?
rippa has joined #lisp
<beach>
schweers: Only one that I know of. They don't exist because the cost of conducting one is exorbitant. Luckily, the US Navy did a small one once. It is not perfect, but it gives some indications.
<beach>
schweers: Do you know the paper I am talking about?
clog has joined #lisp
<schweers>
no, but I have heard the name Hudak before.
<schweers>
otherwise I wouldn’t have had to ask ;)
<beach>
He was one of the inventors of Haskell.
warweasle has joined #lisp
<beach>
My computer needs to be rebooted, but let's see what I can find...
<schweers>
the beloved reboot cycle will probably never truly leave us, will it?
<TMA>
schweers: there are experiments in live kernel patching in linux (both suse and redhat are developing one, iirc)
<beach>
schweers: Yes, sure, but not to install a new "kernel".
<schweers>
thanks again :)
<dlowe>
it's way more than experimental
TCZ has joined #lisp
<shrdlu68>
Yep, I've seen the config in the kernel sources.
trafaret1 has joined #lisp
<schweers>
TMA: I know, but its only for small patches, at least as far as I know
<trafaret1>
hi there
<beach>
Hello trafaret1.
<dlowe>
I would think that it's possible for any OS data structure to become corrupted in such a way that it will require a reboot to fix.
<beach>
dlowe: sure in the presence of bugs.
<beach>
dlowe: But for Unix, you have to reboot if some part of your kernel is updated.
<beach>
dlowe: ... even if your system is bug free.
<trafaret1>
I have started using emacs I would like to have lisp like ipython shell in emacs where I type some expression and it will be instantly evaluate into text file beneath expression
<trafaret1>
any clue
<shrdlu68>
trafaret1: Slime.
<beach>
minion: Please tell trafaret1 about SLIME.
<svillemot>
trafaret1: "apt-get install slime" actually works (though you won't necessary get the latest version, depending on your distribution)
<trafaret1>
I fall in love to emacs and shortcuts in programming I don't have expirience but I want start with lisp
<beach>
trafaret1: Most people here use Quicklisp, so you can get help from anyone.
<beach>
dlowe: Do you see what I mean about having to reboot even when the system is bug free?
LiamH has joined #lisp
<shrdlu68>
trafaret1: Great! Well, quicklisp is a package manager used for CL, used to install libraries not in the language's "standard library".
<schweers>
think pip
<svillemot>
beach: why do you recommend against using apt-get for install slime? (I'm maintaining the package in Debian)
<schweers>
well, without the shell command-line
ebrasca has joined #lisp
<beach>
svillemot: Maybe my information is outdated, but I have seen several newbies in the past who do not use Quicklisp for installing SLIME and then they get outdated or incompatible versions. I will gladly accept being corrected.
<dlowe>
beach: yes, I see. I wonder if that's true for less monolithic kernels
<trafaret1>
for little correction I have started installing slime through apt-get and next do I need to add package from melpa into emacs?
mathZ has joined #lisp
<shrdlu68>
Nope. I mean, you don't need to install it twice...
<_death>
svillemot: there is also the matter of support.. not everyone here uses debian
<beach>
dlowe: Restart should not be needed in most cases for the LispOS I am planning, just like we don't need to restart our Common Lisp system when we update a function.
<svillemot>
beach: sure, it can be outdated, this is just how stable distributions work
<trafaret1>
thaks all of you for help
<beach>
dlowe: And, yes, the current situation is what it is because most existing operating systems have monolithic kernels.
<beach>
trafaret1: Good luck.
<shrdlu68>
beach: I hope I live to hack on your LispOS.
<svillemot>
still, it is easy to use, since it registers the proper bits into both Emacs and ASDF
<schweers>
there are cases in which I have made a change and found it easier just to restart the lisp session than to "undefine" the relevant parts and reload code in the correct order.
<svillemot>
_death: in this precise case, trafaret1 told he was using an apt-based distribution
<beach>
schweers: Yes, there are situations like that, mainly because existing Common Lisp systems rely on that being a reasonable possibility.
oleo has joined #lisp
<_death>
svillemot: yes, but other people in the channel may not be able to help with debian-specific issues
<beach>
schweers: SICL (the basis for the OS I am thinking of) has first-class global environments which will make many of those situations unnecessary.
<schweers>
so far, sandboxing is not possible, is it?
<beach>
In the standard, no, that's right.
<beach>
But first-class global environments make it possible.
<beach>
Also simplifies bootstrapping with an existing Common Lisp implementation.
<schweers>
if I understand correctly, (some?) scheme implementations have an extra argument to eval, which is an environment. I suppose that is at least something.
<trafaret1>
does lisp can produce programms like c++ does?
<beach>
trafaret1: You mean, can it use 1960s linker technology?
<shrdlu68>
trafaret1: Native binary? Yes.
<schweers>
trafaret1: if you mean “Can I produce standalone binaries?” the answer is that it depends on your implementation, but mostly, yes, you can.
<schweers>
I use sbcl and create such binaries
mathZ has left #lisp ["ERC (IRC client for Emacs 25.3)"]
<shrdlu68>
trafaret1: The distinction between language and implementation is rather clear in CL, but you'll get used to it.
dddddd has joined #lisp
* beach
should restart his computer.
beach has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
<trafaret1>
I worring about hard connection between lisp and pure math stuff like lambda expression and recurrsion
<schweers>
trafaret1: what exactly do you worry about?
<trafaret1>
schweers: does lisp has it's own blackholes in understanding?
<shrdlu68>
What do you mean?
<trafaret1>
shrdlu68: I mean does learning lisp require more math skill compare to c++ for example
<shrdlu68>
trafaret1: Nope.
<shrdlu68>
trafaret1: Lisp's reputation precedes it. Unfortunately almost everything in that reputation is inaccurate.
<_death>
you don't even need to know the precedence rules ;)
<schweers>
as lisp covers more ground than any other programming language or runtime I have yet seen (with the possible exception of concatinative languages), there is more stuff to learn. But in a way, this is an advantage. I always viewed compilers as a box of black magic (and to some extent still do), but lisp lets you, the user of the language, change how compilation works. this is something which takes some time to learn, bu
<schweers>
more than in other languages, because most other languages do not cover this topic in the languages themselves.
wxie has joined #lisp
beach has joined #lisp
<shrdlu68>
trafaret1: In many ways CL is just a language that doesn't get in the way of your coding.
<schweers>
speaking of which: I find C++ templates hard to understand. But I have to admit that I never tried that hard :/
fikka has quit [Ping timeout: 276 seconds]
<shrdlu68>
schweers: Me too.
epony has quit [Remote host closed the connection]
<schweers>
trafaret1: try not to be too put off by some things in the language and the standard that just seem weird. Almost everything in CL is the way it is for a very good reason.
<schweers>
it just sometimes takes some time to understand the reasoning
<loke>
schweers: Almost. :-)
igemnace has quit [Quit: WeeChat 2.1]
<schweers>
loke: almost what?
<schweers>
ah, almost everything
<loke>
schweers: Yes :-)
<schweers>
yes, there are dark corners everywhere, but it seems to me that CL has surprisingly few such corners
trocado has joined #lisp
<trafaret1>
for the end does lisp can lisp programming controllers or gui application?
surrounder has quit [Quit: WeeChat 2.0.1]
<_death>
it has many dark corners, but they're not dangerous corners, unlike in C++
damke_ has quit [Read error: Connection reset by peer]
milanj has quit [Quit: This computer has gone to sleep]
<pierpa>
Controllers is hard, gui applications course it can
porky11 has joined #lisp
damke_ has joined #lisp
<pierpa>
*if course
<pierpa>
*of course
<schweers>
Do people use lisp on microcontrollers these days? I know that there have been such projects, but I’m not sure it can be done with current free implementations.
<shrdlu68>
_death: An example?
<trafaret1>
about emacs I have quesion. It's very powrfull tool. Are here borgs who can programming at least 10 langauges in it?
fikka has joined #lisp
<pierpa>
Borgs?
<trafaret1>
yeas :)
* schweers
doesn’t need 10 programming languages
<shrdlu68>
trafaret1: You don't need all that power. Learn what you need to get started, simple things like saving a file, and learn the rest on a need-to-know basis.
<_cosmonaut_>
borgs need =)
<_death>
shrdlu68: of things that are not widely and perfectly understood? nested backquotes, evaluation times, method combinations, restart-bind, the pretty printer, etc.
<pierpa>
Borgs, as in borgs , mcenroes, lendls?
<shrdlu68>
_death: Perfect examples!
nowhere_man has joined #lisp
<schweers>
those things not being perfectly understood doesn’t necessarily make them dark corners of the language, if you ask me.
<trafaret1>
question for american fellows. Do you always buy books or can you download it from web and what kind of panishment for it?
random-nick has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
epony has joined #lisp
<beach>
trafaret1: Why are all us other folks excluded?
<trafaret1>
as I know us has harsh copyright policy
* schweers
owns a copy of PCL but is not american
<beach>
trafaret1: Copyright is an international convention.
<trafaret1>
idk about eu
<trafaret1>
but in russian it's meee
<beach>
Some books are available for free like PCL, PAIP, OnLisp.
<shrdlu68>
trafaret1: Americans are wealthy, generally speaking. They buy primarily because they can, not because of the law.
<Bike>
most of the harsh piracy cases are for music and movies
<Bike>
swartz excepted
red-dot has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<beach>
The entire publishing model for music, books, movies, etc. is an anachronism.
<schweers>
beach: which wouldn’t be have bad, were it not so badly abused.
marusich has quit [Ping timeout: 276 seconds]
marusich has joined #lisp
<schweers>
s/have/half/
<trafaret1>
I know authtor who started gathering donats form people and write his book but the way he had gathered a decent amount of money and now this book is free
<beach>
Well, the entire idea of writing/recording once and making money N times is wrong in my opinion. I welcome the fact that most musicians now have to make money by working (giving concerts) instead.
pagnol has joined #lisp
<beach>
trafaret1: That's a good idea.
<schweers>
I don’t think its ever been that different for the musicians themselves, at least those who did not produce overtly mainstream pop music. It has been different for the content mafia^W^Wmusic labels though.
<rumbler31>
I don't know, at least about books, the cost of printing is born by someone. If an author only gets paid once, they get paid once by whom?
<Bike>
bandcamp and stuff is nice that way
<rumbler31>
after that, what model makes sense?
<_death>
beach: maybe you have a simplistic theory of value :/
<beach>
_death: There are all kinds of possibilities for my opinions.
trafaret1 has quit [Ping timeout: 240 seconds]
mtd_ has quit [Quit: leaving]
zmt00 has quit [Quit: Leaving]
<stacksmith>
The entire publishing model is _obviously_ wrong, since the only way to enforce payment is with a gun.
TCZ has quit [Ping timeout: 240 seconds]
Guest7580 is now known as caffe
caffe has quit [Changing host]
caffe has joined #lisp
al-damiri has joined #lisp
epony has quit [Read error: Connection reset by peer]
TCZ has joined #lisp
<stacksmith>
95 percent of the 'value' of purchasing a books has nothing to do with a book, but a bribe to avoid kidnapping, having your house torn apart and property confiscated, and extortion by the legal system.
Kevslinger has quit [Quit: Connection closed for inactivity]
epony has joined #lisp
comborico1611 has joined #lisp
xantoz has quit [Ping timeout: 240 seconds]
xantoz has joined #lisp
bms_ has quit [Ping timeout: 260 seconds]
<pierpa>
hmmm...
<stacksmith>
It's just logic.
random-nick has quit [Remote host closed the connection]
<dlowe>
but not common lisp
<antoszka>
Let's take this over to #lispcafe.
<stacksmith>
We should've a while ago...
random-nick has joined #lisp
trocado has quit [Ping timeout: 240 seconds]
wxie has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 240 seconds]
little_l1sper has joined #lisp
heisig has quit [Quit: Leaving]
TCZ has quit [Quit: Leaving]
FreeBirdLjj has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<jeosol>
hey guys, need some help and recommendations on cheap cloud instances. i have a challenge due in 3 weeks. I need to run 250 parallel jobs (each taking about 20 mins) in one iteration, and repeat for 50 iterations. This makes one case. I need to run about 5-10 of these cases within 3 weeks
<phoe>
jeosol: that's not a #lisp question, is it
<jeosol>
hahaha
<jeosol>
I am running lisp code, I see your point, not sure if anyone is using lisp on the cloud that is why I asked
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
szmer has joined #lisp
<dlowe>
Google is still using it to power their flight search
<phoe>
yep, ever since they bought ITA and rebranded it into Google Flights.
<dlowe>
woo ITA
megalography has quit [Ping timeout: 256 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
dented42 has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
xantoz has quit [Ping timeout: 264 seconds]
<p_l>
jeosol: well, it will be probably easiest if you can reliably package your code into something quickly deployable (docker?)
xantoz has joined #lisp
<p_l>
jeosol: then figure out how to use cloud provider's APIs to do the work quickly with minimum fumbling on the servers
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<p_l>
Assuming the tasks to run are big enough
shka_ has quit [Ping timeout: 264 seconds]
<jeosol>
@p_l, I can try. I am running sbcl and lparallel library
Mutex7 has quit [Quit: Leaving]
<p_l>
Do the instances have to communicate somehow?
<p_l>
Also, input/output concerns
<jeosol>
The small tests I did, take about 20mins, on my 64GB machine OpenSuSe, some can take 30 mins
<jeosol>
no @p_l, they are SIMD, I need to perform the same workflow repeated with different data F(X), with X changing between calls
<jeosol>
Yes, I need to gather the results back, a single result that I feed into the program, and that ends one-batch, on to the next
megalography has joined #lisp
<p_l>
What's the memory usage per instance?
<jeosol>
I am running as threads using lparallel, but for all cases, to get done, if I can push 250 runs at once, get results back in approximate 30 mins, I can finish a case in about a day
<jeosol>
Good question, I have the problem crash most times when dealing with large CLOS objects. So I start SBCL with large memory size.
fourier has quit [Ping timeout: 260 seconds]
<jeosol>
the bottle neck is not within lisp, I make a call to another software/blackbox after writing input files for that program, do a system call, wait for the call to finish, then read the output file
fourier has joined #lisp
<jeosol>
lisp code is the layer that manages all logic, processing etc, but that call is the most expensive part. I can't make that part go any faster
<jeosol>
@p_l, thanks for the input so far
<p_l>
jeosol: can you possibly factor out that call?
<p_l>
as in, make it a checkpoint moment for your application?
<jeosol>
no communication at all between the runs. I start slime, run the top-level application, which then runs the job
<jeosol>
@p_l, not sure I understand, but that part that makes that call is a defun
<jeosol>
then the threading functionality takes that function with different input to creates the threads
<p_l>
Cause well, I can help you get somewhere around $5/day for 16 core, 104GB machine, if your software could survive random stops and preferably finish within 24h per execution
megalography has quit [Ping timeout: 256 seconds]
<p_l>
that blackbox you mentioned is probably hardest part to move
<jeosol>
yes, it is. It is a third party vendor software, only exe available
<p_l>
from my understanding, you have a pattern of <N*lisp threads> -> 1 blackbox -> <N*lisp threads>
<jeosol>
yeah more or less
<jeosol>
no license restrictions through on the blackbox, each thread gets to run it's job
<p_l>
jeosol: is it a windows program?
<p_l>
also, I understand you then have N*lisp threads calling N instances of the blackbox?
hiroaki has quit [Ping timeout: 240 seconds]
<jeosol>
my whole setup is in linux, but that program is a windows program, so I cheat by running it with wine
<jeosol>
@p_l, yeah, correct
hiroaki has joined #lisp
<p_l>
if it's a one off job, building a deploy image (docker might be good option) and then grabbing pretty much any cloud provider with big enough options should be good enough
<p_l>
if you want larger scale... well, I have ideas
<jeosol>
what do you mean by big enough?
fikka has joined #lisp
<p_l>
jeosol: RAM, CPU
<jeosol>
memory size?
<jeosol>
ok
Naergon has joined #lisp
<p_l>
it's important to get a grasp on resource usage, especially as different cloud providers have different "weights" to which resource costs how much
<p_l>
AWS for example will skin you on Elastic Block Storage aka durable disks
<p_l>
and then nom whatever money you have left on memory which you'll use to buffer the slow EBS ;)
<jeosol>
I see, when I asked the question before, I was told AWS is expensive, and may be able to get a reasonable size box for 30 a month on hivevelocity or sth link that.
<jeosol>
I will run the large case, and get an idea of much resource each job takes
<p_l>
jeosol: small providers have different issues
<jeosol>
I think 250 jobs at once may be too much, if I can leave with say batches of 50, that may not be too bad.
<p_l>
AWS *is* expensive but that doesn't mean it's too expensive etc.
<p_l>
I like Google Cloud Platform not just for the fact that it's usually cheaper than AWS, but also because their default networking mode leaves everyone else in the dust
<jeosol>
p_l: I see. realiability is also important as I don't have enough time. I am extensively testing on my box, if I move somewhere I don't want to job to fail as least on the LISP+SBCL side
zbir has quit [Remote host closed the connection]
<p_l>
jeosol: that's why I stress the "packaging" part
zbir has joined #lisp
<jeosol>
*meant not on the LISP side
fikka has quit [Ping timeout: 264 seconds]
<p_l>
if you make it into something that can be quickly deployed without worrying about setting the OS etc. you'll have much better time testing and setting things up
<jeosol>
any links that could be me with that deploy image thing.
<jeosol>
I see
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<p_l>
these days docker is popular (if flawed) option to package stuff with minimum fuss
trocado has joined #lisp
<p_l>
having well-done package is better than slapping together a docker container, but I assume you want to get the job done fast and that it's not going to be some production monster (and even then it can be fixed)
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jeosol>
I will like to have it in the cloud at some point with robust solution, web app, etc, but for now, I want to just run the cases for the challenge, so a quickly dirty solution is better
<jeosol>
but if well-done package is a few days, and will save headache, then it's the way to go
<p_l>
if you handle the packaging part well enough that running the code can be dropped to the level of "one line to execute on nearly any random Ubuntu install"
zbir has quit [Remote host closed the connection]
<p_l>
then pretty much any VPS host will be good enough
zbir has joined #lisp
<p_l>
so long as they provide options with enough CPU and memory
hiroaki has quit [Ping timeout: 276 seconds]
<jeosol>
by packing you mean the whole shebang, sbcl, blackbox, etc, and possible some executable generated to run on command line?
<p_l>
yeah, probably put into docker image that you can then easily upload and run
hiroaki has joined #lisp
<p_l>
(you don't need to upload your image to Docker Hub or anywhere else, you can export it into tarball, upload to server then import
TCZ has joined #lisp
<p_l>
Docker would help to avoid library conflicts and the like
zbir has quit [Read error: Connection reset by peer]
<jeosol>
that's the best option. usually it was always a pain for me, moving files, installing, etc
<p_l>
it's a PITA for many cases :)
zbir has joined #lisp
<p_l>
your program sounds like straightforward compute thing, so packaging and setup is going to dominate workload
<p_l>
and if you really want to get cheap on the cloud, making your workload easily transferable, and making it so that you only actually run when you have your program running, is important
<jeosol>
you are 100% right. is the packaging and setup that is the most work. I tried to make everything self contained. I only need sbcl, quicklisp, ..., blackbox, and python libs. but I have been doing all this by hand
megalography has joined #lisp
<p_l>
and docker by packaging the whole of a linux distro will also make it easier to deal with dependencies you might have missed (wine? ;D)
<jeosol>
that is true, I forgot about wine? blackbox won't run
<jeosol>
oh men
quazimodo has joined #lisp
zbir has quit [Remote host closed the connection]
<p_l>
jeosol: does it need graphics to run?
<p_l>
(might be non-trivial to find out)
zbir has joined #lisp
nowhere_man has quit [Ping timeout: 264 seconds]
<jeosol>
not really, if I understand. No GPU/Cuda or anything. I only make plots to see results sometimes, but I disable all that when doing the heavy workload
trocado has quit [Ping timeout: 276 seconds]
<p_l>
jeosol: you might not notice the blackbox calling graphic-dependant functions (it might not show a visible window for one)
<jeosol>
yeah you right.
<p_l>
try running it using wine from shell after running `unset DISPLAY`
<jeosol>
ok
Cymew has joined #lisp
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
<jeosol>
it ran ok, but usually i get some random windows socket related error at start of call. fixme:heap:RtlSetHeapInformation 0x240000 0 0x23fd40 4 stub, fixme:winsock:convert_socktype_w2u unhandled Windows socket type 5, etc
<jeosol>
but it does run ok
Cymew has quit [Ping timeout: 260 seconds]
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
<p_l>
one less thing to worry about :)
deng_cn has quit [Read error: Connection reset by peer]
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
deng_cn has joined #lisp
<jeosol>
p_l: thanks. I can't get you beer if you drink, but the pointers and help are appreciated.
fikka has joined #lisp
<p_l>
don't worry, the doctor forbid me from drinking anyway :P
<jeosol>
p_l: now I need to look into docker, etc, and packing
<jeosol>
hahaha,
xantoz has quit [Ping timeout: 246 seconds]
<p_l>
jeosol: it was hard to avoid *over* engineering a solution for you :P
xantoz has joined #lisp
<jeosol>
I will probably still looking to those more robust options later, but my primary need is just getting the code to run. I am testing now to make sure no problems with Lisp/SBCL end of things
zbir has quit [Remote host closed the connection]
Quetzal2 has joined #lisp
zbir has joined #lisp
dieggsy has quit [Ping timeout: 276 seconds]
Fare has quit [Ping timeout: 260 seconds]
energizer has quit [Disconnected by services]
zbir has quit [Remote host closed the connection]
energizer has joined #lisp
zbir has joined #lisp
energizer has quit [Remote host closed the connection]
energizer has joined #lisp
zbir has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 276 seconds]
zbir has joined #lisp
TCZ has quit [Quit: Leaving]
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
zbir has quit [Remote host closed the connection]
zbir has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
hiroaki has joined #lisp
asarch_ has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
LiamH has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 256 seconds]
deng_cn has joined #lisp
asarch has quit [Ping timeout: 256 seconds]
pyface has joined #lisp
zbir has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
asarch_ is now known as asarch
vlatkoB has quit [Remote host closed the connection]
fikka has joined #lisp
lnostdal has quit [Ping timeout: 268 seconds]
Chream_ has quit [Ping timeout: 268 seconds]
mishoo has quit [Quit: (save-lisp-and-die)]
mishoo has joined #lisp
mishoo has quit [Client Quit]
pyface_ has joined #lisp
pyface_ has quit [Remote host closed the connection]
sjl has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
lnostdal has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
damke has quit [Ping timeout: 264 seconds]
deng_cn has joined #lisp
Bike has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
blt has quit [Ping timeout: 240 seconds]
xantoz has quit [Ping timeout: 240 seconds]
tunabee has joined #lisp
blt has joined #lisp
EvW has joined #lisp
slyrus has quit [Ping timeout: 256 seconds]
blt has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
comborico1611 has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
python476 has quit [Ping timeout: 260 seconds]
asarch has quit [Quit: Leaving]
karswell has quit [Ping timeout: 246 seconds]
pagnol has joined #lisp
Quetzal2 has quit [Read error: Connection reset by peer]
Baggers has quit [Quit: b]
Baggers has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
fluke`` has joined #lisp
random-nick has quit [Ping timeout: 260 seconds]
fluke` has quit [Ping timeout: 260 seconds]
oxo1o1o1o has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
comborico1611 has quit [Quit: Konversation terminated!]