--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/81770a76-0bf2-4fc3-84ae-0372b7f94077%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/69535c5c-eac3-472c-bb39-062ad4708a72%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/e608c7bb-42ce-457b-a606-9fe3525f801d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/e608c7bb-42ce-457b-a606-9fe3525f801d%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/34dfad01-9bd4-464f-9ccd-6dfae8207f4c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/34dfad01-9bd4-464f-9ccd-6dfae8207f4c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/c2f9d2b7-61f5-4142-b8b2-930147ee589d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/c2f9d2b7-61f5-4142-b8b2-930147ee589d%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/d78409e2-aff1-4b96-98f3-eb3a5d20ff95%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/d78409e2-aff1-4b96-98f3-eb3a5d20ff95%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/716c8c61-d535-412d-8584-d4030d20801d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/716c8c61-d535-412d-8584-d4030d20801d%40googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/ats-lang-users" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/group/ats-lang-users';return true;" onclick="this.href='https://groups.google.com/group/ats-lang-users';return tr
Tangential to the topic of monads: Do you know if someone has thought about the relations between ATS and "enriched effect calculus" (as described in http://homepages.inf.ed.ac.uk/als/Research/Sources/eec.pdf) or "linear state monads" (as mentioned in https://arxiv.org/pdf/1403.1477.pdf)? There is a clear analogy. Implementing a concept such as a linear state monad in ATS would be nice, I think. Monadic programming on an Arduino, anyone? =) It would certainly be a unique selling point.
Tangential to the topic of monads: Do you know if someone has thought about the relations between ATS and "enriched effect calculus" (as described in http://homepages.inf.ed.ac.uk/als/Research/Sources/eec.pdf) or "linear state monads" (as mentioned in https://arxiv.org/pdf/1403.1477.pdf)? There is a clear analogy. Implementing a concept such as a linear state monad in ATS would be nice, I think. Monadic programming on an Arduino, anyone? =) It would certainly be a unique selling point.
I can't really follow these monad papers. Too much for me :)
Given your background, maybe you could give this a try?
Over the years, I have gradually grown more and more cynic about "theoretic" research
in the area of programming languages. I feel that the most urgent issue in programming is
to find effective approaches to reducing programming complexity.
For instance, in your csv parser, there are a lot of if-then-else's. Maybe you took them from
some Haskel code. The point is that if-then-else's make programming hard to write and harder
to read/follow. I propose the following style:
1) Implementing a csv parser without worrying about quotes (DQUOT). Call this version 1.
2) Using templates to improve version 1 without directly modifying version 1. Another way
to put it: you still have version 1 available after doing the improvement.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/f19d1d97-1aa7-40a2-83e3-d779c3f674b8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/f19d1d97-1aa7-40a2-83e3-d779c3f674b8%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/d38dfda3-e1f5-4633-a6ae-ef6274e95fb3%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/d38dfda3-e1f5-4633-a6ae-ef6274e95fb3%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/67332c80-cfb4-4349-a7de-2326d99b037c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/5b1f1046-0664-447d-8ffc-bdcbb81981eb%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/5b1f1046-0664-447d-8ffc-bdcbb81981eb%40googlegroups.com.
...
Hi!
I'm in over my head and tried writing a CSV-parser using linear lazy streams. My code thus far is 600 lines and almost to my own surprise I get it to compile! However, there is something fishy because I get a segfault when applying my program to an actual CSV-file. I've been trying to debug using gdb but the fault eludes me. Since I don't expect anyone to mull through 600 lines of code, I am hoping these code snippets are enough for one of you guys to give me some advice.
This code executes just fine:
implement main0 () = {
val test = stream_vt_make_cons(
'a', stream_vt_make_cons(
';', stream_vt_make_sing('b'))) (* the stream ('a', ';', 'b') *)
val lexed = lex_csv(true, ';', test)
val h = (lexed.head())
val- CSV_Field(r) = h
val a = r.csvFieldContent
val () = println!(a)
}
Here [lex_csv] is my 600-line alogrithm. It reads a [stream_vt(char)] and gives back a [stream_vt(CSVEntry)], where [CSVEntry] is a record type, one of whose fields is [CSVFieldContent]. When executing the program I get "a" printed to the console.
This code results in a segfault:
implement main0 () = {
val inp = fileref_open_exn("small.csv", file_mode_r)
val ins = streamize_fileref_char(inp)
val lexed = lex_csv(true, ';', ins)
val () = fileref_close(inp)
val h = (lexed.head())
val- CSV_Field(r) = h
val a = r.csvFieldContent
val () = println!(a)
}