Can compiled Haskell run w/o Haskell environment? [duplicate] - haskell

This question already has answers here:
Is it possible to produce stand alone haskell executable
(2 answers)
Do ghc-compiled binaries require GHC or are they self-contained?
(4 answers)
Closed 4 years ago.
I was trying to find out, whether the Haskell environment is needed to run Haskell program? For instance like Java.
Or does it work more like .net, where compiled .exe can be run on any computer wherever one copies it to?
I got this question, because in addition to normal arguments, one can give arguments for Haskell environment (+RTS -RTS) when launching an executable.

Related

How to read the contents of a file on linux in FASM x86_64 assembly? [duplicate]

This question already has answers here:
How to read from and write to files using NASM for x86-64bit
(2 answers)
Read file from a specific position in x86
(2 answers)
Closed 8 months ago.
I'm trying to learn how to use FASM, and currently looking into manipulating files using it. But all resources I could find for it seem to be windows-only.
How could I obtain a pointer to the contents of the file, or loop over each of its lines?

Haskell interpreted mode for real world app [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
One can run Haskell Code with runhaskell ... or compile it with ghc .... It's clear that there are performance differences between interpreted code and an executable.
But is it common to use interpreted Haskell code in real world applications?
Or does this feature only exists for development purposes?
EDIT:
Is it common practice to run real world apps in interpreted mode like i would do with, for example, Node.js?
$ node './app.js'
$ runhaskell './Main.hs'
Define "common".
I have a program that I consider "production code" that takes a specification for a web page and generates the appropriate static HTML. The specification isn't external; it's just a chunk of Haskell source code in the program. About once a month, I update the specification and run the program. I run it with runghc and the run time is a tiny fraction of a second, so compiling would be a waste of keystrokes.
Out in the broader world, the popular stack tool comes with script support. If you write a program like this:
#!/usr/bin/env stack
{- stack script --resolver lts-14.17 -}
main = putStrLn "Interpreted code is awesome!"
and run it, it basically uses a version of runghc to run the script. So, this is at least one sanctioned method for writing and running interpreted, production scripts for Haskell.

How to know which shared object is used? [duplicate]

This question already has answers here:
Determine direct shared object dependencies of a Linux binary?
(4 answers)
Closed 5 years ago.
This probably already has an answer but I couldn't find it.
I want to know which shared object is used by the binary (based on LD_LIBRARY_PATH, /etc/ld.so.conf, etc...). Something similar to the which command but for .so.
Thanks
You should use the ldd utility. In the same environment you would load your executable (Same LD_LIBRARY_PATH, e.t.c.)

Linux command line Nodejs [duplicate]

This question already has answers here:
Read environment variables in Node.js
(8 answers)
Closed 9 years ago.
I see some NodeJS programs executed like this PARAM=1;node program.js
Im assuming its putting PARAM=1 into the environment. How do I access this in the node program? thanks,
Yes, PARAM=1 is setting an environment variable.
Depending on which shell you're using, you may need to use export PARAM=1 so the setting makes it to the child process. Otherwise the value would only exist for the shell.
As dystroy pointed out, the rest of your question is answered here.

Dependency Walker equivalent for Linux? [duplicate]

This question already has answers here:
Hierarchical ldd(1)
(4 answers)
Closed 3 years ago.
I need a tool to show all the shared library dependencies in some graphical way, not just with ldd on each .so. For MS Windows Dependency Walker works. Is there anything for Linux?
.
Try binscan or ELF Library Viewer

Resources