erg on master
stack-as-data: fix everything. … (compare)
erg on master
sequences.extras: update nrotat… (compare)
erg on master
fry2: Add another implementatio… syntax: Fix spaces generalizations: add generaliza… and 2 more (compare)
mrjbq7 on master
io.monitors: bump sleeps in tes… (compare)
mrjbq7 on master
alien: remove note about 32-bit… (compare)
Hey, guys! Does anyone know if Racket has something like Factor's with-directory
?
This is what I wrote:
(define (with-current-directory dir func)
(define prev-dir (current-directory))
(current-directory dir)
(define result (func))
(current-directory prev-dir)
result)
It works, but 1) it feels awkward to define
two things for such a simple job (maybe it's just Factor in me talking), and
2) if anyone knows how to make sure the current-directory
would be restored in case of exceptions in the func
, I would appreciate a hint.
master-db7911c017
on Jan 26 still hangs after a short session, so I have to explore other options.)
(current-directory)
is a parameter. So if I remember correctly, you can use parameterize
. It's taking care of exceptions. https://docs.racket-lang.org/guide/parameterize.html
Hey all, I started on a protobuf lib a while ago - I kind of got distracted but I got to a decent point I feel like I should get it properly working and not just conceptually working. I have the foundations of the thing in pure factor (without any c++ shenanigans and creating objects dynamically instead of having a code generation step like most libs do).
Some technical questions
with-compilation-unit
ok here.Some general factor questions:
.factor_history
in my home directory but it only has history up to an old save-image
call. I can't seem to find docs/code relevant to this - is there some symbol I need to define at startup to read in that file to the listener history recall?you can redefine tuples, the machinery handles it for you if you do, for example:
TUPLE: foo name ;
TUPLE: foo name address ;
it will update all tuple instances to add the address slot. reordering works as expected. when you remove/rename a slot they are removed from instances and set to a default initial value, i believe.
@inivekin i'm excited about your protobuf code! if you want a code review, let us know.
1) .factor_history comes from using libreadline and the command-line factor. we currently don't persist listener sessions history, but it wouldn't be that hard to add. so if you do $ rlwrap ./factor
then that will participate in "history saving".
2) we've looked at symbolic versions of those and they seem even harder to read than bi
/bi*
/bi@
... one solution is to use cleave
/spread
/apply
with quotations... little bit more verbose, much easier to understand code data flows...
@alex-ilin i wish we could figure out your windows situation, thats not a bug we have been able to reproduce for other windows users. i wonder if it has to do with video graphics drivers? we had some issues on linux with certain buggy GL drivers. are you sure you have the latest for your hardware?
I currently have 3 Lenovo laptops, all based on self-updating Win10x64, each with different graphics cards, and I didn't do anything specific to the video drivers. The latest laptop is ThinkPad L15 Gen 2, with just Intel's integrated graphics. The other two have both integrated and discrete video cards (I believe the integrated one is always used for desktop apps, but I'm not sure whether Factor qualifies as a regular desktop app, or a custom game interface).
8c69252
. I wonder if I could time-travel back to that state and run the old Factor version in parallel. Of course, some of my vocabs that are updated to the latest version would throw a hissy fit, but for basic stuff it should be possible to run just to prove a point. I'll look for an old enough zip-file on the build server.
https://downloads.factorcode.org/releases/
have the same date-time? I hoped to search for a version based on the date-time of that commit I mentioned.