<nullnullnull>
btw, why the sbcl --eval is not working like --load file?
<nullnullnull>
it doesn't read the 'require'
EvW has joined #lisp
<no-defun-allowed>
sb-bsd-sockets is only for SBCL, and --eval reads an expression whereas --load reads a file
xkapastel has quit [Quit: Connection closed for inactivity]
Bike has quit [Quit: Lost terminal]
Frobozz_ is now known as Frobozz
frgo has quit [Ping timeout: 248 seconds]
<nullnullnull>
strange cuz the --eval doesnt read the (require :sb-bsd-sockets) , it says "Package SB-BSD-SOCKETS does not exist"
<nullnullnull>
but works with --load
CloseToZero has joined #lisp
libertyprime has quit [Ping timeout: 248 seconds]
EvW has quit [Ping timeout: 264 seconds]
lavaflow has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
lavaflow has joined #lisp
<beach>
Good morning everyone!
<LdBeth>
Morning
_whitelogger has joined #lisp
libertyprime has quit [Ping timeout: 268 seconds]
gravicappa has joined #lisp
defunkydrummer has joined #lisp
libertyprime has joined #lisp
mwgkgk has joined #lisp
zaquest has quit [Remote host closed the connection]
zaquest has joined #lisp
<markasoftware>
i remember once seeing an sdl2 library apart from cl-sdl2, but I can't find it again.
<markasoftware>
Does anybody know what it might be?
libertyprime has quit [Ping timeout: 244 seconds]
semz has quit [Ping timeout: 264 seconds]
Arcaelyx has quit [Ping timeout: 272 seconds]
sauvin has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
<LdBeth>
markasoftware: if the name on github or somewhere is cl-xxx then in Quicklisp dists it’s usually named xxx, so you are probably talking about the same package
libertyprime has joined #lisp
defunkydrummer has quit [Ping timeout: 245 seconds]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
<aeth>
Portable, but maybe not the most elegant way to do it. It looks like it uses the sysconf function in Linux, not get_nprocs.
<aeth>
It looks like it saves it to a global variable, so if the user disables hyperthreading/SMT after the library is loaded, then it will give inaccurate information, assuming those show up as processors.
gxt has joined #lisp
frgo has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
gareppa has joined #lisp
kajo has quit [Ping timeout: 250 seconds]
shka_ has joined #lisp
Adamclisi has quit [Quit: leaving]
varjagg has joined #lisp
zhlyg has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
milanj has quit [Quit: This computer has gone to sleep]
FreeBirdLjj has joined #lisp
gareppa has quit [Quit: Leaving]
m00natic has quit [Remote host closed the connection]
orivej has joined #lisp
charh has joined #lisp
FreeBirdLjj has quit [Ping timeout: 272 seconds]
cosimone has joined #lisp
cosimone has quit [Ping timeout: 264 seconds]
cosimone has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
wigust has quit [Ping timeout: 248 seconds]
wigust has joined #lisp
femi has quit [Ping timeout: 264 seconds]
vaporatorius has quit [Quit: Leaving]
gxt has joined #lisp
EvW has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
<flip214>
aeth: I agree that the library shouldn't cache such information by itself... but how often does that change? even in VMs I seldom need to change the #CPUs.
femi has joined #lisp
<aeth>
flip214: Some CPUs have noticable performance differences in applications with SMT on vs SMT off, i.e. some applications are faster with SMT off and some with SMT on (also intel HT has security issues), so I could imagine someone writing a script that switches that feature on/off based on applications used. I think it's just setting a config file from 1 to 0 or vice versa in Linux.
<flip214>
aeth: yes, you can just enable/disable CPUs.
<aeth>
I think there's a file or two specificially for SMT
<aeth>
So that means most users could instantly half/double their CPUs
<flip214>
but you can also get the same effect by just restricting the _process_ to some set of CPUs that don't have HT overlaps
<flip214>
(and forcing all other processes away from these CPUs, of course)
<flip214>
see taskset
gxt has quit [Ping timeout: 260 seconds]
<aeth>
flip214: Yeah, I'm just saying that in 2019 (and not really in 2015) you could conceive of situations where someone instantly halves their CPUs on Linux (if it's possible which iirc it is). e.g. if a game benchmarks better with SMT off, they might run a script to turn it off, and if they leave your Lisp app up in the background...
<flip214>
and lstopo will give you the CPU physical IDs
<flip214>
but as I wrote, you can get the same effect by just not _scheduling_ tasks on some HT.
<aeth>
flip214: I was thinking more along the lines of echo 0 > /sys/devices/system/cpu/smt/active
<aeth>
flip214: Thanks for getting me to look in the right location, though. It was going to bother me if I couldn't find that again
<flip214>
np, google finds _everything_ (sadly)
<aeth>
flip214: And, yes, it might never be the optimal solution, but if it's a known, correct solution, then someone's probably doing it so an incredibly general library needs to take edge cases like that into account imo.
<aeth>
And I've definitely done lots of suboptimal things just because they're easier or easier to remember.
<flip214>
if that's used in a library I'd suggest having an option to spawn a "sudo" process to switch these priviledged bits around, so that not the whole process runs as UID 0 all the time
<aeth>
The only important thing here imo is that I can `(cl-cpus:get-number-of-processors) => 8` and then `echo 0 > /sys/devices/system/cpu/smt/active` and then `(cl-cpus:get-number-of-processors) => 8` and get double the now-correct answer.
jansc has joined #lisp
<aeth>
For most applications, caching will probably make sense (and it's on the user for messing with SMT), but it's not always the answer, so the library shouldn't only cache.
<flip214>
well, for a simple sysconf operation (which probably because of vdso is just a local call and reading some quasi-local value) I wouldn't even cache
EvW has quit [Ping timeout: 250 seconds]
akkad has quit [Remote host closed the connection]
<flip214>
after all, you should avoid as many syscalls as possible anyway, so caching that should be done in the application
<aeth>
Right. And you probably don't need to even cache in the application. Once you find out "8" it doesn't matter if it's an old i7 with HT and 4 cores or a new i7 without HT and 8 cores, or if the processor count could (in a rare edge case) change. You're making 8 worker threads or whatever so now *threads* => 8 or something like that is what you want.
<aeth>
The only time you'd need to keep the actual processor count is if you have a GUI menu with a slider or something.
atgreen_ has quit [Ping timeout: 276 seconds]
kajo has joined #lisp
rozenglass has quit [Remote host closed the connection]
semz has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
<p_l>
POWER 8/9 can switch degree of SMT at will
<aeth>
So it's worse than I thought, then.
<aeth>
(Caching, I mean.)
semz has joined #lisp
semz has quit [Changing host]
semz has joined #lisp
<p_l>
Yeah, and worst case cpu core can swing from 1 thread to 8
<ebrasca>
p_l: Power9 ? I need to test it.
<aeth>
Does anyone use POWER9? I'm only aware of Talos from https://www.raptorcs.com/ which is an option... pretty pricey, though. Not underpowered, but probably underpowered when compared to Threadripper, its real price-range competition.
<p_l>
T2 hw can do 4 threads
<p_l>
aeth: depends on use case
<p_l>
Also availability of nvlink 2.0 gets them clients
Lycurgus has joined #lisp
keramida has joined #lisp
<aeth>
Looks like it's 8-core for $687.85 when you can get 12-core for $499.99 (cheapest I've seen it anywhere is $449.99 with a Microcenter motherboard bundle)...
jansc has quit [Ping timeout: 272 seconds]
<aeth>
Low-end workstations (even last-gen Threadrippers, if you need the feature set) are getting very competitive right now.
<aeth>
s/when you can get 12-core/when you can get 12-core AMD/
sauvin has quit [Ping timeout: 258 seconds]
CloseToZero has quit [Quit: WeeChat 2.5]
<p_l>
aeth: they have first mover advantage on ridiculous I/O and RAM bandwidth
<p_l>
That 12 core will normally operate with SMT4
jansc has joined #lisp
<aeth>
I think the real (somewhat on-topic) problem with using POWER9, though, is that you can expect that given a POWER9 CPU and a x86-64 CPU of exactly the same performance characteristics, the software will probably run on the x86-64 CPU faster. Afaik, SBCL has x86-64 specific optimizations, for instance. It just gets more attention. And, the flip side of the popularity is that with the hypothetical exact-equivalent CPUs, the x86-64 will probab
<aeth>
p_l: SMT4 afaik usually adds about 10% or so over SMT2 (some surprisingly low number), so you'd have to start taking into account single-core performance when making a comparison.
<aeth>
i.e. 12c24t vs. 12c48t won't always have the latter win... and the latter might win less than you think
<p_l>
I know, but at the same time, I can't recall any single-core-perf bound application for me
<p_l>
And I can dynamically change SMT setup
<aeth>
p_l: Do you have a POWER9? Can you benchmark something in lparallel (or similar) with SMT2 vs. SMT4 on it?
<aeth>
It would be interesting to see a concrete percent gain
<p_l>
aeth: unfortunately my plans for power9 are shot, but iirc ebrasca has one
<aeth>
ebrasca: poke
keramida has quit [Ping timeout: 264 seconds]
gareppa has joined #lisp
<aeth>
p_l: This is going to get increasingly off topic so I'll move to #lispcafe
rotty has joined #lisp
aindilis has quit [Ping timeout: 245 seconds]
jansc has quit [Ping timeout: 248 seconds]
kajo has quit [Ping timeout: 264 seconds]
<ebrasca>
aeth: Hi
<aeth>
ebrasca: Do you have a POWER9 system with SMT4?
<ebrasca>
aeth: I have 2 Power9 in my talos II.
kajo has joined #lisp
jansc has joined #lisp
<ebrasca>
aeth: They are SMT4
atgreen_ has joined #lisp
<ebrasca>
aeth: Do you like to test someting?
<aeth>
ebrasca: Do you mind benchmarking some simple floating-point and integer operations in SBCL using something like lparallel with SMT4 and then with half disabled to give you SMT2 and then with SMT off? To test the % gain with SMT, and then with SMT4 that only POWER9 currently has
<aeth>
(Or CCL if SBCL is not available on POWER9, I'm not sure what the situation is.)
<ebrasca>
aeth: I tryed to installing comon lisp and failed, I have gentoo.
<aeth>
hmm, there isn't (there's only one with ppc in its name and it's ancient)
<ebrasca>
aeth: Do you know about gentoo?
<aeth>
no
<aeth>
ebrasca: Have you tried building CLISP?
<aeth>
The usual bootstrapping path is to build CLISP and then build SBCL with CLISP
<ebrasca>
I think ecl and someting else , I can't remember.
aindilis has joined #lisp
gxt has joined #lisp
<p_l>
aeth: the problem is that SBCL is bigendian and most Linux uses little endian, and CCL is big endian but the code has rotten
<aeth>
You could try downloading the latest (8 years newer than the release version) CLISP from https://sourceforge.net/p/clisp/clisp/ci/default/tree/ which is apparently mercurial (hg), which I haven't seen in years... I'm not even sure I still have that installed. And if that can be used to build the latest SBCL git...
<ebrasca>
My gentoo is little endian
<aeth>
ebrasca: right, I think p_l is saying that the SBCL for Power is big endian (and power is bi-endian?)
<aeth>
Unlike with MIPS, where SBCL has a MIPSbe and a MIPSle
<ebrasca>
aeth: Power9 is little endian and big endian, you can chose what you like more.
gxt has quit [Ping timeout: 260 seconds]
<ebrasca>
aeth: My gentoo is little endian
semz has quit [Quit: Leaving]
EvW1 has joined #lisp
gxt has joined #lisp
Lycurgus has quit [Quit: Exeunt]
lmln has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
gxt has quit [Ping timeout: 260 seconds]
EvW1 has quit [Ping timeout: 250 seconds]
<ebrasca>
aeth: I am instaling clisp.
<ebrasca>
aeth: clisp does work in my talos II.
vlatkoB_ has quit [Remote host closed the connection]
rpg has joined #lisp
<aeth>
ebrasca: great
<aeth>
ebrasca: Can it build the latest SBCL from git?
<aeth>
Maybe it just works and the problem is solved right there!
milanj has quit [Quit: This computer has gone to sleep]
<ebrasca>
aeth: Can you give link?
<ebrasca>
aeth: Do you mean master?
gareppa has quit [Quit: Leaving]
gareppa has joined #lisp
<aeth>
ebrasca: Maybe ask in #sbcl if there's another branch or a forked repo for POWER9, but I would try master since none of the names stood out
gxt has joined #lisp
<ebrasca>
aeth: I asked some time ago and get 0 responces.
<aeth>
ebrasca: stassats seems to be the most active developer there
gareppa has quit [Quit: Leaving]
<ebrasca>
I get "can't guess target SBCL architecture, please specify --arch=<name>"
zigpaw has quit [Remote host closed the connection]
zigpaw has joined #lisp
gareppa has joined #lisp
<ebrasca>
Going to try ppc64.
Lord_of_Life_ has joined #lisp
<p_l>
I think sbcl ppc is only big-endian though, so you might have problems there
gxt has quit [Ping timeout: 260 seconds]
<ebrasca>
I get some error compiling sbcl.
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<aeth>
If that's ture and it doesn't work and you *really* want it to run at any cost, you could just copy and paste sbcl/src/assembly/ppc64 into sbcl/src/assembly/ppc64le and sbcl/src/compiler/ppc64 to sbcl/src/compiler/ppc64le and a few other copied files, like the Config files in src/runtime... and then modify until it runs
<aeth>
probably not worth it unless you are interested in that, though
<ebrasca>
I am more interested in Mezzano.
<ebrasca>
But I am bad with assambler.
sahara3 has joined #lisp
<aeth>
Doesn't Mezzano require SBCL in its build process? So technically, a POWER9 SBCL is a prereq for a POWER9 Mezzano.
<sahara3>
hello
<aeth>
At least CLISP compiles and runs so the bootstrap isn't *too* complicated...
<p_l>
aeth: IIRC Mezzano has its own compiler
<aeth>
p_l: I think Mezzano is its own compiler when booted into Mezzano OS, but builds with SBCL
<aeth>
I could be mistaken
<aeth>
That means to port Mezzano you need to first port CLISP and then port SBCL