Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 05 20:18

    julia-tagbot[bot] on v0.22.8

    (compare)

  • Dec 05 19:53
    JuliaRegistrator commented on 4fa0288
  • Dec 05 19:53
    essenciary commented on 4fa0288
  • Dec 05 19:52

    essenciary on master

    v0.22.8 (compare)

  • Dec 04 19:17

    julia-tagbot[bot] on v0.22.7

    (compare)

  • Dec 04 18:53
    JuliaRegistrator commented on e604d3e
  • Dec 04 18:53
    essenciary commented on e604d3e
  • Dec 04 18:52

    essenciary on master

    v0.22.7 (compare)

  • Dec 04 12:17

    julia-tagbot[bot] on v0.22.6

    (compare)

  • Dec 04 11:42
    JuliaRegistrator commented on 1c94ffd
  • Dec 04 11:42
    essenciary commented on 1c94ffd
  • Dec 04 11:41

    essenciary on master

    v0.22.6 (compare)

  • Dec 04 11:40

    essenciary on master

    v0.22.6 (compare)

  • Dec 04 11:34

    essenciary on master

    Update package import for JSONP… Merge pull request #186 from an… (compare)

  • Dec 04 11:34
    essenciary closed #186
  • Dec 04 11:03
    angusmoore opened #186
  • Dec 04 10:06
    spacefan starred GenieFramework/Genie.jl
  • Dec 04 02:30
    tom-gith starred GenieFramework/Genie.jl
  • Dec 03 13:08
    edwardpwtsoi starred GenieFramework/Genie.jl
  • Nov 30 14:48

    julia-tagbot[bot] on v0.22.5

    (compare)

Adrian Salceanu
@essenciary
won’t break
nor this
using Genie.Router
using Debugger

break_on(:error)

route("/hello") do
  error("OMG")
  "Welcome!"
end
Adrian Salceanu
@essenciary
looking at Rebugger, it doesn’t seem to fit at all - it’s designed to be used explicitly at the REPL, requesting special key combinations to trigger the debugging behaviour
Adrian Salceanu
@essenciary
@zalmoxis Infiltrator.jl works!!! 🎉
actually it doesn’t :( it does break
but the commands don’t go to the debugger :-/
Adrian Salceanu
@essenciary
@zalmoxis it works!!! if you start Genie’s server with async = false
image.png
Adrian Salceanu
@essenciary
i’ll add it to the docs
Darie Petrov
@zalmoxis
Thanks for looking into this @essenciary ... I think I'm still doing something wrong as I can't get Infiltrator to happen for me. Genie#master is what I should be using?
Adrian Salceanu
@essenciary
@zalmoxis any recent genie, Infiltrator just works… make sure you start the genie app with async = false
Adrian Salceanu
@essenciary
what seems to be the problem? not triggering? maybe PM me with the code samples
Darie Petrov
@zalmoxis
it works!
Darie Petrov
@zalmoxis
I can't seem to find this in the documentation. Is there a command to generate migrations automatically for new dbmodels? I can have more models per file correct? And I'm not sure how to represent foreign keys or other relationships. I'm using this project as a sample https://github.com/GenieFramework/Genie-Searchlight-example-app
skinnychris
@skinnychris
@essenciary Unfortunately error in trying either Julia Repl or in Atom as script
@essenciary Actually nevermind, it actually works using the standard Julia REPL. Problem is with the ATOM IDE. By the way, Genie is awesome! So clean and logical :)
Darie Petrov
@zalmoxis
I agree! )
:)
Darie Petrov
@zalmoxis
Infiltrate works quite adequately
Darie Petrov
@zalmoxis
does SearchLight currently support relationships?
Adrian Salceanu
@essenciary
@zalmoxis Infiltrate is a bit flaky for me (at some point it stops working) but it’s a good start
it’s good for inspecting variables instead of adding @show and dump everywhere - might be interesting to extend with some @debug @infiltrate to automatically disable it if env is not dev, to make sure debugging is desactivated in production
Adrian Salceanu
@essenciary
generate migrations from models - that’s a nice idea, i haven’t thought about it. I’ll add it to the list of future features, sounds challenging but doable
yes, there can be more models per file - it’s a regular julia module so there are no restrictions in how many structs it can define
the example app needs updating - don’t think it’s relevant anymore :-/
Darie Petrov
@zalmoxis
automatic migration generation is convenient but can do without ... but I still don't know how to define relationships
I need to finish something by tomorrow night so if I can't use relationships I'll use redis or something else
but if you have an example of how to setup foreign keys I can create "through" m2m tables
Adrian Salceanu
@essenciary
there is no support for relationships i’m afraid. there used to be but was buggy so it needs to be redone - the lower level API is still there like the SQLJoin so I guess it can be worked around at lower level APIs
or you can run a hand written SQL and get the dataframe
or create a view which joins the tables plus a model
@inline function query(sql::String; system_query::Bool = false) :: DataFrames.DataFrame
  Database.query(sql, system_query = system_query)
end
Darie Petrov
@zalmoxis
ok thanks! I'll sort something temporary out .. cheers!
Adrian Salceanu
@essenciary
cheers!
@skinnychris if you can walk me through the workflow in atom i will try to reproduce it - I suspect I know what it is (there is a default path set to . so I could change that to pwd()) but I need to be able to reproduce it and test it
Darie Petrov
@zalmoxis
in the templating system is there a @if(bool) macro like the @foreach ?
Adrian Salceanu
@essenciary
no - tried it but it doesn’t work (or I couldn’t get it to work)
beware that if is tricky - in Julia it returns the last expression evaluated, so if you have more than one elements in the block, it will only return the last. so it needs to be wrapped in an array
ex:
<% if some_condition 
[ %>
    <link rel="stylesheet" href="/css/lite_cms/bootstrap.min.css" />
    <link rel="stylesheet" href="/css/lite_cms/callouts.css" />
<% ]end %>
something like that
without the […] only <link rel="stylesheet" href="/css/lite_cms/callouts.css" /> is returned
Darie Petrov
@zalmoxis
aha thanks!
Adrian Salceanu
@essenciary
👍🏻
skinnychris
@skinnychris
Is there a specific IDE you recommend? I'd probably stay away from using atom.
*In relation to using Genie
Adrian Salceanu
@essenciary
i’ve been having problems with atom all the time, it just didn’t work well for me… I’m using VSCode. but I use the REPL for starting the apps (ie $ bin/repl) and for running generators (so the server runs in the REPL) and VSCode for editing files. If I get an error, the stacktrace in the REPL lists the files and I can Ctrl+Click the file path and it opens it in VSCode. I edit and save and reload the page and the changes are applied thanks to Revise
skinnychris
@skinnychris
Cool, that's good to know :)
Adrian Salceanu
@essenciary
:)