Comments (6)
What has changed is the order in which things are ran:
it used to be:
loadFilesOnce startingContext coreModulesToLoad
>>= load [carpProfile | hasProfile]
>>= execStrs "Preload" preloads
>>= load argFilesToLoad
>>= execStrs "Postload" postloads
And now is
pure startingContext
>>= load [carpProfile | hasProfile && profile]
>>= execStrs "Preload" preloads
>>= loadOnce coreModulesToLoad
>>= load argFilesToLoad
>>= execStrs "Postload" postloads
But I also can’t remember why.
As for It's not possible to def a String for example:
, in your example you use --eval-preload
. Shouldn’t it be postload
instead?
from carp.
Isn’t this a case for --eval-postload
?
from carp.
I guess that would work for (Debug.sanitize-addresses)
but not for the other usages.
It's not possible to def a String for example:
$ echo "(defn main [] (IO.println &wow))" > main.carp
$ carp -x --log-memory --eval-preload '(def wow @"string")' main.carp
I can’t find any implementation for the interface `copy` of type (Fn [(Ref String r3)] String) at line 1, column 10 in 'Preload'.
None of the possibilities have the correct signature:
Array.copy : (Fn [(Ref (Array a) q)] (Array a))
Pointer.copy : (Fn [(Ref (Ptr p) q)] (Ptr p))
Box.copy : (Fn [(Ref (Box t) q)] (Box t))
Function.Arity0.copy : (Fn [(Ref (Fn [] z) q)] a)
Function.Arity1.copy : (Fn [(Ref (Fn [d] z) q)] a)
Function.Arity2.copy : (Fn [(Ref (Fn [d, e] z) q)] a)
Function.Arity3.copy : (Fn [(Ref (Fn [d, e, f] z) q)] a)
Function.Arity4.copy : (Fn [(Ref (Fn [d, e, f, g] z) q)] a)
Function.Arity5.copy : (Fn [(Ref (Fn [d, e, f, g, h] z) q)] a)
Function.Arity6.copy : (Fn [(Ref (Fn [d, e, f, g, h, i] z) q)] a)
Function.Arity7.copy : (Fn [(Ref (Fn [d, e, f, g, h, i, j] z) q)] a)
Function.Arity8.copy : (Fn [(Ref (Fn [d, e, f, g, h, i, j, k] z) q)] a)
Function.Arity9.copy : (Fn [(Ref (Fn [d, e, f, g, h, i, j, k, l] z) q)] a) at Preload:1:2.
Traceback:
(def wow (copy "string")) at Preload:1:1.
from carp.
huh, whatever changed the behavior is not obvious. the actual pre/post impl haven't changed at all since they were first implemented, as far as I can tell
might need to do a git bisect
and check the behavior at each stage. presumably we can use the commit that introduced the feature as the good commit: 6bce3b1
from carp.
Postload runs after the user files so you can't inject things to be used by these files.
But I also can’t remember why.
Git blame says the last changes were two years ago and that's a formatting commit, clearly I haven't used preload in a while then.
from carp.
I'm just gonna close this, it seems that preload use to behave differently but if that was two years ago then it doesn't feel that that this is a useful.
from carp.
Related Issues (20)
- Memory management in nested lambdas is not working properly HOT 1
- memory management crash
- performance: better default string functions
- Bug with REPL displaying result of calling function that returns Char HOT 1
- REPL prompt is not `鯉` on Linux HOT 2
- (()) seems to cause an infinite loop on the latest release
- Packaging issues. HOT 1
- `format` leaks memory HOT 1
- [Bug] Not handling all cases during pattern-matching in lambdas HOT 8
- [Bug] Control.iterate-until double-uses a variable, and thus is broken HOT 3
- [Feat Request] Exhaustive pattern-matching for `defn` HOT 5
- [Bug] Issue pattern matching structs HOT 7
- Document println*
- Feature Request: Make running tests not dependent on stack?
- CarpHask fails to build with hashable >= 1.4 (GHC 9.2 / Stackage LTS-20) HOT 4
- FR: Better Support for Embedded HOT 5
- Get Can't find symbol 'make-update-deriver' when trying to run example on Windows 11 HOT 7
- [bug] duplicate bindings in environment HOT 2
- Repl crashes on type of Map
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carp.