libera/#commonlisp - IRC Chatlog
Search
9:45:04
lisp123_
flip214: then that would be the answer to the earlier query on how to reverse proxy in CL
9:45:50
flip214
unless there is some specific rewriting to do, I'd go for a standard product, though (nginx, apache, haproxy, etc.). even casual text changes (via regexes) can be done in apache, for example.
9:46:19
lisp123_
yeah nginx is a very easy to use reverse proxy imo (well since I know how to use it, hence its easy to use :D)
9:51:05
flip214
lisp123_: depending on the answer time of the http services "behind" the proxy you might have quite a lot of simultaneous active http connections.
9:51:43
flip214
HT by default creates threads; quux-ht uses a thread pool; perhaps you should take a look at tpd2 or so, to have a bounded number of threads for an (more or less) unbounded number of connections.
9:52:59
lisp123_
flip214: Good to know :) I was just answering the earlier question on the chat, I've personally moved away from web dev for the foreseeable future
9:53:16
lisp123_
perhaps I will come back in the future, after all everything commercial is a SaaS these days
15:53:51
nij-
Can someone recommand a noob friendly CL implementation that comes with an editor, works with windows and macos, and that allows the user to start playing with the repl after a quick download?
16:01:30
nij-
I remember there's one that satisfies all of these requirements.. but I couldn't find its name..
16:11:09
etimmons
nij-: People like Portacle, but it's not an implementation. Just a bundling of an implementation and other things.
16:12:26
Shinmera
Unfortunately macOS' release of Portacle is pretty busted, and I don't have the time... or, rather, the patience and energy to play catch-up with Apples BS.
16:13:36
Shinmera
If there's any other poor souls willing to sacrifice themselves to do the work though, by all means, PRs are open.
16:24:55
Shinmera
beach: In my case it's because other people that do use Apple devices heckle me about it
17:12:14
jeosol
* debugging an application that works correctly in serial mode but gives inconsistent results in parallel mode (race problems, etc) is a different kind of hell
17:14:49
nij-
Shinmera: if Portacle is just a bunch of implementations, why wouldn't it do well on macos?
17:15:52
Shinmera
First fo all, that's being very dismissive of all the work that had to be done, and second the reason is because apple wants you to distribute stuff solely through the app store and makes everything else a huge pain in the ass to force your hand.
17:17:38
shka
OSX used to be pretty nice platform for the software distribution, shame that it ends this way
17:18:16
Shinmera
Turns out when companies are doing well they start fucking everyone over. Who knew???
17:20:27
nij-
Sigh* Do you think doing that favors the those who will never learn any bit of programming?
17:21:00
Shinmera
Don't worry, I'm currently bleeding through all of my savings and probably will end up bankrupt within the next year, so me not doing well is virtually guaranteed :)
17:37:16
jackdaniel
I think that it is a matter of incentives; when you respond before a board assigned by shareholders, then you aim for growth and revenue; when you respond to your family business then you seek stability; when you respond to a non-profit then you have "its" goal in mind
17:41:11
jeosol
I am sure we'd be able to rally round. when my lot changes soon, i should be able to make some contributions to your efforts
17:41:45
Shinmera
shka: You can! https://gum.co/yukari2022 you could also support me on github if you want: https://github.com/sponsors/shinmera
17:45:48
jeosol
calling out threading experts, my code exhibiting weird behavior and I don't throwing locks here and there is the way to do it. I am using bordeaux threads for simd-like tasks. I have 3 tasks A, B, C that I would like to run in parallel: A writes files required for step B, B does a system call using the file from step A and 3rd party exe, and C
17:46:52
jeosol
For step A, I occassionally, get the inputs jumbled when I look at the files for different cases, e.g., a file for a different task ends up being included for a different task.
17:47:26
jeosol
I would like to chain all three steps A, B, C, but perhaps doing A serially, B parallel, C serially is more tractable
17:48:22
Josh_2
Instead of a lock you could use semaphores to signal when B when A is done, and C when B is done
17:50:32
jeosol
Bike: It is a population-based optimization I am doing and I need to evaluate F(X) for several iterations and populations. Step B is the most expensive and can run for hours, I have created a small case that finishes in 2 seconds for my testing. steps A and C are very fast and not the bottle neck
17:51:33
jeosol
issue is when writing the files, some of the indices are jumbled. For instance in a given iteration, say iteration 1, I can have 20 solutions. so I append the iteration index and population index to the ends of files in each folder. e.g., input_iter1_sol2.dat
17:51:49
shka
Shinmera: i grabbed two for 15 bucks each, it also looks like something i could appreciate on aesthetically
17:52:21
Josh_2
jeosol: http://alumni.cs.ucr.edu/~kishore/papers/semaphores.pdf maybe you would find the pattern in section 3.5 useful
17:52:34
jeosol
All relevant files in the same folder should have same iteration and solution indices: e.g., <prefix file>_iter1_sol2.dat
17:53:26
jeosol
So far, I have used locks, but it stinks and works in some cases and other it doesn't. However in serial mode, everything is kosher
17:53:36
Bike
i'm sorry, you're giving a very high level description of your system but it's hard to understand the particular problem. is it something like, a file produced by an A task is being processed by the wrong kind of B task?
17:56:19
Josh_2
does sound to me like you need semaphores, you can use them to pause and synchronize the execution of the tasks. if B depends on the completion of A, then B can sit on its semaphore until A signals it, then B will execute, same for B and C
17:56:34
jeosol
Bike: I didn't want to get into too much details. I wanted to understand any CL aspects in case I am missing something. In the above only step A is critical, as if the wrong files ended up in the wrong folder, the application will file as it can't get the folder so I say objective function is some high value 1e10 (for minimization task)
17:57:06
jeosol
I want to be able to do a call, e.g., like (call-with-thread-lock (function-A) ...) or something similar so the file writing steps is correct
18:00:14
Bike
when you exit the with-lock-held form, the lock is released. your release-lock call is redundant and probably an error or something.
18:01:30
Bike
it will evaluate the cleanup form once unconditionally, and then again if it returns true
18:01:58
Bike
you probably meant to check whether there's a cleanup form at macroexpansion time rather than runtime
18:02:54
Guest82
phantomics a simple social network like app with a reactjs front end (or angular) and managing docs, videos, commenting, and the like
18:03:47
Bike
just to be very clear about with-lock-held - the lock will be released if the form is exited in any way. it essentially does an unwind-protect to ensure it's released.
18:04:30
jeosol
so my unwind-protect on top is reduntant since the with-lock-held would have released the lock on exit
18:05:38
jeosol
I guess I can simplify things, I rarely have a cleanup form, or just chain all tasks together
18:06:52
Bike
you could dispense with this macro, and instead just do (unwind-protect (with-lock-held ...) cleanup) when you need to
18:06:57
yitzi
Does anybody know if it is a hard requirement that logical pathname words get upcased? CLHS 19.3.1.1.7 seems to imply that to me, but CCL appears to preserve case words.
18:07:00
jeosol
Bike: Thanks for helping brain stop this. But in your view, if I do something like this, it should help with the race issues?
18:07:20
Bike
jeosol: like i said, i don't understand your race issues. i just know that you're doubly releasing locks and that can't be good
18:08:17
Bike
and Josh_2 is right that from your description you might want a semaphore structure rather than locks per se
18:08:47
_death
it's not clear to me what you expect to gain by parallelization, if processes A and C are much faster than B
18:09:40
Guest82
phantomics oh, didn't know that... have seen many people using react, yet also see many people and companies using angular...
18:14:54
phantomics
React is worth learning for sure, you can also use the Panic library to generate React in tandem with CL-WHO
18:15:02
jeosol
_death: I apologize since I it's not very clear. I am doing optimization and for each F(X) evaluation, I run three steps A, B, and C. B is a numerical simulation step (fluid modeling on a 3d grid) using a 3rd party application. Writing the input files and reading the output are easy and fast they are both textfiles
18:15:47
jeosol
For task B, the size of the grid affects the run time, so I created a smaller grid 40x40x1 for my test case. Realistic ones can have 500K cells and takes longer to run
18:16:18
phantomics
Using CL-WHO and Panic, you can meld React components, JS and HTML together in a seamless way
18:17:10
_death
jeosol: so are you running a single B process, or multiple ones doing different inputs?
18:17:20
jeosol
death: so in a population-based optimizer, in each iteration you get 20 solutions, there are 20 F(X)'s to compute, if each F(X) takes an hour, if I can do all F(X) in parallel, they would take 1 hour ceteris paribus, instead of 20 hours - that is where the parallelization comes in
18:19:25
jeosol
one process, but I create as many threads as need and call the function that does steps A, B, and C. But I think steps A where I write the input files, results get jumbled. Onces the files are written correctly, Step B is deterministic and Step C is just read a file in the correct folder
18:19:27
_death
jeosol: right.. so basically it sounds like https://zguide.zeromq.org/docs/chapter1/#Divide-and-Conquer
18:24:31
shka
so when you call lparallel:pmapcar, you will get list of results, just like with mapcar
18:26:52
jeosol
yeah its similar to what I am doing, but I can't say I am using lparallel. My issue is the shear size of parameters - unfortunately, I have functions all over the place. So I was wondering if I could somehow tie them together and use the lock, everything will be kosher
18:27:45
jeosol
it seems it will do that I want especially with the blocking part but still running in parallel