-
Notifications
You must be signed in to change notification settings - Fork 0
/
Log.txt
221 lines (161 loc) · 5.99 KB
/
Log.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
########
# Week 1
########
2023-04-29
----------
18:21:
Currently working on the web app.
Using bulma to create some templates.
Have managed to build usort-lib with ghc-js.
Things to do next:
- Write the other templates
- Write the controller
- Connect the DOM API to usort-lib somehow
I'll just write the templates first so it's done.
########
# Week 2
########
2023-06-03
----------
16:21:
I'd like to talk about what I need to do next.
I have a couple templates now -- enough to know I can definitely use Bulma and make
something that is usable. I still need to decide how to wire up the data to the
view. And I need to decide how to change the view. I guess I need the internet for
that. The question is do I want to write my own for fun, or do I just use something
off the shelf? And if I go off the shelf, do I go javascript native or Haskell
native? Is there a js-native option that I can hook up to a frp? Or are there
js-native options that are close enough to frp to make it unnecessary? Once again I
find myself needing to write a js web app...
########
# Week 3
########
2023-06-10
----------
15:08:
To compile to javascript:
(Build ghc-js)
emconfigure ./configure --target=javascript-unknown-ghcjs
cd usort-web/ghc; nix-shell
cabal build \
-w $PWD/usort-web/ghc/_build/stage1/bin/javascript-unknown-ghcjs-ghc usort-lib \
--with-hc-pkg $PWD/usort-web/ghc/_build/stage1/bin/javascript-unknown-ghcjs-ghc-pkg \
--allow-newer
19:45:
Spent time trying to install pretty-simple, which petered out when Cabal tried to
build Setup for javascript, but pretty-simple uses defaultMainWithDoctest, which
uses runProcessInteractive, which doesn't exist.
2023-06-11
----------
09:10:
Now I understand that I need to write an executable that "exports" functions
through the JS api. That's what I'll do next. Then I'll try to make a demo.
########
# Week 4
########
2023-08-04
----------
16:05:
I keep losing track of what I was working on, so let's look and document a bit.
I can build usort-lib and usort-web, but I can't run it yet because there are
problems with text when compiled with ghc2js. I assume other people are working on
those problems? I actually don't know. Also I don't think I am set up with a clear
way to run `cabal test` and have it test the pure code version of things. Can we
add that under a feature flag and start using it? Also, has anything else changed
to the text library yet?
Indeed. The next thing to do is add a pure-haskell flag to the cabal description,
add an issue to the upstream repo about pure-haskell implementation for javascript,
find and link to any relevant discussion in that issue, and then start implementing
things purely.
2023-08-06
----------
22:10:
Ok, I actually found where I am. It's github:chreekat/text/b/more-js. What I'm
trying to do right now is demonstrate the general strategy for adding pure Haskell
versions of functions. I have started with reverse. Once I have reverse working, I
want to create a draft PR to see if people think it's the right path.
22:14:
Oh, I also need to add instructinos for how to test it and I need to make sure
use-cbits is false when the arch is javascript.
########
# Week 5
########
2023-08-13
----------
10:03:
To write reverse, I need to be able to identify a unicode character. It doesn't
look like that already exists, so I'll use Data.Text.Array.unsafeIndex and
unsafeWrite and just mimic the C code.
########
# Week 6
########
2023-08-14
----------
09:53:
I haven't written any code, but a combination of GPT and Wikipedia has allowed me
to understand what measure_off_naive is doing, which is definitely progress.
2023-08-16
----------
08:35:
I spent time yesterday trying to write reverse. Right now the two options appear to
be (1) using the IsList instance to get a list of Word8 or (2) using a bunch of
primops from GHC.Exts such as indexWord64Array#, assuming the latter are
implemented. I should probably just start with showing that the PURE_HASKELL macro
and the use-cbits flag actually work.
########
# Week 7
########
2023-08-25
----------
09:47:
phadej suggesting looking at if arch(javascript) and simdutf stuff.
2023-08-27
----------
16:49:
Done and done! Implemented reverse. Next, need to pose the question: merge the
existing stuff as-is? (After editing the docs for the pure-haskell flag to indicate
that it is not complete yet.)
########
# Week 8
########
2023-09-07
----------
20:14:
Today I want to try running perf tests.
########
# Week 9
########
2023-09-13
----------
20:06:
I have run tests and benchmarks. The PR is failing tests though.
.PHONY: all bench pure pure-bench fast.baseline
all:
cabal test -j
bench:
cabal -j bench --benchmark-options="-p /reverse/"
pure:
cabal --builddir=dist-pure -fpure-haskell -j test
pure-bench:
cabal --builddir=dist-pure -fpure-haskell -j bench --benchmark-options="-p /reverse/ --baseline fast.baseline"
fast.baseline:
cabal -j bench --benchmark-options="-p /reverse/ --csv fast.baseline"
20:38:
Trying to get doctests to pass. Will download and build cabal-extras directly, dang
it.
2023-09-15
----------
23:05:
Just noting that the next thing to do is take a benchmark and then try Sylvain's
implementation stuff.
#########
# Week 10
#########
2023-09-21
----------
20:30:
Just gonna try the bangs to see if anything changes.
I did build cabal-extras btw, but now actually building cabal-docspec in
~/src/haskell/cabal-extras.
20:45:
Adding bangs didn't seem to help much.