jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.2 | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
mdz_ has joined #crystal-lang
<flaviu> I'd expect quite a bit of speedup on linux too, https://i.imgur.com/TT2rn6x.png
mdz_ has quit [Ping timeout: 256 seconds]
kulelu88 has joined #crystal-lang
<flaviu> Ctags isn't particularly effective though, especially on short identifiers.
<flaviu> I use pt as a searching tool, and ctags is only a little better then dumb text search.
<flaviu> "out foo" is a clever idea!
shama has quit [Remote host closed the connection]
c355E3B has joined #crystal-lang
<datanoise> ctags displays method/class definitions, with grep you have to waddle through all call sites, which is too much in most projects
asterite has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
shama has joined #crystal-lang
Cidan is now known as zz_Cidan
<flaviu> well, you can hack around that most the time with clever queries
shama has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
mdz_ has quit [Ping timeout: 264 seconds]
bcardiff has quit [Quit: Leaving.]
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vIOdt
<crystal-gh> crystal/master 04fb587 Juan Wajnerman: Process both read and write events coming from libevent in the same call (should fix crystal-redis/issues#2)
shama has joined #crystal-lang
pleiosaur has joined #crystal-lang
<travis-ci> manastech/crystal#2412 (master - 04fb587 : Juan Wajnerman): The build passed.
shama has quit [Remote host closed the connection]
<pleiosaur> hey folks, there's a question at https://news.ycombinator.com/item?id=9669166 that I'm also interested to know the answer to
shama has joined #crystal-lang
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 265 seconds]
waj has joined #crystal-lang
asterite has joined #crystal-lang
c355E3B has quit [Quit: Connection closed for inactivity]
asterite has quit [Ping timeout: 246 seconds]
waj has quit [Quit: waj]
asterite has joined #crystal-lang
<asterite> hi pleiosaur, what question?
willl has quit [Quit: Connection closed for inactivity]
<pleiosaur> pleiosaur: it was the first one, I think you've already answered it :P
<pleiosaur> er, asterite ^
<pleiosaur> just talking to myself again, I suppose :P
<asterite> :)
<pleiosaur> asterite: what's the backend?
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
<asterite> pleiosaur: llvm
shadeslayer is now known as shaderslayer
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
ponga has joined #crystal-lang
BlaXpirit has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 258 seconds]
datanoise has quit [Ping timeout: 246 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
ponga has quit [Ping timeout: 246 seconds]
datanoise has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
ponga has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vI3lQ
<crystal-gh> crystal/master b7d19f7 Ary Borenszweig: Say that we are a statically type-checked language
sandelius has joined #crystal-lang
<travis-ci> manastech/crystal#2413 (master - b7d19f7 : Ary Borenszweig): The build passed.
datanoise has quit [Ping timeout: 250 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willl has joined #crystal-lang
sandelius has joined #crystal-lang
ponga has quit [Read error: No route to host]
mdz_ has joined #crystal-lang
DeBot has quit [Remote host closed the connection]
jhass has quit [Read error: Connection reset by peer]
mdz_ has quit [Ping timeout: 256 seconds]
Ven has joined #crystal-lang
zipR4ND has joined #crystal-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nickpad has joined #crystal-lang
<zipR4ND> hey all, can i capture a block def capture(&block: args -> return) and have a splatted array as args (variable number of inputs?)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
BlaXpirit has joined #crystal-lang
sandelius has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
willl has quit [Quit: Connection closed for inactivity]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
sandelius has joined #crystal-lang
doebi has joined #crystal-lang
Ven has quit [Disconnected by services]
Ven_ has joined #crystal-lang
nickpad has quit [Quit: nickpad]
geksilla has quit [Ping timeout: 255 seconds]
jhass has joined #crystal-lang
Evangelia has joined #crystal-lang
Evangelia has left #crystal-lang [#crystal-lang]
<crystal-gh> [crystal] teleological opened pull request #739: Fix typo in docs (gh-pages...patch-1) http://git.io/vIsgo
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
DeBot_ has joined #crystal-lang
DeBot_ has quit [Client Quit]
DeBot_ has joined #crystal-lang
DeBot_ has quit [Client Quit]
DeBot_ has joined #crystal-lang
DeBot_ has joined #crystal-lang
jhass is now known as DeBot
DeBot is now known as jhass
DeBot_ has quit [Client Quit]
DeBot has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 276 seconds]
<crystal-gh> [crystal] teleological opened pull request #741: Fix typo in docs (gh-pages...patch-2) http://git.io/vIsQg
Ven has joined #crystal-lang
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (card.freenode.net (Nickname regained by services))]
sandelius has joined #crystal-lang
datanoise has joined #crystal-lang
jeromegn has joined #crystal-lang
<jeromegn> asterite, your responses have been great on HN.
jeromegn has quit [Client Quit]
jeromegn has joined #crystal-lang
<BlaXpirit> on HN what
<BlaXpirit> oh, "crystal language", that wasn't hard to find
waj has joined #crystal-lang
NeverDie has joined #crystal-lang
<jeromegn> :)
<sandelius> kink?
<sandelius> link?
<sandelius> danke
<jhass> and the day we land on HN carc.in's host has a harddisk replaced >.<
<jeromegn> oh
<jhass> (it's done and back up, raid is rebuilding)
<jeromegn> nice
<jeromegn> I’ve been wondering, why does the standard lib include OAuth stuff?
<jhass> probably because they used it for one of their projects
datanoise has quit [Ping timeout: 256 seconds]
<jeromegn> perhaps
benhuda has joined #crystal-lang
<benhuda> hello
<jhass> hi
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waj has quit [Quit: waj]
<benhuda> im very excited about crystal. came here following the HN post :)
<benhuda> although Crystal isn't proven enough so that I take it to production (web services) im thinking of building my CLI tooling with it (system, devop, etc)
<benhuda> i've noticed it generates binaries even smaller than Go (I've directed my company to seriously invest in Go)
<benhuda> to a more experienced crystalist, does this make sense?
<benhuda> also i'm wondering if theres any kind of roadmap/vision/timeline I can take a look at
<benhuda> my intuition tells me this can be much bigger than Elixir or JRuby
<flaviu> I'm curious as to why binary size is important.
<jhass> benhuda: afaik it's because Go statically links everything while crystal tends to dynamically link
<benhuda> flaviu well, in Go, binaries creep up to 20M in size when we use real-life libraries, and so far we like to compose our tools as well. our devops maintain 40-50 different tools (much of them in the data science/hadoop area)
<jhass> doing dynamic linking is subject to discussion but I hope I'll be able to make the case for keeping it as an option
<benhuda> but generally it's not a concern, just an indicator of static/dynamic linking (which i see the answer from jhass :)
vikaton has joined #crystal-lang
asterite has joined #crystal-lang
Ven has joined #crystal-lang
<flaviu> I've gotten around to changing codegen_many_units, and simply tearing out all the forking gets me a 2x speedup.
havenwood has joined #crystal-lang
<asterite> flaviu: cool! what the code looks like? 2x speedup in which phase?
<flaviu> It's an overall 2x speedup, time make all takes half the time
<flaviu> I'd expect another major speedup once I make so that the threads are only forked once.
<jhass> I wonder if/how it affects memory usage too
<asterite> flaviu: hm, but removing fork makes codegen be sequential, not parallel anymore... right?
<flaviu> Correct.
<asterite> That should be slower, I think... that's what we had in the beginning. Let me check again
<flaviu> But when it forks for each unit, linux has to copy every page that is written to.
<flaviu> And that showed up 40% of the samples in my profiler.
<asterite> Did you remove the .crystal folder before checking the performance?
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flaviu> yep, my bad then.
kokut has joined #crystal-lang
kokut has left #crystal-lang [#crystal-lang]
<flaviu> But I only get a 10% or so slowdown removing all the paralleization, so that shows room for growth.
<flaviu> from my profiler: https://i.imgur.com/TT2rn6x.png
<jhass> asterite: I'm curious, you need to show us a screenshot of https://github.com/manastech/crystal/graphs/traffic :P
<asterite> jhass: I'll do if you show us traffic of carc.in ;-)
<asterite> (kidding)
<jhass> host was done for harddisk replacement this morning, so missed a bunch I'm afraid :/
<asterite> jhass: no problem :)
<jhass> mh, 403s here
<asterite> And this is for the main website's google analytics: https://www.dropbox.com/s/0osrrhz6umwluoe/Screenshot%202015-06-06%2012.19.40.png?dl=0
<asterite> Almost 10_000 came from hackernews, the other times it was something around ~2_000 or ~3_000, I don't know why today more people went in... maybe because it's weekend
willl has joined #crystal-lang
<asterite> flaviu: in my case without the parelleization, compiling the compiler, in the bc+obj phase it takes 30s
<asterite> I'll have to try that on linux, will do soon
<jhass> interesting, I'd think more would make it from the homepage to the repo
<asterite> jhass: file:///var/folders/6r/59l7y6hs6zb27xpbh3fqr53w0000gn/T/dbxlHgCWPY.html#
<asterite> Oops, didn't refresh the location bar yet
<jhass> yeah, that's about 15% of the crystal-lang.org visitors if I got that right
<jhass> on the plus side I've already seen people entering play.google.com by pasting the full URL into google :P
<asterite> Cool :)
<asterite> I'm one of those ;-)
<asterite> No,sorry
<asterite> not into google, hehe... misread
<jhass> and I mistyped...
<asterite> There's this classic: http://i.imgur.com/bcpZR.jpg
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> haha
<jhass> didn't even know it
<jhass> but I also don't understand how reddit & HN got so popular, I find that kind of comment organization extremely hard to follow
<asterite> Me too, when I want to read new comments (at least on HN) I search "minutes ago" :-P
<jhass> yeah
<BlaXpirit> nah, reddit is fine
unshadow has quit [Ping timeout: 272 seconds]
<crystal-gh> [crystal] asterite closed pull request #741: Fix typo in docs (gh-pages...patch-2) http://git.io/vIsQg
<crystal-gh> [crystal] asterite closed pull request #739: Fix typo in docs (gh-pages...patch-1) http://git.io/vIsgo
<jhass> http://carc.in/#/r/1xx hrm, I don't want to know how many people are set up by that one
<benhuda> i just had a nice 'wow' feeling with the crystal CLI - awesome work on crystal guys! im getting a really feeling about it!
<benhuda> jhass its the quality and maturity of discussion on HN that counts. it's nice to have posts judged and critiqued by the cream of the crop of VCs, entreprenuers, techies, and generally smart people
<asterite> jhass: it's fixed on master, maybe we should release 0.7.3 :-)
<BlaXpirit> wow, fixes coming so fast
<asterite> benhuda: yes, I liked that too. I didn't see a comment like "your language sucks" or "who needs another language?", all comments are humble and well thought
<benhuda> asterite if you guys don't really know HN, i can bring you up to date. usually if you're at the top 10, and get to be #1, you're really *really* worth it
<benhuda> theres a few anti-fraud algorithm that no one really know how they work, so it's very hard to "trick" your way into top 10
<benhuda> but, from my experience (i pushed around 4-5 projects into the top 10 over the last 3-4 years) there are some topics HN as a living and breathing organism likes
<benhuda> it changes with time, but for the last 2-3 years, anything with "Go" in it goes right up. anything with Elixir for the last 6months or so goes right up. Clojure used to be a blessed topic, like Go, but lately is not.
<benhuda> so, from these facts alone - here's a trick for you guys when you need another boost -- publish a Go/Crystal comparison, benchmark, or anything really.
<jhass> asterite: I know
<benhuda> it'll make it to top 10 quickly, and you're going to be positioned really well per next posts on HN.
<benhuda> i'm not saying be a HN junkies.. but the 40k/day visits of raw talent sometimes can really help a community
Ven has joined #crystal-lang
<jhass> and all I'm saying re HN/reddit is that I'm never sure I actually seeing everything of all that well thought stuff unless I'm spending an unjustified amount of time there
<benhuda> jhass you're right, theres a time investment there but it covers my daily bathroom readings well :)
<asterite> benhuda: I'd like to let things evolve by themselves. This HN wasn't made by any of us, probably someone that recently discovered crystal. I also personally don't do public benchmarks against other languages as benchmarks have many things taken into account and it's hard to make conclusions. But we always try to make sure to have reasonable performance
<jhass> with unjustified I mean I just would need some way to influence the sorting, new since/hotlist with the last 10 comments that jump through them, something like that
<jhass> nothing hard to do
<asterite> benhuda: if Crystal is good people will eventually realize it and start using it and improve it and its ecosystem... we could push things with HN or other stuff, but I wouldn't like it
<benhuda> asterite i'm with you on evolving. But i came from HN, and i'm willing to help with Crystal :). I'm excited to start the week and I'm going to get our devops start doing tooling with Crystal. I think it'll be awesome. Hopefully from this come some feedback to you guys, fixes, and perhaps libraries that we'll develop.
<benhuda> you can't measure the HN effect yet.. but since i've experienced it a few times, it's going to last a year or so :)
sandelius has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
<vikaton> I'm usually the person to post thing on /r/programming or HN about articles or releases of the languages that more attention
<vikaton> the ones I support of course
<benhuda> anyways i'll go back to working. i think crystal right now has a huge sweet spot for CLI tooling; i'm going to go for that and hopefully make a few tools, blog posts to share about the process.
<jhass> btw did that rgsoc project start already?
asterite has joined #crystal-lang
c355E3B has joined #crystal-lang
<asterite> benhuda: hope you enjoy crystal :-) But I'd be careful to use it for production apps, but if it's some CLI for internal usage I would definitely try it
<benhuda> yep :)
<asterite> jhass: I saw this the other day: http://railsgirlssummerofcode.org/blog but I don't think they will do the twitter cl (didn't see it mentioned)
<jhass> oh, that's sad
<jhass> interesting, we got one sponsored, I wonder who mentors it....
<jhass> Lisa I guess
<asterite> For diaspora?
<jhass> yeah
asterite has quit [Ping timeout: 246 seconds]
<jhass> haha, nice try http://carc.in/#/r/1zb
<BlaXpirit> o.o
<BlaXpirit> one day you'll make it playable there :D
<jhass> maybe....
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> I'm a bit disappointed at the script kiddies
<jhass> nobody seriously tried to break it yet
mdz_ has joined #crystal-lang
<flaviu> Is that a challenge I hear? ;)
<jhass> sure, I'd like to know if there's a flaw
<jhass> http://www.securitytracker.com/id/1032453 anybody knows anything about this one btw?
<BlaXpirit> :/
<flaviu> jhass: Can you do something about http://carc.in/assets/vendor-xxx.js? 1M is quite big.
<BlaXpirit> wow, pcre vulnerability really sucks
<jhass> mmh, my nginx doesn't gzip?
<BlaXpirit> doesn't matter, 1M is crazy
<flaviu> ^
<jhass> well, codemirror, ember & highlightjs
mdz_ has quit [Ping timeout: 265 seconds]
c355E3B has left #crystal-lang [#crystal-lang]
benhuda has quit [Max SendQ exceeded]
<jhass> derp, gzip was indeed off
<flaviu> I guess I haven't really been keeping up with frontend trends -- I tend to do as much as possible without javascript.
<flaviu> anyway 183601 bytes is much more reasonable than 1M.
zipR4ND has quit [Ping timeout: 276 seconds]
<jhass> I'm not a JS person either and this is essentially a toy project for me, so I don't care much
<jhass> 300KB with gzip
<flaviu> Is it possible to turn up gzip in nginx? I get just 183KB with -9.
<jhass> I guess, the vm is still mostly idle
<jhass> set gzip_comp_level 9, doesn't seem to make much of a difference
<flaviu> The biggest improvement in load time will probably happen when nginx finally gets http2 support.
bhishma has joined #crystal-lang
<jhass> well, that's still under debate
<jhass> quite a lot people seem to see negative effects from what I've heard
<jhass> I expect things like SO_REUSEPORT support that came in 1.9 to have a greater impact for the larger deployments
<jhass> mmh, I should edit the DB and add a link to http://www.w3fools.com/ here: http://carc.in/#/r/1zg :P
<flaviu> I'm not sure how http2 would cause problems here.
<jhass> iirc it was something with the pipelining
<flaviu> It'd allow the browser to fetch the css and js before parsing the html.
<jhass> I don't have the details present
<jhass> I think something with header bloat too
datanoise has joined #crystal-lang
<flaviu> well, headers are now binary and compressed
datanoise has quit [Ping timeout: 272 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] bdsatish opened pull request #742: Documentation fix about Unicode range (master...patch-1) http://git.io/vIG9O
bcardiff has joined #crystal-lang
sandelius has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
kostya has joined #crystal-lang
kostya has quit [Client Quit]
<crystal-gh> [crystal] bdsatish opened pull request #744: Documentation fix about Unicode range (gh-pages...gh-pages) http://git.io/vIGdk
Ven has joined #crystal-lang
Ven has quit [Client Quit]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
waj has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #744: Documentation fix about Unicode range (gh-pages...gh-pages) http://git.io/vIGdk
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vIGhO
<crystal-gh> crystal/master a2a8677 सತೀశః: Documentation fix about Unicode range...
<crystal-gh> crystal/master 05cb08a Ary Borenszweig: Merge pull request #742 from bdsatish/patch-1...
<travis-ci> manastech/crystal#2415 (master - 05cb08a : Ary Borenszweig): The build passed.
NeverDie has joined #crystal-lang
bcardiff has joined #crystal-lang
<crystal-gh> [crystal] flaviut opened pull request #745: Reduce threads spawned for codegen (master...reduce-forking) http://git.io/vIZf2
waj has quit [Quit: waj]
<flaviu> Eventually, when someone writes a real thread pool, it could be changed to use that.
<flaviu> As there might be times when only one out of several threads is busy
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
premysl has joined #crystal-lang
<premysl> Hello, is there a way to get a C int?
<premysl> That is, platform-dependent width.
<jhass> premysl: we have an alias, LibC::IntT
<premysl> Is it documented?
<jhass> I don't think so
<premysl> Couldn't find anything like that in the docs.
<premysl> Thought it'd be like that.
mdz_ has joined #crystal-lang
<BlaXpirit> also keep in mind that it's wrong :|
mdz_ has quit [Ping timeout: 258 seconds]
<jhass> correct it?
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vikaton has quit []
doebi has left #crystal-lang ["WeeChat 1.1.1"]
sandelius has joined #crystal-lang
<BlaXpirit> lol so i corrected it
<BlaXpirit> and of course crystal doesnt compile anymroe
<BlaXpirit> >> LibC::SizeT.cast(5)
<DeBot> BlaXpirit: # => 5 - http://carc.in/#/r/22h
<BlaXpirit> yay, i remember this
asterite has joined #crystal-lang
<asterite> BlaXpirit: what's wrong with IntT?
<BlaXpirit> asterite, well almost everything
<BlaXpirit> asterite, is it supposed to be C int?
<asterite> Everything like... ?
<BlaXpirit> it is 32 bit on all major systems
<asterite> As far as I can see, IntT and UIntT are only used to define SizeT, SSizeT, etc.
<asterite> C int is Int32 in Crystal
<BlaXpirit> asterite, what purpose does IntT serve really
<asterite> or at least that's why I knew so far
<asterite> just to define SizeT and SSizeT
<BlaXpirit> but that's pointless and backwards
<asterite> I wouldn't have defined it, probably, maybe it's there to avoid some repeition
<BlaXpirit> it is a meaningless type that doesn't exist
<BlaXpirit> which just happen to define SizeT correctly
datanoise has joined #crystal-lang
<asterite> Yes, I'll remove it :)
<BlaXpirit> I think it is best to define all these C types instead of relying on de-facto standards that may change in the future
<BlaXpirit> then all the libraries will be broken
<BlaXpirit> asterite, don't you think so?
<asterite> what do you mean?
<BlaXpirit> i mean what if windows 11 defines int to be 64 bit
<BlaXpirit> what will you do then?
<BlaXpirit> or linux 4, whatever
<BlaXpirit> then crystal and its libraries just won't work
<BlaXpirit> and it will be a global catastrophe, every lib would have to be modified
<BlaXpirit> int is quite an unlikely example, but it can happen to any type
<asterite> Mmm... the C types are just for C bindings, when you define bindings you must use the correct types
<BlaXpirit> asterite, the correct types are not available in Crystal
<BlaXpirit> so how can one use them?
<asterite> Crystal types must be converted to these C types to work, I don't think that's going to be a problem
<BlaXpirit> ok but I can't define bindings
<asterite> BlaXpirit: you shouldn't use them in regular code, just in bindings
<BlaXpirit> goddammit
<BlaXpirit> i have a C function that accepts arguments: short, unsigned long, int
<BlaXpirit> how to make bindings for it?
<asterite> int = Int32, short = Int16, unsigned long = UInt64
<BlaXpirit> that is wrong
<BlaXpirit> even currently
<asterite> I just did sizeof(int) in C and it gives me 4
<asterite> and I'm on a 64 bits machine
<BlaXpirit> ok cool
<BlaXpirit> on 32 bit machine long is 32 bit
<BlaXpirit> on windows long is 32 bit
<BlaXpirit> on old machines int is 16 bit
<BlaXpirit> on future machines, who knows, short may become 32 bit
<asterite> Ah, I didn't know what
<BlaXpirit> what i really should say is,
<BlaXpirit> C standard NEVER defines the exact sizes of these types
<asterite> well, we'll have to make a big ifdef for windows... or eventually have a proper alias for C int like you say
<BlaXpirit> even char can be more than 1 byte (and there were precedents)
<flaviu> I'd like to see how clang handles all this
<flaviu> Since LLVM IR does not (IIRC) support names like "short" and "int", just i16, i32
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (sinisalo.freenode.net (Nickname regained by services))]
<BlaXpirit> whatever coincidences or de-facto standards there may be, it's all fragile
<BlaXpirit> I really hate using these Int32 for C bindings. What I suggest is aliases for every single C type
<BlaXpirit> sure, almost all of them would be trivial aliases like int = Int32
<BlaXpirit> but think of the children!
asterite has quit [Ping timeout: 246 seconds]
<flaviu> Maybe this would require compiler magic to get right?
vikaton has joined #crystal-lang
bcardiff has joined #crystal-lang
<jhass> +1, aliases for C types even if trivial wouldn't be bad, you can completely forget what the mapping to crystal types on what platform is
<BlaXpirit> it's not about forgetting, it's about future-proofing
<flaviu> jhass: It is absolutely not trivial, especially if the goal is to support everything clang supports.
<BlaXpirit> you don't seem to understand
<BlaXpirit> it actually IS quite easy
<BlaXpirit> we don't even insist on it to immediately support every system
<BlaXpirit> alias LibC::Int = Int32 is a ton better than using Int32
<jhass> I also still think we should hide the ifdef hell better with something like https://gist.github.com/jhass/cbc509e8ed1025b22a70 but oh well...
<flaviu> jhass: yep, but sometimes its necessary to wrap other C libraries.
<jhass> well that proposal is geared towards the standard library only
<jhass> whether it's fit for other libraries is on their own to choose
<flaviu> jhass: I don't understand.
<flaviu> Are you saying "Provide an idomatic wrapper around the C standard library in the Crystal standard library"?
<jhass> yes, where "C standard library" is everything that the crystal standard library provides bindings for that differ among platforms
<jhass> https://github.com/xwanderer/crystal/commits/win32 read a bit through the commits here
vikaton has quit []
vikaton has joined #crystal-lang
<jhass> well, and "idiomatic" is not the focus, well-defined is
<jhass> abstract platform specific behavior away and provide a common contract to build upon
<jhass> so you can get rid of the riddling the higher level abstractions in the standard library with ifdefs
<flaviu> I understand. What I'm talking about is totally different.
<jhass> thus I started with "I also"
<flaviu> Sorry then, my eyes completely skipped over "also"
<crystal-gh> [crystal] BlaXpirit opened pull request #746: Fix LibC types (master...fix-libc) http://git.io/vIZXz
datanoise has quit [Ping timeout: 265 seconds]
<BlaXpirit> welp, looks like i definitely have missed a lot of the places where it's used
<BlaXpirit> what have i gotten myself into
<BlaXpirit> size_t wrapped as Int32
<BlaXpirit> how can it work
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<BlaXpirit> it's an extreme amount of work to change the types everywhere :(
<BlaXpirit> why size : UInt32
<BlaXpirit> just why
<BlaXpirit> and this s**t is everywhere
<jhass> well you can do it or you can open a bug report about it, but there's no point in all the whining, that's just annoying
waj has joined #crystal-lang
<crystal-gh> [crystal] BlaXpirit closed pull request #746: Fix LibC types (master...fix-libc) http://git.io/vIZXz
waj has quit [Client Quit]
strcmp1 has quit [Remote host closed the connection]
kulelu88 has joined #crystal-lang
strcmp1 has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
jabar has joined #crystal-lang
mdz_ has joined #crystal-lang
<jabar> Any idea why this does not print more than once? https://gist.github.com/anonymous/7cf9b6c3d93d82d8fe5d
mdz_ has quit [Ping timeout: 252 seconds]
<jhass> http://carc.in/#/r/238 0.7 broke sleep in threads I think
NeverDie has joined #crystal-lang
datanoise has quit [Ping timeout: 258 seconds]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
jabar has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 258 seconds]