Newest at the top
2025-05-04 23:53:19 +0200 | <tomsmeding> | apologies for being impatient for a bit there by the way, it's late here |
2025-05-04 23:52:22 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2025-05-04 23:48:33 +0200 | <tomsmeding> | :') |
2025-05-04 23:48:31 +0200 | <tomsmeding> | if you want practice with this particular trick, do assignment 0.3 here https://utrechtuniversity.github.io/infomcpd/assignments/asg0.pdf |
2025-05-04 23:47:13 +0200 | <hellwolf> | I am digesting |
2025-05-04 23:46:45 +0200 | <EvanR> | see what tomsmeding just did |
2025-05-04 23:46:29 +0200 | <EvanR> | doesn't matter what source language |
2025-05-04 23:46:11 +0200 | <EvanR> | functions are expressed as functions |
2025-05-04 23:45:58 +0200 | <EvanR> | yes this is what higher order abstract syntax does |
2025-05-04 23:45:30 +0200 | <hellwolf> | what code? This code snippets is not even Haskell... |
2025-05-04 23:45:30 +0200 | <hellwolf> | | there's always a way to convert code into a haskell function |
2025-05-04 23:45:29 +0200 | <tomsmeding> | and create that `->` function by partially-applying `go` to the term you wish to store in the Value |
2025-05-04 23:45:14 +0200 | <tomsmeding> | alternatively: `data Value = VWord WORD | VFun (Value -> State EvalData Value)` |
2025-05-04 23:45:09 +0200 | <hellwolf> | I can't do that in Eval. But let it be, I think I find away. |
2025-05-04 23:45:07 +0200 | <EvanR> | there's always a way to convert code into a haskell function |
2025-05-04 23:44:59 +0200 | <hellwolf> | I store the snippets and it becomes a function object |
2025-05-04 23:44:45 +0200 | <hellwolf> | code snippets is basically what's generated by https://github.com/yolc-dev/yul-dsl-monorepo/blob/master/hs-pkgs/yul-dsl/src/YulDSL/CodeGens/Yul/I… |
2025-05-04 23:44:33 +0200 | <tomsmeding> | perhaps `data SomeTerm = forall a b. YulO2 a b => SOmeTerm (YulCat eff a b)` |
2025-05-04 23:44:22 +0200 | <EvanR> | if not an AST |
2025-05-04 23:44:09 +0200 | <EvanR> | at least your codesnippets are in a more convenient form than blob of Text? At least it's a string of tokens? xD |
2025-05-04 23:44:05 +0200 | <hellwolf> | which is not very useful because I can't even run the code snippets until the external compile compiles it |
2025-05-04 23:43:51 +0200 | <tomsmeding> | `data SomeTerm = forall a b. SomeTerm (YulCat eff a b)` ; `data Value eff = VWord WORD | VFun (SomeTerm eff)` |
2025-05-04 23:43:41 +0200 | <hellwolf> | reality |
2025-05-04 23:43:39 +0200 | <hellwolf> | in really |
2025-05-04 23:43:38 +0200 | <hellwolf> | it will be represented in code snippets :D |
2025-05-04 23:43:21 +0200 | <tomsmeding> | `data Value = VWord WORD | VFun (WhateverYourFunctionRepresentationWillBe)` |
2025-05-04 23:43:15 +0200 | <hellwolf> | haha |
2025-05-04 23:43:11 +0200 | <tomsmeding> | I don't fucking care lol |
2025-05-04 23:43:05 +0200 | <hellwolf> | the only way to playback in Hask is through Eval. |
2025-05-04 23:42:59 +0200 | <hellwolf> | I can't, the function is created in DSL itself, I have no way to recreate that function in Hask |
2025-05-04 23:42:38 +0200 | <tomsmeding> | and then you'll have to branch on what Value you get to see if it's what you expect |
2025-05-04 23:42:27 +0200 | <tomsmeding> | I suspect you'll have no choice but to do `data Value = VWord WORD | VFun (Value -> Value)`; `newtype EvalData = MkEvalData (M.Map B32 Value)` |
2025-05-04 23:42:10 +0200 | <hellwolf> | For Eval, I need to find a different strategy. |
2025-05-04 23:41:58 +0200 | <hellwolf> | yea, deadend, I won't do that for Eval. The codegen is easy though, because codegen can use Map Int T.Text to store code snippets |
2025-05-04 23:41:46 +0200 | tromp | (~textual@2001:1c00:3487:1b00:25b8:e34c:8097:c1c7) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-05-04 23:41:39 +0200 | Typedfern | (~Typedfern@213.red-83-37-26.dynamicip.rima-tde.net) typedfern |
2025-05-04 23:41:14 +0200 | <tomsmeding> | well all you're currently storing is WORD |
2025-05-04 23:40:57 +0200 | <hellwolf> | Currently Eval assumes that I can store all data type as it is in Haskell too, but for function object, I will have to create such a "a -> b" |
2025-05-04 23:40:55 +0200 | <tomsmeding> | and the evaluator will have no choice but error |
2025-05-04 23:40:48 +0200 | <tomsmeding> | the YulCat term could be horrendously ill-typed |
2025-05-04 23:40:38 +0200 | <tomsmeding> | so strong will be pointless, because DMap allows you to _preserve_ typing, but there's no typing here to preserve in the first place |
2025-05-04 23:40:12 +0200 | <tomsmeding> | okay yeah so the untyped integer references are baked into the DSL you're interpreting |
2025-05-04 23:40:09 +0200 | <hellwolf> | I will try not use complicated solution. I think I probably can let Eval to decide the actual representation of each data type; for function object I just use haskell function to represent. |
2025-05-04 23:39:35 +0200 | <hellwolf> | https://github.com/yolc-dev/yul-dsl-monorepo/blob/master/hs-pkgs/yul-dsl/src/YulDSL/Core/YulCat.hs |
2025-05-04 23:39:28 +0200 | <EvanR> | since how likely is it you have exactly the right key |
2025-05-04 23:39:26 +0200 | <tomsmeding> | hellwolf: where's the YulCat data type? |
2025-05-04 23:39:18 +0200 | <EvanR> | and then to practically use it you'll need higher rank utilities |
2025-05-04 23:38:15 +0200 | <EvanR> | same results |
2025-05-04 23:38:11 +0200 | <EvanR> | yeah |
2025-05-04 23:38:10 +0200 | <tomsmeding> | but strange |