02:43
theruran has joined #picolisp
06:26
<
abu[7] >
Now I think I found what the real problem was with non-symbolic tasks
06:26
<
tankf33der >
morning
06:26
<
abu[7] >
This was never used before :)
06:26
<
tankf33der >
i knew you can
06:27
<
abu[7] >
But this does not explain what the problem yesterday was, because this was also with symbolic tasks where this code was not even called
06:27
<
tankf33der >
infinity and beyond
06:27
<
abu[7] >
My simple tests here passed, also on Debian
06:28
<
tankf33der >
i have 30mins
06:28
<
abu[7] >
I'll release now
06:40
<
tankf33der >
debian, alpine, freebsd, archlinux - ok
06:40
<
tankf33der >
now playing with -O3
06:41
<
abu[7] >
I think I feel better with -O2 ;)
06:42
<
tankf33der >
issue is here, lets leave it alone.
06:43
<
tankf33der >
now testing old-new tests with co and will add to bundle if ok
06:46
<
abu[7] >
Yes, very good
06:47
<
tankf33der >
passed.
06:47
<
abu[7] >
And if you have more ideas for abnormal use cases, please try ;)
06:48
<
abu[7] >
So it looks a lot better today
06:48
<
abu[7] >
Then a week ago
06:48
<
tankf33der >
Let's assume that the coroutine adventures have come to an end.
06:49
<
abu[7] >
We added sanity checks and fixed some bugs
06:49
<
abu[7] >
Thanks for all the help!
07:16
geri has joined #picolisp
07:18
<
abu[7] >
(apply Exec (rest)) is better (pass Exec)
07:19
<
abu[7] >
(rest) builds a list first
07:25
<
geri >
i wanted to call Exec and Exec& "!" and "&" but both are already defined
07:26
<
geri >
also using a case statement for matching on file extension is way nicer than what i had before
07:26
<
abu[7] >
Upper case is fof locally bound symbols though
07:26
<
geri >
well, it's script-local
07:27
<
abu[7] >
T, but globally bound in the script
07:27
<
abu[7] >
But no probled
07:27
<
abu[7] >
In a small script you are free
07:28
<
geri >
i only started doing them with capitals cause text is a builtin already
07:29
<
abu[7] >
Yek, I thought so
07:29
<
geri >
is there a neat way to define a key of alist to be same as another one?
07:29
<
abu[7] >
I sometimes to (setq Var in a script
07:30
<
abu[7] >
How another?
07:30
<
geri >
i basically want to do the same thing as i do with de Image ~Video but if everything is stored in an alist
07:30
<
abu[7] >
The keys are checked with '=='
07:31
<
abu[7] >
assoc uses '='
07:32
<
abu[7] >
asoq uses '=='
07:32
<
abu[7] >
T thought you talk about properties
07:32
<
geri >
(video (F) (Exec& "mpv" "--no-terminal" "--" F))
07:32
<
geri >
(image ...)) # should refer to video
07:33
<
geri >
i dont wanna do let's, its ugly
07:34
<
abu[7] >
Hmm, I don't understand what you want to do
07:35
<
abu[7] >
Which alist?
07:35
<
geri >
(de Video (F) (Exec& "mpv" "--no-terminal" "--" F))
07:35
<
geri >
(de Image ~Video)
07:35
<
geri >
but instead its all stored in one alist
07:36
<
abu[7] >
asoq in one single function?
07:36
<
abu[7] >
(Apps 'video ... ?
07:36
<
geri >
in other lang lingo - just make a hash table storing functions, but somehow refer to another key when defining it?
07:37
<
geri >
ill probably just rename all those opening functions though
07:37
<
geri >
just curious
08:05
<
geri >
i keep on hacking on my pil rewrites for sh scripts but i cant seem to commit to it haha
09:44
<
abu[7] >
geri, btw, TAB expansion for "@" now works also on the top level directory
09:51
<
tankf33der >
abu[7]: testing This in co-yield
09:52
<
tankf33der >
if i comment yield T prints two times
09:52
<
tankf33der >
is it good test if i understood problem correctly
09:54
<
abu[7] >
More interesting is perhaps if the yield is
*in* the 'let'
09:55
<
tankf33der >
i have tried with setq
09:55
<
tankf33der >
with the same result
09:56
<
abu[7] >
T, setq does not hold the value in the co frame
09:56
<
tankf33der >
the same result with let
09:57
<
abu[7] >
co local are locally bound syms, i/o catch etc,
09:57
<
abu[7] >
global is global
09:58
<
abu[7] >
Did you expect something different?
10:02
<
abu[7] >
'This' is a normal symbol like any other. It is just used implicitly at certain places
10:04
<
tankf33der >
why it is NIL after yield call ? :/
10:05
<
abu[7] >
Good question
10:06
<
tankf33der >
ref says:
10:06
<
tankf33der >
The initial value of This is bound and preserved in the coroutine environment.
10:07
<
abu[7] >
I think not
10:07
<
tankf33der >
so i am decided to play with This values
10:07
<
abu[7] >
This is not in the co frame
10:08
<
abu[7] >
I'm shopping, Will take a look later
10:08
<
tankf33der >
thanks.
10:19
<
geri >
abu[7]: about @Tab very nice!
10:28
<
abu[7] >
tankf33der: While waiting at the supermar(et, I understood the reason. 'This' is part of the env, and because 'a' terminates after the 'yield' and 'with', it restores the env of the originator (here T) to what it was when it was called (This was NIL at that time)
10:28
<
abu[7] >
The question is if This should be part of the enw
10:29
<
abu[7] >
But what about other parts of the env?
10:30
<
abu[7] >
I did not think much about terminating co's asynchronously
10:31
<
abu[7] >
ie. starting in one env and stopping in another
10:42
<
abu[7] >
OK, I see that $This is not part of the llvm~env, good so.
10:46
<
tankf33der >
Not bug, ok
10:47
<
abu[7] >
Well, not sure
10:47
<
abu[7] >
I'm still out
10:48
<
abu[7] >
Will investigate why This is overwritten on co exit
10:49
<
tankf33der >
Thanks
10:49
<
abu[7] >
(other vars are no)
10:58
<
tankf33der >
tested, other syms are ok
11:05
<
abu[7] >
't understand
11:06
<
abu[7] >
why this is so :)
11:07
<
abu[7] >
Ah, I see!
11:08
<
abu[7] >
(push (val $This) $This ... in 'co'
11:08
<
abu[7] >
It is handled explicitly
11:08
<
abu[7] >
Not a good idea perhaps
11:15
<
abu[7] >
Makes no sense to me now
11:18
<
abu[7] >
I'll meditate about removing it
11:35
<
abu[7] >
It was added 31aug23
11:35
<
abu[7] >
I have even code that relies on it
11:37
<
abu[7] >
It is very useful when coroutine tags are OOP objects
11:38
<
abu[7] >
ie. implicit 'This' like in methods
12:09
<
abu[7] >
Unsatisfactory ...
14:54
<
geri >
nice and bloated
14:55
<
geri >
i wrote another impl in guile scheme and its like 1 line shorter, probably because of docs lol
14:55
<
geri >
(i also wrote one in cl, gauche, clojure & pure sh :))
14:56
<
geri >
gotta write one in janet, why not
14:56
<
geri >
have you heard about it?
14:56
<
geri >
is that russian? :D
14:56
<
geri >
its an array-based lisp
14:57
<
geri >
ie not a lisp at all
14:57
<
geri >
its for scripting, but its got the immutability shtick so you probably wont like it at all
14:58
<
abu[7] >
yes, russian, but I don't speak any ;)
14:58
<
geri >
im a native B)
14:59
<
abu[7] >
That's why you are up so early
15:00
<
geri >
nah, i just wake up at 5 am every day
15:00
<
geri >
im in eastern eu
15:05
<
tankf33der >
I am russian
15:06
<
tankf33der >
geri: and maybe from your country
15:10
<
geri >
more likely that we're neightbours
15:12
<
geri >
unnecessary t :(
15:51
<
geri >
(de termuxify (Opener)
15:51
<
geri >
(if (= Opener editor)
15:51
<
geri >
(if (sys "TERMUX_VERSION")
15:51
<
geri >
'((F) (exec! "termux-open" F)))
15:51
<
geri >
that's right now
15:51
<
geri >
(de termuxify (Opener)
15:51
<
geri >
(and (sys "TERMUX_VERSION")
15:51
<
geri >
(not (= Opener editor))
15:51
<
geri >
'((F) (exec! "termux-open" F)))
15:51
<
geri >
that's an experiment
15:52
<
geri >
first one probably a little clearer
15:54
<
geri >
and with proper formatting the logic chain one is 1 line longer
16:14
<
abu[7] >
Yeah, I always feel uneasy upon 'not'
16:15
<
abu[7] >
ok, here '<>'
16:16
<
tankf33der >
not = comes from lisp books
16:16
<
tankf33der >
this is insane
16:35
<
abu[7] >
tankf33der: I thi
16:35
<
abu[7] >
nk I understand the This issue
16:36
<
abu[7] >
It is special on 'co' entry
16:36
<
abu[7] >
so it should be handled on exit too
16:37
<
abu[7] >
(not sure how, will find out)
16:47
<
geri >
(not (= ...)) is fine
16:47
<
geri >
i couldnt remember how the opposite was called
16:47
<
abu[7] >
>> ok, here '<>'
16:49
<
geri >
most lisps dont have like half of predicates you got lol
16:49
<
geri >
and inverted ones just remove a set of parens, logically they dont really do anything other than (not (=...)) and the likes
16:50
<
abu[7] >
In an interpreter they are important
16:51
<
abu[7] >
Func calls are expensive
16:52
<
abu[7] >
bench '(not A)' against just 'A'
16:54
<
geri >
(not A) => 0.013 - 0.035 sec, A => 0.006 - 0.015 sec
16:56
<
geri >
if its 'A vs (not 'A) its very similar
16:57
<
geri >
where does <> symbol come from?
16:58
<
abu[7] >
eg, Basic used <>
16:59
<
geri >
aighty, no wonder i didnt know
16:59
<
geri >
i honestly really like using (quote ...) syntax for defining functions instead of using the shortcut, feems homey
17:00
<
geri >
there's no point, its more symbols, but it just feels right haha
17:24
<
geri >
aighty, gotta go
17:26
<
abu[7] >
Good night geri!
17:27
<
abu[7] >
tankf33der, I think I have it
17:28
geri has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
17:29
<
abu[7] >
Released :)
17:29
<
tankf33der >
playing
17:30
<
abu[7] >
Thanks as ever for finding this!
17:30
<
abu[7] >
Now it is more correct
17:31
<
abu[7] >
It was even a bug I think
17:32
<
tankf33der >
alpine - crashed
17:32
<
tankf33der >
debian - ok
17:32
<
abu[7] >
Maybe diffenent stack layout
17:33
<
tankf33der >
this new machine, checking ulimit settings
17:33
<
abu[7] >
I try indire6t pointers
17:33
<
tankf33der >
with unlimited co is ok
17:35
<
abu[7] >
Did it use really so much stack?
17:35
<
tankf33der >
default 8k is too small
17:39
<
abu[7] >
tankf33der, ao you are a Latvian citizen in the russian minority?
17:39
<
tankf33der >
i am Latvian alien
17:40
<
tankf33der >
as written in my passport
17:40
<
abu[7] >
You have russian nationality?
17:41
<
tankf33der >
on Latvian semi citizen status
17:41
<
tankf33der >
on -> only
17:41
<
abu[7] >
strange, semi
17:41
<
tankf33der >
because i was born in soviet union
17:42
<
abu[7] >
So now they should give you full status
17:43
<
tankf33der >
i must know Latvian language, but i am very stupid for languages
17:45
<
tankf33der >
This inside co tested, works
17:45
<
abu[7] >
My son in law is Canadian, he had to pass a German lang test last week to have less problems with residence permission
17:45
<
abu[7] >
Co's get better and better