freenode/#lisp - IRC Chatlog
Search
16:24:23
tfb
phoe: except, you don't use maven. You use some configuration management tool you wrote which uses Jinja2 and three other home-made templating systems to write maven configurations
16:25:17
tfb
phoe: and the Java code is also preprocessed by Jinja2 (except you need to use another version of it).
16:26:16
ck_
... but no problem you just open Eclipse and use this dialog to build the configuration and then click here and here and 'ok' -- and then just do it again because the first time always crashes
16:32:14
tfb
(And just to finish my rant, there are lots of configurations you use. They are all slightly different copies of each other. when you find a bug you have to fix it in 248 different places. OK, finished.)
17:26:27
jmercouris
1000 one line functions can be far more difficult to reason about than 5 200 line functions
17:54:15
hhdave
Xach: I think you may have over egged it with circulating the job ad. Ron Garret just emailed me enquiring! (thanks!)
18:12:08
jeosol
had rain this morning, computer tripped off and my runs died. Was able to find the gnuplot issues though, so no entering debugger
18:40:12
jeosol
josh_2: I am running meta-optimization (optimizing and optimizer) and the F(X) for the sub-optimization is very expensive, so it can take weeks. I do a test with a table-look (in the sub)
18:41:15
jeosol
afterwards, I run the more expensive problem. My last UPS powerpack is dead, so I was taking risk to run the jobs. Unfortunately, rain today caused the power to trip.
19:19:21
phoe
minion: memo for pfdietz: I have some people who are interested in your work on random-testing the SBCL compiler and the techniques you used and the effects that it had and the bugs that it uncovered; is there any published code/research that I should link them to?
19:20:09
phoe
minion: memo for pfdietz: also, if you ever have the time to prepare and speak about it, I would love to listen to this on an Online Lisp Meeting someday (and so would these people).
20:25:19
jeosol
josh_2: Now for the meta-optimization part, some people call it meta-learning (in the machine learning community). I have an optimizer (hereafter sub-optimizer) that I want to use to optimize a problem but this optimizer takes some (tuning) parameters, e.g., a, b, c, d, and the setting can make it performance better or worse
20:26:33
jeosol
So now, I push a second optimizer on top of the sub-optimizer (to determine the best parameters for a, b, c,d) while solving the underlying process. It's a very expensive computation
20:27:06
jeosol
It's very specific, perhaps, sometime, I will try to see if I can share results/process. But yes, I use CL for everything.
20:29:18
jeosol
apart from proprietary third-party (FORTRAN) executable does the more expensive forward F(X) calculations
20:29:44
Josh_2
but I assumed (wrongfully) you were talking about code optimization but now I see you mean machine learning it makes a lot more sense
20:29:53
jeosol
josh_2: in my case, I had control for the whole workflow, I just used what was best. The first version from grad school used matlab though, then C++,
20:30:53
jeosol
josh_2: yeah, it is the sense of machine learning. I wish I can make my builds faster though. Fare did tell me to look at poiu but haven't been able to make it work
20:48:02
jeosol
josh_2: sorry i am a bit tired ... hence explanation. But overall experience with CL has been good but I got a lot of help here and comp.lang.lisp (earlier)
21:06:31
Josh_2
Is anyone updating the list at https://lisp-lang.org/wiki/article/recommended-libraries ?
21:44:37
fiddlerwoaroof
I'm interested in why JSON instead of s-expressions. I assume for integration with other editors or something?
21:45:24
Fare
jeosol: what didn't work about POIU? Which versions of ASDF and POIU were you using to build what?
22:52:31
fiddlerwoaroof
The importance Kent Pitman attaches to symbol plists here is interesting: https://adeht.org/usenet-gems/data-hygiene.txt
23:41:34
oni-on-ion
hmm very interesting read. i came across this yesterday, also very interesting : https://neilmadden.blog/2020/11/25/parse-dont-type-check/
23:51:35
no-defun-allowed
In a sufficiently large-scale system, you find that you might use some names for some actions which someone else uses different names for. We would ideally have the users of protocols negotiate their differences, and that would preclude any type-checking.
23:53:38
no-defun-allowed
And in a sufficiently old system, you have old data and new data, which can't be handled with the same grammars and logic. So a good trick would be to stick as much logic in the object that you write to disk, so you'll be sure you can use it later, and update it only if necessary. (This idea really only works in decentralised development, where there isn't one linear progression of worse-to-better.)
23:55:15
no-defun-allowed
In other words, we avoid the low-level trappings of writing data structures, and find our types to be very, very abstract. I wrote about this in <http://lettingthedaysgoby.altervista.org/translate-what-data/the-drive-to-2021.html> and the article before it (lop off the-drive-to-2021.html).
23:55:21
oni-on-ion
fiddlerwoaroof, do you happen to have any similar notes/articles related to this ? (symbolic programming, lisp1/2, data vs. program separation, etc)
23:56:17
oni-on-ion
oh imma read that. but we did have this in UNIX days, programs/binaries. piping and shells in whatever languages (talking with plain text/binary). now we split them into .so/.dll - now we've larger monster programs, and web services =/
23:58:07
no-defun-allowed
Also, I dislike the argument that you must know you can do something to do it in dynamically typed languages, when I can happily (make-instance 4) and, sure enough, that's a valid program. It does something -- not anything useful really, but I can handle it, and it is a legal expression in Common Lisp.
23:59:42
no-defun-allowed
With message-passing and doesNotUnderstand: or the like, you definitely cannot tell if an object doesn't understand a message (i.e doesn't call Object#doesNotUnderstand:) without trying it.
0:00:09
no-defun-allowed
Yeah, it's a really boring argument in favour for static-structural typing.
0:02:39
no-defun-allowed
In my case, I am pretty sure my inference techniques are NP-hard - but I guess the "type" of my objects would be the union of their protocols, with all the real names stripped out for gensyms.
0:03:01
lotuseater
in things about legal expressions: i tell people that i can easily use eg '1/z for the name of a lexically scoped parameter and everybody gets confused and responds that's not understandable
0:03:24
no-defun-allowed
That's decidable (I think ML type inference is also NP) but if you also permit arbitrary code in the FSM I describe, it is definitely undecidable.
0:03:42
no-defun-allowed
lotuseater: Heh, yeah, I once showed some Scheme code to someone and they got confused about the ? in number?
0:40:36
no-defun-allowed
I'll have to check, but it's part of the symbol reading stuff and thus not a macro character.
1:08:40
thmprover
Question: when I write something like (defstruct (foo (:type list)) name age weight), this is just creating a list "under the hood", right? In the sense that (make-foo "Joe" 38 145) produces the same result as '("Joe" 38 145).
1:09:33
no-defun-allowed
From memory (I don't usually use a different :type), yes, except that you can mutate the result of the former but not the latter without UB.
1:10:50
thmprover
So would omitting the '(:type list) part, would that change the memory layout at all?
1:12:01
lotuseater
good question, I thought about structs up to now in general represented in memory as vectors
1:12:03
no-defun-allowed
That would create its own object, which is trivial to detect as an instance of the structure-class FOO.
1:12:42
no-defun-allowed
That wouldn't be too far off, except that structures are tagged as such. (type-of (make-foo ...)) should return FOO every time.
1:12:54
no-defun-allowed
oni-on-ion: It is undefined behaviour as to what happens if you modify literal data.
1:15:22
thmprover
So wait, let me get this straight, without the 'type, it's layout is like a vector? More analogous to C structs in memory? Whereas `(:type list)` would make it a linked list in memory (well, I just confirmed on my repl it's `equal` to a list with the same components)
1:18:10
White_Flame
or DISASSEMBLE the creation, and see the multiple cons allocations for each list cell, vs a single allocation for the stuct
1:18:53
lotuseater
thmprover: using CLOS for easy stuff could be a bit heavy, DEFSTRUCT is very lightweight and you can also have simple inheritance
1:19:29
White_Flame
I use (:type list) to automatically create accessors for the fields of preexisting lists
1:21:04
thmprover
I've been working on a pattern matching program to do symbolic math, and I'm about to add integrals to it, which is what prompts my asking.
1:21:30
thmprover
I wasn't sure if there was any advantage to a defstruct + (:type list), or just a vanilla '(list 'integral ...)
1:22:14
White_Flame
you don't know if (INTEGRAL ...) is an actual intentional integral, or a list that happens to have that value there
1:23:08
no-defun-allowed
I would use standard-classes first, then structure-classes if the added indirection of standard-class is a problem.
1:23:39
thmprover
Although highly unlikely, I would want to avoid the accidental '(integral ...) mistaken as an intentional integral
1:24:07
lotuseater
thmprover: maybe chapters 8 and 15 of the PAIP book help you :) it gave me good insights
1:26:05
thmprover
lotuseater: those are good chapters of PAIP, I'm actually mulling over chapter 15.
1:27:29
thmprover
I've been reading the first few chapters of BPS while studying the SCMUTILS library. SCMUTILS is what prompted this little adventure, trying to get something similar working in Common Lisp.
1:32:21
thmprover
Macros are like superpowers: they're awesome, until you accidentally destroy Metropolis.
1:32:31
oni-on-ion
seems most lisp code i've found dont even use macro for C #define style text replacement; i dont undersantd
1:33:28
oni-on-ion
perhaps "lisper" is more occupied with sound of mechanical keyboard to type stuff out over and over
1:33:35
lotuseater
somebody once want to told me C and Lisp macros are the same stuff o_O and C++ templates are the greatest stuff out there
1:33:52
no-defun-allowed
I would have to disagree, but I don't really want to if you like C++ templates.
1:34:16
no-defun-allowed
drmeister once famously said C++ templates are to Lisp macros as IRS tax forms are to poetry.
1:40:59
matzy_
i have a question, i'm surprised by the results of running my function here: https://pastebin.com/P6idQqdW
1:42:03
lotuseater
but if I also would be really good in C++ there where less job problems ... it does not fit in my head
1:42:24
no-defun-allowed
UNLESS will evaluate its body if the test value is false. Consider what (unless (member 4 '(0 1 2)) body ...) will do.
1:43:50
matzy_
i understand what that does, it recurses, so I go "three" layers deep so to speak until I enter 2, so I understand why 2 prints, but does it then go "back up the stack" so to speak and complete the code for the rest of the functions, past the point where the recursion was called?
1:43:53
no-defun-allowed
Also, note that FORMAT will always be called after. I'll guess either of those is what surprised you.
1:45:09
matzy_
so it hits the first recursive function, goes in there, that hits a recursive function which is valid and completes, then that exits back to the middle function, which completes, and then that exits to the outer function which then completes?
1:45:22
no-defun-allowed
My guess is this function is supposed to keep prompting the user until they enter 0, 1 or 2, and then do something with the result.
1:45:54
no-defun-allowed
So you are asking it to always write the number with FORMAT outside a conditional form.
1:46:20
matzy_
yeah, i guess i thought when you hit a recursive function, you go in there and stop executing the rest
1:47:04
no-defun-allowed
It does continue as normal. I don't think Common Lisp has a notion of recursive or non-recursive functions.
1:47:27
no-defun-allowed
(But it is not a tail call anyway, you still have stuff to do after calling PLAYER-TURN2.)
1:48:13
no-defun-allowed
A Common Lisp implementation doesn't really care, it does the same thing if it is calling the same function or another one.
1:50:22
White_Flame
most recursive programming is usually "if still-recursing, then do some work & recurse, else print/return final value"
1:51:12
no-defun-allowed
My guess (again) is that you may have thought that form would be tail-recursive, which is the case if there's nothing more to do, and so immediately jumping into that function, without setting up returning to the current function, maintains the illusion that you have called them like normal.
1:52:00
no-defun-allowed
If you write the base case first, then a reader who is familiar with induction would be able to decide if your code will behave and not infinitely recurse.
1:54:37
White_Flame
if you just want to jump back, GOTO style, (tagbody try-again (format t "Please ...") ... (unless (member ..) (go try-again)) ...)
1:59:11
surabax
cl-glfw3's fragment-shader-example instantly closes on launch without any errors on SBCL and Windows 10
2:07:04
surabax
It seems to be dying on the gl:uniformf call that updates the time variable in the render function
2:24:32
surabax
Looks like the examples don't clean up the OpenGL state after themselves so they break if you try to run more than one without reloading everything
3:02:12
matzy_
no-defun-allowed: yeah you're guess sounds right, i basically thought as soon as the UNLESS condition was met and it called itself (the recursive function), it stopped executing and just exectured taht function instead rinse and repeat
3:03:16
no-defun-allowed
Right, UNLESS and WHEN will not affect the evaluation of anything outside of their bodies by themselves.
3:04:19
matzy_
so my thought was the only function call who should hit that second format statement would be a call that did not hit the unless and did not stop to execute another function
3:04:55
matzy_
but it makes sense - if i was calling some other random function, i sure as well wouldn't want my original/main function to stop executing after the call and return
3:06:16
matzy_
it's just weird to think about what value x has at various stages in that process, to me at least
3:07:08
matzy_
if i enter 4, 3, and 2 (lets always use this as an example - it rejects 4 and 3 and is only happy when i enter 2)
3:57:29
no-defun-allowed
It does not, short of the recursively defined structure that looks like <L> ::= () | (<L> . <L>)