ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <eliasjpr> any idea what I am doing wrong here https://play.crystal-lang.org/#/r/2knj
<FromGitter> <eliasjpr> ?
<wmoxam> :D
<FromGitter> <jwaldrip> RX14: Are you around?
<FromGitter> <jwaldrip> Or any core member around for that matter?
<FromGitter> <cevarief> Wondering if there’s already library for creating/reading office files?
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> Maybe libreoffice ?
<bmcginty> eliasjpr: change `name` in `some_method` to `func`, and change `{{tag.id}}` to `{{tag.id.stringify}}` on line 5.
<bmcginty> eliassjpr: your function defined name as an argument, and you also specified name in the options hash when passing it on l16.
<FromGitter> <codenoid> hi, hwo to set a proxy within a crystal HTTP Client
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> I'm trying to get Process to output to a file, I thought that this should do it ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But the file remains empty [https://gitter.im/crystal-lang/crystal?at=599bca869acddb2407b7304f]
<FromGitter> <bararchy> nvm, it was working just errored on something
<Groogy> Morning!
<FromGitter> <codenoid> morning groogy,, :D
<FromGitter> <cevarief> @bararchy Using libreoffice library from Crystal?
<FromGitter> <bararchy> @cevarief it was done before :) https://github.com/ojwb/lloconv
<FromGitter> <codenoid> hi, how to get a GET METHOD data with default crystal http library ?
<FromGitter> <bararchy> @codenoid you mean HTTP::Client.get("http://example.com/") ?
<FromGitter> <cevarief> @bararchy You need LibreOffice 4.3 or later for this to work.
<FromGitter> <cevarief> Crystal + Libre Office would be huge in term of file size.
<FromGitter> <codenoid> nope
<FromGitter> <codenoid> from default crystal http *server , i want get a GET METHOD data
<FromGitter> <codenoid> http://hublaa.co/?key=val # server with cr http server library, and i want get the `key` data
<FromGitter> <cevarief> @codenoid You can try using HTTP::Params or context of HTTP
<oprypin> seems like there are way too many levels to go through to get to the params
<FromGitter> <codenoid> thanks , done with `puts context.request.query`
mark_66 has joined #crystal-lang
<oprypin> codenoid, doesn't that like... return the string "key=val"
<FromGitter> <codenoid> yes, and juts parse it
<oprypin> codenoid, or just use .query_params like i linked?
<FromGitter> <codenoid> same result `fga=ga`
<oprypin> codenoid, that's what it prints with .to_s probably but there's an underlying parsed object
<oprypin> this but the first line is already done for you if you use .query_params https://crystal-lang.org/api/0.23.1/HTTP/Params.html#%5B%5D%28name%29-instance-method
<FromGitter> <codenoid> oo, thanks for `.query_params` @oprypin ^^
<FromGitter> <cevarief> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599bdeef76a757f808ce2e18]
<FromGitter> <bararchy> Wait, does Hash has a `Hash#[key]?` metohd to check if the key exists without call `.has_key?` mu life was a lie
<FromGitter> <cevarief> @bararchy That returns all hash content
<FromGitter> <bararchy> Yeha, played around with it, amazing
<FromGitter> <bararchy> didn't know about this method before
<FromGitter> <cevarief> How it works?
<FromGitter> <cevarief> isn’t that # means comment, so the rest after that char will be ignored
<FromGitter> <codenoid> is i'm right ? `context.response.status_code = 404` (integer status code), but when i check in the web browser, the browser send `200`
<FromGitter> <codenoid> lol, i write that after `context.response.print`
<FromGitter> <bararchy> @cevarief Oh, the `#` symbolizes a method call on an instance of a Class. ⏎ Like here: like `String#gsub`, etc ..
<FromGitter> <bararchy> it's not a literal `#`
<FromGitter> <bararchy> The actual code is ofc `String.gsub`
<FromGitter> <cevarief> @bararchy 👌
<FromGitter> <codenoid> hii, how to prevent this error ⏎ ⏎ ```Unhandled exception in spawn: ⏎ Error writing file: Broken pipe (Errno)``` [https://gitter.im/crystal-lang/crystal?at=599bf238614889d475746caa]
<FromGitter> <cevarief> @bararchy ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599bfbaa210ac26920ac500a]
<FromGitter> <cevarief> Now i’m starting to like exploring crystal api 😄
<FromGitter> <codenoid> hmm, i want make a simple proxy server, working fine in localhost, but when i deploy with public ip, my app returning bad gateway, etc ⏎ https://github.com/codenoid/kuking
<Papierkorb> codenoid, just FYI: There are scan bots out there looking for public proxy servers, for people to proxy mostly less-than-legal stuff over it
<FromGitter> <bararchy> True, you should add user&pass auth before publishing
<Papierkorb> codenoid, really, just "publish" it in your *private* LAN, or just locally for testing.
<Papierkorb> Least things that can go wrong that way
<FromGitter> <codenoid> btw, so weird, crystal basic server wont work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599c01329acddb2407b81938]
bmcginty has quit [Ping timeout: 276 seconds]
<FromGitter> <cevarief> @codenoid Try to restart your laptop
bmcginty has joined #crystal-lang
<FromGitter> <codenoid> vps actually
<FromGitter> <cevarief> Broken Pipe
p0p0pr37 has joined #crystal-lang
<FromGitter> <codenoid> ok then, how to use like this http://docs.python-requests.org/en/master/user/advanced/#proxies , in crystal
<FromGitter> <sdogruyol> no proxy support atm @codenoid
<FromGitter> <sdogruyol> use alternative http client like cossack
<FromGitter> <codenoid> ok, how to use proxy with cossack
<FromGitter> <codenoid> i still read the doc
<FromGitter> <sdogruyol> read the doc
<FromGitter> <sdogruyol> I'm not sure if it suppports though
sz0 has joined #crystal-lang
<FromGitter> <codenoid> so, move to python again :(
<FromGitter> <sdogruyol> ...
bazaar has quit [Ping timeout: 248 seconds]
jhass has quit [Ping timeout: 240 seconds]
bazaar has joined #crystal-lang
jhass has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #4190: Adding put_form to HTTP::Client. Fixes #4181 (master...feature/http_client_put_form) https://git.io/vSTF9
<FromGitter> <codenoid> this is,,,
<FromGitter> <codenoid> silly thing ever i've made
<FromGitter> <sdogruyol> what?
<FromGitter> <codenoid> why my crystal need nginx ? :/
<FromGitter> <sdogruyol> what do you mean?
<FromGitter> <codenoid> my simple proxy server working with nginx help (port management)
<FromGitter> <codenoid> hmmm, confusing me, :/
<Groogy> Well if you are linking against nginx, then you obviously need nginx?
<FromGitter> <codenoid> haha, eid with 2M/24hours data written to mongo with Crystal <3
flaviodesousa has joined #crystal-lang
<travis-ci> crystal-lang/crystal#ef17d5d (master - missed a word in the http client docs): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/267144779
<RX14> i've just about built a statically lniked crystal compiler
<travis-ci> crystal-lang/crystal#ef17d5d (master - missed a word in the http client docs): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/267144779
<FromGitter> <sdogruyol> really?
<FromGitter> <sdogruyol> how about libssl?
<RX14> i think i'll automate it and push to replace the terrible omnibus with it
<RX14> compiler doesn't need openssl
<FromGitter> <sdogruyol> oh yeah
<FromGitter> <sdogruyol> i forgot --withoutD
<RX14> it won't *create* static libraries
<RX14> but your compiler should work at least
<FromGitter> <bararchy> nice !, RX14 , did you build on alpine ?
<RX14> yes
<FromGitter> <bararchy> cool
<FromGitter> <bararchy> When you upload it ping us here :) I'll move back to crystal-git
rohitpaulk has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#ef17d5d (master - missed a word in the http client docs): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/267144779
<RX14> ldd .build/crystal
<RX14> ldd (0x5579985de000)
<RX14> so basically statically linked?
<RX14> it still shows as being linked to ldd
<RX14> actually wait that makes no sense
<RX14> well whatever
<RX14> it's statically linked enough
<RX14> 62.3MiB
<FromGitter> <codenoid> ✨
<FromGitter> <bararchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=599c23b79acddb2407b8b85b]
<FromGitter> <bararchy> new RFC is made
<FromGitter> <bararchy> hahaha
<FromGitter> <sdogruyol> lol
<RX14> well
<RX14> it seems like it's a dynamically linked executable with 0 dependencies
<RX14> not even ld-linux.so
<RX14> so
<RX14> i'm confused
<RX14> it's got what we want though - complete portability
<RX14> and was produced by -static
<RX14> perhaps it's like that to induce ASLR or something weird like that
rohitpaulk has joined #crystal-lang
<FromGitter> <mgarciaisaia> Wooo... Awesome @RX14!
<FromGitter> <bararchy> when you call `file` on it, does it say "dynamicaly linked" ?
<RX14> and this way people will be using their system libraries
<RX14> we won't be distributing any libraries other than libgc.a
<RX14> which is how it should be
<RX14> @bararchy yes and that's why i'm confused
<FromGitter> <codenoid> btw, is crystal really need other web server for resource who coming from public ip ? , I do not think so :/
<RX14> well probably not
<RX14> but probably isn't good enough
<RX14> you put a web server in front so you can say definitely
<RX14> and leave someone else to prove out crystal in production
<FromGitter> <bararchy> I would put the Crystal server in the front
<FromGitter> <bararchy> :)
<FromGitter> <bararchy> But i'm brave
<FromGitter> <bararchy> I'm the "someone else" hahah
<RX14> well I need a reverse proxy regardless because I have many vhosts
<RX14> also SSL termination
<RX14> so yeah
<FromGitter> <sdogruyol> nginx is just built for that kind of job
<RX14> SLL termination is much easier in stuff like nginx if you use LE
<FromGitter> <sdogruyol> so why not just use it
<FromGitter> <bararchy> Oh, that's something else then, I built a Reverse proxy with SSL offload and rewrite based routing from scratch in Ruby, might try to do something similar in Crystal as a side project
<RX14> or just use an existing one?
<RX14> I don't see the point in rewriting the same thing again and again in different languages
<FromGitter> <codenoid> then why my crystal server was not able to work with crystal own server :/
<RX14> we have nginx and we have caddy and they're both fantastic web servers
<FromGitter> <bararchy> Well, following the same logic, why should we have Crystal if we already have C, C++, Ruby, Python, Go, Rust ...
<FromGitter> <bararchy> XD
<RX14> because crystal does something different
<FromGitter> <codenoid> like ? :shipit:
<RX14> and whatever you're going to write likely does not
<FromGitter> <bararchy> Also , the best answer if "for fun and evolution of software" , any new "rewrite" is an upgrade, even just by testing the logic again, Nginx is a re-write of Apache, but better
<RX14> if you're going to write a HTTP proxy to do something special go ahead
<RX14> but if you're going to write it just because it's in crystal don't bother
<RX14> unless it's a learning project
<FromGitter> <codenoid> for me "Abusing computer (crystal++) for fun and profit"
<FromGitter> <codenoid> crystal it self is something special, and i use to build something special with something special , :D ✨
<FromGitter> <bararchy> btw, RX14 you can also say the same thing about Kemal or Amythists, it's just a rewrite of Rails\Sinatra on Crystal
<RX14> yes but that's a library
<FromGitter> <bararchy> But I think that those things are important
<RX14> it's differentiated by being written in crystal
<FromGitter> <bararchy> Well, I can do a reverse proxy lib
<FromGitter> <bararchy> as in a shard form
<FromGitter> <bararchy> that can allow you to use it programiclly
<RX14> sure that'd be useful
<RX14> but if nginx fits the bill then i'd always use nginx
<RX14> the best solution is the one which already exists
<Groogy> Like Boleite is just my rewriting the backend I wrote ages ago in D in Crystal
<Groogy> but with more Crystal idioms
gewo has quit [Ping timeout: 240 seconds]
<Groogy> like I love working with OpenGL objects now
<Groogy> instead of binding and unbindng manually
<Groogy> I just do shader.activate { do_stuff }
<FromGitter> <bararchy> @veelenga Nice work with the Amythist repo
<FromGitter> <bararchy> it's nice of @Codecore to transfer hes repo to the crystal-comunity
<FromGitter> <bew> what is this crystal-community GH organization anyway?
<FromGitter> <krypton97> Good question
<FromGitter> <jwaldrip> hmm, crystal doesnt currently parse timezone from 8601: Time::Format::ISO_8601_DATE_TIME.parse("2017-08-22T12:56:45-07:00")
<FromGitter> <jwaldrip> it returns the proper time, just not with the TZ i specified
<FromGitter> <asterite> it's because Time doesn't have a timezone, it's just UTC or Local
badeball has joined #crystal-lang
<FromGitter> <bararchy> @ary just have to say it , it's really really awsone seeing you back in the crystal tranches :)
<FromGitter> <bararchy> @bew @krypton97 , its an open group to support big dead projects that the original maintainer left or stopped maintaining
<FromGitter> <bararchy> In this way there is no stage where a relevant project sits idle while PRs are getting stacked up
<FromGitter> <codenoid> greatt ✨ 👏
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <bararchy> Nice => https://github.com/crystal-community/amethyst
<FromGitter> <bararchy> @benoist What is the state of the crystal-intelij plugin ?
<FromGitter> <bararchy> nvm , saw it was moved too
sz0 has joined #crystal-lang
<Groogy> Ow yeah is Crystal going to suppot SIMD?
<Groogy> talking about intrinsics in the #programming channel got me to think of that
<RX14> well you can bind the llvm instrinsics
<Groogy> trying to reach https://llvm.org/docs/LangRef.html but can't :(
<Groogy> from a google serach on llvm SIMD intrinsics
<crystal-gh> [crystal] MakeNowJust opened pull request #4870: Explosive birth of 'case!' (master...feature/crystal/optional-exhaustiveness-check) https://git.io/v5THB
<RX14> there's vector reduction and fused multiply add directives
<Groogy> ah their webpage seems to be down?
<RX14> nope
mark_66 has quit [Remote host closed the connection]
<RX14> not to me
<Groogy> it is to me, can't resolve the host
<Groogy> anyway can check it later, would be cool to add to the vector and matrix classes
<RX14> dns has been wacky for me too the last week or so
<RX14> Groogy, honestly just write code
<RX14> and let llvm do the work
<Groogy> it's not writing assembler itself, it's specific instruction set provided by the cpu for multiple data output.
<Groogy> so llvm will still be doing its work
<RX14> yes but llvm knows about that instruction set too
<RX14> have you tried to see whether llvm actually vectorizes already?
<RX14> as long as you've got no bounds checks in your loop
<Groogy> no becuase I can't get access to the website
<RX14> and you're doing simple operatons
<RX14> it should vectorize for you
<RX14> Groogy, you don't need the site for that
<RX14> you just dump the asm and see what it does
<Groogy> well I am at work so can't sit and code crystal here
<Groogy> I know it gives a performance
<Groogy> ops
<Groogy> I know it gives a performance boost when I did it in C++
<RX14> i'm just saying, let the compiler do it's work, you might not need explicit simd intrinsics
<Groogy> specifically on the matrix multiplication
<RX14> did what? simd instructions?
<Groogy> yeah
<RX14> ok
<Groogy> though that was couple of years ago
<Groogy> anyway time to head home
<Groogy> bye! o/
livcd has quit [Remote host closed the connection]
<RX14> Groogy, you might just be missing -march-native
<RX14> Groogy, you might just be missing -march=native
<RX14> which crystal doesn't support
<RX14> darn
<RX14> well
<RX14> -mcpu=native *probably* works
<FromGitter> <bararchy> I'm trying to bind `ptrace.h` using crystal_lib but I get a wierd output ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Someone got an idea ? [https://gitter.im/crystal-lang/crystal?at=599c51c3a7b406262db66d21]
<FromGitter> <bararchy> RX14, does the output looks ok ? it seems wierd this is the full lib
<RX14> why not read the manpage
<RX14> and find out yourself
rohitpaulk has quit [Ping timeout: 260 seconds]
<FromGitter> <totakaro> RX14, `@[Rule(..)]` What is this syntax for? Looks like C# flags
<RX14> Rule?
<RX14> where is that from
<RX14> @[Foo] syntax is attributes
<RX14> allows you to annotate an AST node with metadata
<RX14> for example @[Link()] on libs
<RX14> but i've never ever seen a Rule attribute
<RX14> it's not in the compiler at least
<FromGitter> <totakaro> > @[Foo] syntax is attributes ⏎ ⏎ yeah, I mean `@[Primitives]`, `@[Link]`, `@[Extern]`, etc, Thanks you!
<FromGitter> <totakaro> > allows you to annotate an AST node with metadata ⏎ ⏎ RX14, Can I set customized attributes?
<RX14> no
<FromGitter> <totakaro> Ok 👍
<FromGitter> <krypton97> what os ?
<FromGitter> <sdogruyol> Windows?
<FromGitter> <totakaro> Yes, Windows 10 with WSL, it's the same that https://github.com/watzon/wsl-proxy but with an installer 😅
<FromGitter> <totakaro> The installer adds `crystal ` to Path automatically and creates an Desktop icon for `crystal play`
DTZUZO has quit [Ping timeout: 276 seconds]
<FromGitter> <totakaro> It's useful on VSCode extension by example, I'll write some documentation about.
<watzon> Well would you look at that. My project is useful 😁
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] MakeNowJust opened pull request #4871: Allow assignment to class var when fit this class var types of ancestors (master...fix/crystal/allow-assign-class-var-if-fit-ancestors-type) https://git.io/v5kTs
flaviodesousa has quit [Remote host closed the connection]
Excureo has joined #crystal-lang
<FromGitter> <jwaldrip> @straight-shoota Made some updates the YAML PR, thank you so much for your feedback thus far.
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
<RX14> ok
<RX14> i automated my static crystal
<FromGitter> <mverzilli> :O
<RX14> doesn't even segfault any more
<RX14> haha
<FromGitter> <bew> RX14 what do you mean "automated my static crystal"? What did you automated? The static linking?
<RX14> building the static omnibus
<RX14> inside a docker container
<FromGitter> <bew> Oh nice!
<RX14> lol /opt/crystal/lib/crystal/bin/crystal
<Papierkorb> it's not optional .. neither a lib .. it's a .. BINARY
<RX14> well technically
<RX14> i think the raw compiler binary belongs in lib
<RX14> because it's "libraries the things in bin depend on"
<RX14> and in bin/crystal is just a wrapper
<RX14> but there's also an actual library in lib/crystal
<RX14> so i have to segment it further
<RX14> and the stdlib is in share/crystal where it should be finally
<RX14> i'm confused to why i'm getting /usr/bin/ld: C-allS-tack.o: undefined reference to symbol 'dladdr@@GLIBC_2.2.5' though
<RX14> why is that symbol in there?
<RX14> it's a crystal-emitted .o file so it was generated by LLVM
<RX14> but i compiled on musl so why is there's an erroneous glibc in there
<RX14> so that symbol couldn't have come from musl or my system
<RX14> adding --link-flags='-ldl' works which is strange
<RX14> so does adding 'x86_64-unknown-linux-gnu'
<RX14> so it seems that LLVM's "default target triple" is determined at build time
<RX14> that's annoying and unfortunate
<RX14> i guess i'll add proper cross-build support using something like CRYSTAL_CONFIG_TARGET
<RX14> so we can finally have the hell of build, host and target finally
<crystal-gh> [crystal] RX14 opened pull request #4872: Add --static compiler option (master...feature/static-support) https://git.io/v5kaD
<Papierkorb> Ladies and gentlemen, and channel bots too. I hereby present to you: https://github.com/Papierkorb/qt5
<Papierkorb> And of course https://github.com/Papierkorb/bindgen
xaxisx has quit [Read error: Connection reset by peer]
xaxisx has joined #crystal-lang
<FromGitter> <maxfierke> niiiiice
<FromGitter> <krypton97> !bot remind me 8h
<oprypin> :)
<RX14> Papierkorb, cool
<oprypin> Papierkorb, have you considered not having the qt object through a pointer?
<Papierkorb> mh?
<oprypin> storing the Qt object right in the Crystal object
<oprypin> without a pointer
<Papierkorb> Oh god no
<RX14> what if you con't construct the object
<RX14> then you have to pointer anyway right
<oprypin> solves surprisingly many problems, e.g. dont need to forward qHash :p
<RX14> which just makes the performance advantage kind pointless
<RX14> Papierkorb, why do you need to symlink stuff into ext?
<Papierkorb> RX14: That's just general helper structures.
<Papierkorb> I just recommend symlinking so it keeps up to date with the bindgen version
<oprypin> but maan this project is just on another level
<Papierkorb> oprypin: Took the last two days to completely revamp the type-system too. Fixed a bunch of nasty typing bugs in bindgen.
<RX14> Papierkorb, so you don;t need the bindgen_helper if you're not writing converters?
<RX14> like is ext neccesary at all?
<RX14> also you should add a post install hook to do the bindgen stuff i guess Papierkorb
<oprypin> it's not nice to do, i opted out of that for my project, too many assumptions
<oprypin> main assumption is, i guess, that qt is in /usr/include. and needs clang blah blah
<Papierkorb> The paths are currently full of assumptions
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
<RX14> you literally can't see the bindings
<Papierkorb> Another point for it being TechPreview/Beta-stadium
<Papierkorb> mh?
<oprypin> RX14, Papierkorb, probably need to make per-qt-module binding files huh
<RX14> on github
<RX14> it just craps out
<Papierkorb> Oh yeah
<RX14> file too large
<Papierkorb> that's a lot of code lul
<RX14> yeah yeah i know oprypin
<oprypin> now that's worthy of a bountysource, unlike that guy wth an empty repo xD
<Papierkorb> Atom-editor also has a memory leak which is obvious when working with large files.. So yeah, I used Kate to read those, which had none of such issues
<RX14> oprypin, yeah that was hillarious
<RX14> >atom
<RX14> use a real editor
<oprypin> he used Kate, seems good
<Papierkorb> Now, this really is a TechPreview: There are things to do, but also, infrastructure questions. I want people be able to just drop in a dependency in their shard.yml, run `crystal deps`, and it just works™. I think this is the biggest hiccup that could turn people away otherwise.
<oprypin> what's #define fake enumerations again?
<Papierkorb> Qt has QMake, which is pretty near that for C++ .. as long you stick to Qt lul.
<Papierkorb> oprypin: `#define FOO_A 1 .. FOO_B 2 ..`
<Papierkorb> C-style "enums" “I didn't know there's enum in C too”
<oprypin> that was my main guess but what's the context on it?
<oprypin> does Qt use it somewhere and you want to bind it or what
<Papierkorb> When bindgen grows into a solution for C projects, it'll have to support it somehow
<oprypin> ah whatever
<wmoxam> 0
<Papierkorb> oprypin: Completely irrelevant to Qt, thankfully
<oprypin> well it's actually almost never usable out of the box, the defines can be random chunks of code, it's the weirdest problem to solve for sure
<Papierkorb> And the Clang API for macros is "uargh"
<Papierkorb> RX14: atom is up till now the least-worst editor I use. QtCreator is only for C++ :(
<RX14> i heard vscode was pretty good
<Papierkorb> > Microsoft
<RX14> i judge projects on their qualities
<RX14> not who made them
<RX14> but vim/emacs are the true editors anyway
<oprypin> RX14, this is not the time :(
<RX14> it's always the time!
<oprypin> the most important library binding has been made
<RX14> and i'm shitposting about editors, yes
<oprypin> Postinstall (cd clang && make) && crystal deps build -- yeah also dont like this part
<Papierkorb> Ah man, I forgot to mention in the readme that bindgen does support QFlags
<oprypin> Papierkorb, how would you feel about Windows support tho
<Papierkorb> oprypin: How should it be done otherwise? The clang part needs to be there, and if you run bindgen again and again while not dev'ing bindgen itself, the wait time for crystal really adds up
<RX14> "A class depending on another class should follow *after* its dependency." can't you have circular dependencies in C++?
<oprypin> well the way I did it was to require manual intervention
<oprypin> RX14, you can
<Papierkorb> oprypin: Violates "just works"
<Papierkorb> RX14: Technically yes, in reality "Really?!"
<oprypin> class A; class B {}; class A {};
<RX14> nice
<Papierkorb> That's not circular
<RX14> well no because neither class has members
<oprypin> `class A; class B { A* a}; class A { B* b};`
<oprypin> happy now
<Papierkorb> RX14: Or, mh no I don't think so
<Papierkorb> oprypin: That's not a circular dependency in terms of inheritance
<Papierkorb> Which I was playing at there. Have to improve it if that's not obvious
<oprypin> so that's the thing, RX14 probably didnt mean as inheritance
<Papierkorb> RX14: Well, C++ has virtual inheritance so .. erm .. maybe
<RX14> oh no
<RX14> circular inheritance?
<RX14> that beaks my brain
<oprypin> that's just nonsense
<Papierkorb> virtual inheritance doesn't?
<oprypin> and now i get to sleep and then work all day :>
<crystal-gh> [crystal] kenta-s opened pull request #4873: Improve JSON::ParseException message (master...make-error-message-better) https://git.io/v5kPx
<oprypin> Papierkorb, is it normal that lib/qt5/ext doesn't contain any compiled files after `crystal deps`?
<Papierkorb> oprypin: on `master` you mean?
<oprypin> i have branch: master-ready-to-use
<RX14> Papierkorb, bindgen is really really cool
<RX14> i hope this Qt stuff becomes stable and well-used
<Papierkorb> oprypin: there should be qt_binding.cpp, which should be compiled by `make` through postinstall
<Papierkorb> oprypin: I've never used that scripting feature of shards before though, might be off
<Papierkorb> RX14: Glad you like it overall. And of course, every maintainers dream is that their stuff is actually used I guess
<oprypin> is it by chance being broken by bindgen's postinstall? seems to stop abruptly after it
<oprypin> clang not being installed could have something to do with that
<Papierkorb> But it hits the bindgen postinstall heh
<oprypin> you probably dont want to run bindgen's postinstall
<RX14> i really want to delete crystal deps as an alias
<oprypin> didnt mean to in this context at least
<Papierkorb> oprypin: Looks like it. it's a good point anyway, there should be a way to force disable a postinstall
<oprypin> hold on, i actually do have clang 4.0 installed
<Papierkorb> oprypin: try running `make` in qt5/ext
<oprypin> converters.hpp:4:10: fatal error: bindgen_helper.hpp: No such file or directory
<Papierkorb> Oh sh.. I know
<oprypin> bindgen_helper.hpp -> ../lib/bindgen/assets/bindgen_helper.hpp
<Papierkorb> bindgen_helper.hpp -> ../lib/X - Assumption broken. Come on, I just wanted it to point at the correct version of that file for the normal use case
<oprypin> but the lib is at the very top level
<oprypin> postinstall is a huge pain
<oprypin> like, actually unusable
<oprypin> as soon as you hit c++ you need a build system to wrap it all
<oprypin> and you are gonna need it to support Windows anyway
<Papierkorb> There needs to be a way to build dependencies in shards. What it is I don't care. I just don't wanna do `{{ run ".." }}` hacks in some random crystal source file
<oprypin> cmake lul
<Papierkorb> qmake lul
<Papierkorb> Might actually work, for Qt that is
<RX14> oprypin, why is is unusable?
<RX14> libs being weird?
<oprypin> RX14, not cross-platform by design
<RX14> s/libs/lib/ ?
<Papierkorb> Though w.r.t. Windows, really, that shall be the headache of the Windows maintainer, who I don't plan to be. Last thing I want to do is mess with Windows "development" environments
<oprypin> Papierkorb, it's fiiiine
<RX14> oprypin, yeah i guess
<oprypin> as long as you use a cross platform build system and not makefiles
<RX14> thing is in windows not everything ends up on PATH
<oprypin> so it forces you to break assumptions that you shouldn't have had in the first place?
<RX14> and stuff is kinda designed around IDEs using the build tools
<RX14> mostly the microsoft tools
<Papierkorb> ^
<RX14> uhh cmake being on the path is a pretty good assumption
<RX14> how else do you find it?
<oprypin> you let the user find it
* Papierkorb thinks of a file open dialog
<Papierkorb> bwahaha
<RX14> no
<RX14> you don't use windows
<RX14> it's a terrible development platform
<oprypin> RX14, you dont know me
<RX14> Papierkorb, that's probably what most windows users want you to do
<RX14> and thats terrifying
<Papierkorb> RX14: To be honest, Qt makes it actually quite usable with their online installer setting the whole thing up. Really good.
<RX14> yeah and it adds itself to path right?
<RX14> more than can be said for visual C++
<Papierkorb> Not sure, long time since I had to use it
<RX14> it generates like 15 random batch files which drop you into a shell with the tools in
<RX14> because that's infinitely composable
<oprypin> i liked it :>
<Papierkorb> No idea if it's true, but it's hilarious in any case
* oprypin confirms
<RX14> one shell for each cross-compile target
<RX14> it's terrible
<oprypin> "Visual C++ 2015 x64 Native Build Tools Command Prompt"
<Papierkorb> Oh, that shit?
<RX14> and good luck getting it to work with a decent terminal emulator
<Papierkorb> RX14: But muh play button D:
<Papierkorb> ayy lmao
<FromGitter> <sdogruyol> lol
<oprypin> Papierkorb, no the play button is one thing, and it used to be the only thing
<RX14> play button?
<Papierkorb> RX14: in IDEs
<RX14> oh
<RX14> ye
<oprypin> but now they're so nice to actually provide usable command line tools that you dont need visual studio project files for
<RX14> i forgot
<RX14> ides don't exist on linux
<RX14> oh wait
<Papierkorb> They do?
Excureo has quit [Remote host closed the connection]
<RX14> who knew you can have the best of both worlds
<RX14> all it takes is sensible design
<oprypin> for some reason i have an undefeatable urge to get this Qt binding working on Windows
<RX14> sure get it working
<oprypin> Papierkorb, in theory, do you think pre-generated c++ code has a chance to work unchanged?
<RX14> then you write down the 200 step process
<RX14> and forget all about it
<Papierkorb> Do it, and involve us in your rants about Windows "development" environments, cause that's helping the project and hilarious at once. Win win
<oprypin> im not ranting about anything
<Papierkorb> oprypin: It should
<Papierkorb> Oh you will
<wmoxam> ^^^
<oprypin> i don't know what you extrapolate that from
<Papierkorb> oprypin: The generated sources don't do anything special - Except if Qt does via #ifdef of course. QWidget might be a "candidate" for that
<Papierkorb> type WId, windowHandle() or what it was called, may break your build
<Papierkorb> Eh, just throw it out. ¯\_(ツ)_/¯
<oprypin> I see it only in qt5/qt.yml: WId: { ignore: true }
<oprypin> so how would it break anything?
<Papierkorb> See? How nice I was to already include that ignore there?
<oprypin> what makes QPoint deserving of its own Crystal file?
<Papierkorb> For types like QPoint, QRect, etc., I didn't think it makes much sense to do a round-trip to C++ all the time. Especially as their APIs are small.
<oprypin> oh ok
<oprypin> so basically you have everything stored by pointer but in these few instances you did "composition"
<oprypin> oh yeah, forgot all about C++ templates - how do they work?
<Papierkorb> They're normal classes after instantiation
<oprypin> yeah but you can't instantiate it for all possible parameters
<RX14> I found out today that LLVM exposes triple normalization
<Papierkorb> Of course not
<RX14> so maybe we'll manage to actually get a decent handling of target triples
<oprypin> that's what im wondering about, how do you provide bindings to template classes
<Papierkorb> But you know which possible parameters make sense, and those you can instantiate
<oprypin> or is it on a case by case basis because QList is useless etc
alibby1 has quit [Quit: Leaving.]
<oprypin> i'm seeing a lot of Enumerable near QList
<Papierkorb> The templating feature focuses on containers (right now, only sequential ones), and even there the API is the minimum required to do something useful. If a user wants to really work with the data, just turn it into an Array
<Papierkorb> Yeah it's Enumerable, which is why you probably won't even notice it's not an Array
<oprypin> should it be "indexable"?
<Papierkorb> Enumerable() is just what the user is allowed to pass in
<Papierkorb> It then tries to upcast, else, does the #each loop.
<oprypin> I mean the return types. though they probably are ignored by Crystal anyway
<Papierkorb> Oh that, fair point. Indeed, they are. And that's a current shortcoming, you can only define one type on each "layer" (Wrapper, Binding, C++), and not one for in and out each
<oprypin> mhm
<Papierkorb> Question is, have you already tried the amazing image viewer sample program?
<oprypin> actually i did mere seconds ago
<RX14> actually i need to try this
<RX14> i'd rather the repo was named crystal-qt5 or something though
<oprypin> for sure
<RX14> i prefer the .cr suffix actually
<RX14> because it's easier to tab complete
<oprypin> not worth it
<RX14> ls -1 /data/programming | wc -l
<RX14> 259
<RX14> :(
<oprypin> /data
<oprypin> :(
<Papierkorb> :(
<RX14> /home is an overloaded directory
<wmoxam> lol
<RX14> everything shoves it's dotfiles and stuff in there
alibby has joined #crystal-lang
<RX14> I have control over /data
<RX14> plus - /home benefits a LOT from being on a SSD
<Papierkorb> I just have ~/Projekte ("Projects"). Fixed.
<RX14> whereas your programming projects are likely just wasting space
<wmoxam> tru
<RX14> well it's too late to change now lol
<Papierkorb> Not worth thinking about
<Papierkorb> It's not like I'm using nodejs which would actually trash my ssds
<oprypin> > re naming: that's not even my main concern, i'm just saying it's not clear what your repository is about. is it a fork of qt?
<Papierkorb> `qt5.cr` would be acceptable. I despise the `LANGUAGE-` prefix. Plain ugly. "qt5.cr" is at least what you almost write in the require afterwards
<RX14> yes i agree with you there Papierkorb
<oprypin> Papierkorb, sure, that applies to normal projects existing by themselves
<RX14> i prefer cool names
<oprypin> your project is crystal qt bindings. you call it qt.
<FromGitter> <johnjansen> likewise … there should be a standard fir that
<FromGitter> <johnjansen> fir
<RX14> but sometimes just slapping .cr on the end does
<FromGitter> <johnjansen> -i-i +o
<RX14> but just calling it "qt5" is bad
<oprypin> Papierkorb, don't do it for me, do it for https://qt.io/trademark/
<RX14> yup this image viewer works
<Papierkorb> wtf is wrong with my internet, clangs docs are constantly down for me, and now qt.io
<FromGitter> <johnjansen> haha
<RX14> dns errors?
<FromGitter> <johnjansen> same
<Papierkorb> "unable to conenct"
<oprypin> Papierkorb, sorry same here
<oprypin> i shouldn't have butchered the link huh
<Papierkorb> Oh that was it, yeah qt.io completely vomits if you leave off the www. durr
<RX14> clang docs work for me
<RX14> Papierkorb, not for me
<Papierkorb> RX14: mostly they do for me, other times, not for some hours
<RX14> i think dns is being weird somehow
<FromGitter> <johnjansen> technically that protects QT.cr too
<Papierkorb> RX14: without www, it rejects the connection, according to curl -v
<RX14> works for me Papierkorb
<RX14> using curl
<RX14> well httpie
<RX14> 301 moved permenantly
<Papierkorb> Mh even with google DNS it breaks
<oprypin> works if you fully butcher it http://qt.io/trademark/
<Papierkorb> at least they're rewriting it to https www
<RX14> well
<RX14> internet broke
<Papierkorb> There, renamed. Gotta fix the README now
<RX14> because it's fine for me
<Papierkorb> Pretty neat that github does a redirect. I also used manastech/crystal pretty long as my go-to URL to crystal sources lul
<oprypin> Papierkorb, pls also change the title "Qt 5 Technology Preview"
<Papierkorb> Okay, a unicode dash for you it is
<oprypin> no I mean it's not Qt 5 so don't cconfuse people and stay out of danger
<RX14> ok static complication works with my 2 patches
<Papierkorb> ... Can I write a <small> into markdown, without using HTML?
<oprypin> no
<oprypin> can do subscript probably but .....
<oprypin> actually no
<Papierkorb> small doesn't work. sup and sub does though.
<oprypin> nooo
<FromGitter> <bew> in github markdown?
<Papierkorb> ye
<oprypin> Papierkorb, look at that pretty markdown file, you can't defile it with html
<crystal-gh> [crystal] RX14 opened pull request #4874: Add configurable default target (master...feature/target-support) https://git.io/v5kyl
<oprypin> but whatever, this is actually quite neat
<RX14> and now i can sleep
<Papierkorb> what, with sup?
<oprypin> yeah
<Papierkorb> Yeah I'll stick to that. It'll go away eventually anyway.
<oprypin> or just call it Alpha or something
<Papierkorb> RX14: Nighty
<RX14> night
<RX14> but my statically compiled omnibus works
<RX14> i forgot to add shards though
<RX14> if anyone wants to play with it I can upload it somewhere
<Papierkorb> Where did the crystal lang subreddit go?
<Papierkorb> Oh there it is
<RX14> it's weird they had r/crystal and chose r/crystal_programming instead
<Papierkorb> ..lol
<RX14> ebc313689f5f006406c1eeb7ffbfe4f2310ee433
<RX14> in case people want to test it out
<RX14> night
<Papierkorb> gn8
<Papierkorb> my gawd that thing is huge
<RX14> yeah
<RX14> afaik the compiler was only 60mb
<RX14> so i wonder what the rest is...
<Papierkorb> Oh a man-page
<Papierkorb> not in my installation yet :(
<RX14> i followed the FHS!
<RX14> just unpack to usr/local and you're all set
<Papierkorb> .. I clicked on it, and Ark opened an embedded man-page reader with formatting. Damn this DE is amazing.
<RX14> there's 56mb of html docs
<RX14> which is almost as much as the compiler
<Papierkorb> Oo
<RX14> probably should have gzipped it
<RX14> lol
<RX14> compiler is 64MiB
<Papierkorb> As big as a large N64 game
<RX14> sourcecode is like 6MiB
<Papierkorb> LLVM though
<RX14> not llvm
<RX14> just crystal src dir
<Papierkorb> the crystal binary
<RX14> oh yeah
<RX14> it does have all of llvm in
<Papierkorb> Which concerns a part of bindgen. I want it to generate a cpp per "section", probably per-class. Will help reduce resulting binary sizes a lot.
<FromGitter> <cevarief> ```code paste, see link``` ⏎ ⏎ I’m wondering what causing this error? [https://gitter.im/crystal-lang/crystal?at=599cbf46162adb6d2e23c73a]
<Papierkorb> cevarief, that "some code here" contains a `yield`, thus the method requires a block
<FromGitter> <cevarief> @Papierkorb Ah yes, right. thank you.
<oprypin> Papierkorb, wouldn't it be better to do a cpp per qt module?
<Papierkorb> No, there are only (right now) 3
<oprypin> i dont see the problem
<Papierkorb> The point is, the linker can leave out object files, if you never access them. It can't "split" them up though. There's reason to believe that most programs will never touch 60-80% of all wrapped classes (when the project reached near 100% coverage), so by leaving all of those out, you save a few megs
<Papierkorb> binding.a is already quite large
sz0 has quit [Quit: Connection closed for inactivity]
<oprypin> ok
<oprypin> -> Stripping unneeded symbols from binaries and libraries...
<oprypin> (was in my terminal scrollback) hint hint
<oprypin> but yeah it's not the real solution
<Papierkorb> the linker can only do so much. It can't throw much out, as it can't know if it's actually used even if it thinks it's not
<oprypin> you're saying this as if QtWidgets isn't one shared library
<Papierkorb> No it's not cutting out anything from Qt itself
<Papierkorb> But the generated code also has size
<oprypin> my point is why bother splitting object files if it's nothing compared to qt itself
<oprypin> do you think it can speed up Crystal compilation?
<Papierkorb> Sometimes I feel old, but I don't like wasting space for nothing. That's probably the C programmer in me lul.
<Papierkorb> Nah
<Papierkorb> That's pure linker related
<Papierkorb> Method overloading deduction (aka, macro code, lots of it) increased compilation times though
<oprypin> so probably slows down overall
<Papierkorb> gn8