Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 18 15:15
    asterite synchronize #12378
  • Aug 18 14:49
    asterite synchronize #12375
  • Aug 18 14:45
    HertzDevil edited #12235
  • Aug 18 14:25
    straight-shoota milestoned #12242
  • Aug 18 14:25
    straight-shoota milestoned #12242
  • Aug 18 14:24
    straight-shoota milestoned #12244
  • Aug 18 14:24
    straight-shoota milestoned #12244
  • Aug 18 14:23
    straight-shoota milestoned #11226
  • Aug 18 14:23
    straight-shoota milestoned #11226
  • Aug 18 14:22
    HertzDevil review_requested #12244
  • Aug 18 14:22
    HertzDevil review_requested #12242
  • Aug 18 13:32
    HertzDevil ready_for_review #12242
  • Aug 18 13:32
    HertzDevil synchronize #12242
  • Aug 18 13:24
    HertzDevil ready_for_review #12244
  • Aug 18 13:24
    HertzDevil edited #12244
  • Aug 18 13:23
    HertzDevil synchronize #12244
  • Aug 18 13:17
    HertzDevil closed #12399
  • Aug 18 13:12
    HertzDevil synchronize #12282
  • Aug 18 13:04
    HertzDevil synchronize #11226
  • Aug 18 09:57
    straight-shoota closed #12145
Zafar Ansari
@ansarizafar
class variable did the job me.
Bar Hofesh
@bararchy
So, i opened a channel for supporting crystal-fann if anyone needs it: https://gitter.im/crystal-fann/Lobby
Serdar Dogruyol - Sedo セド
@sdogruyol
Morning everyone
@bararchy great job with crystal-fann :+1:
From IRC (bridge bot)
@FromIRC
<Groogy> Morning!
unreadable
@unreadable
morning all, just found this awesome git rank
seems that apple beat microsoft x)
Serdar Dogruyol - Sedo セド
@sdogruyol
lol
Crystal beats Scala there
it should be taken with a grain of salt :P
Faustino Aguilar
@faustinoaq

Yeah, scala is a great language, crystal still needs a lot of work to have a community like scala.

They even have a scalacenter with a scala "stairs" :smile:

https://www.youtube.com/watch?v=Bh5mWHQgpkg

Maybe one day we can have a "crystal monument" for developers

https://media-cdn.tripadvisor.com/media/photo-s/0e/ab/14/67/spinoza.jpg [0]

[0] - Spinoza Monument

Serdar Dogruyol - Sedo セド
@sdogruyol
lol
unreadable
@unreadable
apple, google and microsoft on first 3 places, what a surprise :) ..Sometimes I wonder how popular these languages would be without google's/ apple's back
nice scala stairs
From IRC (bridge bot)
@FromIRC
<Groogy> when a macro for logging accidentally allocates memory for strings and it just kills our performance and it took way too long to find that out <_<
ziprandom
@ziprandom
hey @sdogruyol is there a way to have kemal auto re[compile/start] while developing?
unreadable
@unreadable
@ziprandom check it out
ziprandom
@ziprandom
@krypton97 tried it, it doesn't work. can't compile in release mode. in dev mode the binary does nothing. not even shoe --help output :/
José Rodrigues
@joselfr
@ziprandom What do you mean by the binary does nothing even when you compile directly with crystal?
Zafar Ansari
@ansarizafar
Beginner Question: Is there any global exception handler in Crystal?
From IRC (bridge bot)
@FromIRC
<Yxhuvud> not be default, but you can always wrap whatever you are writing with begin .. rescue .. end. I'd advise strongly to not do that though.
oliviermo75
@zyriuse75
@krypton97 thank for the link man :+1:
From IRC (bridge bot)
@FromIRC
<ShalokShalom> Papierkorb: You said your bindings are ready for Tier 1 KDE?
unreadable
@unreadable
np m8 ;)
@ziprandom try to submit an issue, haven't used it so far
imonmyown
@imonmyown
Hi all :)
What are the generally accepted marshalling tools, or if none are available what is the preferred way to store application settings locally?
Ghost
@ghost~55586c4815522ed4b3e08557
you can use JSON or YAML
imonmyown
@imonmyown
Thanks @bew
imonmyown
@imonmyown

What would be the right mapping for a single YAML array?

class Foo
  YAML.mapping([] of Integer)
end

Doesn't cut it apparently... :(

Do I have to put it behind a key?
Ghost
@ghost~55586c4815522ed4b3e08557
yes
or use
Array(Int32).from_yaml(some_yaml) directly
imonmyown
@imonmyown
Great, thanks
Faustino Aguilar
@faustinoaq
Screenshot_20170922_084536.png
Official API search needs some work, devdocs is a great tool :+1:
From IRC (bridge bot)
@FromIRC
<gcds> Hi, is there implementation of PBKDF2 on Crystal?
Faustino Aguilar
@faustinoaq

No as far I know :sweat_smile:

You can use https://crystalshards.xyz to find crystal projects.

From IRC (bridge bot)
@FromIRC
<gcds> Maybe someone could help me. I am trying to compile std lib and get problem I think on mac somehow std lib cant find libcrypto. Maybe someone has encountered this problem? pkg-config libcrypto doesnt return nothing...
<gcds> it does return sorry but still I cant build :⁠(
<gcds> i think I know the problem my openssl is to old
<gcds> too*
Ilker Güller
@Sly777

Hey all, I'm trying to make crystal app with Kemal, Granite ORM on postgres. My question is I created one model that needs to update password to encrypted one. But on the build, It's giving error as...

instance variable '@password' of User must be (String | Nil), not Crypto::Bcrypt::Password

require "granite_orm/adapter/pg"
require "crypto/bcrypt/password"
require "logger"
require "kemal"

log = Logger.new(STDOUT)
log.level = Logger::WARN

class User < Granite::ORM::Base
  adapter pg

  before_save :prepare_data

  field email : String
  field password : String
  timestamps

  def prepare_data
    if password = @password
      log("#{password}")
      @password = Crypto::Bcrypt::Password.create(password)
      log("#{@password} | #{password}")
    end
  end
end

module Crystal::Chat
  get "/" do
    user = User.new
    user.email = "test@test.com"
    user.password = "pass1234"
    user.save

    "Hello World! #{VERSION}"
  end

  Kemal.run
end
Nick Franken
@fridgerator
Crypto::Bcrypt::Password.create(password).to_s
Ilker Güller
@Sly777
But after that, How can I cast to Bcrypt again to compare password?
Btw. I'm really new on crystal so It can be dumb question :D