Having to do with issues arising when implementing a programming language.
Questions tagged [language-implementation]
141 questions
-1
votes
0 answers
How to java truffle unit tests?
Hi I'm currently implementing my first language using the truffle language framework. I would like to write now some unit test but I get alwaays the same error. Here is the code for a simple addition node:
package truffle.nodes.expression;
import…

Tanoyto
- 1
- 4
-1
votes
2 answers
greek char functions (for fun)
why can I write (in swift)
func β(a: Double, b: Double) -> Double { exp( lgamma(a) + lgamma(b) - lgamma(a + b) ) }
or
func Γ(_ x: Double) -> Double { tgamma(x) }
but not
func √(_ x: Double) -> Double { return sqrt(x) }

user3585825
- 27
- 1
- 1
- 3
-1
votes
2 answers
Completely erase object from memory in python
Using python, I've encountered an interesting problem: my script reads some sensitive info, and I want the data completely scrubbed as soon as it's been used. Something like:
try:
useData(sensitiveString)
except:
print("There was a problem…

Ruslan
- 911
- 2
- 11
- 28
-1
votes
2 answers
How to use multi dimensional array in Java 8 to execute a block of code based on array combination principle. eg: MALE, FRIDAY or FEMALE, FRIDAY
i'm implementing a naming system for a country that is based on the day of a week that a person was born. The user should provide the system with Birthday date and the gender. Then the system should give their first name.
For example... if birthday…

Fred Kibuchi
- 123
- 1
- 4
- 15
-1
votes
1 answer
Is an interpreted language good for the implementation language of an interpreter?
Would writing an interpreter for a new language in an interpreted language like Python be a bad idea, in all aspects, for example speed.

Tristan Pops Kildaire
- 303
- 1
- 8
-4
votes
1 answer
Comparison in python (!= vs ==)
I guess it's a common case to search an odd number with expression num%2 != 0.
Wonder what stands behind it comparing to num%2 == 1, especially in terms of its implementation in python.

Sergii
- 109
- 1
- 8