Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:47
    straight-shoota closed #12051
  • 13:47
    straight-shoota closed #12050
  • 12:17
    beta-ziliani edited #7318
  • May 15 08:43
    r00ster91 closed #7318
  • May 15 08:17
    r00ster91 closed #7690
  • May 14 17:01
    Blacksmoke16 labeled #11995
  • May 14 13:03
    webhive closed #12055
  • May 14 10:19
    straight-shoota milestoned #12051
  • May 14 10:00
    I3oris edited #12051
  • May 14 08:45
    oprypin review_requested #11977
  • May 13 23:29
    Blacksmoke16 unlabeled #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 opened #12061
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota opened #12060
From IRC (bridge bot)
@FromIRC
<Papierkorb> hash syntax is { "foo" => "bar" } - Note the hashrocket
Rubi
@codenoid
a json value
its a json
Jeremy Woertink
@jwoertink
Has anyone ran in to any issues naming a class the same as something that's in the crystal stdlib?
I have a crecto model named Event, but when I try and use it, I get Event is not a class, it's a module
cevarief
@cevarief
Any update regarding to support multi threading (parrarel) ?
Jeremy Woertink
@jwoertink
The language isn't really moving that fast anymore. I doubt much progress has been made on that. There's this branch https://github.com/crystal-lang/crystal/tree/thread-support which hasn't been updated in a while.
I would urge anyone that has experience with that sort of stuff to hop in and knock out some issues to help out :)
John Jansen
@johnjansen
@jwoertink you have named your model the same as a module from somewhere else ;-)
Jeremy Woertink
@jwoertink
haha. I know
I want my model named Event
because it's like things you go out and do, parties, concerts, games, etc...
I had to namespace my model so it will work. Not horrible
John Jansen
@johnjansen
@jwoertink why dont you put all your models into a namespace so you can still use event … im assuming that wont break anything
Jeremy Woertink
@jwoertink
That's what I ended up doing
it's a little annoying, but not horrible
Hanyuan Li
@hanyuone
Here is a Github gist to my GTK+ binding so far
I'm not sure if I'm doing this right...
Is anyone with a decent knowledge of C (and preferably GTK+) on?
I've implemented all the functions for GApplication
From IRC (bridge bot)
@FromIRC
<bmcginty> @Qwerp-Derp: Have you tried running the gtk and gobject stuff through the libgen shard?
Serdar Dogruyol - Sedo セド
@sdogruyol
Morning everyone
Bar Hofesh
@bararchy
Morning :)
Rubi
@codenoid
hi, how to statically define this value ( {"key":"val","key":"val"} ) inside crystal variable
Serdar Dogruyol - Sedo セド
@sdogruyol
@codenoid
STATIC_VAR = {"key":"val","key":"val"}
Indra Gunawan
@coderbuzz
Morning...
Rubi
@codenoid
nope, wont work @sdogruyol
it's a json value, please,
Syntax error in src/toped.cr:8: expecting token '=>', not 'val'

STATIC_VAR = {"key":"val","key":"val"}
Serdar Dogruyol - Sedo セド
@sdogruyol
Hanyuan Li
@hanyuone
bmcginty Whoa, that's neat :)
Rubi
@codenoid
my static value is {"key":"val","key":"val"} not {"key" => "val","key" =>"val"}
Serdar Dogruyol - Sedo セド
@sdogruyol
the first is a NamedTuple the second is a Hash
Hanyuan Li
@hanyuone
@codenoid => is Crystal syntax for key-value pairs
Rubi
@codenoid
but its json value :(
Hanyuan Li
@hanyuone
Ohhhhh
Sorry, my mistake
Serdar Dogruyol - Sedo セド
@sdogruyol
@codenoid i still don't get your point
Hanyuan Li
@hanyuone
I don't think you can do that, You might have to wrap it around a toJSON thing
Serdar Dogruyol - Sedo セド
@sdogruyol
just use a String then
Ghost
@ghost~55586c4815522ed4b3e08557
@codenoid you want var = %({"your": "json"})
Rubi
@codenoid
why crystal didnt read first " and last " as a opening and closing string
@bew cool thanks @bew
Ghost
@ghost~55586c4815522ed4b3e08557
:smile:
Because %() %[] and %<> are other string separators
Dru Jensen
@drujensen
or you could escape all the inner quotes ”{\"key\": \"val\",\"key2\": \"val\”}” but that is some ugly code ;)
Rubi
@codenoid
^ agree
Gabriel Torrecillas Sartori
@G4BB3R
This message was deleted

I need help, very beginner here. I am using Crecto, look my Repo.cr

module Repo
  extend Crecto::Repo

  config do |conf|
    conf.adapter = Crecto::Adapters::Mysql
    conf.database = "revistinha"
    conf.hostname = "localhost"
    conf.username = "root"
    conf.password = ""
    conf.port = 5432
  end
end

Then when I do this, it prints "Trying to insert" and then freezes forever, don't print nothing neither print an error

c = Consumidor.new
c.nome = "Gabb"
c.sobrenome = "Esperanto"

puts "Trying to insert..."
changeset = Repo.insert(c)
puts changeset.errors

After a few minutes waiting it throws an huge exception:
https://pastebin.com/TetU7nxy

unreadable
@unreadable
To be honest, I find it easier to work directly with the stdlib than the orm