<FromGitter>
<eliasjpr> Generics and Polymorphic type is the same concept
<FromGitter>
<Sija> ocaml… ;)
<FromGitter>
<eliasjpr> lol
<FromGitter>
<Sija> obviously there’s more use-cases for compiled languages than for interpeted ones
<FromGitter>
<eliasjpr> Which why I am surprised that is not part of crystal
<FromGitter>
<Sija> programing world is vast and wild so there r many ways of approaching things
<FromGitter>
<Sija> now u know it is :)
<FromGitter>
<eliasjpr> I mean I guess it is with generics
<FromGitter>
<eliasjpr> im still grasping the generics implementation
<FromGitter>
<Sija> C++ has ‘em too btw (as templates)
<FromGitter>
<eliasjpr> :thumbsup:
ezrast has joined #crystal-lang
Philpax has joined #crystal-lang
ezrast has quit [Ping timeout: 260 seconds]
<aarongodin>
hey everyone, just learning the syntax for crystal in the last week or so and very excited. Does anyone know if there are some shards made for building guis?
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
balduin has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
yogg-saron has joined #crystal-lang
unshadow has quit [Ping timeout: 276 seconds]
unshadow has joined #crystal-lang
Cyrus has joined #crystal-lang
<aarongodin>
nice. even that site is a big help, lots of interesting things on there
ChickeNES has joined #crystal-lang
yogg-saron has quit [Ping timeout: 276 seconds]
balduin has quit [Ping timeout: 240 seconds]
mark_66 has joined #crystal-lang
Qchmqs has joined #crystal-lang
Qchmqs has quit [Read error: Connection reset by peer]
zipR4ND has joined #crystal-lang
Qchmqs__ has joined #crystal-lang
Qchmqs__ is now known as Qchmqs
Yxhuvud has quit [Ping timeout: 240 seconds]
Qchmqs is now known as Frites
Yxhuvud has joined #crystal-lang
bjz has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
Majost has quit [Remote host closed the connection]
hmans has quit [Remote host closed the connection]
sz0 has quit [Read error: Connection reset by peer]
twisterghost has quit [Remote host closed the connection]
mroth has quit [Remote host closed the connection]
aemadrid has quit [Remote host closed the connection]
mroth has joined #crystal-lang
aemadrid has joined #crystal-lang
twisterghost has joined #crystal-lang
Majost has joined #crystal-lang
zipR4ND has quit [Ping timeout: 240 seconds]
hmans has joined #crystal-lang
sz0 has joined #crystal-lang
balduin has joined #crystal-lang
zipR4ND has joined #crystal-lang
splitty__ has joined #crystal-lang
splitty___ has quit [Ping timeout: 240 seconds]
bjz_ has joined #crystal-lang
<FromGitter>
<luislavena> @fridgerator re: `HTTP::Client` usage, spawning in multiple fibers a single client connection might result in race conditions. A pool of connections will be a better approach
<FromGitter>
<CodelessFuture> Crypto::MD5.hex_digest("foo”) find this in the API…..I cannot find a way to use it….what module I nned to require?
<FromGitter>
<CodelessFuture> Ok….figured out. OLD API version….
<FromGitter>
<luislavena> @CodelessFuture old API, try use latest. I believe is under `Digest::MD5`, you can see in the docs it states were is defined in the files (`digest/md5.cr`) https://crystal-lang.org/api/0.22.0/Digest/MD5.html
<FromGitter>
<CodelessFuture> @luislavena yes thank you when I post the link I realised
bjz_ has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
<wuehlmaus>
hmm, i am not able to ``require "Math"'' on my Apple, crystal version is 0.22.
<wuehlmaus>
i bet this is known already.
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wuehlmaus>
0.22.0
<FromGitter>
<luislavena> @wuehlmaus you need to require `math`, is case-sensitive (most likely your OSX filesystem is)
<wuehlmaus>
ah, yes i just tried that
<wuehlmaus>
thanks
<FromGitter>
<sdogruyol> yeah os x is case sensitive
<FromGitter>
<luislavena> @sdogruyol ah, that's new, last time with Slow Leopard it wasn't by default, lot of headaches in Ruby land because of that :smile:
<FromGitter>
<sdogruyol> oh how i miss snow leopard
Philpax has quit [Ping timeout: 240 seconds]
<FromGitter>
<Sija> is there a way to build a target from a dependency?
<FromGitter>
<Sija> sth like `shards build <dep>/<target>`?
<FromGitter>
<Sija> I can probably define my own `target` pointing to the dependency but that’s not rly DRY
<wuehlmaus>
sdogruyol: i just tried ``touch /tmp/name'' and was able to ``rm /tmp/NAME'' which was not existing before i did ``touch /tmp/name''. so it seems, Sierra is not case sensible.
<FromGitter>
<sdogruyol> that actually depends on your disk format
<wuehlmaus>
i did not tune that.
<crystal-gh>
[crystal] bcardiff pushed 1 new commit to master: https://git.io/v94Hr
<crystal-gh>
crystal/master 3b752a3 Brian J. Cardiff: Fixes #4336. Use original_location for debug info
<FromGitter>
<Sija> @luislavena thx, I’ve been evaluating `postinstall` hook but its too hackish for my use - for instance there’s no way of passing arguments to the build command
<oprypin>
what the actual f**k is going on on that page? DOCKER!?!?!?
<oprypin>
instead of skipping the '-g' flag one could use docker, good job
<oprypin>
to be fair, gitbook would still put things into $HOME/.gitbook, which is kinda "global" and not easily preventable. so it's something. sorry for yelling.
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
Frites has quit [Ping timeout: 240 seconds]
bcardiff has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
unshadow has quit [Quit: leaving]
leafybas- has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
zipR4ND has quit [Ping timeout: 240 seconds]
bcardiff has joined #crystal-lang
zipR4ND has joined #crystal-lang
DeBot has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
bcardiff has joined #crystal-lang
FromGitter has joined #crystal-lang
<FromGitter>
<bew> loool
FromGitter has quit [Remote host closed the connection]
<oprypin>
sorry for inconvenience, the irc<->gitter bridge bot has been down for the last 5-6 hours
<FromGitter>
<bew> it's back now :) why was it a down?
<oprypin>
not entirely sure. kept getting timeouts and SSL errors from IRC side, might have been network connectivity problems on my VPS, and then... someone occupied that nickname
<oprypin>
turns out registering a nick is not enough on freenode, you need to manually kick someone with your nick. or /msg nickserv help set enforce
<Papierkorb>
it's normal that you have to ghost an impostor
<oprypin>
why is it normal?
<Papierkorb>
it's been the case on every IRC network I've ever been
<oprypin>
mkay
<Papierkorb>
QuakeNet is an exception which doesn't guarantee nicks anyway
bmcginty has quit [Ping timeout: 260 seconds]
<FromGitter>
<c910335> @Sija So the reason is broken meta-model?
<FromGitter>
<Sija> That’s my understanding, yep
<FromGitter>
<Sija> In case of Generics it’s even worse
<FromGitter>
<bew> maybe you're tired (or I am?), but I trying to pass a buffer to a C function, so the C function can fill the buffer..
<FromGitter>
<Sija> yep, that’s me, sorry for the noise ;)
<FromGitter>
<bew> don't worry ;)
<FromGitter>
<bew> another question:
<FromGitter>
<bew> what's the difference between `GC.malloc` & `GC.malloc_atomic` ? (no doc in api reference..)
<oprypin>
bew, iirc malloc_atomic tells GC that this memory cannot possibly have pointers so it doesnt need to track it
<oprypin>
like array of Int32 would be allocated with malloc_atomic and array of some class would be allocated with malloc
<RX14>
@bew you can pass an initial size to IO::Memory iirc
<RX14>
then use it as a buffer
<RX14>
IO::memory.new(bytes); then use io.to_unsafe
<oprypin>
probably wants to reuse the buffer
<FromGitter>
<bew> @RX14 yeah but how to resize that buffer, if it's not big enough?
<RX14>
why do you need that?
<RX14>
and why not use slice/pointer?
<oprypin>
yeah basically use slice..
<oprypin>
easier to manually resize if it's not big enough than deal with the limitations
bmcginty has joined #crystal-lang
<RX14>
you can create an IO::Memory from a slice if you need an IO interface
<FromGitter>
<bew> yeah I use slice/pointer now ^^ I've seen the limitations of io memory, and seen that it's not what it's been built for!
<FromGitter>
<bew> how to get the `SIZE_MAX` C macro, which is the max value of a `size_t` C type?
<FromGitter>
<elorest> Sort of a silly question, but is there a way to map a hash to properties or @instance vars of an object at runtime. Obviously we don’t have send or eval. something like this but without eval. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5908f4c2f22385553d9abbfb]
<RX14>
you'd need to use macros, why do you need this @elorest
<FromGitter>
<elorest> I’m playing around with the idea of @db_object.set_attributes(:name => “me”, :age => 33) for an ORM.
<RX14>
why not use named parameters
<FromGitter>
<elorest> That’s probably the right solution.
<oprypin>
bew, you can't do anything related to C preprocessor or header files. but Crystal maintains info about C types. use `LibC::SizeT::MAX`