freenode/#lisp - IRC Chatlog
Search
17:31:23
aeth
loke, oni-on-ion: Pretty much every advantage of interpreted languages that people list can be done by Common Lisp AOT implementations, better. That's probably why people think Lisp will be slow. (I'll concede the lack of sandboxing, but on the other hand only JS and Lua do sandboxing.)
17:32:20
aeth
oni-on-ion: I think you'll find that most of the very fast CL libraries work on specialized arrays. It's something that (SB)CL is good at (technically, some implementations like CLISP don't do this well).
17:38:44
sjl
Is there a way to reduce over a numeric range in lparallel without instantiating a sequence of the numbers, or will I need to roll it myself?
17:39:31
sjl
e.g. (lparallel:preduce (lambda (n x) (+ n (if (evenp x) x 0))) (alexandria:iota 101) :initial-value 0) but without allocating a sequence of consecutive integers
17:43:12
akkad
well such as in posix shell. where you have background tasks you spawn, but can bring them to the foreground.
17:45:19
akkad
keeping track of background tasks you might have running in a loop, and say, updating the code, then stopping/restarting that given task
17:48:34
trittweiler
akkad: Assuming you're talking of threads (and not of child processes), do you know about `M-x slime-list-threads'?
17:49:48
trittweiler
that will give you a list of all the threads and you can invoke the debugger on any of them, then possibly redefine a function and invoke the CONTINUE restart
21:37:47
serichsen
Xach: I'm thinking about hard forking `cl-arrows' (https://github.com/nightfly19/cl-arrows). nightfly19 does not respond to any contact attempt. Its current state comes (entirely) from a fork/pull request by me, and another pull request where I rounded it out later is ignored. My problem is that no one ever talked nor thought about a license. Do you think that it would be right ethically if I renamed or copied my fork
21:37:48
serichsen
(https://github.com/Harleqin/cl-arrows) to `arrows', put my name in it and made it public domain?
21:38:21
theemacsshibe[m]
Is there a way to create a Hunchentoot handler for any URL? I need to create a proxy server for a specific application.
21:38:52
fiddlerwoaroof
serichsen: I don't think you have the right to the code, unless it's licensed under an OSS license
21:41:36
aeth
I suppose there's an implicit right to use it and to submit improvements to it if it's on Github, but not much beyond that.
21:42:51
aeth
(github probably has terms of service letting you do the whole pull request thing no matter the license)
21:44:10
Bike
"If there's no license then legally no one has rights to it" is incorrect. you don't need explicit copyright notices nowadays, it's the base assumption.
21:44:45
serichsen
Ah. I read a bit about copyright in the USA, and as far as I was able to tell, if something is done in a collaboration, all authors have the right to the entirety (unless they have a contract or license saying otherwise). But that doesn't answer how it is internationally anyway, and I asked about ethics.
21:46:10
Beep-Lord
serichsen: I'd rewrite the software. There could be legal issues for anyone that would use your software otherwise. It doesn't look like it would be too hard to do.
21:47:10
aeth
https://help.github.com/articles/github-terms-of-service/#5-license-grant-to-other-users
21:48:13
aeth
Even with no license the user has the right to view and fork it if it's on Github. The right only applies to use on Github.
21:49:34
pjb
aeth: well, you can always use it, patch it, but you're cannot distribute it. Ie. forking of repos without a license should be forbidden in the first place!
21:50:31
aeth
pjb: The ToS requires any public repos to be usable through GitHub services. So you can fork it (on Github) and you can do all the other Github stuff. But I don't think you'd have the right to run it
21:50:51
pjb
aeth: I would argue that forking constitute redistribution. Which is not allowed by copyright when no specific license is provided.
21:51:16
aeth
pjb: The license, when none is given, on Github is https://help.github.com/articles/github-terms-of-service/#5-license-grant-to-other-users
21:54:52
pjb
one problem anyways with the default github licensing, is that once you take a copy out of github, arguably the github terms don't apply anymore.
21:58:49
Beep-Lord
serichsen: Make sure you base your work off of your own ideas or another project that has an open license, such as swiss-arrows.
23:00:06
kenster
I'm trying to get (defcmethod upload-session "new" new :pointer) to define a method on the class with the name new that calls a C function called "FileUploadingSession_new" that returns a pointer.
23:00:43
kenster
the issue is the arguments list that I'm passing up, I want ((test :int) (blah :int)) to turn into (test :int) (blah :int) when it gets passed into defcfun
23:01:00
kenster
but I also want to properly handle the empty arguments list case, which is to not pass anything into defcfun — besides of course ,cfun-name and ,creturn-type
23:26:01
pillton
Sometimes when writing complicated macros it is better to use a function to generate the code.
23:29:21
pillton
Lets assume %defcmethod is a function. What code do you want it to generate from its arguments?
23:32:24
kenster
a defcfun with the bound method signature and a defined method that applies a list of arguments to that method
23:34:09
kenster
I want to safely use C functions in a lispy manner, I can't use SWIG because I am using C++17
23:39:32
pillton
kenster: You don't apply-list-as-rest. It should just be (apply #',ffi-method-name method-args).
23:44:31
pjb
kenster: when you test if arguments is a list, this is something that is known at macroexpansion time. Therefore there is no reason to test it at run-time! You can select the defcfun form at macroexpansion time.
23:49:45
kenster
but I still have (FILEBUCKET::CFFI-DEFUN # #:RETURN-TYPE301 #:C-STRUCT-NAME302 NIL)
23:57:33
serichsen
That might be a problem of the class you use there. By the way, you should not use slot-value to interact with your objects (unless it is inside of something like initialize-instance) but define readers or accessors. Usually # is a placeholder of the printer for things it doesn't show completely.
0:04:46
pjb
serichsen: the problem is worse: you cannot access slots (even :allocation :class slots) without an instance!
0:09:37
pjb
kenster: now, notice that I used make-symbol. This doesn't intern the symbol. This show that you could just use gensym there, without concatenate etc.
0:10:22
pjb
Right. Wrap the defclass in an (eval-when (:compile-toplevel :load-toplevel :execute) …)
0:13:56
pjb
kenster: also, since as you can see you cannot access the struct-name slot without making an instance, usually class attributes are just kept in global variables. In this case, you need a map between class name and structure name in the compilation environment for use at macroexpansion time. You could keep this map in a global variable (a hash-table), and fill it with a specific macro. Or you could write your own class definini
0:13:56
pjb
macro that could expand into this at compiliation time, and the defclass form for run-time.
0:17:41
pjb
kenster: this is because you compute the names instead of taking them as parameter to your macros.
0:18:05
pjb
kenster: cffi-method-name is not the name of the function defined with defcfun in cffi-defun, therefore no such function exist.
2:56:51
mathZ
`pkg info maxima` => maxima-5.41.0, why doesnot maxima run ~/maxima-init.mac automatically after started ?
4:21:09
beach
I guess lots of smart people with lots of time have already tried that. Not that this fact guarantees that it can't be done. Just that it might take some time. :)
4:21:48
beach
I mean, I make my living questioning what lots of smart people have agreed upon for decades, but that happens to no longer be true.
4:29:51
MichaelRaskin
Well, it is not definitive enough that I publically say yes without any qualifications on such a statement, but omst likely yes.
4:33:13
MichaelRaskin
As for smart people agreeing — well, my ICALP talk this year will be a set of ideas I had in around a week or two, together they (with something in the paper but not in the talk because technical details) disprove the conjecture most people in the field were inclined to believe… You never know.
4:37:41
beach
Our colleague idurand worked with Aart Middledorp for some time. His standard format for a talk started with "In <year>, <person> wrote a paper in which it was proved that <theorem>. Here is a counterexample to that theorem." Very impressive.
4:39:14
MichaelRaskin
Heh. Yeah, that is impressive, but this is what I definitely cannot do — it needs studying something deeply.
4:42:00
MichaelRaskin
Well, in the sense that you need to actually look at a field, have a good grasp of what is known and what is not over a large area of related things, and read a lot of papers with this in mind. It is too much specialisation for me, I am more of «wait, you are applying this from adjacent field Y instead of a better fit in an almost-adjacent field Z» person.
4:43:25
beach
That is definitely also a winning strategy in CS. Few people have the broad knowledge to do that, so there are lots of good results to be found.
4:45:08
MichaelRaskin
But few people know basic discrete probability well, or remember their second-year algebra — at all. Which is the reason for my ICALP papers in 2017 and in 2018.
4:49:32
MichaelRaskin
Then again, I am grateful to the people more immersed into the fields in question for telling me how to actually write that down (oh I did write it down on my own, but the target audience for that specific order of explanation turned out to be empty…)
4:52:23
beach
When I did my PhD and wrote an early paper, I wrote it so that people could understand what I was doing, and I was told that this is not how it is done. You reverse the order of your explanations in the paper.
4:53:22
MichaelRaskin
Reversing is enough for linear enough things, flattening a DAG is even more fun
4:54:19
MichaelRaskin
(Can we please actually learn how to use hypertext, pretty please? I am not saying I know what exactly to do, I am saying there is not enough diversity of attempts)
4:55:34
beach
Sure. All I meant was that conventions are different in different domains, just like conventions are different for different programming languages. And one just has to learn and adapt.
4:56:22
MichaelRaskin
Yes, and when I am not insider in any specific field, that learning often needs direct explanations from insiders — every time.
4:59:13
MichaelRaskin
It is definitely not a common knowledge in the I know they know I know sense; I wonder if it is universally obvious knowledge that just doesn't become common knowledge because pf coordination problems.
5:02:16
beach
I am convinced that not many colleagues even give it a thought. I mean, they don't even give any thought to the basic quality of their writing, as Steven Pinker so amusingly points out in his book and in his talks.
5:05:39
MichaelRaskin
Well, then there is a clear incentive problem around basic quality of explanation.
5:06:49
MichaelRaskin
Not in the sense of lack of incentive — this can be overcome with appeals to morality, in the sense of visible negative incentives.
5:09:26
MichaelRaskin
(then again, the problem of negative results is easier to define and it is still not going anywhere)
5:09:29
beach
I am not sure that's enough. As pinker explains, most colleagues just don't know how to write, and learning that is not obvious.
5:10:07
MichaelRaskin
I can explicitly declare that the style I prefer to read is generally considered bad writing.