jle

jle

I’m trying to learn zigler with livebook

https://github.com/ityonemo/zigler

When I install it…

Mix.install([
  {:zigler, "~> 0.9.1"}
])

I got next error message

== Compilation error in file lib/zig/doc/parser.ex ==
** (KeyError) key :function_groups not found
    (ex_doc 0.29.1) expanding struct: ExDoc.ModuleNode.__struct__/1
    lib/zig/doc/parser.ex:33: Zig.Doc.Parser.moduledocs_from_file/3
could not compile dependency :zigler, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile zigler", update it with "mix deps.update zigler" or clean it with "mix deps.clean zigler"

Is anyone using this library with livebook?

my elixir and livebook versions are…

Erlang/OTP 25 [erts-13.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.13.2 (compiled with Erlang/OTP 24)

Livebook 0.6.3

Showing Posts 1 to 9

awerment

awerment

Looks like :function_groups was removed in ExDoc v0.29.1. Specifying an older version explicitly seems to work:

Mix.install([
  {:ex_doc, "0.29.0"},
  {:zigler, "~> 0.9.1"}
])
ityonemo

ityonemo

Yep, sorry I was doing a bad and using some private apis. The next version will not include zigdoc, it’s going to be a separate dependency

ityonemo

ityonemo

Just a word of warning, don’t get too attached to how things work in zigler 0.9.1, a lot of things are changing in 0.10.x

jle

jle OP

now it compiles zigler on install

but I got next error with the github example

** (UndefinedFunctionError) function nil.project/0 is undefined.

compiling

defmodule ExampleZig do
  use Zig
  ~Z"""
  /// nif: example_fun/2
  fn example_fun(value1: f64, value2: f64) bool {
    return value1 > value2;
  }
  """
end

ExampleZig.example_fun(0.8, -0.8)
ityonemo

ityonemo

Hm I think you might need otp_app parameter for use Zig (that will stay for 0.10.0)

jle

jle OP

Ops!
Then… it cannot be used from livebook, right?

In any case, great job, it’s a fantastic library.
thanks

ityonemo

ityonemo

? Just make the otp_app be livebook!

jle

jle OP

I did, It works perfect
very nice job

prabhugopal

prabhugopal

@jle I got stuck exactly here.. :slight_smile: How do I set otp_app to Livebook? Is the below code works?

use Zig, otp_app: :livebook
— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
widianto
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews