<FromGitter>
<Brusalk> I'm trying to build scry on Ubuntu 17.04, and I believe I've installed all the required devel dependencies, however upon building (specifically after/during Codegen (bc+obj), I'm getting a lot of undefined reference errors and it's failing to build. ⏎ https://gist.github.com/Brusalk/5e8b43b7c385a845236d4c9b8d547e8b ⏎ Has anyone run into this before or know what I can try and do to fix this? My google-fu is
<FromGitter>
... failing me and I'm not acquainted with llvm enough to know what is going wrong
<FromGitter>
<Brusalk> I've been searching fruitlessly all day :(
chamar has joined #crystal-lang
<FromGitter>
<georgeu2000> @raydf - Thanks for your help!
_whitelogger has joined #crystal-lang
bmcginty has joined #crystal-lang
DTZUZO has joined #crystal-lang
alex`` has joined #crystal-lang
danielpclark has joined #crystal-lang
<FromGitter>
<Hellfire01> hi ! Simple question
<FromGitter>
<Hellfire01> how do I declare an Array of Strings ?
<FromGitter>
<Hellfire01> why does it not work if there is no initialize method in the class ?
<FromGitter>
<tbrand> Since you have to guarantee the array is not nil, or you can decrare nullable varianble like `getter s1 : Array(String)?`
<FromGitter>
<Hellfire01> so if I declare it as `getter s1 : Array(String)?` I allow it to take the nil value ?
<FromGitter>
<tbrand> Yes
<FromGitter>
<Hellfire01> thanks a lot
<FromGitter>
<tbrand> 😄
<FromGitter>
<Hellfire01> that also means that if i wish to avoid code redundancy i should declare the type in the initialize rather than in the getter ?
<FromGitter>
<Hellfire01> *does that also
<FromGitter>
<georgeu2000> You can also do `[] of String`, but not sure if it works for the above.
<FromGitter>
<zyriuse75> how are you doing today ?
<Groogy>
Happy since I confirmed for myself how damned fast Crystal is ^^
<Papierkorb_>
Yeah was also pleased with your numbers. It being CPU bound is all the better for this case :)
claudiuinberlin has joined #crystal-lang
<FromGitter>
<bararchy> I want to bind CUDA , if we are talking about CPU bound
<Papierkorb_>
OpenCL *cough*
<FromGitter>
<bararchy> Yeha :)
<FromGitter>
<tbrand> Cool!
<Groogy>
Yeah that I switched from debug to release gave like a doubling in speed
<Groogy>
shows it was CPU bound
<Groogy>
Bararchy usually when you say CPU bound and GPU bound you mean which component is throtthling the performance
<Groogy>
i.e if you are doing super heavy OpenCL coding on the GPU, then you will become GPU bound :P
<FromGitter>
<bararchy> Yeha, but having 2 Titan Nvidia cards with SLI, I guess it should perform a little better then my Xeon
<Groogy>
Well yeah but in the example I showed, you wouldn't get any performance boost at all
<Papierkorb_>
It's a bit infuriating how much data science relies on CUDA and not friggin OpenCL
<Groogy>
I've never used OpenCL or CUDA
<Groogy>
Never had time or oppertunity to play around with it
<Papierkorb_>
If for nothing else, blockchain mining has proven that AMD cards can run circles around nvidias for such computations
<FromGitter>
<bararchy> OpenCL caters for both though, W\E card you have
<FromGitter>
<bararchy> I think Nvidia just got a better name when it comes to non-gaming work
<Papierkorb_>
Which is another reason for OpenCL
<Papierkorb_>
I mean I can test OpenCL code on my shitty netbook if needed
<FromGitter>
<bararchy> cool, that's a better idea then, bind opencl
<FromGitter>
<bararchy> :)
mark_66 has joined #crystal-lang
<FromGitter>
<bararchy> I'll play with bindgen for it
<Groogy>
closest I've come to this computing is like tesselation
<Papierkorb_>
Oh and yesterday I found an interesting bug in the clang part. Let's hope it's in my code, and not clangs.
<FromGitter>
<bararchy> :\
<FromGitter>
<bararchy> I hope it's not in clang Oo
<Papierkorb_>
Ah well, at least I found it by adding more specs to the project.
<Papierkorb_>
Qt is starting to wane as primary testing target, weee
<FromGitter>
<bararchy> wane as being les effective ?
<Papierkorb_>
Efficiency isn't even that big deal, the test suite with integration tests needs more time than a full Qt run. Just is less fun to find bugs in 80k+ lines of C++ and Crystal code :P
DTZUZO has quit [Ping timeout: 248 seconds]
<FromGitter>
<Rinkana> Hmm, it seems that `ary = Array(String).new` is slower then `ary = [] of String`. I tought they would perform exacly the same
<Papierkorb_>
Adding the item directly is faster in both cases, and makes the class 1.10x slower. Though even an empty literal is faster than an empty .new
<FromGitter>
<Rinkana> So the items are not known beforehand.
<FromGitter>
<Rinkana> And the reason i wanted to test this is because i want consistancy in defining class vars. But in one of my classes i use `Deque`. And that does not have a literal. So i need to do `Deque(String).new`
<Papierkorb_>
I doubt that you'll notice any difference in runtime
<Papierkorb_>
The billions of temporary arrays generated by map and friends would worry me more
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<FromGitter>
<faustinoaq> 👍
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
txdv has quit [Ping timeout: 258 seconds]
txdv has joined #crystal-lang
<Groogy>
faustinoaq your part of the core team right?
<Groogy>
or wait no you were on vs-code, nevermind that's where I remembered the name from
tzekid has joined #crystal-lang
<FromGitter>
<bararchy> Papierkorb_ Only now I got that your lib can also Crystal to C++
<FromGitter>
<bararchy> F**ing awsome !
<FromGitter>
<yxhuvud> ugh, I can't use the generic type inside macros?
<FromGitter>
<bararchy> @yxhuvud for a sec there I just saw "Linus" and was like OMG Linus Trovalds is here ?????, and then the gitter finsihed it's quirks and I got the full name :)
<FromGitter>
<yxhuvud> sorry for not being that awesome
<FromGitter>
<bararchy> you are still awsome :)
<FromGitter>
<bararchy> ✨
claudiuinberlin has joined #crystal-lang
<Papierkorb_>
bararchy, lol
tzekid_ has joined #crystal-lang
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tzekid has quit [Ping timeout: 255 seconds]
ShalokShalom has quit [Ping timeout: 258 seconds]
<Groogy>
@yxhuvud yeah I know also bothered me
<Groogy>
the Generic/Macros incompatibility is annoying
<FromGitter>
<yxhuvud> I was able to work around it with some helper methods, but still somewhat silly to have to define methods like def rule_type; Rule(T); end
<FromGitter>
<iambudi> Just found this db for OLAP. Looks interesting. Any crystal library to connect to this db ? https://clickhouse.yandex
<Papierkorb_>
Groogy: What incompat?
<FromGitter>
<bararchy> Reserching a DPI solution for my current work place, all I can think about is ..hm... would that be easy to bind using Ruby-FFI ?
<FromGitter>
<bararchy> hate FFI
<Papierkorb_>
Must be me, but I'd make it a habit to mess with DPI in any way possible if one was installed at my work if it's there to monitor employees
<Groogy>
Papierkorb_ they exist kind if in seperate environments and can't interact
<Groogy>
more than that Macros can generate code but it does not seem to be aware of stuff
<FromGitter>
<bararchy> oh, it's for embedding in our software, it will be a part of a IPS\IDS soulution
<Groogy>
it is especially noticeable in constants
<Papierkorb_>
bararchy, ah so to defend against obvious crap from outside. that'd be fine.
<FromGitter>
<bararchy> this IPS claims to be the new best ever super awsome IPS ever created in all universes, more reading ... uses suricaa and snort and builds around them ... hm...
<Papierkorb_>
And then everyone just shoots login attempts at the shoddy php web application and brings it down without much traffic. Nice.
<FromGitter>
<bararchy> XD
<crystal-gh>
[crystal] straight-shoota opened pull request #5091: Fix be_nil expectation to use .nil? (master...jm-nil-expectation) https://git.io/vd2vD
claudiuinberlin has joined #crystal-lang
<FromGitter>
<Rinkana> Is DPI in such case legal?
DTZUZO has joined #crystal-lang
<Papierkorb_>
To inspect traffic coming from the outside? Usually yes, why not?
<Papierkorb_>
To monitor employees? Highly local legal issue
<FromGitter>
<Rinkana> Yeah, because here it's illegal to monitor employees in such way
<Papierkorb_>
"here"?
<FromGitter>
<Rinkana> Netherlands
<Papierkorb_>
Not sure how it is in Germany exactly, but if it's allowed, it's rather restrictive
<FromGitter>
<Rinkana> Often Germany is way stricter in privacy related issues the The Netherlands
<FromGitter>
<yxhuvud> Also, EU has GDPR, and saving stuff like IP numbers is troublesome
<FromGitter>
<yxhuvud> regardless of the direction the traffic is going.
<Papierkorb_>
Hopefully this laughable "privacy shield" the EU thought up crumbles too.
<Papierkorb_>
That thing that makes it legal to store private data in the US
<FromGitter>
<sdogruyol> anyone using AMD's new ThreadRipper Cpus yet?
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Groogy>
That's Ryzen?
<Groogy>
or is that the architecture after Ryzen?
<Papierkorb_>
ThreadRipper was "Ryzen for servers"
<FromGitter>
<sdogruyol> yeah
<Papierkorb_>
Wasn't it literally two or more ryzens glued together or something?
claudiuinberlin has joined #crystal-lang
<FromGitter>
<sdogruyol> I'd be happy to hear some real world Ryzen feedback too @Groogy
<Groogy>
Also when it comes to monitoring employees, yes that is super illegal in the EU
<Groogy>
Ryzen seems to work really freaking good
<Groogy>
got 8k FPS out of it at home running Crystal :P
<Papierkorb_>
On a single core no less
<Groogy>
yeah
<Groogy>
8.5k was highest framerate I got
<Papierkorb_>
I'm pretty happy that AMD finally pushed out a viable line of CPUs. Their GPUs are looking promising too, the current line made lots of ground
<Groogy>
It was so low that the delta between frames I was monitoring for game loop update sometimes became 0
<Papierkorb_>
Can't tackle nvidia for gaming just yet, but it's not bad for that either
<FromGitter>
<sdogruyol> @Groogy 8k, lol
<Papierkorb_>
And FU nvidia for disabling features in the driver by "accidentially" breaking it
<FromGitter>
<sdogruyol> I've been using AMD for like more than 15 years (before switching to mac) :P
<Papierkorb_>
Groogy: So is this gaming in 8K everyone's talking about?
<Groogy>
osd_averate_time_spent_per_frame
<Groogy>
haha lol isn't the new thing 4k ultra hd?
<Groogy>
8k hasn't come yet right?
<FromGitter>
<barisbalic> Looking at the JSON mapping/builder stuff right now, I can't see a way to do something that I want, but... maybe I'm doing something daft. I want to use the JSON::Builder to create some JSON where a single field actually references an object that has it's own mappings via JSON.mapping macro. Is this currently possible?
<Groogy>
so 0.06ms must be like... 60 microseconds right?
<Papierkorb_>
60µs sounds about right
<FromGitter>
<bararchy> Groggy it makes me think of simcity 2000 :)
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Groogy>
OH I think it is actually lower than 60 microseconds it is just breaking at that point
<Groogy>
because it is 120 for the application, wheras 60 of those comes from the application benchmarking (the second value)
<Groogy>
I think
<Groogy>
nah the math holds up with 1/8500=0.000117......
<FromGitter>
<sdogruyol> has anyone else seen this? (yet)
txdv has quit [Ping timeout: 240 seconds]
<FromGitter>
<sdogruyol> your colleagues e.g
<FromGitter>
<bararchy> I'm, playing citis:skyline now, and those grids make me happy hahaha
<Groogy>
nope
<Groogy>
the grids are just visual help for me debugging :P
<Groogy>
but yeah I am sharing this here first
txdv has joined #crystal-lang
<Groogy>
gonna present it to the company to get permission to put on a patreon or something when I get back to where I was in C++
<FromGitter>
<bararchy> 👏
<FromGitter>
<sdogruyol> @Groggy that'd be awesome 💯
<Groogy>
If I don't get that permission I'll just still put it out there for free for people to contribute too
<Groogy>
though I will probably not have Ego (the game project) in one of the open source licenses, probably get something drafted up by the legal team here
<Groogy>
since I would want to own the trademark when I finally name the game
<Papierkorb_>
Don't you own all code already?
<Groogy>
Yeah but if I want to own the trademark but it is free for people to just take the game and remake it into their own it becomes really hard to defend that trademark
<Groogy>
game source will be available open source and people can contribute to the code, but to keep things "simple" it would be best to ensure future problems don't occur
<Papierkorb_>
Seems to be common to put the game assets into a restrictive license and OSS the engine code itself
<Papierkorb_>
at least ID does it
<FromGitter>
<bararchy> I would totally buy a game written in Crystal , even just for support
<FromGitter>
<bararchy> but Groggy I expect AAA level graphics yeha ? else my $ back ;)
<Groogy>
Well it is a legal gray area really. Let's say I have a patreon, you contribute code to that project and I accept the pull request. I don't think legally that I own that code without extensive mark of that you resign that right upon doing the pull request
<Groogy>
Lol bararchy the game is going to be free no matter what
<Papierkorb_>
Groogy: Also called a "CLA"
<Groogy>
but you never know about the future how things go down so it is better be safe than sorry
<Groogy>
besides a patreon would be not to make money but to fund like webpages etc and things regarding the game itself. I earn more than enough as it is
<Papierkorb_>
Groogy: The easiest way is to license engine code under a (F)OSS license of your liking. The player would then buy your game, but actually "only" pay for the assets
<Papierkorb_>
No CLA mess in that case
<Papierkorb_>
There are plenty licenses to choose from that have been proven in court :)
<Groogy>
and potentially pay for expertise help like making art assets using the patreon money
<Groogy>
stuff I can't do myself
<Groogy>
I was thinking Boleite and the other projects aorund would be zlib but then have the game itself something else
<Papierkorb_>
Yep. Scripts, models, all assets that make a game out of the game engine
<Groogy>
though with how Crystal includes source I don't know how well that works
<Groogy>
though zlib is extremly permissive so
<Papierkorb_>
zlib is almost public domain
<Groogy>
I guess zlib would just force one to put the contributors of the projects in credits, which I was planning to do anyway with bindgen etc.
<Groogy>
we also have all the libraries we use that are open source in our credits
<Papierkorb_>
On that: Bindgen is GPLv3, but code generated by it is *yours*
<FromGitter>
<bararchy> How does that work ?
<Groogy>
yeah so I can't include bindgen directly but Ican use the code generated
<FromGitter>
<bararchy> LGPL ?
<Papierkorb_>
I think the latter part is obvious, even to courts, but I wrote that into the README just in case
<Papierkorb_>
Groogy: Correct.
<Groogy>
as soon as money gets involved this shit gets so complicated xD
<Papierkorb_>
bararchy, no pointer in LGPL for bindgen. LGPL is generally rather pointless for Crystal :(
<Papierkorb_>
bararchy, which is why I use MPL-2 in the case I want something like LGPL
<Groogy>
yeah LGPL is the "if you link dynamically it's k" right?
<Papierkorb_>
In short, yes
<Papierkorb_>
Some projects use LGPL with an addendum to allow static linking, but that's confusing and not battle tested.
<Papierkorb_>
MPL-2 is similar to LGPL in the (to me) important aspects, but allows static linking
<Groogy>
I did have talk with our legal person and she was first like "What no that doesn't work... wait hmm" when I asked if you could own a trademark but open source it
<Papierkorb_>
Sure it works great
<Groogy>
it could potentially work and I might try it when Iget that far
<Papierkorb_>
Groogy: Linux, Qt, ..
<Papierkorb_>
All trademarks for OSS, Qt even commercial and OSS
<Papierkorb_>
And Linux even FOSS
<Groogy>
all I want is people to contribute to the game so I don't have to do al lof the tons of details xD
<Papierkorb_>
To the /game/ would be CLA hell
<Papierkorb_>
to the engine would be no biggie
<Groogy>
system is built so like if you want behaviour difference between a birch tree and a oak tree, you can put that in
<Groogy>
and I don't feel like doing all that detail myself
<Groogy>
but knowing our fanbase, there's tons of people who care and are willing to put that effort in
<Papierkorb_>
Yes modders. But you need gamers first to turn them into devoted modders
<Papierkorb_>
And you get gamers by having a game
<Groogy>
of course
<Groogy>
well I do have one, I just need to port it to Crystal (which I am doing because I was doing a major refactoring of big systems since I hit a limitation so might as well ^^)
<Groogy>
also this time doing it in 3D instead of 2D
<Papierkorb_>
Not to mention that many people don't feel like signing some random contract for a small contribution
<Groogy>
though Crystal is owned under Manas right?
claudiuinberlin has joined #crystal-lang
<Groogy>
thx @Rinkana!
<FromGitter>
<bararchy> "Owned" ? It's MIT, means you can clone, put your name there, and it's yours
<FromGitter>
<bararchy> it's copyleft
<Groogy>
ah
<Papierkorb_>
Groogy: E.g., the prettified code just recently. If you wanted to use that, you'd have me sign the CLA. Which I would've refused
<FromGitter>
<Rinkana> :')
<Papierkorb_>
And now you have a dilemma: You can't use the code, obviously. You can replicate it, but watch out that it's not a copy "with small changes", as that could be counted as being a derivative of my work.
<Groogy>
yeah I know :/
<Papierkorb_>
A CLA is a really huge hammer I wouldn't use. A big company? Okay, I understand it. But for small companies, or even one-man armys, I'd advise against it
<Groogy>
I guess this is why DF is not opensource ^^
<Papierkorb_>
Groogy: A compromise for you could be that the scripts are open/free, but the other assets aren't
<Papierkorb_>
DF?
<FromGitter>
<bararchy> Papierkorb_ What about what the linux kernel uses ?
<Groogy>
dwarf fortress
<Papierkorb_>
bararchy, since when does Linux have a CLA?
<FromGitter>
<bararchy> "DCO"
<FromGitter>
<bararchy> not the same thing, but serves the same purpose
<Papierkorb_>
That thing reads fine. Foremost, it's short and plain english
<Papierkorb_>
It's just "oh yeah I totally have the right to contribute this"
<Papierkorb_>
Looks to be a simple fools hook against stolen code
<Groogy>
and you have to sign each commit I believe
<Papierkorb_>
I once thought about contributing to Qt. Then I saw the CLA. And gerrit.
<Papierkorb_>
Suffice to say, I never got something into Qt
<Groogy>
well problem becomes the second money is involved, DCO haven't waivered ownership of the contribution, only enforced responsibility if wrongdoing happens
<Papierkorb_>
correct
<Groogy>
as a hypothetical, the cleaned up code for text rendering. Let's say the game is free, but it wins an award at let's say Nordic Games Conference
<Groogy>
what happens then?
<Papierkorb_>
What should happen?
<Groogy>
Well I would claim the award on behalf of the project but someone who has contributed could challenge that
<Papierkorb_>
You get the award for the game
<Papierkorb_>
the engine isn't a game
<Groogy>
no but I want people to contribute to the game as well
<Groogy>
and that's when things gets tricky
<Papierkorb_>
Linus Torvalds doesn't get a say either just because you built your game on a linux box
<Groogy>
like I said zlib is the license of the engine
<Papierkorb_>
my primary concern would actually be people git cloning all assets and then playing for free. Or rather, someone repacking it for the noobs to play
<Groogy>
well it is supposed to be for free
<Groogy>
but even being free circumstances like this can come up where potential legal problems can occur
<FromGitter>
<bararchy> Hm....
leafybasil has joined #crystal-lang
<Groogy>
hmm I should look at some of the other OSS games that exist
<FromGitter>
<bararchy> ```code paste, see link```
<FromGitter>
<bararchy> :(
<Groogy>
what's cappage?
<Groogy>
cabbage*
<Papierkorb_>
something to wat
<Papierkorb_>
eat*
<FromGitter>
<yxhuvud> still lacking some necessary stuff to be actually usable, like support for character ranges and left recursion optimization. Also needs a total rework of how terminals are handled. But it is a good start :D
<FromGitter>
<yxhuvud> groogy: it is a parser based on the earley algorithm.
txdv has joined #crystal-lang
<FromGitter>
<Rinkana> Groogy, how would you go about applying a material to a set vertices? Let say i have a set vertices with an color inside an mesh object. And i want to apply an material wich would set them to another color.
<FromGitter>
<Rinkana> Would you recalculate the vertices or switch to the material when rendering if a material object is found. Or even build vertices later on in the process
<Groogy>
is the color uniform over all vertices in the mesh?
<Groogy>
or does each vertice need to have its own color?
<FromGitter>
<Rinkana> Each need their own color. And materials should be able to support textures later on.
<Groogy>
you could put the color in its own buffer you upload
<Groogy>
so you don't have to upload the position part of the vertex each time you modify it
<Groogy>
but what kind of material would apply a secondary different color on each vertice?
<FromGitter>
<Rinkana> They are two different buffers right now. It's mainly the process of converting vertexes + material to vertices
<Groogy>
could you give me a link to the source or something so I get a bit more context?
<FromGitter>
<zyriuse75> how can i know if the user run the script as root ?
<oprypin>
zyriuse75, i told you dont do it, and also in that link you have examples of C function getuid i think
<oprypin>
so you bind the libc getuid and check if its result equals 0
<FromGitter>
<Rinkana> However it should be that the vertex already has the correct color from the material.
<Groogy>
color_buffer.set([material.color] * mesh.vertices.size) this irks me, because this could just be a uniform
<Groogy>
so what you want is a material structure that can override the color component written into the vertices?
<Groogy>
all materials apply unilaterally the same on all vertices that have that material right?
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Groogy>
I would have the material values upload as uniforms, and you have a default material for default values for the uniforms
<Groogy>
that way you can then in the shader decide to use material color, vertex color or some math to combine them
<FromGitter>
<bew> @yxhuvud really nice! I learned about Earley parsing some time ago, I'm happy someone's doing sth in crystal! (I'm also having fun making a parsing lib in crystal, but more for PEG)
<Groogy>
like outputColor = materialColor * vertexColor
<Groogy>
and default value for materialColor uniform is just 1.0
<Groogy>
or however you want it to treat the material
<FromGitter>
<georgeu2000> I have a method that takes either a single `Struct 1` or an array of `Struct2`: ⏎ ⏎ `def initialize(@items :Struct1 | Array(Struct2))` ⏎ ⏎ That seems OK, but how can I coerce @items into an array? [https://gitter.im/crystal-lang/crystal?at=59dbbbbf614889d47593676f]
<FromGitter>
<georgeu2000> In Ruby, it would be `@items.to_a.flatten`.
<FromGitter>
<bew> Hey watzon it's been a while indeed! we missed you? ;)
<RX14>
the mailinglist sure does seem to love elixir pipes
<FromGitter>
<bew> @georgeu2000 what do you mean? "When it's an array do that do that"?
<FromGitter>
<georgeu2000> I'm not sure what you mean, but I want to call `@items.map ...`
<RX14>
it drives me up the wall how some people seem to keep bringing up the elixir pipes issue even though it's been argued against so much
<FromGitter>
<georgeu2000> I guess I can check the type of `@items`, but it does not seem very idiomatic...
<FromGitter>
<georgeu2000> Maybe because it is not idiomatic for a typed language...
<FromGitter>
<bew> wut
<FromGitter>
<bew> `Struct1` probably don't have `#map` method, so you'll have to check for the type
<oprypin>
georgeu2000, that should be 2 different items
<oprypin>
georgeu2000, that should be 2 different methods
<Papierkorb>
RX14: not even that, but not a single person has yet brought up a valid use-case that isn't already possible with a similar amount of characters to type
<RX14>
less
<RX14>
. is way less than " |> "
<FromGitter>
<OldhamMade> the `{{ cat styles.css }}` trick is useful. are there any websites/etc with such tricks I could subscribe to? (@oprypin)
<RX14>
plus there's no implicit caller so you need to specify the Full::Namespaced.function as well
<RX14>
no but isn't that the normal pipes suggestion Papierkorb?
<RX14>
that they were suggesting regardless?
<oprypin>
RX14, it is, it just seemed like you misunderstood maybe
<RX14>
no
<RX14>
i mean that you'd have to do Array.sort instead of just .sort
<RX14>
because there's no implicit reciever of objects
<Papierkorb>
RX14: always looked like they wanted `Enumerable.foo` instead of `some_obj.foo` for some arcane reason
<RX14>
yes
<RX14>
exactly
<RX14>
so the syntax is longer and it makes the function calls longer as well
<Papierkorb>
Enumerable.foo .. yes ok, foo has a receiver, but nothing useful. My sample would at least give you a reasonable receiver. Still, I don't want it.
<RX14>
i don't mind pipes, but they work for functional languages
<RX14>
and we're not a functional language so its just horribly out of place
<RX14>
and obviated by objects
<Papierkorb>
At least without an OOP-spin to it. But no one yet proposed a OOP-native derivation of that syntax. Just want an inferior syntax.
<RX14>
it's just appears to be familiarity and unwillingness to think differently of how to solve a problem to me
<RX14>
thinking in elixir while working in crystal
<Papierkorb>
possibly. seems to be a vocal minority in any case
<Papierkorb>
lawl I found a bug in jq
<Papierkorb>
And I already thought that there's was a bug in my code. Nah, that'd never happen
<watzon>
Lol look at Papierkorb, his head is gigantic
<FromGitter>
<faustinoaq> Currently crystal on UNIX needs a CC compiler as dependency to link object files, so we should install gcc or clang as requirement but I just check windows linker support on https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/compiler.cr#L301 What would be the dependencies for Crystal on Windows ? I think C++ Tools for Windows is a bit heavy as dependency 😅
<Papierkorb>
I always relied on mingw on windows. If their x64 port is stable nowadays, I don't see anything wrong with it. But in any case, you can't win on windows.
<RX14>
@faustinoaq we're going to need C++ tools
<RX14>
that's a minimal dependency to me
<RX14>
compared to mingw or some other non-native solution
<Papierkorb>
mingw can be redistributed though, makes it easier to bundle it into a nice setup package
<Papierkorb>
At least it's how the windows Qt installer operates. it gives you the option to, you don't have to use it at all
<RX14>
Papierkorb, i assume that it produces binaries which dont depend on mingw though
<Papierkorb>
it?
<RX14>
qt
<Papierkorb>
Well it depends on the runtime environment of each compiler. for msvc that's MS', for mingw, that's mingws DLL
<RX14>
oh so the mingw compiler doesn't compile for win32?
<Papierkorb>
Another point is that MSVC and mingws ABIs are incompatible
<Papierkorb>
It does
<RX14>
it just compiles for mingw?
<RX14>
i was assuming it just used the mingw compiler to compile for w32 natively
<oprypin>
that's like saying MSVC doesn't compile for win32
<Papierkorb>
Define natively
<RX14>
without including any mingw headers
<Papierkorb>
it requiring a DLL doesn't mean it's not native. it's perfectly native
<RX14>
well
<Papierkorb>
it simply doesn't use windows' c lib
<RX14>
actually without requiring any mingw runtime libraries
<RX14>
it should produce an executable which runs without mingw
<RX14>
it seems im confused on what mingw does
<RX14>
im sorry
<RX14>
it's just an alternate toolchain for native win32 isn't it
<Papierkorb>
it's a port of the GNU C Compiler suite, including environment
<Papierkorb>
And directly inheriting its ABI
<RX14>
the mingw website implies it's using windows's DLLs and headers
<oprypin>
it implements POSIX APIs using Win32 functions
<RX14>
"MinGW, being Minimalist, does not, and never will, attempt to provide a POSIX runtime environment for POSIX application deployment on MS-Windows"
<RX14>
???
<oprypin>
RX14, probably means it doesnt run ELF or something
<RX14>
oh
<Papierkorb>
It doesn't implement posix. maybe it provides some functions that MSVC wouldn't, but that doesn't make it posix
<RX14>
i don't want us using gnu libc symbols
<RX14>
thats not native to me
<Papierkorb>
MSVC constantly breaks the ABI
<oprypin>
RX14, why are you talking about that
<oprypin>
pretty sure all efforts to port Crystal to Windows have focused on MSVC
<RX14>
because if you're using libc symbols it means there's a translation layer
<RX14>
and that layer is frequently buggy, or breaks unix assumptions
<oprypin>
well yeah thats the downside
<RX14>
for example fork
<RX14>
is the most obvious
<oprypin>
RX14, why are you talking about that tho
<Papierkorb>
don't remember if mingw provides fork
<RX14>
but there's obviously more
<RX14>
oprypin, how is it not relevant?
<oprypin>
RX14, well because nobody is trying to use mingw for crystal nor is planning to
<RX14>
except @faustinoaq brought up the issue of needing the non-redistributable msvc toolkit
<Papierkorb>
in the correct version
<RX14>
and i was wondering if mingw was essentially a drop-in replacement
<RX14>
except open source
<oprypin>
maybe it is, who knows
<RX14>
if it is
<oprypin>
RX14, gcc's linker is being relied on, not any runtime
<RX14>
yes
<oprypin>
i dont think the choice of linker would affect the choice of runtime
<RX14>
well using for example the cygwin linker would affect the choice of runtime
<oprypin>
might not be redistributable but installer could suggest downloading and installing it
<Papierkorb>
how does rust do it?
wontruefree has quit [Ping timeout: 260 seconds]
claudiuinberlin has joined #crystal-lang
<FromGitter>
<imonmyown> They're switching to rustup (a tool that does the installation, the last information that I have is that they ask which toolchain is to be used: MSVC or MINGW)
<FromGitter>
<imonmyown> That's what @oprypin wrote and that's what is done in rust. You select the platform's target triple and the installer does the rest
<RX14>
why would the target triple be different for msvc and mingw? surely they must be the same ABI to link?
<FromGitter>
<imonmyown> I was wrong it's not mingw, its gnu
<RX14>
yup
<RX14>
thats a different ABI, not a compiler
<FromGitter>
<imonmyown> right, sorry
<FromGitter>
<imonmyown> corrected myself above, perhaps it was not relayed to IRC
<RX14>
no, it's not
<RX14>
we'd prefer if nobody used the fancy gitter stuff but what can you do :)
<FromGitter>
<imonmyown> ok, got it
<FromGitter>
<imonmyown> I don't care much about fanciness, I just found it easier to make it work for me :)
<FromGitter>
<bararchy> RX14, great points in the discusstion thread
<Papierkorb>
RX14: No. As I already said, MinGWs ABI is different to MSVCs ABI. Which is not that bad at all: MSVC versions aren't even compatible among themselves!
<Papierkorb>
There's no stable MS ABI
<RX14>
why
<RX14>
how do their shared links work then
<Papierkorb>
Who knows
<RX14>
i dont even
<Papierkorb>
By using the same compiler for the whole project
<RX14>
shared libs*
<RX14>
no like the windows ones
<RX14>
that are distributed with the system
<Papierkorb>
Have you never wondered why websites provide DLLs for MSVC2013 and 2015 (or w/e) separately?
<RX14>
so why doesnt everything break all the time
<Papierkorb>
Ever wondered what those MSVC redistribution packets are about?
<RX14>
isnt there like
<Papierkorb>
C
<Papierkorb>
C is stable, C++ is not
<RX14>
one win32.dll
<oprypin>
lol
<RX14>
yeah but crystal only uses the C abi
<RX14>
lol
<RX14>
thats what I was talking about
<Papierkorb>
If mingw uses the same LL convention in C, they're compatible
<RX14>
i don't care that the C++ abi changes all the time when it doesn't matter to crystal at all
<RX14>
so they're the same abi
<RX14>
right
<Papierkorb>
That should be the only difference, as that's where Windows differs from *everyone else*
<Papierkorb>
If MinGW emulates GNU, incompatible. If not, compatible
<RX14>
i always thought C++ abi was different to the target triple
chamar has quit [Read error: Connection reset by peer]
DTZUZO has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 255 seconds]
<FromGitter>
<monouser7dig> > still lacking some necessary stuff to be actually usable, like support for character ranges and left recursion optimization. Also needs a total rework of how terminals are handled. But it is a good start :D ⏎ ⏎ @yxhuvud ⏎ tried left recursion optimization on ruby some weeks ago but left after I did https://en.wikipedia.org/wiki/Chomsky_normal_form ... and did some parsing tree (re)construction in
<FromGitter>
<monouser7dig> btw is there a preference in crystal for alias vs type? I'd just use type but mainly see alias around here
<FromGitter>
<bew> you should use alias all of the time
<FromGitter>
<bew> `type` is only useful in some cases in lib bindings (e.g: changing a `Void*` to a more restrictive type in crystal land)
<FromGitter>
<simaoneves> guys, just noticed we are over 10.000 commits, congrats!
<RX14>
@monouser7dig we're thinking of removing type since it's super buggy
<RX14>
alias is a transparent alias
<RX14>
type makes the types non-interchangable
<RX14>
but it really doesn't play out too well with the rest of the language and it turns out you can't simply shoehorn in the same type being incompatible with itself in an OO language like this
<Papierkorb>
monouser7dig, or maybe easier described: alias is an alias (another name for the same thing). type creates a whole new type.
<RX14>
and the type it creates is buggy
ducklobster has quit [Ping timeout: 260 seconds]
<crystal-gh>
[crystal] RX14 closed pull request #5091: Fix be_nil expectation to use .nil? (master...jm-nil-expectation) https://git.io/vd2vD
wontruefree has joined #crystal-lang
<wontruefree>
Are there any forking web servers in crystal?
<FromGitter>
<faustinoaq> Papierkorb, oprypin, RX14 & @monouser7dig Interesting discussion about Windows port for Crystal ⏎ ⏎ > MSVC builds of rustup additionally require an installation of Visual Studio 2015 or the Visual C++ Build Tools 2015. For Visual Studio, make sure to check the "C++ tools" option. No additional software installation is necessary for basic use of the GNU build. ⏎ ⏎ Rust also requires C++ tools, so I