freenode/#lisp - IRC Chatlog
Search
14:59:43
MichaelRaskin
And liking POSIX Shell. Common Lisp is a valuable tool, not an exclusive religion.
15:07:09
TheInformaticist
Cool. I've also thought that sh or bash tools can be really powerful for cleaning up and formatting data, and yet most "data analytics" people seem to be unaware that these tools exist.
15:23:54
TheInformaticist
MichaelRaskin: Ever use the suckless terminal (which is definitely NOT written in Lisp, unlike eshell)?
15:27:00
MichaelRaskin
That is far into #lispcafe zone. (But nope, urxvt, sometimes xterm and mlterm, fbterm when without X)
15:38:09
mseddon
So given there is no standard way to e.g. locate defstruct constructor function names, how would one go about implementing a custom reader that supports #S syntax vaguely portably?
15:40:36
Nilby
mseddon: Sadly there can't a portable version, but you can make one that has implementation-specific code for most implementations.
15:44:34
mseddon
Nilby right.. i found various classoid apis for sbcl, but there is no reflection defstruct library that would cover that? :/
15:45:38
mseddon
MichaelRaskin, so like eclector I want to track source information, which the standard reader does not support
15:46:28
mseddon
But eclector bails on #S and leaves a hook for you to tie into your implementation, so I wondered if there was a better way
15:47:48
mseddon
Everything else is 100% portable, but sadly I think I have hit an oversight in the spec
15:52:23
Nilby
mseddon: Last time I looked a I didn't find one. I have code that works on sbcl, ccl, and maybe a few others. Maybe the people working on eclector have some suggestion?
15:53:49
mseddon
Nilby thanks, I will check. Certainly trivial defstruct reflection that works across platforms would be useful for me here
16:12:36
Nilby
mseddon: I'm not really a good choice for being a project maintainer, but here's what I had: https://bpa.st/C4OQ . You're welcome to do whatever with it. This was designed for use in eclector.
16:15:52
Nilby
yep. This is one of my top changes I would make to CL. To have a standardized make-structure-instance or something.
16:18:30
_death
for sbcl only the struct name is needed to allocate an instance.. for others you may need something more elaborate
16:25:51
Nilby
_death: Your words have a very high ratio of making me realize I'm stupid and have to rewrite my code. :)
17:10:56
phoe
'(vector number *) most likely becomes '(vector t *) because of the element type being upgraded
17:11:33
phoe
that is because numbers have 1) unbounded size in the general case, 2) can be complex or real
17:12:35
fzfzfzv28
thank you! I tried (typep #("hello") '(vector (integer 0 10) *)) => NIL which makes sense in that context.
17:13:21
phoe
fzfzfzv28: what exactly do you want to do though? check if all elements of a vector are numbers?
17:14:04
phoe
I don't think the CL type system is powerful enough to perform this on the type level, unless you use SATISFIES
17:16:35
phoe
(asking because CL is efficient and nice to play with when it comes to fixed-width byte and float types)
17:17:17
dbotton
what is the lisp way of something I do always in Ada ie create a named type such as myint that has a range of 0 to 100
17:17:56
fzfzfzv28
@phoe: my actual use case is im reducing a vector of strings and functions that produce strings into one string.
17:21:47
phoe
dbotton: e.g. it is common to (deftype octet () '(unsigned-byte 8)) and then e.g. (declare (type octet x y z))
17:22:50
dbotton
I keep getting more excited the further I go in exploring the combo of static and dynamic typing
17:23:52
dbotton
so using satisfied allows that every declared use if the type would pass some arbitrary tesy
17:25:13
phoe
the ranges 1..50 and 55..100 are expressible via an OR type, (or (integer 1 50) (integer 55 100))
17:28:14
dbotton
granted that would require some tools to enforce certain policies but seems that critical systems certainly could be done in lisp
17:29:41
mseddon
dbotton: moreover, it seems to generally more make sense in lisp. Though as you discover, the capability is buried a bit
17:29:48
dbotton
I am finding the level of flexibility at compile time can make this a more then ideal choice once control of the GC in check
17:33:43
mseddon
Dbotton: arian 5 would not have blown up in cl, it wouldn't let you unsafely cast to a 16 bit value
17:34:54
MichaelRaskin
CLISP development snapshot is better, but they cannot get around to make a release
17:37:13
dbotton
once I fully grocked cl I'll plan on doing some docs for my own start on what is needed translation from Ada etc
17:39:52
TheInformaticist
OK, I'll look at both. I also just installed a weird version of Scheme nobody has heard of, LOL...but I know about it because of a professor.
17:46:43
TheInformaticist
I'm also learning C++ right now in class. I know this is crazy, but I'm working overtime, doing all my programming exercises in both languages...trying to see if I can do my final project in a functional style. I want to give my professor a pleasant surprise.
18:50:20
dbotton
anyone know a good resource book chapter or online that would have all the "type checking" related lisp info in one place
19:31:44
Xach
Not great that (asdf:system-relative-pathname "system" "foo") is critically different from (asdf:system-relative-pathname "system" #p"foo"))
19:44:05
Xach
phoe: read the sources; if you pass a string, it goes through asdf/uiop's non-standard pathname parsing mechanism, which mangles e.g. "foo/**/*.txt"
19:51:16
Fare
portable, including to non-Unix systems like Genera, RMCL, Windows, etc., where the separator is not /
20:53:07
AeroNotix
the library I am wrapping sets a struct field to `enum foobar flags:8`. The enum is defined with defcenum. How do I use it like that?
20:53:53
AeroNotix
it seems I will need to override the type in my wrapper from the enum, to type I create with defbitfield. Seems a bit awkward.
20:55:45
_death
heh, I don't think I've encountered anything like that (and I've been doing this for some time..).. I'd guess it's not even standard C, but I could be wrong
21:00:40
AeroNotix
_death: so I'm using swig to generate the bindings... I would like to keep using swig just to make things automatic (unless there's a different auto-approach). I kinda don't want to need to maintain some cffi definition code.
21:03:18
_death
ok, C99 standard 6.7.2.1 paragraph 4 says "A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed int, unsigned int, or some other implementation-defined type".. so I'm guessing it's an extension
21:05:39
_death
AeroNotix: never used swig (well, I may have tried it a decade ago I think..).. for automatic wrapping I use autowrap
21:16:28
AeroNotix
autowrap looks good but I would need to rewrite a bunch of stuff. Not a bad thing just some thing not for today
21:27:16
p_l
btw, does anyone know of solid implementation of Symbolics' DEFRESOURCE macro with permissive license (unlike LGPLed one in McCLIM?)
21:30:41
phoe
https://github.com/franzinc/clim2/blob/4d4712f28b397523d8b30059de60d5b48f52a1b7/clim/defresource.lisp#L90
21:31:11
AeroNotix
phoe: oh hey, just came across the book you're writing. Definitely will be adding that to the collection
21:34:47
p_l
phoe: thanks, will have to study how exactly it works (symbolics one used intrinsics iirc) and check the license
21:54:43
TMA
phoe: it is the ancient BSD one (pre 1990) https://en.wikipedia.org/wiki/BSD_licenses#Previous_license
23:03:37
aeth
DEC Alpha was actually killed by Itanium. I guess they figured that they couldn't compete with Intel there so they... very prematurely gave up.
23:09:46
p_l
aeth: when Alpha was canceled, it was the speed leader, Itanium was still "will be available soon, honestly", and pretty much everyone outside of decision making circle was caught flat footed
0:39:54
p_l
Aurora_v_kosmose: yes, but with alpha I only need to get one of the many complete computer systems built with it
0:40:20
Aurora_v_kosmose
And I mean, reasonably, not like Lisp Machines which will merely cost you a few millions.
0:41:31
p_l
that one is reasonably hard to find, because chances are it is still running production workload
0:42:54
p_l
Aurora_v_kosmose: the "shocking!" revelation to HP was that customers didn't want to buy Itanium :>
0:45:18
p_l
end result was that outside of supercomputing, Itanium was left with two groups of customers, the people who somehow ended up running HP-UX (I might have actually encountered a case few years ago), and people running OpenVMS who for some reason couldn't get alphas or needed something specific to I64 systems
0:57:24
p_l
aeth: Itanium was pretty much dead within few years of actually arriving, and it was half-dead on arrival
0:58:04
aeth
Right, my joke is that writing a compiler for Itanium is a job that probably no one here is even capable of doing.
1:07:59
TheInformaticist
OK, this is weird. ERC is automatically signing me into #lisp when I log in (or freenode is). Any idea why?
1:15:34
Nilby
The Alpha was the machine that was the fastest the longest in an office that got every new computer, so it was quite far ahead. It was a decent choice to to put Genera on.
1:21:20
Nilby
Sometimes I think some exec at intel asked some exec at HP to buy alpha and kill it so they didn't have to worry anymore.
1:22:42
p_l
best summary I figured ever was that Compaq was very happy being intel's sock puppet and figured being competitors wasn't in their plans and happily folded when intel announced their "RISC killer"
1:23:35
p_l
then, after merger with HP, everyone found out that Chipzilla released a lame duck, and HP was forced by the market to restart production of last alpha design
1:25:24
p_l
the only remaining non-HP itanium vendor quickly turned out to be SGI, and they ended up both dumping it, moving to Xeons, and being bought by shitty company (Rackable)
1:27:07
p_l
Nilby: major groups involved in Alpha development were taken by surprise, among them Microsoft and Compaq (formerly DEC) "NT on Alpha" team
1:29:41
p_l
not only process updates, the real strength behind intel, failed, but also various dirty tricks they picked up to keep the precious single-core speeds up ended up backfiring spectacularly
1:32:37
Nilby
yeah, i now regard the intel chips with a bit of suspicion, and wish they would just let us program the microcode
1:35:08
prumnopytis
Hey, does anyone know about using GPGME's cl [cffi] ? I found I wasn't able to successfully asdf load it under sbcl 2.0.5
1:46:27
prumnopytis
I'm not really sure how to debug asdf's COMPILE-FILE-ERROR. it caches a fasl, but I'm not sure what it wants to tell me.
1:46:29
Nilby
p_l: maybe someday they'll do microscopy to vhdl/simulator and we'll see, but in the meantime I'm glad to be able to bring any chip to a crawl with CL.
1:47:34
prumnopytis
Also sorry to come late to a party but Nilby are you talking about running common lisp on some interesting chips? I was ignoring some research I should probably read somewhere and it sounds like you might be talking about that.
1:49:19
p_l
well, on the interesting and actually powerful front is recent revival of SBCL on power, including proper 64bitness iirc
1:50:06
Nilby
I have no idea what I'm talking about, but p_l is a smart person. https://irclog.tymoon.eu/freenode/%23lisp
1:51:18
p_l
hopefully the issues with POWER10's openness are solved and RCS will make POWER10 systems too :<
1:57:19
aeth
POWER's problem is that it's too expensive. Billion dollar companies will gladly rely on FOSS libraries written by hobbyists, but those hobbyists probably only have access to x86-64 and ARM.
1:58:33
p_l
aeth: RCS made computers in the same price range as x86-64 workstations (actual workstations, that is)
2:11:09
aeth
p_l: Yeah, actual workstations. Meanwhile, you can get a budget 12-core not-quite-workstation for the price of a 3900X.
2:12:05
p_l
aeth: true. That's why the projects I mentioned would have significant benefits related to not having x86 hollywood&netflix-encumbered cpus
2:17:04
prumnopytis
Interesting but not exactly my area of hardware design. So there was a 2020 tech show debut of some scalable parallel processing-y machine (POWER10).
2:38:13
sm2n
prumnopytis, from what I recall, when I looked into it a while back, gpgme's cl bindings are unmaintained for a long time and have bitrotted