freenode/#lisp - IRC Chatlog
Search
4:59:08
pjb
iqubic: alternatively, you may learn Objective-C, which is C+Smalltalk, but it's more complicated because of the C part.
4:59:48
pjb
iqubic: Sometimes, in universities, one learns OO by implementing it in lisp (or scheme), instead of learning Smalltalk. It's also a good way to do it.
6:21:40
krwq
hello, does anyone know if there is a way to make swig generate valid fields from the header file which uses bitfields? it currently seems to be generating for 4 :unsigned-int fields instead of 29+1+1+1 bit numbers
6:41:08
krwq
I ended up with %ignore in swig file and redefining the struct by myself using a single uint - ifanyone knows a better way to handle that please let me know
10:18:56
flip214
I've got a GF with multiple methods which have EQL specializations on the first argument.
10:19:19
flip214
I can list them via GENERIC-FUNCTION-METHODS, but how would I selectively call one of them?
10:21:27
beach
flip214: That would not be a typical use case for generic functions and methods. It would be best to call the generic function with the EQL specializer in question.
10:23:59
JuanDaugherty
iqubic, because a) it developed over a long time and b) it is the inherently most flexible OOP mechanism, a generic meta one in fact
10:24:54
hajovonta
is it possible for a function to determine the other function it was called from?
10:26:03
hajovonta
like when I call (fun1 param1 (fun2 param2 param3)) and inside fun2 I would need some information that it was called from fun1
10:27:15
flip214
beach: I'm trying to use CLOS as a mechanism to get a kind-of plug-in architecture...
10:27:50
JuanDaugherty
also cl is the more baroque lisp, you might find the scheme oop, whatever it is more to your liking
10:28:03
hajovonta
jackdaniel: thanks. portability is currently not a problem for me as I only have SBCL here
10:28:17
flip214
I quite like the automatic documentation and availability of debugging via swank/slime etc.
10:28:44
jackdaniel
hajovonta: checking where function was called from is also wrong from the technical perspective
10:28:44
flip214
so I should parse the EQL specifier and call the GF with the right first value, right?
10:29:02
Shinmera
hajovonta: Dissect will give you an object representation for the stack rather than just a string like trivial-backtrace does
10:29:07
jackdaniel
if you customize behavior based on that your program will be automatically unintelligible
10:29:16
scymtym
flip214: for a certain style of pluggable implementations, you may find https://github.com/scymtym/architecture.service-provider useful
10:32:41
beach
flip214: I would just use a hash table instead if I understand your use case correctly.
10:35:58
hajovonta
what I don't understand is where are the first two SBCL-CALLs in the environment-stack object
10:37:11
|3b|
flip214: looks like github's .org renderer got confused... makes a bit more sense in original
11:29:44
ecraven
well, I wouldn't call it an improvement ;) but it does make kawa work with slime, which is nice
11:32:18
jackdaniel
I think that scope of change impact is a better metric than scope of changes wrt improvement
12:27:23
Shinmera
Is initialize-instance called for condition objects? define-condition talks about initialize-instance in the :initarg option, but (on SBCL) initialize-instance does not seem to get called when I create a condition.
12:27:51
Shinmera
Which is annoying as fuck, since I'd like to compute some slots based on an initarg.
12:34:02
Shinmera
So what's this about then in CLHS for define-condigion: "The :initarg slot option declares an initialization argument named by its symbol argument and specifies that this initialization argument initializes the given slot. If the initialization argument has a value in the call to initialize-instance, the value is stored into the given slot, and the slot's :initform slot option, if any, is not evaluated."
12:36:09
jackdaniel
this doesn't say anything whenever initialize-instance is automatically called (only how initialize-instance *behaves* when it's called)
12:36:39
Shinmera
I guess, but it's weird to talk about it at all when it's not even specified that make-instance should work on condition types.
13:00:35
Shinmera
Not that having them recorded would have been much better, since the quality of the 2017 recordings is really poor
13:08:04
jmercouris
hey everyone, just made a post on /r/programming about programming next via hooks: https://www.reddit.com/r/programming/comments/7w4k5x/using_hooks_to_smart_program_your_browser/
13:18:03
jmercouris
jackdaniel: It doesn't it's just a "smart" browser rather than a dumb one, like the one's were used to
13:18:48
ludston
jackdaniel: Why would anyone get upset about using nodejs streams. They're just going to be regular grey streams, right?
13:19:24
jackdaniel
I don't know what nodejs streams are, thought you have some problem with streams
13:19:55
jmercouris
Xach: No doubt that is true in any context, the question is, are you bringing it up because of that?
13:21:27
jmercouris
if any of you downvoted/don't like the article, I'd be interested to know why so that I may write better articles in the future
13:23:22
jackdaniel
I haven't, but I'd ramove word "smart" whatsoever (unless it is backed by something what makes it indeed "smart") ;-)
13:24:29
jmercouris
it is the browser that has the capability to be "smart", not clever just "more interactive", kind of how emacs macros can "smarten" your editing process
13:25:33
jackdaniel
still don't see how that makes it smart (done with elaborating on "smart" word, I've got stuff to do):p
13:29:16
ludston
jmercouris: If we're not done bikeshedding the title of your post, I'd go with "Using events in the Next browser"
13:33:06
jmercouris
ludston: while a very accurate and succint title, I'm not sure it would make want to read such an article
13:35:29
jackdaniel
misleading titles which are meant to increase reader count are colloquially called clickbaits
13:42:48
jmercouris
jackdaniel: I don't get you, sometimes you are so helpful and nice, and sometimes so... mean
13:44:40
ludston
Speaking of dichotomy. I might be just drunk, but I'm looking at the source of next-browser and I'm not seeing any calls to 'run-hook'.
13:45:45
jmercouris
it's good to be honest, but it is also good to be considerate of other people's feelings
13:47:21
jackdaniel
it's not like I've said your title is shit or something, I find word "smart" very much misplaced here, and when your argument is that "people wouldn't be so inclined to read it if the title were more accurate" it makes it only worse in my eyes
13:49:06
ludston
jmercouris: Basically what I am seeing you say here, is "please look after my ego", and in many parts of western culture cadres form with an unspoken agreement to avoid ego-bruising
13:49:14
jmercouris
an implication of writing clickbait is mean, it paints me as a dishonest person, but whatever, water under the bridge
13:50:44
ludston
jmercouris: But the *big opinion* is that ego-ism is largely personally unhealthy, and the cause of a lot of personal unhappiness so it's better just to ditch it.
13:51:14
jmercouris
ludston: This has nothing to do with egoism, and everything to do with how you treat others
13:52:02
ludston
jmercouris: 'How you treat others' is mostly, 'how people perceive that they are being treated'
13:53:17
jmercouris
if his intention is not negative (which I have trouble believing), then it is okay, criticism is good, if not, then I don't really like it, but it is not my position to tell others what they can or cannot do
13:53:34
jackdaniel
1) it is offtopic here, 2) I don't appreciate talking about me in third person [ignore 2), focus on 1)]
13:54:03
ludston
jmercouris: Which basically comes down to some level of entitlement and expectation that is probably completely undue when it comes to which secret phrase damages your sense of identity and makes you feel bad inside.
13:54:10
jmercouris
jackdaniel: I spoke of you in the third person not out of disrespect, but because I was replying to the other person
13:58:01
jmercouris
last thing I'd like to say, as always, sorry if I misunderstood or hurt anyone, or if I am being egotistical, I'm trying to be better
14:34:48
White_Flame
idunno, error messages and sounds always seemed to sound offended & be offensive :-P
14:35:48
jmercouris
kolb: It's hard to tell if via text you are being sarcastic or not, if you are not I appreciate the sentiment
14:36:17
dlowe
JuanDaugherty: that's a bad strategy when deciding how to communicate with non-machines.
14:37:22
kolb
jmercouris: if they can call it a smart phone you can very well call it a smart browser imho. Smart = programmable? That's honest imho. (Not sarcastic, tryna be supportive)
14:38:56
jackdaniel
dlowe: sounds like a robustness principle[1] adapted to human interaction ;-) [1] https://en.wikipedia.org/wiki/Robustness_principle
14:58:05
flip214
Following https://common-lisp.net/project/cl-store/docs/cl-store_4.html#IDX35 (serializable-slots-using-class) works fine for storing...
15:07:49
flip214
hmmm, swank doesn't show the slot... but if I browse to the class definition it's still listed in the parent class as direct slot
15:13:33
attila_lendvai
if you're willing to patch things up, then I recommend hu.dwim.serializer instead. it's better quality than cl-store, but it's mostly tailored to our needs in the sense that it's not dealing much with backward compatibility and use-cases that we didn't bump into
15:15:12
attila_lendvai
kinda. it exists as a legal entity, but we don't have serious projects for a while now
15:15:31
jmercouris
what were your serious projects? can you link them? explain your business model?
15:16:49
attila_lendvai
google around, http://dwim.hu but that site has not much useful. just standard enterprise bullshit, but written in lisp
15:17:17
flip214
attila_lendvai: thanks for the reminder. I've already seen and used quite a few dwim.hu things, but, TBH, the site itself bugs me to no end.
15:17:50
attila_lendvai
all the hu.dwim libs are the result of that work, most notably hu.dwim.perec
15:17:57
flip214
attila_lendvai: clicking at projects/dwim/d.j.s for example gives me a page with the header and footer, and "none" as text. Ugh.
15:18:33
attila_lendvai
flip214: that site is automatically generated from project metadata, that is not filled out. plus some bitrot, too, probably
15:21:19
attila_lendvai
just get the repo and look into the tests and grep around the whole hu.dwim universe for usage examples, although for serializer it shouldn't hold many surprises...
15:22:07
attila_lendvai
we rarely read docs, so we're somewhat reluctant to write them... :) or at least tests are a priority
15:22:35
flip214
for example, I need to exempt one or two slots from serialization... grepping through the source might take a bit longer than looking into an index
15:38:56
jmercouris
how to go from string --> symbol? having issues in my macro (which I thought worked)
15:43:21
Zhivago
Lisp symbols are case sensitive. The reader does some insane case folding based on a dynamic variable to make it quasi-insensitive.
15:55:05
Shinmera
Zhivago: very rarely I get bug reports from people that use a readtable case other than :upcase
15:57:19
jackdaniel
maybe my joke was lost in a wire transfer (I find :invert least useful from the possible values)
15:57:36
Shinmera
I wasn't sure whether you were serious or not because there's people that actually do try to use it
15:58:19
jackdaniel
I've nevert encountered :invert used in real code (only :downcase which arguably has aesthetic appeal)
15:59:56
jackdaniel
I have even written a test for all corner cases with readtable-case (when fixing bug in ECL)
16:01:27
jackdaniel
https://gitlab.common-lisp.net/ansi-test/ansi-test/blob/master/reader/readtable-case.lsp#L58 there it is
16:17:28
_death
jackdaniel: actually :invert is deemed useful because you can use lowercase for standard symbols and mixed case is simple