00:00
jwatzman|work has quit [Quit: jwatzman|work]
00:02
oriba_ has quit [Quit: oriba_]
00:04
shinnya has quit [Ping timeout: 256 seconds]
00:08
jfeser has joined #ocaml
00:09
travisbrady has joined #ocaml
00:09
rand000 has quit [Quit: leaving]
00:10
shinnya has joined #ocaml
00:20
fold has quit [Ping timeout: 255 seconds]
00:27
eikke__ has joined #ocaml
00:31
travisbrady has quit [Quit: travisbrady]
00:34
thomasga has quit [Quit: Leaving.]
00:36
BitPuffin has quit [Ping timeout: 264 seconds]
00:44
travisbrady has joined #ocaml
00:45
eikke__ has quit [Ping timeout: 260 seconds]
00:52
agarwal1975 has quit [Quit: agarwal1975]
00:55
maattdd has joined #ocaml
00:58
travisbrady has quit [Quit: travisbrady]
01:00
maattdd has quit [Ping timeout: 256 seconds]
01:02
flazz is now known as zz_flazz
01:21
lordkryss has quit [Quit: Connection closed for inactivity]
01:39
fold has joined #ocaml
01:43
huza has joined #ocaml
01:49
boogie has joined #ocaml
01:51
philtor has quit [Ping timeout: 250 seconds]
01:51
jfeser has quit [Quit: jfeser]
01:53
claudiuc has quit [Remote host closed the connection]
01:55
travisbrady has joined #ocaml
01:55
maattdd has joined #ocaml
02:00
maattdd has quit [Ping timeout: 245 seconds]
02:02
huza has quit [Ping timeout: 244 seconds]
02:07
huza has joined #ocaml
02:10
_twx_ has quit [Remote host closed the connection]
02:13
manizzle has quit [Ping timeout: 255 seconds]
02:14
<
whitequark >
anyone familiar with Typedtree here?
02:14
<
whitequark >
I don't understand how recursive types are represented in Types.signature
02:15
<
whitequark >
oh, nevermind, I read the comment for Types.rec_status.
02:17
\q has quit [Ping timeout: 250 seconds]
02:18
<
Drup >
whitequark: what are you hacking ?
02:18
<
whitequark >
ppx_import
02:19
<
whitequark >
I'm trying to make it work based on .cmi and not .cmti
02:19
<
whitequark >
not sure if it's a good idea actually
02:20
\q has joined #ocaml
02:20
<
whitequark >
wth is Partial_interface?!
02:21
<
Drup >
whitequark: you could use ocp-index's lib to ease the work
02:22
<
Drup >
I think it contains everything you need already
02:22
<
whitequark >
except I can't even install it
02:23
<
Drup >
even your oasis fork ?
02:23
<
whitequark >
okay. only I can install it on 4.02
02:24
<
Drup >
why is that an issue ?
02:25
<
whitequark >
because I'm interested in actually having useful software?
02:25
<
Drup >
did you meant "can't" ?
02:26
<
whitequark >
no, I mean "can"
02:26
<
whitequark >
I can install ppx_import, anyone else couldn't
02:26
<
whitequark >
→ no point in distributing it or having smth else depend on it
02:26
<
Drup >
but you patched ocp-index and did a PR, which will be merged when 4.02 goes out and distributed
02:27
<
Drup >
nobody is going to use your ppx before 4.02 is officially out anyway ...
02:27
travisbrady has quit [Quit: travisbrady]
02:28
<
whitequark >
assuming anyone updates typerex...
02:28
<
whitequark >
anyway, it's beside the point, ocp-index translates cmi/cmt into Outcometree
02:28
<
whitequark >
and I need Parsetree
02:29
travisbrady has joined #ocaml
02:29
<
Drup >
hum, I wonder why it's done that way
02:40
ygrek has joined #ocaml
02:41
jao has joined #ocaml
02:41
jao has quit [Changing host]
02:41
jao has joined #ocaml
02:42
<
whitequark >
wow wth
02:42
<
whitequark >
type Variance.f = May_pos | May_neg | May_weak | Inj | Pos | Neg | Inv
02:43
fold has quit [Ping timeout: 245 seconds]
02:48
<
whitequark >
why do record labels have arguments? O_o
02:49
ygrek has quit [Ping timeout: 240 seconds]
02:51
q66 has quit [Quit: Leaving]
02:51
ygrek has joined #ocaml
02:54
bjorkintosh has quit [Ping timeout: 260 seconds]
02:54
ygrek has quit [Remote host closed the connection]
02:55
ygrek has joined #ocaml
02:56
maattdd has joined #ocaml
02:57
huza has quit [Ping timeout: 250 seconds]
02:58
<
whitequark >
how come `constraint`s are not in .cmi? O_o
02:59
bjorkintosh has joined #ocaml
03:01
maattdd has quit [Ping timeout: 240 seconds]
03:01
boogie has quit [Remote host closed the connection]
03:02
boogie has joined #ocaml
03:03
huza has joined #ocaml
03:06
darkf has quit [Quit: Leaving]
03:06
darkf has joined #ocaml
03:06
boogie has quit [Ping timeout: 245 seconds]
03:12
uggwar has quit [Ping timeout: 245 seconds]
03:17
boogie has joined #ocaml
03:19
rishabhjain has joined #ocaml
03:20
boogie has quit [Client Quit]
03:22
ygrek has quit [Ping timeout: 264 seconds]
03:30
hausdorff has joined #ocaml
03:31
manizzle has joined #ocaml
03:33
artagnon has left #ocaml [#ocaml]
03:37
travisbrady has quit [Quit: travisbrady]
03:44
<
whitequark >
cmi format is a mess.
03:57
<
whitequark >
how is Types.row_field even supposed to work
03:57
maattdd has joined #ocaml
03:57
<
whitequark >
I now intensely regret starting this at all
04:01
maattdd has quit [Ping timeout: 240 seconds]
04:16
<
whitequark >
| Otyp_stuff of string
04:16
<
whitequark >
`Otyp_stuff' ?
04:22
axiles has joined #ocaml
04:23
ygrek has joined #ocaml
04:23
lusory has quit [Ping timeout: 256 seconds]
04:29
lusory has joined #ocaml
04:35
slash^ has joined #ocaml
04:37
huza has quit [Quit: WeeChat 0.3.8]
04:42
rishabhjain has quit []
04:45
shinnya has quit [Ping timeout: 255 seconds]
04:58
maattdd has joined #ocaml
05:02
maattdd has quit [Ping timeout: 240 seconds]
05:07
jao has quit [Ping timeout: 245 seconds]
05:08
ygrek has quit [Ping timeout: 240 seconds]
05:16
_5kg has quit [Ping timeout: 245 seconds]
05:22
slash^ has quit [Read error: Connection reset by peer]
05:24
slash^ has joined #ocaml
05:27
fraggle_laptop has joined #ocaml
05:30
ygrek has joined #ocaml
05:37
tac has quit [Quit: Leaving]
05:39
tac has joined #ocaml
05:47
hausdorff has quit [Remote host closed the connection]
05:49
hausdorff has joined #ocaml
05:53
hausdorff has quit [Ping timeout: 250 seconds]
05:58
maattdd has joined #ocaml
06:00
hausdorff has joined #ocaml
06:03
maattdd has quit [Ping timeout: 260 seconds]
06:04
ggole has joined #ocaml
06:24
slash^ has quit [Read error: Connection reset by peer]
06:31
Hannibal_Smith has joined #ocaml
06:42
_0xAX has joined #ocaml
06:43
Simn has joined #ocaml
06:59
maattdd has joined #ocaml
07:00
Gonzih has joined #ocaml
07:00
parcs has quit [Read error: Connection reset by peer]
07:01
parcs has joined #ocaml
07:04
maattdd has quit [Ping timeout: 250 seconds]
07:23
yacks has quit [Ping timeout: 264 seconds]
07:28
Kakadu has joined #ocaml
07:30
_0xAX has quit [Remote host closed the connection]
07:31
samrat has joined #ocaml
07:39
dant3 has quit [Ping timeout: 272 seconds]
07:41
dant3 has joined #ocaml
07:46
yacks has joined #ocaml
08:00
maattdd has joined #ocaml
08:01
typedlambda has quit [Ping timeout: 250 seconds]
08:04
typedlambda has joined #ocaml
08:05
maattdd has quit [Ping timeout: 240 seconds]
08:12
leowzukw has joined #ocaml
08:14
lifeng has joined #ocaml
08:21
pango has joined #ocaml
08:21
Sim_n has joined #ocaml
08:21
wwilly has joined #ocaml
08:23
Simn has quit [Ping timeout: 240 seconds]
08:26
zpe has joined #ocaml
08:29
leowzukw has quit [Quit: leaving]
08:30
leowzukw has joined #ocaml
08:38
leowzukw has quit [Quit: leaving]
08:39
zpe has quit [Remote host closed the connection]
08:40
zpe has joined #ocaml
08:44
zpe has quit [Ping timeout: 245 seconds]
08:59
Sim_n is now known as Simn
09:02
demonimin_ has joined #ocaml
09:02
demonimin has quit [Ping timeout: 256 seconds]
09:10
Nahra has joined #ocaml
09:19
hausdorff has quit [Remote host closed the connection]
09:37
rand000 has joined #ocaml
09:42
ollehar has joined #ocaml
09:44
ygrek has quit [Ping timeout: 250 seconds]
09:50
zpe has joined #ocaml
09:52
tac has quit [Quit: Leaving]
09:54
tane has joined #ocaml
09:55
zpe has quit [Ping timeout: 255 seconds]
09:58
ollehar has quit [Ping timeout: 240 seconds]
09:59
lifeng has quit [Remote host closed the connection]
10:02
rand000 has quit [Ping timeout: 255 seconds]
10:02
rand000 has joined #ocaml
10:09
thomasga has joined #ocaml
10:12
lifeng has joined #ocaml
10:18
BitPuffin has joined #ocaml
10:29
Gonzih has quit [Ping timeout: 240 seconds]
10:37
BitPuffin has quit [Ping timeout: 264 seconds]
10:48
fraggle_laptop has quit [Remote host closed the connection]
10:53
BitPuffin has joined #ocaml
11:02
maattdd has joined #ocaml
11:07
maattdd has quit [Ping timeout: 244 seconds]
11:20
dsheets_ has joined #ocaml
11:30
hausdorff has joined #ocaml
11:32
shinnya has joined #ocaml
11:34
rand000 has quit [Quit: leaving]
11:35
hausdorff has quit [Ping timeout: 240 seconds]
11:43
darkf has quit [Quit: Leaving]
11:48
wwilly has quit [Ping timeout: 240 seconds]
12:03
maattdd has joined #ocaml
12:07
maattdd has quit [Ping timeout: 250 seconds]
12:17
englishm_ has joined #ocaml
12:31
BitPuffin has quit [Ping timeout: 264 seconds]
12:31
q66 has joined #ocaml
12:32
ollehar has joined #ocaml
12:50
lifeng has quit [Quit: Ex-Chat]
13:02
samrat has quit [Quit: Computer has gone to sleep.]
13:04
maattdd has joined #ocaml
13:04
englishm_ has quit [Remote host closed the connection]
13:05
ygrek has joined #ocaml
13:09
maattdd has quit [Ping timeout: 256 seconds]
13:13
oriba has joined #ocaml
13:20
samrat has joined #ocaml
13:23
bjorkintosh has quit [Ping timeout: 250 seconds]
13:25
Submarine has joined #ocaml
13:28
bjorkintosh has joined #ocaml
13:43
zpe has joined #ocaml
13:47
ollehar has quit [Ping timeout: 255 seconds]
13:52
BitPuffin has joined #ocaml
13:53
parcs has quit [Read error: Connection reset by peer]
13:53
Denommus has joined #ocaml
13:54
parcs has joined #ocaml
13:58
zpe has quit [Remote host closed the connection]
13:59
zpe has joined #ocaml
14:03
zpe has quit [Ping timeout: 244 seconds]
14:05
maattdd has joined #ocaml
14:10
maattdd has quit [Ping timeout: 264 seconds]
14:12
sad0ur_ has quit [Quit: leaving]
14:13
slash^ has joined #ocaml
14:17
jbrown has joined #ocaml
14:18
samrat has quit [Quit: Computer has gone to sleep.]
14:21
lordkryss has joined #ocaml
14:23
pjdelport has quit [Quit: Connection closed for inactivity]
14:27
fold has joined #ocaml
14:33
englishm_ has joined #ocaml
14:33
jbrown has quit [Read error: Connection timed out]
14:34
jbrown has joined #ocaml
14:36
travisbrady has joined #ocaml
14:50
jbrown has quit [Read error: Connection timed out]
14:51
jbrown has joined #ocaml
14:51
agarwal1975 has joined #ocaml
14:51
samrat has joined #ocaml
14:55
nojb has joined #ocaml
14:57
<
nojb >
>> Fatal error: cannot open implicit module "Pervasives"
14:57
<
nojb >
Fatal error: exception Misc.Fatal_error
14:57
<
nojb >
when calling Runcode.run in a program compiled using metaocamlc ... any ideas ?
15:02
<
ygrek >
show the code?
15:03
<
nojb >
it is part of a long program - let me see if I can make a small example
15:06
maattdd has joined #ocaml
15:09
<
nojb >
ygrek: never mind - now it works; apparently metaocaml doesn't like .cma's...
15:10
zpe has joined #ocaml
15:10
maattdd has quit [Ping timeout: 240 seconds]
15:12
travisbrady has quit [Quit: travisbrady]
15:13
dsheets_ has quit [Quit: Leaving]
15:14
zpe has quit [Ping timeout: 245 seconds]
15:16
dsheets has joined #ocaml
15:28
englishm_ has quit [Remote host closed the connection]
15:29
englishm has joined #ocaml
15:33
englishm has quit [Ping timeout: 255 seconds]
15:35
hhugo has joined #ocaml
15:42
ollehar has joined #ocaml
15:43
dsheets has quit [Quit: Leaving]
15:45
slash^ has quit [Read error: Connection reset by peer]
15:48
nojb has quit [Read error: Connection reset by peer]
15:49
_twx_ has joined #ocaml
15:50
slash^ has joined #ocaml
15:50
hhugo has quit [Quit: Leaving.]
15:52
pjdelport has joined #ocaml
15:54
hhugo has joined #ocaml
15:58
pminten has joined #ocaml
16:00
ollehar has quit [Ping timeout: 255 seconds]
16:02
manizzle has quit [Ping timeout: 244 seconds]
16:02
pminten has quit [Remote host closed the connection]
16:04
isBEKaml_mobile has joined #ocaml
16:05
isBEKaml_mobile has left #ocaml [#ocaml]
16:05
ollehar has joined #ocaml
16:05
ollehar has quit [Client Quit]
16:06
maattdd has joined #ocaml
16:11
maattdd has quit [Ping timeout: 245 seconds]
16:11
BitPuffin has quit [Remote host closed the connection]
16:18
jbrown has quit [Ping timeout: 256 seconds]
16:26
mcclurmc has joined #ocaml
16:29
hhugo has quit [Quit: Leaving.]
16:32
jbrown has joined #ocaml
16:34
travisbrady has joined #ocaml
16:34
_0xAX has joined #ocaml
16:36
hausdorff has joined #ocaml
16:36
ollehar has joined #ocaml
16:45
hhugo has joined #ocaml
16:47
_0xAX has quit [Remote host closed the connection]
17:01
slash^ has quit [Read error: Connection reset by peer]
17:05
rishabhjain has joined #ocaml
17:08
maattdd has joined #ocaml
17:13
maattdd has quit [Ping timeout: 264 seconds]
17:16
ollehar has quit [Ping timeout: 256 seconds]
17:17
philtor has joined #ocaml
17:18
isomorphismes has quit [Ping timeout: 260 seconds]
17:19
travisbrady has quit [Quit: travisbrady]
17:19
philtor_ has joined #ocaml
17:20
isomorphismes has joined #ocaml
17:21
tac has joined #ocaml
17:25
samrat has quit [Ping timeout: 264 seconds]
17:27
samrat has joined #ocaml
17:27
tane has quit [Quit: Verlassend]
17:28
hhugo has quit [Quit: Leaving.]
17:31
hhugo has joined #ocaml
17:34
fraggle_laptop has joined #ocaml
17:36
ygrek has quit [Ping timeout: 260 seconds]
17:39
ygrek has joined #ocaml
17:40
hausdorff has quit [Remote host closed the connection]
17:41
fold has quit [Ping timeout: 240 seconds]
17:44
dsheets has joined #ocaml
17:45
waneck has joined #ocaml
17:46
hausdorff has joined #ocaml
17:47
hhugo has quit [Quit: Leaving.]
17:47
hausdorf_ has joined #ocaml
17:49
rishabhjain has quit [Ping timeout: 260 seconds]
17:50
philtor_ has quit [Ping timeout: 255 seconds]
17:55
divyanshu has joined #ocaml
18:01
tane has joined #ocaml
18:01
oriba_ has joined #ocaml
18:02
jbrown has quit [Ping timeout: 256 seconds]
18:05
oriba has quit [Ping timeout: 250 seconds]
18:08
hhugo has joined #ocaml
18:08
maattdd has joined #ocaml
18:10
hausdorf_ has quit [Remote host closed the connection]
18:11
hausdorf_ has joined #ocaml
18:11
lordkryss has quit [Quit: Connection closed for inactivity]
18:13
hhugo has quit [Quit: Leaving.]
18:13
maattdd has quit [Ping timeout: 255 seconds]
18:15
jbrown has joined #ocaml
18:15
hausdorf_ has quit [Ping timeout: 244 seconds]
18:15
Kakadu has quit [Quit: Konversation terminated!]
18:15
vincom2 has quit [Remote host closed the connection]
18:16
Kakadu has joined #ocaml
18:16
vincom2 has joined #ocaml
18:18
vincom2 has quit [Remote host closed the connection]
18:18
vincom2 has joined #ocaml
18:20
ollehar has joined #ocaml
18:20
ollehar has quit [Client Quit]
18:21
travisbrady has joined #ocaml
18:22
divyanshu has quit [Ping timeout: 240 seconds]
18:22
vincom2 has quit [Remote host closed the connection]
18:23
vincom2 has joined #ocaml
18:23
samrat has quit [Ping timeout: 245 seconds]
18:24
hausdorff has quit [Remote host closed the connection]
18:24
hausdorff has joined #ocaml
18:25
hausdorff has quit [Remote host closed the connection]
18:25
hausdorff has joined #ocaml
18:25
divyanshu has joined #ocaml
18:27
tac has quit [Ping timeout: 255 seconds]
18:28
fold has joined #ocaml
18:30
hausdorff has quit [Ping timeout: 250 seconds]
18:31
manizzle has joined #ocaml
18:32
ygrek has quit [Ping timeout: 240 seconds]
18:32
manizzle has quit [Max SendQ exceeded]
18:33
travisbrady has quit [Quit: travisbrady]
18:33
pjdelport has quit [Quit: Connection closed for inactivity]
18:36
mcclurmc has quit [Remote host closed the connection]
18:37
mcclurmc has joined #ocaml
18:39
ontologiae has joined #ocaml
18:40
divyanshu has quit [Ping timeout: 244 seconds]
18:42
mcclurmc has quit [Ping timeout: 255 seconds]
18:43
hausdorff has joined #ocaml
18:49
thomasga has quit [Quit: Leaving.]
19:00
thomasga has joined #ocaml
19:00
thomasga has quit [Client Quit]
19:02
dotfelix has joined #ocaml
19:09
maattdd has joined #ocaml
19:10
samrat has joined #ocaml
19:13
maattdd has quit [Ping timeout: 245 seconds]
19:29
dotfelix has quit [Quit: Leaving]
19:30
Anarchos has joined #ocaml
19:40
j__ has joined #ocaml
19:54
hausdorff has quit [Remote host closed the connection]
19:54
rgrinberg has joined #ocaml
19:55
paddymahoney has quit [Read error: Connection reset by peer]
19:59
BitPuffin has joined #ocaml
20:00
hausdorff has joined #ocaml
20:02
samrat has quit [Quit: Computer has gone to sleep.]
20:10
maattdd has joined #ocaml
20:14
maattdd has quit [Ping timeout: 240 seconds]
20:18
pyon has quit [Read error: Connection reset by peer]
20:23
<
j__ >
#j rust-gamedev
20:32
Hannibal_Smith has quit [Quit: Sto andando via]
20:38
pyon has joined #ocaml
20:38
artagnon has joined #ocaml
20:38
artagnon has left #ocaml [#ocaml]
20:40
artagnon has joined #ocaml
20:41
<
artagnon >
(OCaml LLVM bindings) How do I create a vector of size specified by llvalue?
20:43
axiles has quit [Remote host closed the connection]
20:43
dsheets has quit [Read error: Connection reset by peer]
20:48
<
whitequark >
artagnon: you can't
20:48
<
whitequark >
that's not how vectors work
20:49
<
artagnon >
Do you have any ideas on how to store and retrieve a vector from a struct with an element pointer?
20:50
joncfoo has joined #ocaml
20:50
<
whitequark >
cast it to a vector
20:50
<
artagnon >
Of what size?
20:50
<
whitequark >
if you need to handle several different vector sizes, use a switch statement
20:50
<
artagnon >
What do you mean?
20:50
<
whitequark >
it only makes sense to use the few vector widths supported by your hardware, anyway
20:51
<
whitequark >
vectors aren't like arrays, they're only for SIMD operations
20:52
<
artagnon >
I got that. I have a vector of integers.
20:52
<
artagnon >
But I need to box and unbox it because my language is dynamically typed.
20:53
<
artagnon >
Note that I'm using the constant "3" on the vector_size for unboxing.
20:53
<
whitequark >
as I've said, use a switch
20:53
<
artagnon >
Can you elaborate on that?
20:53
<
whitequark >
well, actually, scratch that
20:54
<
whitequark >
you aren't going to use vectors with a language like that
20:54
<
whitequark >
(use a switch) generate several code paths for every possible vector size
20:54
<
artagnon >
But how do I know the vector size?
20:54
<
artagnon >
While unboxing.
20:54
<
whitequark >
your language is dynamically typed, you must keep that information somewhere
20:55
<
artagnon >
Okay, so I keep it in a field in my struct.
20:55
<
artagnon >
It's an llvalue.
20:55
<
artagnon >
Now what?
20:55
<
whitequark >
now you compare it with 2, if it is, you unpack into a vector of size 2
20:55
<
whitequark >
repeat for 3, 4, ...
20:56
<
whitequark >
but this is useless, because you can't push the result on stack or basically do anything useful whatsoever with it
20:56
<
whitequark >
since for every vector operation you need to know the vector size as well
20:56
<
artagnon >
Yeah, that happens while unboxing.
20:57
<
whitequark >
ah, so you codegen unbox+op+box?
20:57
<
artagnon >
So, if I add two vectors, they're boxed into value_t and then unboxed.
20:57
<
whitequark >
that would work, but the problem is that this pattern will be simply very inefficient
20:57
<
artagnon >
That's how a dynamically typed language works.
20:58
<
whitequark >
so? it doesn't change the fact that it is useless
20:58
<
whitequark >
since you will only have marginal, if any, speedup
20:58
<
artagnon >
What do you propose I do?
20:58
<
artagnon >
Scrap vectors?
20:58
<
whitequark >
or dynamic typing
20:58
<
whitequark >
either works :)
20:58
<
artagnon >
I can't scrap dynamic typing. The language is a Lisp.
20:58
<
whitequark >
well, you can also add a specializing JIT
20:59
<
whitequark >
which would use type information
20:59
<
whitequark >
to unbox values over a much wider scope
20:59
<
whitequark >
but that's pretty hard to do
20:59
<
whitequark >
also, LLVM kinda sucks at JITing
20:59
<
artagnon >
Wait, even array_type requires an int; can't take an llvalue.
21:01
<
artagnon >
Wait, can I keep track of the sizes of vectors in OCaml?
21:02
<
artagnon >
The problem turns into identifying vectors while unboxing.
21:03
travisbrady has joined #ocaml
21:08
sad0ur has joined #ocaml
21:11
maattdd has joined #ocaml
21:12
pjdelport has joined #ocaml
21:13
Simn has quit [Quit: Leaving]
21:15
travisbrady has quit [Quit: travisbrady]
21:15
maattdd has quit [Ping timeout: 240 seconds]
21:20
<
whitequark >
you need to store the vector size together with its value
21:21
<
artagnon >
I've done that.
21:21
<
whitequark >
okay, so what's the problem?
21:21
<
artagnon >
The switch statement.
21:21
<
artagnon >
I can compare the size llvalue to the constant llvalue N, and I get another llvalue.
21:22
<
dmbaturin >
Do type constructors have to be capitalized?
21:22
<
dmbaturin >
Ah, this explains where the syntax error is.
21:23
<
whitequark >
switch i32 %vector_size, label %wtf [ i32 2, label %two, i32 3, label %three, ... ]
21:24
<
whitequark >
then at two: codegen the code for <2 x i32>, etc
21:24
<
artagnon >
Oh, my bad. I thought you meant in OCaml.
21:24
<
artagnon >
The switch statement is quite a hack.
21:24
<
artagnon >
How many sizes can I handle?
21:25
rgrinberg has quit [Quit: Leaving.]
21:26
<
whitequark >
I could answer that question, but I wouldn't, because I believe you are misunderstanding what vectors are useful for
21:27
<
Anarchos >
whitequark the margin is too thin ?
21:27
<
whitequark >
SIMD gives you a lot of benefit when you have large contiguous areas of unboxed data without branches
21:27
<
whitequark >
you have the direct opposite of that configuration
21:28
rgrinberg has joined #ocaml
21:29
<
artagnon >
I'll change it into arrays then.
21:29
<
joncfoo >
is there a mirror of the default opam.ocaml.org repository?
21:29
<
artagnon >
Just s/vector/array/ -- same code, right?
21:30
<
whitequark >
um, no?
21:30
<
whitequark >
you can't add arrays
21:30
<
whitequark >
like add [i32 x 4] %a, %b
21:30
<
artagnon >
I meant the boxing/ unboxing stuff.
21:31
<
whitequark >
do you want to unbox the entire array? O_o
21:31
<
whitequark >
and anyway, that's even more pointless, since array sizes are effectively unbounded
21:32
<
artagnon >
Then what composite type can I have in my language? :|
21:33
<
whitequark >
anything you want, but you have to lower it into instructions that LLVM supports (gep in this case) yourself
21:33
tac has joined #ocaml
21:35
<
artagnon >
Sounds like a huge pain :/
21:35
<
artagnon >
I'll try to implement a linked list though.
21:36
<
artagnon >
Just that I'll be left with very basic LLVM instructions to operate on my data.
21:36
<
joncfoo >
I keep getting timed out
21:36
<
artagnon >
Thanks though.
21:37
<
whitequark >
writing your own compiler is a huge pain, duh
21:49
joncfoo has quit [Quit: Leaving]
21:52
<
dmbaturin >
What is the motivation behind requirement to have type constructors capitalized?
21:53
<
whitequark >
disambiguation with values, I suppose?
21:54
<
dmbaturin >
Ah, so values
_cannot_ be capitalized. Now it makes sense.
21:55
fold has quit [Ping timeout: 260 seconds]
21:55
<
dmbaturin >
Manuals I've found don't emphasize it for some reason.
21:57
shinnya has quit [Ping timeout: 250 seconds]
22:02
tane has quit [Quit: Verlassend]
22:04
shinnya has joined #ocaml
22:11
Kakadu has quit [Quit: Konversation terminated!]
22:11
maattdd has joined #ocaml
22:16
maattdd has quit [Ping timeout: 244 seconds]
22:17
<
whitequark >
please read the LLVM LangRef.
22:17
jave has joined #ocaml
22:17
<
artagnon >
I think I'm using block_of_value incorrectly.
22:17
<
whitequark >
you are. what do you even expect that to do?
22:17
<
artagnon >
I did read it.
22:17
<
artagnon >
Create a block with that value?
22:19
<
artagnon >
add_case takes llbasicblock destinations.
22:19
<
artagnon >
So, I tried creating an llbasicblock out of an llvalue.
22:21
philtor_ has joined #ocaml
22:23
<
whitequark >
block_of_value is a conversion function
22:23
<
whitequark >
it takes an llvalue, which must already refer to a basic block, and returns llbasicblock
22:23
<
whitequark >
it doesn't create anything
22:25
<
whitequark >
basically, llvalue input and llbasicblock output refer to the exact same thing
22:28
philtor_ has quit [Remote host closed the connection]
22:30
<
artagnon >
So, how do I create a basicblock containing an llvalue?
22:30
<
whitequark >
using llbuilder.
22:31
j__ has quit [Ping timeout: 244 seconds]
22:31
<
artagnon >
insertion_block then.
22:33
darkf has joined #ocaml
22:35
<
artagnon >
How do I insert an llvalue into the llbasicblock?
22:38
<
whitequark >
insert_into_builder
22:38
<
artagnon >
I was thinking add_destination.
22:39
<
whitequark >
"add_destination br bb adds the basic block bb as a possible branch location for the indirectbr instruction br. See the method llvm::IndirectBrInst::addDestination. *"
22:39
<
whitequark >
I'm not sure why you consider add_destination relevant at all
22:40
<
artagnon >
From the signature.
22:40
<
artagnon >
Never mind.
22:40
rgrinberg has quit [Quit: Leaving.]
22:40
<
whitequark >
I do think you should read the documentation before trying to use a function.
22:43
<
artagnon >
I tried insert_into_builder (vec n) "vecN" builder; insertion_block builder
22:44
<
artagnon >
... but that returns an error.
22:44
jave has quit [Read error: No route to host]
22:44
<
whitequark >
I'm not going to answer any more questions until you read documentation for all the functions you use.
22:44
jave has joined #ocaml
22:45
jao has joined #ocaml
22:45
jao has quit [Changing host]
22:45
jao has joined #ocaml
22:49
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
22:49
<
artagnon >
So, I tried calling insertion_block first and then insert_into_builder, returning the llbasicblock.
22:49
<
whitequark >
No, really, read the documentation.
22:53
<
artagnon >
I read and re-read the docstrings. I don't know what I'm missing.
22:53
<
artagnon >
insertion_block returns the basic block that the builder is positioned to insert into.
22:53
<
artagnon >
And insert_into_builder inserts the instruction at the position specified by llbuilder.
22:55
<
whitequark >
okay, good
22:55
<
whitequark >
the problem you have is that you're still inserting into the same basic block as before, because none of the functions you invoked create a new basic block
22:55
<
whitequark >
you need to append_block and then position_at_end
22:56
* artagnon
tries that
22:56
rgrinberg has joined #ocaml
23:06
<
artagnon >
I get a very unhelpful V->getParent() == 0 && "Value already in a container!!"
23:12
maattdd has joined #ocaml
23:17
maattdd has quit [Ping timeout: 260 seconds]
23:20
jave has quit [Read error: No route to host]
23:20
jave has joined #ocaml
23:26
thomasga has joined #ocaml
23:34
madroach has quit [Ping timeout: 250 seconds]
23:35
madroach has joined #ocaml
23:36
rgrinberg has quit [Quit: Leaving.]
23:40
NoNNaN has quit [Remote host closed the connection]
23:40
NoNNaN has joined #ocaml
23:43
q66 has quit [Remote host closed the connection]
23:46
bbarker has joined #ocaml
23:48
rgrinberg has joined #ocaml
23:50
<
dmbaturin >
How do I define a type constructor that takes a list of lists of something?
23:50
philtor_ has joined #ocaml
23:50
tac has quit [Quit: Leaving]
23:52
<
Drup >
you want an heterogeneous list or just a polymorphic datatype ?
23:52
BitPuffin has quit [Ping timeout: 263 seconds]
23:53
<
Drup >
let me reformulate : do you want a list where you can put anything, or a list of all the same something, but you don't know which something yet ?
23:53
<
whitequark >
artagnon: you already put that instruction somewhere, then...
23:54
<
dmbaturin >
Drup: I want a type to represent context-free grammar production rules. Every rule may include multiple terminals and non-terminals on the right side.
23:54
<
whitequark >
artagnon: if (vec n) builds the llvalue, then it has just inserted it into this very basic block
23:56
<
Drup >
dmbaturin: and what is the representation of your terminal/non-termintals ?
23:56
<
dmbaturin >
Drup: That's what I'm trying to come up with. :)
23:56
<
Drup >
well, let's assume you have made up your mind about that, and you have a type "terminal" and "nonterminal" ready
23:57
<
dmbaturin >
The current idea is to make symbol type that can be terminal (string) or nonterminal, and non-terminal can be a list of terminals and non-terminals.
23:57
<
dmbaturin >
Or symbols, that is.
23:57
<
artagnon >
whitequark: Yeah, (vec n) builds an an llvalue.
23:57
<
whitequark >
so it's already inserted then
23:58
<
artagnon >
No need to insert_into_builder?
23:58
<
Drup >
type terminal = string
23:58
<
Drup >
and nonterminal = symbol list
23:58
<
Drup >
and symbol = Term of terminal | NonTerm of nonterminal ;;
23:58
<
Drup >
dmbaturin: something like that.
23:59
<
artagnon >
whitequark: I'm getting errors about missing basic block terminators.
23:59
<
Drup >
dmbaturin: note that two of these "definitions" are not really defining anything, they are simply giving new names to something that already exists
23:59
<
whitequark >
again, please, read the relevant LangRef parts
23:59
jao has quit [Ping timeout: 240 seconds]