« first day (31 days earlier)      last day (244 days later) » 

04:12
@BgilMidol str - int, subtract the ascii value of str by int
 
3 hours later…
06:51
@PyGamer0 yeah, that sounds good
 
8 hours later…
14:34
@mathcat error
14:51
@BgilMidol Implicit output already exists
that's what Context if for
If already printed (one or many items), the program doesn't do anything
Else it prints the last output token
@BgilMidol I'll look into it
@mathcat so does "Hello, World! work?
not yet
ah I see
some arg mistake
uff
I'll need some time
ah I see
@mathcat I don't think you pushed this
but nvm
I'll do it
15:12
@mathcat ill do it
pushed
nice, I'll do some changes
actually
Implicit output
is not working
without a function
so "Hello World" won't work
but +1 2 will
15:30
Ah, I see the problem
Currently, there is no difference between g and "Hello
The parser returns both as strings
so ["g"] and ["Hello"]
That should be changed
@PyGamer0 help
Flax's parser returns values, not tokens right?
So how does it differentiate between a function and a string?
A string is enclosed by quotes, functions are not.
No, the tokenizer already figures that out
But the parser gets the token_list
and evaluates values
so it would return something like:
["g", "Hello", 2]
not [Token("g", TokenType.Function), ...
And it's better like that
Tokens would complicate things a lot
but now, there's no difference between g and "Hello
Should the parser evaluate a function to a pythonical lambda
not a string/integer?
@mathcat yes
15:41
okay
that makes more sense
So the parser already evaluates values to it's python form
The tests look weird now:
[[<function Add at 0x000002011473A680>, 1, [<function Add at 0x000002011473A680>, 3, [<function Add at 0x000002011473A680>, 4, 5]]]]
but okay
It's working~
And +"Hello"2 too!
btw I'll make some helper functions
like checking types
16:20
@mathcat actually yes
@mathcat you see the tokeniser checks if the current character is in the atoms dictionary aka it is in the builtins
the parser then sees hey the tokentype is Atom, now let me fetch the atom from the dictionary
flax doesnt have strings
it does allow 'abcd'+'bcde' because it immediately converts them into a list of integers
the strings are tokenised as hey look i found a ' now i must pop all characters until another ' is encountered
flax is not a good language to study
oh, ok
I'm done
Everything working!
I'm gonna git commit -am "frick" now
pr-ed?
not yet
16:42
Done!
Now you can update your answer
to get your 15 bytes
17:03
@BgilMidol Can you merge the PR?
wrong link
 
4 hours later…
21:05
@mathcat I like a1 ** a2, not a1**a2

« first day (31 days earlier)      last day (244 days later) »