jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.18.7 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
Renich has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
mgarciaisaia has joined #crystal-lang
mkl0501 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sapphire_ is now known as sapphire_brb
mgarciaisaia has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
soveran has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
Renich has quit [Ping timeout: 264 seconds]
Renich has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
mgarciaisaia has joined #crystal-lang
Renich has quit [Quit: leaving]
mgarciaisaia has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
pawnbox has joined #crystal-lang
akwiatkowski has joined #crystal-lang
_whitelogger has joined #crystal-lang
danzilio has quit [*.net *.split]
triangles2 has quit [*.net *.split]
jhass has quit [*.net *.split]
jokke has quit [*.net *.split]
tilpner has quit [*.net *.split]
gewo has quit [*.net *.split]
maxpowa has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
RX14 has quit [*.net *.split]
dzv_ has quit [*.net *.split]
sapphire_brb has quit [*.net *.split]
Raimondi has quit [*.net *.split]
txdv has quit [*.net *.split]
sebasr has quit [*.net *.split]
mose has quit [*.net *.split]
Val has quit [*.net *.split]
akwiatkowski has quit [*.net *.split]
A124 has quit [*.net *.split]
bjz_ has quit [*.net *.split]
Tophe has quit [*.net *.split]
bjmllr has quit [*.net *.split]
Davy_CC has quit [*.net *.split]
leafybasi has quit [*.net *.split]
jwaldrip has quit [*.net *.split]
aarongodin has quit [*.net *.split]
kiliankoe has quit [*.net *.split]
jamie_ca has quit [*.net *.split]
ssvb has quit [*.net *.split]
buggs has quit [*.net *.split]
guilleiguaran__ has quit [*.net *.split]
trajing has quit [*.net *.split]
mjblack has quit [*.net *.split]
badeball has quit [*.net *.split]
hmans has quit [*.net *.split]
pataphysics has quit [*.net *.split]
BlaXpirit has quit [*.net *.split]
DeBot has quit [*.net *.split]
pawnbox has quit [*.net *.split]
onionhammer has quit [*.net *.split]
jeromegn has quit [*.net *.split]
aemadrid has quit [*.net *.split]
Majost has quit [*.net *.split]
mroth has quit [*.net *.split]
x0f has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
braidn has quit [*.net *.split]
early has quit [*.net *.split]
vegai has quit [*.net *.split]
nickc has quit [*.net *.split]
dom96 has quit [*.net *.split]
havenwood has quit [*.net *.split]
Philpax has quit [*.net *.split]
jamie_ca_ has quit [*.net *.split]
qard has quit [*.net *.split]
FromGitter has quit [*.net *.split]
foca has quit [*.net *.split]
bazaar has quit [*.net *.split]
go|dfish has quit [*.net *.split]
adam12 has quit [*.net *.split]
asterite has quit [*.net *.split]
jadams has quit [*.net *.split]
Papierkorb has quit [*.net *.split]
yossarian has quit [*.net *.split]
swav has quit [*.net *.split]
pabs has quit [*.net *.split]
vifino has quit [*.net *.split]
Liothen has quit [*.net *.split]
Cidan has quit [*.net *.split]
avdi has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
jfontan has quit [*.net *.split]
matp has quit [*.net *.split]
coderobe has quit [*.net *.split]
_jungh4ns has quit [*.net *.split]
miketheman has quit [*.net *.split]
grindhold has quit [*.net *.split]
endou_ has quit [*.net *.split]
justinmcp_ has quit [*.net *.split]
oddmunds has quit [*.net *.split]
rtl has quit [*.net *.split]
salvor has quit [*.net *.split]
rkeene has quit [*.net *.split]
_whitelogger has joined #crystal-lang
_whitelogger has quit [Excess Flood]
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
jwaldrip has joined #crystal-lang
foca has joined #crystal-lang
asterite has joined #crystal-lang
x0f has joined #crystal-lang
jhass has joined #crystal-lang
DeBot has joined #crystal-lang
go|dfish has joined #crystal-lang
havenwood has joined #crystal-lang
triangles2 has joined #crystal-lang
rtl has joined #crystal-lang
CompanionCube has quit [Max SendQ exceeded]
gewo has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondii is now known as Raimondi
emmanueloga has joined #crystal-lang
soveran has joined #crystal-lang
onethirtyfive has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
Nik736 has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
elomatreb has quit [Quit: mep mep]
elomatreb has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
bjz has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter> <wrq> > **<Yxhuvud>** .. why on earth would anyone think a code of conduct is a: worth forking for and b: a CoC-less project would get more support than one with a CoC? ⏎ I've already fielded some small offers from potential sponsors. Companies are extremely reluctant to consider a move away from C++ with such toxic community guidelines, and there's a LOT of money to be made offering up my extensions, knowledge of internals, and a free-er
<FromGitter> ... platform. It's just a matter of time.
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> That's weird and interesting
pawnbox has joined #crystal-lang
<FromGitter> <wrq> well consider their point of view, it's a huge endeavor to move away from something like C++
<FromGitter> <wrq> its the same reason Rust isnt really succeeding in real workspaces
<FromGitter> <wrq> the value proposition of "you can only be a part of this community if you hivethink EXACTLY what we agree with" is not very good, and no real vendor is going to go for that.
<Yxhuvud> Eh, exactly how is anything in the CoC toxic? From what I can see, the only thing it does is explicitly forbid toxic behaviour.
<FromGitter> <wrq> FOSS software should never attack free-speech.
<FromGitter> <sdogruyol> I'm not a native speaker of English
<FromGitter> <sdogruyol> Sometimes i fear CoC
<FromGitter> <sdogruyol> If it's misused like in the recen Crockford case, i'm doomed lol
<FromGitter> <sdogruyol> yeah, i've seen this
<FromGitter> <wrq> exactly. We are building S O F T W A R E, that should be the **only** relevant aspect
<FromGitter> <sdogruyol> It's good
<Yxhuvud> that is a ridiculous point of view. It is not an attack on free speech for the community totake a stand against people being assholes.
<Yxhuvud> in fact, it is an EXERCISE of free speech
<FromGitter> <sdogruyol> So Crockford is an asshole?
<FromGitter> <sdogruyol> Lol
<FromGitter> <sdogruyol> He is such a nice guy and a real gentlemen (i've met him in person)
<FromGitter> <wrq> yxhuvud, hence i'm exercising my own free speech in return
<FromGitter> <wrq> I've not met Crockford but like I've seen him interact with people "off the record" so to speak, and he seemed like a pretty chill guy
<FromGitter> <wrq> the kind of guy thats a nice guy even when nobody is watching
<FromGitter> <sdogruyol> yeah, he's a nice guy
<FromGitter> <sdogruyol> i don't know it's super easy to blackmail someone
<FromGitter> <wrq> and nodevember is a lame conference anyways. it's not like Joyent put out a huge blog post excommunicating him, it's just some conference. it's the principle of it that frustrates me
<FromGitter> <sdogruyol> and i hate people getting behind something called X and shit on anyone
<FromGitter> <sdogruyol> i'm not a native speaker and if i call the crowd 'guys' i fear that they gonna blame me for being sexist. that's really awful
<FromGitter> <wrq> freenode
<FromGitter> <wrq> freenode's #ruby has that bot that attacks people who say "hey guys"
<FromGitter> <wrq> it's unreal
<FromGitter> <sdogruyol> roflmao
<FromGitter> <sdogruyol> guess we need to reeducate the whole world about the new 'English'
<FromGitter> <wrq> well and that's the beauty of FOSS. They can't forcibly TAKE crystal away. Forks are easy to make, even if they change the license, we can still start from the latest point before that and just continue onwards, which is what I've already done in a sense on my own.
<FromGitter> <wrq> for now, crystal will just keep going. but if it gets out of hand, then the sane parts of the community will have no choice but to fork
<FromGitter> <sdogruyol> well, i don't think people care about that like you do
<FromGitter> <wrq> they will
<BlaXpirit> a fork has absolutely no chance because almost all code is written by people who knowingly agree with the CoC
<FromGitter> <wrq> a lot more people care about this than you think
<FromGitter> <sdogruyol> idk
<FromGitter> <wrq> they've no reason to speak up publicly about it, I only bring it up because I like the debate
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<sapphire_> back again
bjz has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/viR5k
<crystal-gh> crystal/master 026f632 Ary Borenszweig: Let Time.parse handle microseconds. Fixes #3283
balduin has joined #crystal-lang
<balduin> hello, how do I create interfaces in Crystal (I am comming from the Java world)?
<BlaXpirit> balduin, use modules
<BlaXpirit> hm is it really not covered?
<balduin> @BlaXpirit: thanks. Do I get this right there is no "interface" keyword?
<BlaXpirit> balduin, yes, there are no interfaces directly
<balduin> @BlaXpirit: thanks
snsei has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<BlaXpirit> balduin, https://carc.in/#/r/192h
snsei has joined #crystal-lang
<wmoxam> asterite: :D
<travis-ci> crystal-lang/crystal#026f632 (master - Let Time.parse handle microseconds. Fixes #3283): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/158963131
<DeBot> https://github.com/crystal-lang/crystal/issues/3283 (Time.parse can't handle microseconds)
<balduin> @BlaXpirit: nice. Thanks again :-)
snsei has quit [Remote host closed the connection]
bjz has joined #crystal-lang
tombruijn has joined #crystal-lang
bjz has quit [Client Quit]
tombruijn has left #crystal-lang [#crystal-lang]
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.1 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<adam12> jhass: I was just wondering where you'd been.
<jhass> too busy for IRC ;)
<adam12> I hear ya. IRC is a time sink.
<jhass> but I guess I should add some ops here
<jhass> RX14 / BlaXpirit any of you willing to op here?
<RX14> i'm willing
<jhass> great
<RX14> not that much traffic or spam
<RX14> but yeah
<jhass> yeah, more for things like keeping the topic up-to-date ;)
<RX14> yeah
<jhass> there we go
<RX14> now i need to learn how to use chanserv again...
<jhass> heh, it's weechat plugins for me, always starting with /cs help if I have to interact directly :P
<RX14> yeah i have about 200 pages of chanserv help on this channel now :P
<RX14> i guess i just need to remember /cs op #crystal-lang RX14 then do what i want
<RX14> and then deop
<RX14> and probably topic command
<RX14> and thats it
<RX14> i'm used to just having +O on my channels
Nik736 has quit [Remote host closed the connection]
Nik736 has joined #crystal-lang
Nik736 has quit [Client Quit]
<jhass> sure, that works. Freenode discourages permanent op, iirc they explain somewhere in the guidelines/policies stuff
<RX14> yeah i can understand why
<RX14> jhass, i've noticed you've been busier lately, any reason?
<jhass> starting work, moving
<jhass> more time with gf
<jhass> so yeah, more afk stuff atm
<RX14> ah, that would be a very good reason!
pawnbox has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> ugh, is a Tuple a good way to hold type information
<RX14> what do you mean by hold type information?
<FromGitter> <sdogruyol> {Int32, String}
<RX14> oh
<RX14> why not?
<FromGitter> <sdogruyol> i can't iterate over this
<RX14> why not?
<FromGitter> <sdogruyol> in the case of i being 0, typeof(types[i]) => (Int32:Class | String:Class)
<RX14> @sdogruyol https://carc.in/#/r/192j
<jhass> if i is a runtime value you get a union, yeah
<RX14> well actually it's just "Class" if i is constant
<FromGitter> <sdogruyol> yeah it's a runtime value
<RX14> which is interesting
<FromGitter> <sdogruyol> dynamically trying to map the db rows to some struct
<FromGitter> <sdogruyol> i want to pass the type information in a tuple
<RX14> i know crystal-pg passes type info as a tuple
<FromGitter> <sdogruyol> yeah
<RX14> can you show code?
<FromGitter> <sdogruyol> well it takes a different approach
<FromGitter> <sdogruyol> sure
<RX14> hmm
<FromGitter> <sdogruyol> well since it's at runtime types[i] is not working for me
<FromGitter> <sdogruyol> i'm basically trying to tell that take type info from Tuple in an order and map it to each column
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
<jhass> just flip?
<FromGitter> <sdogruyol> what?
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<jhass> types.each_with_index |type, i| foo[rs.column_names[i]] = rs.read(type); end or whatever
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> oh, let me try
pawnbox has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> @jhass nice one, it actually worked :P
<FromGitter> <sdogruyol> ugh, actually it didnt :/
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 265 seconds]
akwiatkowski has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
<adam12> I wonder what would be required to run a Crystal program via CGI (cgi-bin)
<adam12> I guess I'd need to get the request variables from ENV somehow..
<BlaXpirit> adam12, a Crystal compiler
<BlaXpirit> u literally print stuff to stdout, but yeah, for most functionality you read ENV
<adam12> Right, but avoiding rewriting handling of params, etc.
<adam12> Using parts of the HTTP library, outside of the client and server.
<adam12> Ie. http/params, http/cookie.
<BlaXpirit> why would you do it :(
<RX14> i would advise against CGI for anything thats not a toy project
<RX14> it's too insecure and performance is bad compared to http::server
<adam12> I'm just being hypothetical. I haven't used cgi-bin in decades, but ran into something lately which made me think about it
pawnbox has joined #crystal-lang
<adam12> and obviously I'd want to write it in Crystal ;)
<RX14> yeah, it's a cool idea for a project
<RX14> but not something I would ever put into production
<BlaXpirit> adam12, it's all under HTTP https://crystal-lang.org/api/0.18.7/HTTP.html
<BlaXpirit> get headers from env, parse headers. get query args, parse query args
<adam12> That was essentially the question tho - could I pass those in from ENV.. which I guess is yes.
<RX14> yes... ENV is ENV
trapped has joined #crystal-lang
<BlaXpirit> RX14, how's cgi insecure again?
<adam12> I know it can be depending on file permissions, but with Apache+mod_ruid2 or similar, I would think it's fine?
<adam12> s/file permissions/process owner
pawnbox has quit [Ping timeout: 276 seconds]
<adam12> Anyways, I don't want to write PHP, so I thought it would be interesting to drop something into cgi-bin written in Crystal.
<adam12> Assuming something low traffic obviously.
<BlaXpirit> adam12, if you're feeling adventurous, just go and learn stuff along the way, there's no roadblocks that i can predict. and maybe make a basic lib along the way :p
<adam12> Yeah - I know it's possible, I was just wondering if anybody had actually explored it
<BlaXpirit> i don't think so
<adam12> but I just glazed source and it seems everything is passed in, so no reason why I couldn't HTTP.parse_request(STDIN.gets) or something.
<RX14> BlaXpirit, stuff like this: https://httpoxy.org/
<RX14> although i don't think crystal uses HTTP_PROXY
soveran has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
qard has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tombruijn has joined #crystal-lang
trapped has quit [Quit: int random { /* ensure randomness */ return 3; }]
tombruijn has quit [Client Quit]
tombruijn has joined #crystal-lang
tombruijn has quit [Client Quit]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
tombruijn has joined #crystal-lang
tombruijn has quit [Client Quit]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vi0vw
<crystal-gh> crystal/master 3aadab7 Ary Borenszweig: Encoding: don't error on incomplete multibyte sequences on :skip. Fixes #3285
<Papierkorb> How do I compile a linux 32bit ELF on a linux x64 system?
<Papierkorb> *cross-compile
<RX14> Papierkorb, with great difficulty
<Papierkorb> no pain no gain, how?
<FromGitter> <sdogruyol> @asterite do you have any idea how far are we behind on making [] of T and {} of T
<BlaXpirit> sdogruyol, what do you mean `of T` - maybe `of Object` ?
Ven_ has joined #crystal-lang
<FromGitter> <sdogruyol> ah yes, you are right
Ven_ has quit [Max SendQ exceeded]
pawnbox_ has quit [Read error: Connection reset by peer]
<travis-ci> crystal-lang/crystal#3aadab7 (master - Encoding: don't error on incomplete multibyte sequences on :skip. Fixes #3285): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/158996558
<DeBot> https://github.com/crystal-lang/crystal/issues/3285 (incomplete multibyte sequence (ArgumentError))
Ven_ has joined #crystal-lang
pawnbox has joined #crystal-lang
A124 has joined #crystal-lang
Ven_ has quit [Ping timeout: 260 seconds]
Ven_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vi0UN
<crystal-gh> crystal/master 6d867d9 Ary Borenszweig: Optimize Char#to_s when it's ascii and the IO has no encoding....
Ven_ has quit [Ping timeout: 244 seconds]
<travis-ci> crystal-lang/crystal#6d867d9 (master - Optimize Char#to_s when it's ascii and the IO has no encoding.): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/159006213
sija has joined #crystal-lang
soveran has joined #crystal-lang
qard has joined #crystal-lang
qard has quit [Client Quit]
mkl0501 has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
sija has quit [Ping timeout: 255 seconds]
<Papierkorb> Indeed, that was painful. But hey, I can now cross compile
Crizkov has joined #crystal-lang
<Crizkov> Hi, guys!
<RX14> hi
<Crizkov> How Can I do this in Crystal => ```5.methods.sort```
<RX14> look up the methods for Int32 in the docs
<RX14> there is no methods on objects
<RX14> because it's not a dynamic langauge
<Crizkov> Ok, but, by example, How Can i get all instance variables of a class?
<Crizkov> Sija: Oh, thanks
<RX14> you can only access the type node from certain macros, but here's all the methods on @type: https://crystal-lang.org/api/0.18.7/Crystal/Macros/TypeNode.html
<FromGitter> <Sija> in your case that would be sth along the lines of
<FromGitter> <Sija> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57d46c5a880624344546b03a]
<Crizkov> RX14 && Sija: Thanks for help, Now, you solved my question :-)
Crizkov has quit [Quit: Page closed]
<FromGitter> <Sija> @Crizkov: yw! godspeed :)
<FromGitter> <Sija> is there a way to use enum type with “free" int values? some C libs are using enums for return codes, returning an int sometimes which is an arbitrary value (say no of bytes)
<RX14> like int to enum?
<FromGitter> <Sija> more like `Enum | Int`
<RX14> just get an int back then check it againt the enum
<FromGitter> <Sija> since returned int is not part of the enum but an actual value
<FromGitter> <Sija> yeah, but then I can’t use enums in lib defs, can I?
<RX14> is the enum negative?
<FromGitter> <Sija> uhm, 0..-n
<RX14> yes
<RX14> well the answer is no
<RX14> lib defs can only return 1 thing
<RX14> either an int or enum
<RX14> and there they return an int
<FromGitter> <Sija> so in this case it would rather have to be an int to be checked against enum l8r in the code, right?
<RX14> sometimes that int happens to correspond with an enum value but you can't tell the compiler that
<RX14> @Sija yes
<FromGitter> <Sija> va bene, thanks 4 help @RX14!
<BlaXpirit> >> enum En; A; B; C; end; A.new(6)
<DeBot> BlaXpirit: undefined constant A - https://carc.in/#/r/1935
<BlaXpirit> >> enum En; A; B; C; end; En.new(6)
<DeBot> BlaXpirit: # => 6 - https://carc.in/#/r/1936
<BlaXpirit> >> enum En; A; B; C; end; En.new(1)
akwiatkowski has quit [Ping timeout: 244 seconds]
<DeBot> BlaXpirit: # => B - https://carc.in/#/r/1937
<BlaXpirit> Sija, I think this may interest you
<FromGitter> <Sija> indeed, i’m just experimenting with it :)
zacts has quit [Quit: WeeChat 1.5]
mkl0501 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
<FromGitter> <Sija> any1 knows how to create pair of virtual serial ports on mac osx el capitan?
<FromGitter> <Sija> I tried `socat` but when trying to open ‘em I only end up with `Inappropriate ioctl for device (25)` os error
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
bjz has quit [Quit: Textual IRC Client: www.textualapp.com]
bjz has joined #crystal-lang
bjz has quit [Remote host closed the connection]
bjz has joined #crystal-lang
qard has joined #crystal-lang
pawnbox has joined #crystal-lang
<FromGitter> <Sija> another q: buffer passed to unix's `read` function is supposed to be of type `char*`?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <Sija> in C it’s a `Void*` but what should I pass from Crystal world?
onethirtyfive has joined #crystal-lang
<BlaXpirit> Sija, Slice(UInt8)
<BlaXpirit> uh probably Pointer(UInt8)
<FromGitter> <Sija> yeah, or even `Bytes` but that works only with fixed size AFAIK
<FromGitter> <Sija> yep
<FromGitter> <Sija> Pointer(UInt8).null ?
soveran has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit_ is now known as BlaXpirit
<FromGitter> <Sija> nah, null is bad, but how do I pass the pointer without allocating fixed size memory?
soveran has quit [Remote host closed the connection]
DeBot has quit [Ping timeout: 260 seconds]
<BlaXpirit> Sija, that's what you do in C - allocate fixed size memory
<BlaXpirit> and hope it's enough
<BlaXpirit> best case, the function will let you retry to get more data
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vi0s9
<crystal-gh> crystal/master 19fdf45 Ary Borenszweig: Compiler: fixed parsing of regex with backlash. Fixes #3286
<crystal-gh> crystal/master 8bc771b Ary Borenszweig: Regex: fix to_s and inspect when regex has backslash. Fixes #3286
pawnbox has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#8bc771b (master - Regex: fix to_s and inspect when regex has backslash. Fixes #3286): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/159039613
<crystal-gh> [crystal] kostya opened pull request #3287: add IO::Buffered#rewind_buffer (master...rewind_buffer) https://git.io/vi0Go
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
kulelu88 has joined #crystal-lang
soveran has joined #crystal-lang
qard has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 265 seconds]