<beneroth>
Regenaxer, if I see correctly, src64/ht.l was not updated to handle 4 byte UTF-8 (e.g. in ht:Prin)
<beneroth>
# 18dec18abu
<beneroth>
oh, htFmtE does handle the fourth byte
<beneroth>
argh
<beneroth>
Regenaxer, nevermind, I cannot read
<beneroth>
Regenaxer, pil version of ht:Prin is extremely faster in my use case, should never have done this evil ht:Prin pipe lol!
<beneroth>
ht lib should really only used when directly printing to stream....
* beneroth
knows now...
orivej has quit [Ping timeout: 258 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #picolisp
<Regenaxer>
beneroth, you mean using 'replace', right? Good to know
<Regenaxer>
Also, my proposal yesterday was rather stupid
<Regenaxer>
(pipe (exec "picolisp" "-loop (
<Regenaxer>
This is nonsense, as 'pipe' does already fork a picolisp process
<Regenaxer>
So something like (pipe (loop ... would be better (if using a pipe at all)
rob_w has joined #picolisp
orivej has joined #picolisp
rob_w has quit [Remote host closed the connection]
jibanes has quit [Ping timeout: 245 seconds]
jibanes has joined #picolisp
<beneroth>
Regenaxer, no, using make, iterating over the string
<beneroth>
I think 'replace was once only replacing the first occurrence, might that be? at least I thought so, once. Does the current one check for all replacements (additional arguments) in one go, or using multiple iterations?
<beneroth>
hm.. probably 'replace would be better than make for chop...
<Regenaxer>
'replace' takes an arbitrary number of argument pairs
<Regenaxer>
In my example I used 2
<Regenaxer>
"<" and ">" iirc
<Regenaxer>
make is also fine, and more flexible
<Regenaxer>
only if speed is extremely critical, 'replace' as a single function call would be faster
<beneroth>
ok.
<beneroth>
ah yes, for removing characters make is handier, replace would need a second filter call
<nullnullnull>
how to eval script with picolisp? (and exit debugger, non-interactive)
<beneroth>
hi nullnullnull
<beneroth>
picolisp source files are read and evaluated with (load) and (script)
<nullnullnull>
hi mate
<nullnullnull>
but I tried with --eval and --load
<nullnullnull>
sec let me check again
<beneroth>
show me your entire invocation/cli command, and the source file (if its bigger, put it on pastebin or so)
<Regenaxer>
replace needs no second filter
<Regenaxer>
you can pass "" or NIL
<beneroth>
Regenaxer, yes, I find out
<beneroth>
*found
<beneroth>
:)
<Regenaxer>
ah, yes, sorry
<beneroth>
everything is fine
<Regenaxer>
Hi nullnullnull
<nullnullnull>
hi mate
<Regenaxer>
:)
<nullnullnull>
here's my command line: picolisp -eval myfile.pico
<beneroth>
Regenaxer, what do you use for string replacements, meaning replacing entire substrings, repeatedly? I'm currently using (while (match) ...) for this. not the most optimized solution probably, but alright.
<beneroth>
they don't have semantic meaning in the language, but are best practice for getting readable and good code, and to avoid common mistakes
<nullnullnull>
thanks mate ;) I'm reading now the docs, to see about the timeout
<Regenaxer>
'connect' has no timeout. You can use 'abort'
<beneroth>
connect does not retry itself
<Regenaxer>
(let? S (abort 60 (connect ...
<nullnullnull>
oh
<beneroth>
Regenaxer, database question, how can I merge (rel birthday (+Ref +Number)) and (rel birthday-2 (+Ref +Number)) into a single index (but two properties) ?
<Regenaxer>
+Aux is not suitable?
<beneroth>
not possible, would need creation of a custom prefix +idx class, yes?
<nullnullnull>
abort -- Undefined
<beneroth>
I want to have two index entries, not a combination
<Regenaxer>
nullnullnull, did you start 'pil'?
<beneroth>
nullnullnull, use pil instead of picolisp
<Regenaxer>
'picolisp' is not enough
<nullnullnull>
ah it's different
<nullnullnull>
sec
<Regenaxer>
beneroth, why birthday-2?
<Regenaxer>
isnt it redundant?
<beneroth>
second person, same contact
<Regenaxer>
ok
<Regenaxer>
and why +Number and not +Date?
<beneroth>
not separating person in its own entity here
<beneroth>
Regenaxer, haha, yes right should be date
<beneroth>
I'm still sleeping
<Regenaxer>
:)
<beneroth>
nullnullnull, start picolisp and pil in interactive mode, then type: abort
<beneroth>
(without parens)
<beneroth>
then you get the value of the symbol 'abort
<Regenaxer>
Why do you need a *single* index?
<nullnullnull>
yes worked mate, btw the "abort" is exit with success
<beneroth>
nullnullnull, in picolisp interactive mode you see abort -> NIL. in pil you see abort -> (("N" . ... it's lisp source code
<Regenaxer>
So no timeout?
<Regenaxer>
(abort 5 (connect "server" 80))
<beneroth>
nullnullnull, you can set *Bye to exit differently
<nullnullnull>
yeah I saw it
<nullnullnull>
yes but the Bye is for the good exit (when the connection established)
<beneroth>
in picolisp the source code is exactly what gets executed
<beneroth>
it gets translated to a binary representation in memory, but that is just a compacter representation of the same, nothing gets changed
<nullnullnull>
REPL
<beneroth>
nullnullnull, just out of curiosity, how did get interest in picolisp and find us?
<nullnullnull>
im trying to learn about all the programming languages :P
<beneroth>
good reason :D
<beneroth>
you work as programmer? which languages did you already learn?
<nullnullnull>
yes mate, python and java atm
<nullnullnull>
and scripting with bash a bit
<beneroth>
picolisp is bad for happiness. the more I get used to it, the more I deeply hate mainstream languages (e.g. C#)
<beneroth>
nice
<nullnullnull>
I saw the "Crystal" language, it's also nice
<beneroth>
in C# I spend nearly all my time fighting its idiosyncrasies and the type system. doing actual programming is the small part :(
<beneroth>
nullnullnull, oh didn't hear about that one. nice. looks a bit like python or Golang
<beneroth>
but very young, only 1 year old
<nullnullnull>
it's like best of ruby and best of C
<beneroth>
I think the best of C is that it is so primitive and a small language. which is kinda also it's worst.
<beneroth>
but a nice language, not so bloated.
<beneroth>
bloat is the big evil in "picolispism" :D
<beneroth>
KISS the holy grail
<Regenaxer>
yep :)
<nullnullnull>
for example in crystal u write the connection like this: require "socket"; s=TCPSocket.new("google.com",80,connect_timeout:2); s.close
<beneroth>
I see
<nullnullnull>
btw why there are many lisp stuff out there? I saw many lisps
<beneroth>
the original lisp language splittered in many dialects in the 1970s
<nullnullnull>
the commonlisp is the original one?
<Regenaxer>
yes, hundreds
<Regenaxer>
no, CL tried to mix them up
<beneroth>
and they can be very different, the thing making a language a lisp is equivalence of code and data, which kinda always results in this typical (parens) style
<beneroth>
(I think it is not really correct for picolisp)
<nullnullnull>
oh
<Regenaxer>
only paren syntax
<beneroth>
Lisp is the second oldest high programming language still in use
<nullnullnull>
yeah they didnt mention anything about linux support
<beneroth>
second after Fortran
orivej has quit [Ping timeout: 268 seconds]
orivej has joined #picolisp
<nullnullnull>
and I thought pascal is old :P
<beneroth>
Lisp is, and was the whole time, the most powerful language. in recent decades other languages copied most lisp features, except the "code is data" which gives it its ultimate abstraction and flexibility power
<beneroth>
Pascal is younger. and dead, I think, except for introduction courses.
<beneroth>
Fortran still lives because it has many important mechanic and physics simulation libraries, which you cannot re-implement without extremely huge efforts.
<nullnullnull>
and it's part of gcc
<nullnullnull>
gnu fortran
<beneroth>
The original lisp was meant as a teaching language, not to be programmed with. therefore its designed from logic thinking, not from how to build compilers (like C and most languages)
<nullnullnull>
so only the oldest people used lisp right?
<beneroth>
no
<beneroth>
but... interested freaks, yes
<beneroth>
Lisp was always the main language of AI programming and research, or until recently when machine learning took over the field
<nullnullnull>
cuz I dont remember hearing about lisp when I was @ college or @ school
<beneroth>
yeah it was always a niche
* jan6
wonders why people don't use lisp for AI nowdays, much
<beneroth>
if a programmer has heard of lisp, its a good sign that it is a well informed programmer. if a programmer knows some lisp, its likely a better than average programmer
<nullnullnull>
yeah , I heard about lisp when I started doing "some researches" about all the "alive" programming languages
<beneroth>
jan6, because AI now is mostly number crunching statistics, not symbol logic
<beneroth>
some people say you should learn lisp just to learn its way of thinking, so you get a better programmer in other languages too
<beneroth>
I think this is absolutely valid
<Regenaxer>
T
<beneroth>
Lisp invented the if statement. the garbage collector. and much more.
<nullnullnull>
btw I noticed that the commonlisp is not really "unified", I saw many compilers there like sbcl, ccl, allegro and more
<beneroth>
last "kinda" single version was Lisp 1.5, then followed MacLisp, and then it splittered. Common Lisp was an attempt to unify the lisps again, but the result is a mixture of many things, similar to C++
<beneroth>
aye, exactly
<nullnullnull>
oh
<beneroth>
when I wanted to learn lisp, I found out about those many compilers and platform problems, so I turned away from Common Lisp. had enough of that with C++ xD
<nullnullnull>
but they confused the people, so many versions
<beneroth>
T
<beneroth>
now I do much of my programming purely in picolisp. it is simple. it is pragmatic and extremely practical oriented. and it is over 30 years old, was always used for real business applications, so well tested and proven. not some young niche thingy.
<nullnullnull>
and some people told me that: one day (maybe) an old programming language might rise from the dead again
<beneroth>
but as a lisp it's rather different than mainstream languages. and within the lisp family, picolisp is a radical sticking extremely to the "code is data", no compiler, and fexpr usage. fexpr is a lisp language element which came out of fashion in most lisps (because fexpr cannot be compiled, essentially. but they're more powerful than compilable macros)
<nullnullnull>
yeah, btw mate you're using emacs ide or vscode?
<beneroth>
the good languages are not dead. even many bad ones are not dead (e.g. cobol)
<beneroth>
I use emacs. my employee uses vs code. Regenaxer uses vip, his own picolisp implementation of vim.
<nullnullnull>
ah nice
<nullnullnull>
and cobol is mainly used for banks right?
orivej has quit [Ping timeout: 272 seconds]
<beneroth>
I detest vs code for being based upon electron, which I see as a bloaty insecure card house. and I'm not an big fan of MS, even when they are currently forced to play nicely.
<beneroth>
nullnullnull, yeah cobol is big in finance and insurance stuff. for historic reasons. the companies never re-implemented their old shit and are scarred to switch, because they forgot how their old programms work (as the programmers got retired)
<beneroth>
all I know about cobol is that is a kind of ugly bad mix of fortran and C++, in a way
<beneroth>
designed by committee, originally intended for database and number calculation
<nullnullnull>
maybe one day: someone will make a converter from cobol to some X language
<beneroth>
surely someone already did
<nullnullnull>
oh
<beneroth>
I worked with Fortran to C transpilers
<jan6>
if you somehow get a cobol job, I heard that it pays well, probably because everyone hates it, lol
<beneroth>
works well. problem is, the output code is usually unreadable
<beneroth>
jan6, exactly. and not so many people around anymore who have experience with it.
<nullnullnull>
but if there's a converter, why they keep using cobol?
<jan6>
because you can't read the converted code?
<jan6>
because it "just works" ?
<nullnullnull>
like for example to convert from cobol to java
* jan6
*shivers*
<nullnullnull>
or no chance :P no idea
<jan6>
IDENTIFICATION DIVISION.
<jan6>
PROCEDURE DIVISION.
<jan6>
STOP RUN.
<jan6>
PROGRAM-ID. HELLO.
<jan6>
DISPLAY 'Hello World'.
<nullnullnull>
reminds me of the DBA jobs, not many people out there
<jan6>
good luck translating that ;P
<nullnullnull>
ah but the tool will automatically convert that for you
<jan6>
yes
<jan6>
but not readably
<nullnullnull>
ah
<nullnullnull>
looks nasty :P haha
<jan6>
also seems most converters are paid, because of course they are
<jan6>
"COBOL was the first widely used high-level programming language. It is an English-like language which is user friendly. All the instructions can be coded in simple English words." lol
<nullnullnull>
like writing a bed time story :P
<nullnullnull>
and then you will have your calculator app
<nullnullnull>
"75% of the world's business data is still in Cobol" dam
<jan6>
2008, mind you
<jan6>
I'd estimate it to be ~50%-ish now ;P
<nullnullnull>
oh old article :D
<jan6>
"I know it's an old man's game. I like the position of being the younger individual in the market," he says. "You're going to have people retiring and nobody to fill their shoes. So I think my job stability is about as good as it can get."
<nullnullnull>
but nice idea, if I learn cobol today and then go apply for cobol jobs (they will pay good)
<jan6>
^ pretty much the point of even learning cobol nodays ;P
<jan6>
there's always less and less cobol programmers, so if you get a job, you're basially guaranteed job(s) till everyone gives up, because old pros just die or retire ;P
<nullnullnull>
:D
<jan6>
Nevertheless, Cobol programming is still a useful skill for IT professionals to have. "The world doesn't need 100,000 new Cobol programmers, but it does need several thousand new Cobol programmers," says Drake Coker, chief technology officer for Cobol at Micro Focus International. "There is a lot of work out there for people who know how to take a new system with new technology and marry it to an existing
<jan6>
system," he adds.
<jan6>
so yeah, if you know cobol, perl, lisp, python AND java then you're guaranteed to be in high demand ;P
<jan6>
add javascript and VERY high demand ;P
* jan6
shakes fist at all dem kids using web apps for everything
<nullnullnull>
also perl?
* jan6
shakes fist at node.js and stuff too
<jan6>
perl used to be the language of choice to hack things together in, plus old web scripts
<Regenaxer>
Well, PicoLisp has super-parens [ and ]
<jan6>
((((that)is)cheating)!)
<jan6>
(also afaik only ] is super, [ is just a different symbol with same function)
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
<Regenaxer>
No, it behaves different from )
<Regenaxer>
] closes all to the matching [, or till top level
orivej has joined #picolisp
<jan6>
yes, that's what i meant about ]
<jan6>
but [ isnt super
<Regenaxer>
I think it is, as it behaves differently
<Regenaxer>
[a b c) won't work
<jan6>
yeah, still
<jan6>
[ is basically a second version of ( and ] will close [ or any amount of ) (for convenience)
orivej has quit [Ping timeout: 246 seconds]
rob_w has joined #picolisp
beneroth has quit [Quit: Leaving]
<Regenaxer>
yep
<jan6>
would be nice if it closed any amount of [ too ;P
<Regenaxer>
This would not be good
<jan6>
not right now, sure
<jan6>
not when it's already used differently for a long time
<Regenaxer>
this, plus it loses its power
<Regenaxer>
you can't have a complicated sub-expression embedded somewhere with [ and ]
<Regenaxer>
hard to explain ;)
<Regenaxer>
You can't specify where to stop the closing then
<jan6>
k
andyjpb has quit [Ping timeout: 245 seconds]
<Regenaxer>
Super parens are not so important any longer - now that editors match parens
<Regenaxer>
I use them rarely
<Regenaxer>
Mainly in Repl if I'm too lazy
<jan6>
()o()k(),() ()t()h()e()n().()
<jan6>
(if the fancy text styling is annoying you can say to stop ;P)
<Regenaxer>
No problem :)
* jan6
wonders if it'd be worth it to make a function for the irc client to (auto(paren(text(for(funzies)))))
<Regenaxer>
Haha, not sure
<nullnullnull>
btw guys, there's no way to exec script (like -eval) on the fly right? so I must save my script to a file and run it with "pil <filename>"
<Regenaxer>
(call "script")
<Regenaxer>
or (in '("script" args) (line ...
<nullnullnull>
sec
orivej has joined #picolisp
<nullnullnull>
pil (call "script inside here")
<nullnullnull>
: (call "script")
<nullnullnull>
`Script started, file is typescript`
<nullnullnull>
it calls system file
<Regenaxer>
ok
<nullnullnull>
I mean instead of: pil +
<nullnullnull>
is there a way to write script directly in one line?
<nullnullnull>
like pil -eval 'script here'
<Regenaxer>
hmm, 'evql' is not for script
<Regenaxer>
s
<Regenaxer>
pil -'call "script"'
<nullnullnull>
thanks mate ;) worked
<nullnullnull>
btw I didn't find that info in the documentation
<nullnullnull>
about the -'call "script"
<Regenaxer>
: (doc 'call) ?
<Regenaxer>
or you mean the '-'?
<Regenaxer>
see the "invocation" chapter in doc/ref.html
<nullnullnull>
ah sec
<nullnullnull>
ah the invocation, I missed that one :P
orivej has quit [Ping timeout: 272 seconds]
rob_w has quit [Remote host closed the connection]
<Regenaxer>
np :)
<Regenaxer>
or, $ man pil
<Regenaxer>
a very short intro only
<nullnullnull>
yeah I forgot about the man command ;) I always used --help
<Regenaxer>
Yeah, the man is more pro-forma, just for an initial start
rob_w has joined #picolisp
orivej has joined #picolisp
xkapastel has joined #picolisp
orivej has quit [Ping timeout: 245 seconds]
orivej has joined #picolisp
f8l has quit [Ping timeout: 268 seconds]
f8l has joined #picolisp
viaken has quit [Quit: reboot]
viaken has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]