ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
DKordic has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
root____ has quit [Ping timeout: 260 seconds]
root____ has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
orivej has joined #picolisp
<Nistur> mornin'
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #picolisp
<beneroth> Morning Nistur
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
<aw-> beneroth: hey, not sure if you noticed, but i started adding inline comments in a lot of my picolisp code
<aw-> i'm personally not a big fan of it
<aw-> but i thought it would be helpful for others exploring the code
<aw-> what do you think? should I ditch it and revert to my old 'EXPLAIN.md' format?
<beneroth> I haven't noticed, but I have a look now
<beneroth> link?
razzy has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
<beneroth> aw-, hm... I find the comments good
<beneroth> there seems some struggle about the child, reads like a breaking marriage... :P
<beneroth> hm
<aw-> hahaha
<beneroth> hard to tell what is more beneficial, EXPLAIN or comments in code
<aw-> or comments at the top of each function
<aw-> longer comments*
<beneroth> I guess EXPLAIN scores on the "barrier to entry" ranking, while comments in code is closer to the real thing, more context
<beneroth> I think inline comments are better than a separate description at the top of the function
<beneroth> then better EXPLAIN
<beneroth> what annoys you about the inline comments? I have such comments in my code (even sometimes for myself) (much less though)
<beneroth> the thing is of course.. EXPLAIN is more about commenting what the code does, for people who are just learning to understand the code
<aw-> hard to read the code
<beneroth> while inline comments should be WHY something is done the way it is (and not one of the infinite other possible ways)
<beneroth> I personally would increase the space between the code and comments a bit more
<aw-> right, that's a good idea too
<aw-> ok beneroth thanks!
<beneroth> I guess it boils down to your taste.. EXPLAIN vs inline comments... I see some points for EXPLAIN so inline comments can be reserved for WHY-comments
<aw-> right, to explain WHY this weird code does what it does
<beneroth> yeah and why you coded it this way
<beneroth> I find your code very readable
<beneroth> I'm just not used to your personal []-thing
<aw-> thanks, i'm on the fence with this approach, will revise the code shortly
<beneroth> apart from that, perfect for me
<beneroth> ok
<aw-> [] thing?
<aw-> [de function () ... ] ?
<beneroth> aye
<beneroth> :)
<aw-> weird?
<beneroth> I guess you want to highlight top-level functions
<aw-> yes
<beneroth> I actually never use [] square brackets in my picolisp code
<aw-> wow
<aw-> it's so useful
<beneroth> I see it just as code sugar when working on the repl maybe
<beneroth> personal taste
<aw-> yeah i guess
<beneroth> I use paredit-mode in emacs, so whenever I type an opening parenthesis, a closing one is added automatically :)
<beneroth> I have to add this functionality to Regenaxer's vip, than I can switch to it ^^
<aw-> i write in Notepad ;)
<beneroth> paredit also has shortcuts (ctrl+arrow keys) to make an s-expr include or exclude (nest/de-nest) the next expr
<beneroth> I started to use (edit) with vim more often in repl recently
<beneroth> for browsing symbols
<beneroth> so handy
<beneroth> shift+K to view the symbol definition
<beneroth> the emacs modes have this function somewhere too, but I never bothered to get it working
<beneroth> but yeah, whatever works :)
<beneroth> Regenaxer, are you here?
<Nistur> there are people with very strong thoughts on comments. I've heard people argue that comments are bad in general, because code should be legible, and expecting the same person who cannot express themselves clearly in code to do better in a comment is silly. However, I think that it's often good to put some explanation into the code, because, despite best intentions, without incredibly expressive function
<Nistur> names etc, some things will always be a bit obscured. However, the best way to tell what to put is to do a code review, and have to explain your code to someone. When you know what they don't understand just by reading the code, you know what your comments should say
<Nistur> and the issue with having external documentation as your primary commenting method is that it's difficult to link the two sometimes, and follow what is going on. It's also far easier for the documentation to get out of date
<Nistur> it's good for a general overview of "this is what system/API is doing" but for implementation details, they should be inline, so that you can read the code and understand precisely what it's doing
<beneroth> Nistur, yeah. My take: comments usually should describe why the code is the way it is (programming/software design decisions), and not be descriptive (the code should be), unless to short explain a really involved part
<beneroth> Nistur, but yeah, I also worked in environments where the team lead was like: never make comments, people never update them anyway when the code changes
<beneroth> I find the comments have to be reviewed and adapted whenever you change the code, you cannot just ignore them.
<beneroth> but yeah, that code base was riddled with legacy comments with only a very weak historic relation to the current code
<beneroth> less comments is usually better
<beneroth> unless you work with people who are not really programmers and need a clear text explanation next to the code.. .but then they probably should be trained to stop programming anyway... but hey such situations are common e.g. in electronic shops
<beneroth> I started to put pil reference -like description on top of my picolisp functions
<beneroth> especially when their argument handling is heavily overloaded
<aw-> beneroth: like in Common Lisp?
<beneroth> above the function head, not in the body ^^
<aw-> i thought this was "dangerous" in PicoLisp
<aw-> oh ok
<beneroth> # (foo 'sym 'sym ['num]) -> 'obj|NIL
<beneroth> # (foo 'num) -> 'lst
<beneroth> # Does something foo'lish.
<aw-> beneroth: i have never seen any of your code btw
<beneroth> # First form: blblab returns created object or NIL if the stars are out.
<beneroth> (de foo ...)
<beneroth> yeah
<beneroth> hardly anything public yet
<beneroth> mostly because I haven't had yet the time to properly publish it
<beneroth> it's on the todo list :P
<aw-> ok i'm waiting
<beneroth> yeah will surely announce on the ML
<aw-> ok no prob
<beneroth> you're working with nginx by chance?
f8l has quit [Ping timeout: 256 seconds]
f8l has joined #picolisp
<Regenaxer> Sorry, I'm here but in customer talks all the time
rob_w has joined #picolisp
<beneroth> ok
<beneroth> Regenaxer, I've got a question about echo, but doesn't hurry
<beneroth> I wonder if when calling (echo 256 "blabla"), and it stops because it found "blabla", if there is any way to find out how many bytes it already echoed
<Regenaxer> Hmm, not by 'echo' itself, as it does not count the bytes (would be quite some overhead)
<beneroth> yeah so I suspected
<beneroth> ok thx
<aw-> beneroth: yes nginx
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
alexshendi has joined #picolisp
nicktick has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
razzy has quit [Quit: Connection closed]
alexshendi has quit [Remote host closed the connection]
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
nicktick has quit [Ping timeout: 256 seconds]
alexshendi has joined #picolisp
ym has quit [Ping timeout: 246 seconds]
ym has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
ym has quit [Remote host closed the connection]
<Nistur> urgh, I'm being slow. How can I check if I'm running emu or native?
<beneroth> Nistur, *CPU
<beneroth> Possible values include "arm64", "x86-64", "ppc64", "emu" or "JVM". See also *OS and version.
<Nistur> yeah, I'm running emu
<Nistur> I was hoping it would be arm64
<Nistur> ahh actually, it's not the pi I thought it was
<Nistur> so yeah
<Nistur> never mind
<Nistur> although, I somehow thought the Pi4 was arm64... but they are both showing up as arm7l in uname. Ahh well. So much for hope :P
* beneroth shrugs
<beneroth> so it goes
<Nistur> yeah, the pi4 should be 64 bit, but the pi2 I was building this on is only 32 bit
<Nistur> but both are just using arm7l
<beneroth> I don't know much about arm chips, but I know that they come in all sorts of flavors... sometimes the CPU would be capable of 64bit, but is using an older arm instruction set, and other weird stuff
<beneroth> you see the performance as a problem?
* beneroth knows about C/C++ habits ... but the world is doing java and python and javascript and everything goes bad...
<beneroth> ;-)
<Nistur> unless someone is paying me, I refuse to dirty myself with Java, python, or Javascript
<Nistur> I'll happily roll around in C, C++, C
<Nistur> C#, even Obj-C though :P
<Nistur> and, of course, picolisp :P Most of my personal projects are in C, with experiments in picolisp
<Nistur> although, this one is looking like it might become a thing :P
<Nistur> maybe
<beneroth> :)
<beneroth> You find Python worse than C# ?
nicktick has joined #picolisp
<Nistur> beneroth: I find the things python is used for, worse than the things C# is used for :P Python is an unholy behemoth which is often used to make everything, even a simple calculation, into a snake-shaped hammer. C#, while it's arguably larger and less sanctified than even python, is _mostly_ limited in what people decide to use it for, to more sensible things..
<Nistur> my issue is not the language as such then, but the overuse of of it in suboptimal problem spaces
<beneroth> interesting thought, good argument!
<Nistur> also, the whole significant whitespace thing bothers me
<beneroth> yeah.. the question is then, how much of its overuse is a result of language design? :D
<beneroth> I haven't really done anything in python.. I find it a bit bloaty
<beneroth> but I just never had a use for it yet
<beneroth> I guess one uses it for its libraries, same as java back in the day
<beneroth> I do a lot C#, I find it ugly and cumbersome
<Nistur> I heard what I'm sure is a misquote, but it is that Python is the second best language for any problem :P
<beneroth> not a bad quote
<beneroth> I'm sure someone sad it about Java once :P
<Nistur> probably
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
<Nistur> I haven't done any Java in... 16 years?
<Nistur> damn.
<Nistur> actually, not _quite_ true
<Nistur> I've done a little Android glue code
<Nistur> most of the actual code was in C++ or C#, depending what I was working in, but there was obviously a little to interface with Android
<Nistur> anyway
<Nistur> g'night
pointfree has quit [Ping timeout: 246 seconds]
michelp has quit [Ping timeout: 258 seconds]