<FromGitter>
<bararchy> @Fanna1119 you welcome ;) enjoy crystal
rohitpaulk has joined #crystal-lang
<FromGitter>
<krypton97> I've never thought that I'm gonna see collection indexing like this col.1 :)
<FromGitter>
<krypton97> I don't know, but I find it funny x)
bmcginty has quit [Ping timeout: 252 seconds]
bmcginty has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<FromGitter>
<crisward> Is it possible to call a method on an object, when I have the method name in a string? I'm guessing the answer lay in macros, just not sure.
<FromGitter>
<bararchy> wdym in "method name in a string"?
<FromGitter>
<bew> You know the method name at compile time? Can you give a short example of what you have / need?
<FromGitter>
<crisward> I have this big list of things I want to run against a series of class methods in a test. It seems like it'd be easier to define all these things as an array of Hashes, one key being the method. So yes, I know the method name at compile time.
<FromGitter>
<bararchy> well, TBH 1.0 for perfectionists like Manas in a single year was kinda of a scretch goal, what really sadden my is that after a full year paralalisem dosen't seems to be any closer then it was
<RX14>
windows support isn't much closer
<RX14>
we still havent come up with a valid plan for cross-platform IO
<FromGitter>
<bew> Groogy will you make a shard for freetype when you're happy with how it work?
<FromGitter>
<bararchy> well, we had stuff like FD\Socket sperations , etc...
<FromGitter>
<sdogruyol> need some retrospectives on that goals for sure
<FromGitter>
<bararchy> well, did we get to any single goal ?
<FromGitter>
<sdogruyol> well the year is officially not over yet :)
<FromGitter>
<bararchy> LOL
<FromGitter>
<bararchy> Fast, windows support in 1 month + debug
<FromGitter>
<bararchy> sounds like a sprint to me
<FromGitter>
<bararchy> hahah
<FromGitter>
<sdogruyol> lol I didn't meant that
<FromGitter>
<bararchy> yeha I know hahah it was a joke
<FromGitter>
<bew> everyone quit their job, we need to finish crystal! π
<FromGitter>
<bararchy> HAHA
<FromGitter>
<bararchy> working on that
<FromGitter>
<bararchy> XD
<FromGitter>
<sdogruyol> hahah that was nice @bew
<FromGitter>
<bararchy> 1 month to "im free" day
<FromGitter>
<sdogruyol> unfortunately, that won't work
<FromGitter>
<sdogruyol> there aren't many in the world who can implement parallelism to Crystal
<FromGitter>
<bararchy> I thought that @waj was on that ? or maybe @asterite
<FromGitter>
<bararchy> TBH I don't think there is an active dev on that ATM
<FromGitter>
<bararchy> Windows support also work for me
<FromGitter>
<bararchy> I really wanted parallelism, but TBH the current project I'm on does not really needs it, and Windows supprot might attract a bigger crowd
rohitpaulk has joined #crystal-lang
<Groogy>
@bew when Papierkorb finishes his bindgen tool I'll generate a proper binding for it and mantain it
<Groogy>
right now its just minimal thing to just get my framework working
<FromGitter>
<bew> ok, great, thanks
rohitpaulk has quit [Quit: Ping timeout (120 seconds)]
rohitpaulk has joined #crystal-lang
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
<crystal-gh>
[crystal] asterite closed pull request #5025: Compiler: use return type of method with Primitive if available (master...refactor/simplify-primitivs) https://git.io/vdUct
unshadow_ has joined #crystal-lang
unshadow has quit [Quit: leaving]
unshadow_ is now known as unshadow
rohitpaulk has quit [Read error: Connection reset by peer]
<FromGitter>
<codenoid> -.-, my boss doesnt care about a `real performance`
<FromGitter>
<codenoid> My crystal can collect 200 thousand data in 5 minutes, while python takes more than 25 minutes ~,~ (in same vps), multi processing too
<FromGitter>
<sdogruyol> @codenoid most of the people doesn't care
<Groogy>
change is scaaaary
<FromGitter>
<bararchy> XD
<FromGitter>
<bararchy> so true
<Groogy>
well a,lso the thing there is probably your boss has to make a call between risking things or just go with how it is
<Groogy>
and honestly even knowing Crystal I would have made probbly similar call, unless it is some random script that helps you in your daily work
<FromGitter>
<krypton97> Can you write an OS in golang? Just got -26 downvoted for telling that go wasn't intended to be a system language and to check redox os instead..
<FromGitter>
<sdogruyol> lol
<FromGitter>
<bararchy> XD
<Groogy>
In what Reddit?
<FromGitter>
<krypton97> /r/golang
<Groogy>
Well there's your problem
<FromGitter>
<bararchy> Any GC lang is not for OS dev
<Groogy>
Reddit is a social experiment in human hive minds
<Groogy>
told a redditor on our reddit that he should stop making up how the features work to scare monger people and actually read the dev diary (all in a friendly slightly sarky tone)
<Groogy>
all of that subreddit exploded on me telling me "how DARE you tell that to a paying costumer"
<FromGitter>
<sdogruyol> lol
<Groogy>
my respect for reddit is extremly low
<FromGitter>
<krypton97> I sometimes get the feeling that people on that subreddit worship golang
<FromGitter>
<krypton97> or deify, idk what verb to use exactly
<Groogy>
they do
<FromGitter>
<krypton97> not a native en speaker
<Groogy>
and it iwll most probably happen on our reddit as well when it gets the same exposure
<Groogy>
people somehow put self identity in programming language in a way I don't really understand
<Groogy>
it's a tool :/ I don't identify myself as in a hammer
<FromGitter>
<sdogruyol> :D
<FromGitter>
<sdogruyol> They're a lot of people like that in every aspect of the world
<FromGitter>
<sdogruyol> I dare you to mess with an Apple fan...
<Groogy>
I might really like/love that hammer and had that for a long time. But when that hammer breaks I'm gonna get a new one
<Groogy>
@sdogruyol apple fans are not as fun anymore, they've kind of lost their religious fervor over Apple
<FromGitter>
<krypton97> I was actually expecting some counterarguments, but all I got was crap replies. I'll move on I guess
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 252 seconds]
hightower2 has joined #crystal-lang
hightower4 has quit [Ping timeout: 248 seconds]
unshadow has left #crystal-lang ["Good Bye"]
<Groogy>
ugh now I only have the boring stuff of text rendering left ( Β΄_γ`)
<Groogy>
kerning, baselines etc
<Groogy>
need more coffee
<FromGitter>
<bararchy> Groogy GG
<FromGitter>
<bararchy> :)
hightower3 has joined #crystal-lang
<Groogy>
well I am gonna jump like boldness and outlines etc. for now
<Groogy>
will have to add that later
<Groogy>
want to get started on more direct stuff like UI and so
<FromGitter>
<bararchy> nice !
<FromGitter>
<bararchy> pure Crystal graphic framework , how awsome :)
hightower4 has joined #crystal-lang
hightower2 has quit [Ping timeout: 260 seconds]
<Groogy>
now with text rendering it kind of have everything to just get started
<Groogy>
Maths library, image loading, 2d/3d rendering (3d you gotta do some manual stuff though) and last font loading and text rendering
<Groogy>
ow yeah and shaders
hightower3 has quit [Ping timeout: 255 seconds]
<FromGitter>
<bararchy> π
<Groogy>
(γ£Β΄Οο½)γ£
hightower3 has joined #crystal-lang
Groogy has quit [Quit: WeeChat 1.9]
Groogy has joined #crystal-lang
hightower4 has quit [Ping timeout: 255 seconds]
<Groogy>
Hmm I am missing some unicode fontset or something donno
<Groogy>
can't see the unicode smiley you are doing bararchy :/
<FromGitter>
<bararchy> simly π , clap π
<FromGitter>
<bararchy> which one ?
<Groogy>
the second one
<Groogy>
trying to fix it
<FromGitter>
<bararchy> clapping hands
Groogy has quit [Client Quit]
Groogy has joined #crystal-lang
<Groogy>
yeah now it works
<Groogy>
installed Google's trutype font
<FromGitter>
<bararchy> cool :)
rohitpaulk has quit [Read error: Connection reset by peer]
<Groogy>
now I just need to figure out why I can't play content on Facebook and twitter :/
<Groogy>
oh well another day, time for pizza
rohitpaulk has joined #crystal-lang
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 240 seconds]
<FromGitter>
<bararchy> firefox\chrome\chromium ?
<FromGitter>
<bradleyd> @vonKingsley thanks for putting that example together. One question, UInt8* vs LibC::Char* ?
<FromGitter>
<krypton97> enjoy that pizza! :) @groogy
<FromGitter>
<faustinoaq> For me `LibC::Char` is more readable.
<Groogy>
LibC::Char I use whenever I am working with non native code to Crystal
<Groogy>
i.e it kind of highlights this ain't no more crystal land
<Groogy>
but I always convert it to a Bytes (Slice(UInt8)) whenver it leaves that space
<FromGitter>
<ziprandom> hey is there a way to see a file after all the macros transformed it?
<FromGitter>
<bew> Think not, but I'd loooove that too
<FromGitter>
<ziprandom> macros the way nim has would really be the killer! And it's still theoretically possible that crystal macros will some day have the means to programatically produce ast nodes, right?
bradleyd has joined #crystal-lang
<oprypin>
ziprandom, `crystal tool expand`
<oprypin>
no idea how it works tho
<oprypin>
or `{% debug() %}` for something more local
<FromGitter>
<ziprandom> @oprypin thxx
DTZUZO has joined #crystal-lang
bradleyd has quit [Ping timeout: 248 seconds]
weston1 has joined #crystal-lang
<FromGitter>
<ziprandom> was there a macro hook that evaluates when the class is defined?
<oprypin>
ziprandom, yeah you write the code and surround it with... nothing
<oprypin>
lol i mean this makes no sense, what you're writing normally already evaluates when the class is defined
<Yxhuvud>
ziprandom: crystal tool expand ..
<Yxhuvud>
oh, oprypin already answered
<Yxhuvud>
crystal tool expand -c file:row:col file , to use it anyhow. I'm uncertain if there is any way to simply expand a whole file
<Groogy>
@ziprandom anything you write in the class is evaluated when it is written, if you mean a hook when something is included etc. there is that
<Groogy>
but there is also a hook for when the preporcessor is done called finished with is expanded inside the class if you define it in a class
rohitpaulk has quit [Ping timeout: 246 seconds]
weston1 has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
Groogy has quit [Quit: WeeChat 1.9]
weston1 has joined #crystal-lang
Groogy has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<Groogy>
Hey so I need to come up with a nice interface on how to put details to text like coloring, boldness etc within the same object
<Groogy>
hope people are fine with this, my brain just work by vocalizing my problem to help me figure it out and would be nice to "brainstorm" a bit with others who are more experienced with Crystal
<Groogy>
idea right now is to encode in the vertices the info needed to do formatting of text meaning it would be quite performant in order to render decorated text
<Groogy>
but I need a nice API for it
<FromGitter>
<bararchy> Groogy how does a simple usage looks ?
<Groogy>
and let's say you want the word "World" to be in yellow color instead of white
<Groogy>
but the rest of the string white
<Groogy>
at work we have control characters we use but I think I would want to avoid that because there's a heap of user errors that can come from that (as I've experienced first hand)
<FromGitter>
<bararchy> Groogy it looks simple enough for the low level framework it is
<FromGitter>
<bararchy> I guess when someone will create a "game builder" or "UI desginer" above it, it will be much more friendly
<Groogy>
yeah no but like this class would have to be able to understand "color this specific part"
<Groogy>
because otherwise you would have an extra draw call for each differing color etc. and text rendering can get expensive really fast
<FromGitter>
<faustinoaq> > I guess when someone will create a "game builder" or "UI desginer" above it, it will be much more friendly β β Yeah, maybe a GUI using `qt5.cr` π
<Groogy>
right now the class can potentially say "this specific letter should be red" without any overhead at all
<Groogy>
but if you would instead have something ontop of it that decided what gets red and not, it would become several draw calls since you would createi t using several text objects
<Groogy>
I am in the mindset of something like text.formatter.do_something????
<FromGitter>
<bararchy> Groogy, do you know Godot engine ?
snsei has quit [Remote host closed the connection]
weston1 has joined #crystal-lang
<oprypin>
Groogy, have you considered just not implementing this?
<oprypin>
at least in the mean time
<oprypin>
if you do this, might as well make a full on rich text editor
<oprypin>
if you don't, well, then there's not much point
snsei has joined #crystal-lang
<Groogy>
it's not for a rich text editor?
<Groogy>
it's a framework providing functionality, one of those functionalities are coloring text and an optimization is to embed the coloring in the vertex data
<Groogy>
yepp you just have to define the type of the hash as well
<Groogy>
i.e like Hash(String, FooBar)
<oprypin>
Groogy, no no don't involve regex, that's not how people want to think about it
<oprypin>
just Hash works just as well tho
<oprypin>
really needs to be a rich text object...
<FromGitter>
<Fanna1119> so it's fine as is, i will try :D. first time touching hash haha
<Groogy>
no rich text is a layer above
<Groogy>
this is how to get the data to the graphics card
<oprypin>
Groogy, but how do you want to implement rich text without implementing rich text
<Groogy>
Well it depends if you mean RTF or if you mean just the generalization of "rich text"
<Groogy>
I mean just capitalizing text is rich text
<Groogy>
Β―\(Β°_o)/Β―
<oprypin>
i never said "rich text format"
<Groogy>
either way, this is the step that converts random string into vertices that can be put on the screen which means it must also be able to convey color information and that is the step I am trying to figure out how to make it nice
<oprypin>
implement a rich text object
<Groogy>
I don't think you understand what you are saying...
<Groogy>
this doesn't handle things like markup, formatting or anything. This is literally the rasterization of text
<Groogy>
if someone wants more complex behaviours they can put that ontop
<oprypin>
but with arbitrary rich additions
<oprypin>
u said already that u have bold and color
<Groogy>
no I only have color
<oprypin>
ok cool
<oprypin>
well not so cool because it's totally arbitrary
<Groogy>
it converts a plain text string into vertices to be drawn on screen and it happen to just for nothing also support colors because that's how shaders work
<Groogy>
and I just wanted to expose that in a nice way without having the end user have to manipulate vertices manually
<Groogy>
or do several text objects unnessecairly
<oprypin>
i'll show an example of my vision
kiliankoe has left #crystal-lang [#crystal-lang]
<Groogy>
what you probably want is something that fits the GUI module that I am starting on tomorrow. Think of this more as the primitive beneath that the GUI uses.
<Groogy>
yeah that's more fitting for the user interface, since then the rich text object can also have bunch of code in it on how to write this to a file, etc. etc.
<Groogy>
and the rich text in itself would translate into a graphical text object which is in charge of "how does this become graphics"
<Groogy>
and that part I am starting on tomorrow :)
<Groogy>
the ui part
<oprypin>
Groogy, look, your best idea previously regexp. do you seriously consider sticking to that, or what's your current solution?
<Groogy>
it's not only regexp
<oprypin>
D:
<oprypin>
Groogy, you seem to be dismissing my approach after seeing the word "rich"
<Groogy>
it is just a generic regexp, range, keyword and control characters
<oprypin>
that's terrible
<Groogy>
no they just have two different problems to solve
<oprypin>
i am solving the same problem but without regexp and control characters
<Groogy>
yeah no that's not the point? It's an interface for how to build the data of the vertices
<oprypin>
so regexp is your interface and control characters is your implementation?
<Groogy>
Rich text will also have to regard the rules of intendation which the text object doesn't understand for instance
<Groogy>
there's tons of stuff that you can put in there
<Groogy>
eh no
<Groogy>
if you decide to use it bare bones because you don't want the ui stuff, you can use either of those four
<Groogy>
control character is not 100% done yet so pushing that tomorrow
<Groogy>
but that would let you define Β§Y means yellow and Β§! means back to default
<Groogy>
which is how it works in our games
<oprypin>
Groogy, well hopefully you understand that regex cannot work at all
<oprypin>
im just shoing you a nice way to implement everything using range-based rules
<Groogy>
Well it would help a lot at current work
<Groogy>
we have style guides for our tooltips
<Groogy>
a feature have to be captialized and marked yellow
<Groogy>
which you could solve with a regex I imagine?
<Groogy>
but right now we have only §YSome feature§!
<Groogy>
but either way whatever the UI will be using will probably just be range based
<Groogy>
since the higher level logic will be there and it will know exactly what to pick out
<Groogy>
this is more for people who are more comfortable just messing around directly with constructs like sf::Text
<oprypin>
i get it, so why does it involve regular expressions?
<Groogy>
why can you unstage your changes in git in several ways?
<Groogy>
pretty much the same, whatever needs the end user has to do a thing
<Groogy>
and hey add(/(Feature1|Feature2|Feautre3)/ yellow).add(/-[0-9]\d*/, red)
<Groogy>
would make my life already today a lot simpler at my job
<Groogy>
(show feautres yellow, show negative numbers as red)
<oprypin>
β[23:25:09] β<βGroogyβ>β it converts a plain text string into vertices to be drawn on screen and it happen to just for nothing also support colors because that's how shaders work
<Groogy>
off to bed! need to sleep on how to port my ui from c++ or if I even should
<oprypin>
^and also regular expressions just cuz
<Groogy>
hmm yes?
<Groogy>
well the coloring was already there, I just needed an interface and one of the possible way to provide the information is regex
<RX14>
i finished up enforcing parents around the arguments of calls with blocks to unify and enforce their associativity
<RX14>
but it ended up hitting the spec dsl hardest
<RX14>
so now i'm not sure of the change so much
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
<crystal-gh>
[crystal] RX14 opened pull request #5034: Force calls with blocks to have their arguments parenthesised (master...feature/block-unification) https://git.io/vdT6l
snsei_ has quit [Remote host closed the connection]
snsei_ has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]