mvellandi

mvellandi

Exploring Graphs with Elixir: Missing directories (p 100, 105)

Exploring Graphs with Elixir by @tonyhammond

p.100 – Ch 3 > Storing Graphs in the Graph Store > Listing
shows

“iex>​​ ​​list_graphs​
​ 	[..., "default.dot", "IMAGES", ...]”

but (to my recollection) we have not defined this directory yet, either manually or automatically through the shell command in:
p.68 – Ch 2 > Building a Graph Store > Creating a Storage area

I see a reference to this “images” directory later, as a module attribute in NativeGraph.Format
So I manually created it.

Then in
p.105 – Ch 3 > Visualizing Graphs > Rendering with Graph Viz
while creating the water molecule graph, we’re given:

“iex>​​ ​​with​​ ​​{:ok,​​ ​​dot}​​ ​​=​​ ​​Graph.to_dot(g)​​ ​​do​
​ 	​...>​​ ​​write_graph(dot,​​ ​​"dot/h2o.dot"​​)​
​ 	​...>​​ ​​end”

When trying this, I get a File error since the “dot” directory is unavailable. Not sure what I’m missing here, or if the directory is supposed to be automatically created?
I manually created a “dot” directory to make the code work as shown and tested in later pages.

Marked As Solved

tonyhammond

tonyhammond

Author of Exploring Graphs with Elixir

Yes, this was not very clear. These directories are to be added manually.

I added this text on p. 29 in Chapter 2, Building a Graph Store, section Listing:

“And we’ll also want to be able to access graphs and queries within any directories that we may add manually to our store.”

And on p. 47 in Chapter 3. Managing Graphs Natively with Elixir:

“In this case we have manually added an images/ directory.”

And on p. 49:
“And for better graph management note that we’ve manually added the dot/ and images/ directories in our graph store:”

Also I hadn’t been consistent in writing dot files to the dot/ directory. Fixed that too.

Popular Prag Prog topics Top

jon
Some minor things in the paper edition that says “3 2020” on the title page verso, not mentioned in the book’s errata online: p. 186 But...
New
brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
johnp
Hi Brian, Looks like the api for tinydb has changed a little. Noticed while working on chapter 7 that the .purge() call to the db throws...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
New
akraut
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error. lib/pento_web/live/product_l...
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
New
EdBorn
Title: Agile Web Development with Rails 7: (page 70) I am running windows 11 pro with rails 7.0.3 and ruby 3.1.2p20 (2022-04-12 revision...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New

Other popular topics Top

AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Latest in PragProg

View all threads ❯