samth changed the topic of #racket to: Racket v7.3 has been released: https://blog.racket-lang.org/2019/05/racket-v7-3.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
<lexi-lambda> technomancy: named let is normally used for that sort of thing
<technomancy> hm; I see. I don't think I have that in microscheme
<technomancy> (sorry; that wasn't really a racket-specific question I guess)
juanfra has quit [Ping timeout: 246 seconds]
lockywolf_ has quit [Ping timeout: 272 seconds]
<lexi-lambda> named let is in R5RS, R6RS, and R7RS
<technomancy> yeah, microscheme is ... not really a scheme =)
<technomancy> it's whole schtick is "let's write code that runs in in 2.5kb of memory but at least you can use a reasonable syntax"
<technomancy> https://ryansuchocki.github.io/microscheme/ for arduinos and friends
<technomancy> (I'm writing a microscheme program and testing it using racket because testing anything on a microcontroller that doesn't have a repl is unbearably tedious)
<lexi-lambda> given that named let is just syntactic sugar for having another function, I don’t think the memory constraints matter in this particular case
<technomancy> true; I guess it has more to do with microscheme being very immature =)
<technomancy> it's just some guy's masters thesis afaict
<technomancy> oh, not even that. final-year undergrad project.
enderby has quit [Ping timeout: 246 seconds]
clacke_movim has joined #racket
sleepnap has quit [Quit: Leaving.]
cromyr has quit [Quit: leaving]
cromyr has joined #racket
vraid has quit [Ping timeout: 252 seconds]
sleepnap has joined #racket
lockywolf has joined #racket
sleepnap has quit [Ping timeout: 248 seconds]
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 248 seconds]
ym555_ has quit [Quit: leaving...]
keep_learning_M has joined #racket
juanfra has joined #racket
dddddd has quit [Remote host closed the connection]
jcowan has joined #racket
FreeFull has quit []
jao has quit [Remote host closed the connection]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 268 seconds]
clacke_movim has left #racket [#racket]
jokul has left #racket ["Leaving"]
lockywolf__ has quit [Ping timeout: 268 seconds]
iclon_ has joined #racket
iclon has quit [Ping timeout: 258 seconds]
enderby has joined #racket
lockywolf has joined #racket
lockywolf_ has joined #racket
<J_Arcane> but have you heard about named lambda
lockywolf has quit [Ping timeout: 246 seconds]
jokul has joined #racket
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 272 seconds]
lockywolf_ has joined #racket
lockywolf__ has quit [Ping timeout: 246 seconds]
lockywolf_ has quit [Read error: Connection reset by peer]
lockywolf_ has joined #racket
jokul has quit [Remote host closed the connection]
clacke_movim has joined #racket
jokul has joined #racket
clacke_movim has left #racket [#racket]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 245 seconds]
lockywolf_ has joined #racket
lockywolf__ has quit [Ping timeout: 246 seconds]
lockywolf__ has joined #racket
clacke_movim has joined #racket
lockywolf_ has quit [Ping timeout: 246 seconds]
lockywolf_ has joined #racket
lockywolf__ has quit [Read error: Connection reset by peer]
notzmv has quit [Ping timeout: 245 seconds]
_whitelogger has joined #racket
ATuin has joined #racket
casaca has joined #racket
clacke_movim has left #racket [#racket]
endformationage has quit [Quit: WeeChat 2.5]
ATuin has quit [Ping timeout: 245 seconds]
clacke_movim has joined #racket
iclon__ has joined #racket
iclon_ has quit [Ping timeout: 245 seconds]
sauvin has joined #racket
Sgeo_ has joined #racket
Sgeo has quit [Ping timeout: 244 seconds]
lockywolf has joined #racket
lockywolf_ has quit [Ping timeout: 246 seconds]
lockywolf has quit [Ping timeout: 248 seconds]
clacke_movim has left #racket [#racket]
davidl has quit [Quit: WeeChat 2.1]
clacke_movim has joined #racket
manualcrank has quit [Quit: WeeChat 1.9.1]
DGASAU has quit [Ping timeout: 248 seconds]
zipper has joined #racket
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
lockywolf has joined #racket
zipper has quit [Ping timeout: 248 seconds]
clacke_movim has left #racket [#racket]
zipper has joined #racket
clacke_movim has joined #racket
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
vraid has joined #racket
<m1dnight_> I'm reading the paper "Reification: reflection without metaphysics" by Friedman and Wand.
<m1dnight_> Does anyone happen to know if there is an implementation of Brown (the language they introduce) somewhere to be found?
<m1dnight_> (I know it's a long shot, but one can only ask :)
orivej has quit [Ping timeout: 246 seconds]
DGASAU has joined #racket
lockywolf has quit [Remote host closed the connection]
lockywolf has joined #racket
keep_learning_M has quit [Quit: This computer has gone to sleep]
lockywolf has quit [Remote host closed the connection]
lockywolf has joined #racket
zipper has quit [Ping timeout: 245 seconds]
zipper has joined #racket
thallada has quit [Ping timeout: 248 seconds]
zipper has quit [Ping timeout: 268 seconds]
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 245 seconds]
zipper has joined #racket
zipper has quit [Ping timeout: 244 seconds]
thallada has joined #racket
zipper has joined #racket
dddddd has joined #racket
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 258 seconds]
dmiles has quit [Ping timeout: 248 seconds]
dmiles has joined #racket
zipper has quit [Ping timeout: 272 seconds]
pierpal has joined #racket
lockywolf__ has quit [Ping timeout: 258 seconds]
zipper has joined #racket
jao has joined #racket
pierpal has quit [Ping timeout: 246 seconds]
iyzsong has joined #racket
zipper has quit [Ping timeout: 245 seconds]
zipper has joined #racket
orivej has joined #racket
jao has quit [Ping timeout: 272 seconds]
lockywolf has joined #racket
lockywolf_ has joined #racket
<jcowan> m1dnight_: I should have source code for you in a few minutes
<m1dnight_> Yay! :) Thanks a bunch jcowan
lockywolf has quit [Ping timeout: 245 seconds]
<jcowan> Although the freely available paper is just a scan, the one behind the paywall (thank you sci-hub.tw) was OCRed at some point, probably by ACM. I have go through and fix all the OCR errors.
miskatonic has joined #racket
<jcowan> "C" for "(", "abe" and "ribs" for "abs", etc.
<m1dnight_> Oh, but don't type it over. That's the exact reason i was asking :D
<m1dnight_> If that's what you're offering I'll do it too, and share.
<jcowan> No, not retyping. Cutting and pasting, fixing OCR errors, then formatting in Emacs, that should be it.
<m1dnight_> Oh great. Didn't think of sci-hub in this case though.
<m1dnight_> Thanks a bunch :)
teardown has quit [Read error: Connection reset by peer]
jao has joined #racket
<jcowan> I always think of sci-hub. :-)
<jcowan> There are an incredible number of weird OCRings of "scheme", which after all is an ordinary English word, not like "abs".
<jcowan> schene, schame, other weird things I fixed on sight and can't even remember
jao has quit [Ping timeout: 245 seconds]
iclon__ has quit [Ping timeout: 248 seconds]
iclon has joined #racket
lockywolf__ has joined #racket
iclon has quit [Ping timeout: 258 seconds]
iclon has joined #racket
lockywolf_ has quit [Ping timeout: 258 seconds]
<zipper> Hello guys. I've build a graph out of an association list. Let me actually call it an association dict.
<zipper> The reason I did this was to avoid duplicates.
<zipper> Anyway I would like to insert nodes into the graph. How to go about that is dependent on traversing the graph and finding the node
<zipper> One thing is that the dict can be converted to a list then ordered by value
lockywolf__ has quit [Ping timeout: 245 seconds]
<zipper> this would make finding the node and inserting happen in o(1) time
<zipper> However I think it would be cheaper to just use a graph traversal method that acts in log time such as djikstra to find the best adjacent node and insert it.
<zipper> *I meant adjacency not association list
<zipper> What do you guys think?
lockywolf has joined #racket
manualcrank has joined #racket
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
iclon has quit [Read error: Connection reset by peer]
iclon has joined #racket
iclon has quit [Ping timeout: 248 seconds]
iclon has joined #racket
efm has joined #racket
sleepnap has joined #racket
iyzsong has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 245 seconds]
zipper has quit [Ping timeout: 246 seconds]
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 258 seconds]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 245 seconds]
endobson has joined #racket
<endobson> Racket seems to use 0 counting for column numbers (https://docs.racket-lang.org/reference/exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29), but 1 based counting for row number. Does anyone know why this is?
<endobson> Vim seems to use 1 based column numbers, and so does clang
<endobson> I'm trying to make a this decision for a project of mine and trying and I based it off racket's decision originally assuming it was standard and now rethinking that when that assumption seems to not be true
jao has joined #racket
lockywolf__ has quit [Ping timeout: 248 seconds]
lockywolf has joined #racket
euhmeuh has left #racket [#racket]
vraid has quit [Quit: Leaving]
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 272 seconds]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 244 seconds]
zipper has joined #racket
<greghendershott> endobson: Great question. I know in Emacs lines are 1 and columns are 0. But I don't know the rationale.
<greghendershott> Somewhat related trivia: some Racket messages use file:line:col but others file:line.col -- : vs .
<greghendershott> This is a small nuisance configuring stuff like compilation-mode ("jump to error") in Emacs
<endobson> greghendershott: Thanks. My guess is racket is based off emacs then.
<greghendershott> It might be rackunit that's inconsistent using the . but I can't recall exactly right now
<endobson> and I might be able to find more history for emacs
<greghendershott> endobson: Yeah it's probably from that family tree.
<endobson> clang uses file:line:col
<greghendershott> My memory may be faulty but I /think/ once upon a time error messages tended to be just line numbers, like, columns were a hopeless luxury :)
<endobson> My current project doesn't have line numbers at all right now
<endobson> and my ability to work with that has finally reached a breaking point
* greghendershott cues Monty Python you-were-lucky-to-live-in-a-shoebox skit
<endobson> but since I was the one who didn't originally implement them, all I can blame is my lazy former self
<greghendershott> To make up for that, you should work hard to report errors now using Roman numerals.
<greghendershott> Folks love that in error messages.
<endobson> Have you seen that?
<greghendershott> l0l no I hadn't.
<endobson> One of the ways that racket is too powerful for its own good
<greghendershott> I mean, it's Racket, /of course/ someone already thought of that.
<greghendershott> I've stopped trying to come up with original ideas. :)
<zipper> Has anyone seen my question?
<endobson> zipper: I did not. And it seems we aren't logging chat anymore
<endobson> what was it?
ziyourenxiang has quit [Ping timeout: 268 seconds]
orivej has joined #racket
jao has quit [Ping timeout: 245 seconds]
<zipper> I've built a graph out of an association hash table (list).
<zipper> The reason I did this was to avoid duplicates.
<zipper> I would like to insert nodes into the graph. How to go about that is dependent on traversing the graph and finding the node.
<zipper> A thing to note about the nodes is that they contain ordering data but because they're in a dict I can't really order them
<zipper> Just integers
<zipper> One thing is that the dict can be converted to a list then ordered by value
enderby has quit [Ping timeout: 258 seconds]
<zipper> This would make finding the node and inserting happen in o(1) time
<zipper> I meant adjacency list
<zipper> Anyway I think it would be cheaper to just use a graph traversal method that acts in log time such as djikstra to find the best adjacent node and insert it.
<zipper> Because of the cost of converting a dict to a list and ordering it
<zipper> Maybe it's more of an algorithms problem
<zipper> What do you guys think?
<endobson> Are you just inserting a node or are you also inserting edges?
<zipper> endobson: Both nodes and edges
<zipper> I have to edit/break some edges
<endobson> Is your graph directed?
<zipper> yes it's directed
<endobson> let me see if I understand we have Graph := (HashTable Node (List Node)) where an entry in the hash table indicates presence of the node and the value is the adjacent nodes
<endobson> or are you using an assoc list and so Graph := (Listof (Cons Node (List Node)))
<zipper> endobson: I'm using a dict to avoid duplicates
<zipper> I have slow internet one sec
<endobson> I like the data structure with the HashTable. What operation do you need to convert to a list and order it?
casaca has quit [Ping timeout: 245 seconds]
<zipper> I would just call `hash->list` and then call `sort` by `offset` which is a field in the values
<endobson> But why do you need the output of that?
casaca has joined #racket
<zipper> Say the graph has nodes 1 -> 2 -> 3 -> 5 and I want to insert a node 4 between 3 and 5 to make 1 -> 2 -> 3 -> 4 -> 5
<zipper> I could use list-ref to jump to between 3 and 5
<zipper> *to extract 3 and change it's `adjacentedge list`
<endobson> This seems like it is (remove-edge 3 5) (add-node 4) (add-edge 3 4) (add-edge 3 5)
<endobson> This seems like it is (remove-edge 3 5) (add-node 4) (add-edge 3 4) (add-edge 4 5)
<endobson> fixed
<endobson> None of that requires the order
<zipper> I'd need to find node 3
<zipper> I want to make finding node 3 happen as fast as possible
<endobson> Isn't that your (get-node g #:id 3) function
<zipper> Ha! that gets the node by ID
<zipper> but I'd want to find it by offset
<zipper> Okay let me give you some background
<zipper> These graphs represent genomes
<zipper> I am generating a hash out sha256 of the seq (string) + offset (integer: number of chars from 0)
<zipper> that hash is used as a key
efm has quit [Read error: Connection reset by peer]
thallada has quit [Quit: WeeChat 2.4]
<zipper> So I want to insert data based on the offset which is a value contained in the values (struct) of the dict.
<endobson> And what do edges represent?
thallada has joined #racket
<zipper> endobson: edges represent connected sequences
<zipper> Let me show you
efm has joined #racket
<zipper> endobson: I have a nice visual there
<endobson> Do you have the invariant that if node A points to node B and C that B and C have the same offset, and if nodes B and C point to Node D that B and C have the same offset?
<zipper> endobson: Yes in that case B and C would have the same offset
<zipper> I don't know what you mean by invariant but yes that's the idea
<endobson> that it is always a true statement
<zipper> endobson: You just made me realize that I don't know the answer to that
<zipper> I think I should make it true
<zipper> No it doesn't seem true because some paths will contain longer sequences
<zipper> Damn
<endobson> In your blog post you have variations that have a position and an alternative, can the alternative ever replace more than a single character?
<endobson> Such as CT getting replaced with GGGA
<zipper> Yes the alternative can be an abitrary number of chars
<endobson> so a variation is a position, a length to cut out, and an alternative?
<zipper> yes
<zipper> but your question made me think
<endobson> what happens if there are variations that overlap?
<zipper> is offset 4 really offset 4?
<endobson> it probably only means offset 4 in the original reference
<zipper> variations should overlap. For example look at 3 https://blog.urbanslug.com/images/Content/Graphs/example.png
<zipper> 3 and 5
<endobson> thats not what I mean
<zipper> endobson: yeah I meant for it to mean offset 4 in the original reference but I'm not sure whether that's a good idea anymore
<endobson> say you have reference ACTG
<zipper> Go on
<endobson> can you have a variation that replaces the CT with AA and another that replaces the TG with CC?
<endobson> applying the first would get you AAAG and the second would get you ACCC but I'm not sure what it would mean to apply both
<zipper> I believe so
<zipper> I don't see what would stop that variation from existing in nature
<zipper> Yes that could happen
<endobson> So do you want your program to be able to apply both? If so what would that look like?
<zipper> Which completely throws out my ordering idea
<zipper> Yes both should be possible valid genomes
<zipper> Do you want me to generate a visualization for you?
<endobson> no, I'm wondering if there is more than 3 genomes possible given those two variations
<zipper> What you explained will give 3 possible genomes. Namely:
jao has joined #racket
<endobson> ACTG, AAAG, and ACCC
<endobson> so if variations overlap only one applies?
<zipper> A->C>CC A->C->TG and A->AA->G
<zipper> endobson: No all apply. It's not the work of me or the tool to choose the correct path
<zipper> The idea is that there is no correct path
<zipper> Every organism is unique and has a valid sequence
<zipper> There *is* be a consensus but this is trying to get as much *valid noise* in
<endobson> my point is that no path can take both variations
<zipper> endobson: Yes once you start going down a path you can't go back it's directed
<endobson> ok so imagine a graph with a single node for every position in between bases in the reference genome (and at the ends)
<endobson> add an edge annotated with the base inbetween the positions
<endobson> a walk down this graph gives you the reference genome
<zipper> that graph would have a size 4^(length of genome)
<zipper> right?
<endobson> no because it only is the reference genome, no variations yet
<zipper> endobson: Oh okay I can picture that
<zipper> that's what exists okay
<endobson> your graph has nodes annotated with bases and this annotates the edges
<zipper> One sec
<zipper> But why add an edge with a base and not a vertex?
<endobson> so ACTG would look like 0 - A > 1 - C > 2 - T > 3 - G > 4
<zipper> Ya
<zipper> Go on
vraid has joined #racket
<endobson> and then a variation that replaces the TG with CC would look like adding an edge like 2 - CC > 4
jsomedon has joined #racket
<zipper> Okay in directed acyclic graph with 4 nodes there should be 3 edges
<zipper> Is what you mean there something like A -(1)-> C -(2)-> T -(3)-> G
<endobson> You are labeling the nodes with bases and edges with positions
<zipper> Ah so I'm labelling the bases okay, gotcha
<endobson> and I'm saying that given the requirements you have said so far, that I think you should flip that and have nodes be positions (in the reference) and edges be sequences of bases
<zipper> *I should be
<endobson> In that representation it is very easy to add variations, and to look at the walks
<endobson> and once you have added all the variations in that form you can go back to your other form for printing pictures if you want
<zipper> hmm you're breaking my mind. I can't see why the positions should be vertices
<endobson> how about this: why not?
<zipper> because these positions could change a lot.
<zipper> endobson: It's def counter intuitive but I don't see what's wrong
<endobson> the positions refer to points in the reference implementation
<zipper> One sec
<zipper> haha
<endobson> not the distance in any genome with variations
<zipper> wow damn
<zipper> I should experiment with that. I wonder why nobody has done it before
<zipper> But on my own time if I did that rn my supervisor would flip.
<zipper> Okay but there's another thing. Graphs require searching.
<endobson> ok, what is the input for a search and what do you want as the output?
<zipper> I can see how your representation inc speed of graph updates
<zipper> a sequence and to know where it lies in the graph
<zipper> endobson: Do you mind giving me your email? I'm going to be working on this for a while and I may want to let you know how that went. :)
<endobson> ok are updates interleaved with search requests?
<zipper> The whole idea of genome graphs isn't new
<endobson> endobson@racket-lang.org
<zipper> endobson: Oh no updates should not be interleaved with search
<zipper> updates would be followed by an indexing step
<endobson> right and that indexing step can switch back to the old graph representation
<zipper> Ya
<zipper> but this could make indexing even easier maybe
<zipper> ha if I was doing a PhD and not an MSc I would explore this waay further
<zipper> I haven't seen any papers doing this
<zipper> Someone should have tried it
<zipper> Even the genomic graph data formats assume that vertices are sequences
<zipper> I just realized that the format doesn't really stop me
<endobson> ok, gotta run. Hope this was helpful
<zipper> endobson: Sure! thanks
ubLIX has joined #racket
jsomedon has quit [Quit: jsomedon]
zipper has quit [Ping timeout: 268 seconds]
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zipper has joined #racket
zipper has quit [Ping timeout: 245 seconds]
casaca has quit [Ping timeout: 245 seconds]
zipper has joined #racket
casaca has joined #racket
zipper has quit [Ping timeout: 244 seconds]
casaca has quit [Ping timeout: 245 seconds]
casaca has joined #racket
zipper has joined #racket
zipper has quit [Ping timeout: 268 seconds]
casaca has quit [Ping timeout: 245 seconds]
notzmv has joined #racket
casaca has joined #racket
casaca has quit [Ping timeout: 244 seconds]
casaca has joined #racket
casaca has quit [Ping timeout: 272 seconds]
<jcowan> m1dnight_: I got caught up in other stuff, but I was able to paste all the code in the right order and to correct at least most of the OCR problems. I've posted it at http://vrici.lojban.org/~cowan/brown.scm.txt. You'll need to put it in Emacs to indent it properly.
sleepnap has quit [Quit: Leaving.]
endobson has joined #racket
zipper has joined #racket
SenasOzys has joined #racket
FreeFull has joined #racket
ubLIX has quit [Quit: ubLIX]
lavaflow_ has joined #racket
lavaflow has quit [Ping timeout: 244 seconds]
lavaflow has joined #racket
lavaflow_ has quit [Ping timeout: 268 seconds]
endobson_ has joined #racket
endobson has quit [Ping timeout: 248 seconds]
SenasOzys has quit [Ping timeout: 268 seconds]
dmiles has quit [Read error: Connection reset by peer]
efm has quit [Ping timeout: 244 seconds]
dmiles has joined #racket
efm has joined #racket
ziyourenxiang has joined #racket
zipper has quit [Ping timeout: 248 seconds]
vraid has quit [Ping timeout: 252 seconds]