<hightower3>
Papierkorb, gonna add @signal#name to Cute?
<Papierkorb>
hightower3: just did. don't wanna put out a new version just for that though - especially not at this time of day.
<hightower3>
Sure, I always use the checkout, not versions.
<hightower3>
All good
<FromGitter>
<bew> btw @oprypin @Papierkorb, WDYT about the idea? (not the implementation details)
<Papierkorb>
bew, haven't found a use-case for that yet. Macros are really powerful as they are already.
<FromGitter>
<bew> for the use-cases I have some, but nothing to explain now (and not "at this time of day" too)
<oprypin>
these ideas sounded like the implementation of an actual interpreter
<oprypin>
but then i thought about it and i dont see a big breakthrough from such an idea
<hightower3>
Papierkorb, also, still open for suggestions on how to implement a one-time trigger, since the awesome-if-worked idea of def once( ..., &block) on( ...) { yield } doesn't work in Crystal.
astronavt has joined #crystal-lang
<FromGitter>
<bew> hmm currently don't have thought a lot about that (@oprypin). I was thinking it as a thinking draft on remote processes that could have access to some internal data of the compiler, without having to embed it by require-ing it. this could leads to compiler plugins (in a looong time ^^), or other stuff
<FromGitter>
<bew> probably
<hightower3>
Papierkorb, do I see it right that in Cute middleware listeners are conveniently collected in @listeners, yet for basic signals (no middleware) there is no such list?
<hightower3>
Oh not, looks like everyone is in @listeners, all good
snsei has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
Poeticode has quit [Ping timeout: 248 seconds]
Poeticode has joined #crystal-lang
Poeticode has quit [Changing host]
Poeticode has joined #crystal-lang
sp4rrow has joined #crystal-lang
sp4rrow_ has joined #crystal-lang
sp4rrow has quit [Ping timeout: 258 seconds]
pabs has quit [Ping timeout: 246 seconds]
hightower2 has quit [Ping timeout: 246 seconds]
pabs has joined #crystal-lang
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
_whitelogger has joined #crystal-lang
kali_ is now known as kali___
astronavt has quit [Remote host closed the connection]
<FromGitter>
<codenoid> hi, how to load 100% of javascript rendered website using HTTP::Client,
sp4rrow has joined #crystal-lang
byteflame has joined #crystal-lang
ryanf has quit [Remote host closed the connection]
<FromGitter>
<codenoid> and how i can make http::client render 100% loaded web data
<watzon>
Not sure what the status is on it, but it was developed by ysbaddaden so it's probably pretty good
<byteflame>
Using `crystal-db` with `crystal-pg` `db.query_one("select * from foo where bar = ?", "value")` sends the query as-is (including question-mark)
<byteflame>
Issue is I'm stupid and forgot postgres' `?` is `$n`
Guest31091 has joined #crystal-lang
alex`` has joined #crystal-lang
<FromGitter>
<codenoid> `pretty good` If he still takes care of it π
<watzon>
Thatβs the case with any shard though codenoid. Iβm sure itβs good
Guest31091 is now known as alex```
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
olbat has quit [Quit: Bye ...]
alex``` has quit [Quit: WeeChat 1.9]
alex`` has quit [Quit: WeeChat 1.9]
alex` has joined #crystal-lang
alex` is now known as Guest27960
<FromGitter>
<LuckyChicken91_twitter> is someone here having a good program idea?
<FromGitter>
<LuckyChicken91_twitter> im bored
<FromGitter>
<bew> A good program idea is yours to find out. A good/interesting program for me might not be good for you. Also, "a good program" is a very wide subject: do you want to do a fun thing? A useful thing? A mini game? A never-been-done thing? ...
<FromGitter>
<LuckyChicken91_twitter> maybe a game
<FromGitter>
<bew> Also I'm sure there are websites full of ideas of programs to do
<FromGitter>
<LuckyChicken91_twitter> do you know one?
A124 has quit [Remote host closed the connection]
<FromGitter>
<bew> I do, but you should find one that motivates you, there are plenty of mini games you can take inspiration from
<FromGitter>
<bararchy> @LuckyChicken91_twitter Try to do a soduko\soliter\etc.. game with Crystal and maybe crSFML
A124 has joined #crystal-lang
<FromGitter>
<LuckyChicken91_twitter> i never understanded soduko or soliter ;D
<FromGitter>
<LuckyChicken91_twitter> ooh now im having an game idea again
bmcginty has quit [Ping timeout: 258 seconds]
bmcginty has joined #crystal-lang
bmcginty has quit [Ping timeout: 246 seconds]
bmcginty has joined #crystal-lang
bmcginty has quit [Ping timeout: 255 seconds]
bmcginty has joined #crystal-lang
greengriminal has joined #crystal-lang
<FromGitter>
<LuckyChicken91_twitter> can I change the terminal background color with crystal? or with an command?
<oprypin>
LuckyChicken91_twitter, you cannot do that directly, what you can do is set the background color for a character and overwrite the whole screen with that characta
<oprypin>
but dont do that probably?
<FromGitter>
<LuckyChicken91_twitter> hm. If crystal whould support windows then i could easily use the windows command "color f0"
<oprypin>
or you could just stop using the damn terminal
<oprypin>
in crazy ways, anyway, because now i realize it's your only option on windows
<FromGitter>
<LuckyChicken91_twitter> i could just stop using the damn terminal?! you mean i should use GUI? theres still no GUI framework
<FromGitter>
<LuckyChicken91_twitter> this is the problem
<oprypin>
LuckyChicken91_twitter, but you're not using a GUI framework in the terminal either, so what's the advantage?
<FromGitter>
<LuckyChicken91_twitter> how should i use gui in the terminal?
<FromGitter>
<bararchy> Wasn't there someone working on QT bindings ?
<FromGitter>
<LuckyChicken91_twitter> i hope so
<oprypin>
bararchy, that'll take months, in the best case
<oprypin>
(not me working on it, btw)
<FromGitter>
<bararchy> There is Crystal ncurses
<FromGitter>
<bararchy> Can be used also
<FromGitter>
<bararchy> Better then terminal , and has more control
<FromGitter>
<LuckyChicken91_twitter> i prefer the terminal
<FromGitter>
<LuckyChicken91_twitter> The good old terminal.
<oprypin>
how can terminal be better than terminal and how can a framework for terminal have more control than terminal?
<FromGitter>
<LuckyChicken91_twitter> i dont know
<oprypin>
ncurses only provides a convenient wrapper for what crazy things you're already doing (for some definition of convenient)
<watzon>
What he said
<oprypin>
in fact i'm sure it supports background color by automating and persisting the character background color
<oprypin>
not that i condone making UIs in terminal
<FromGitter>
<bararchy> Can't crSFML be used for UI?
<FromGitter>
<bararchy> Even though it might be an overkill
<oprypin>
yes, it can. surely better make GUIS in that without a GUI framework than a terminal without a GUI framework
<oprypin>
but it's Windows, remember
<watzon>
Really at this point if you want good GUI support either make the bindings yourself (long project) or use something like Rust which already has bindings to just about everything including QT
<watzon>
Especially if you're developing on Windows. WSL isn't going to be able to give you good GUI support
<oprypin>
yeah i can imagine the great successes LuckyChicken91_twitter achieves when using Rust
<watzon>
π€£
<watzon>
It would be fun to see the #rust:matrix.org group light up
<watzon>
I've found them to be a little less helpful
<FromGitter>
<bararchy> lol
<FromGitter>
<LuckyChicken91_twitter> i think i could use crsfml on windows
<oprypin>
you could use it with a fork of crystal and be on the minefield with the possibility of anything crashing at any point
<Papierkorb>
with that in mind, who in here has mod privileges?
<Papierkorb>
*op
<oprypin>
RΠ₯14
<oprypin>
even so, gitter is still wild west
<Papierkorb>
And only one op isn't that great either
<oprypin>
technically there are more but yeah........
<RX14>
how did that not ping me oprypin
<RX14>
also i think i am OP in gitter
<oprypin>
oh cool
<RX14>
well, i'm pretty sure i am since i can edit the topic
<oprypin>
RX14, lol that was intentional R{CYRILLIC CAPITAL LETTER HA}14
<RX14>
thing is people are always long gone by the time I notice they need a ban
<RX14>
oprypin, it's better to use a zwsp
<RX14>
RX<zwsp>14
<oprypin>
yeah but i dont have it handy
<RX14>
i only use that trick in bots
<oprypin>
gitter bridge bot uses zwsp when u type :) etc
<RX14>
yeah i forgot you would know about that
<FromGitter>
<muhajirframe> can we actually run crystal on windows? I mean the compiled crystal?
<FromGitter>
<bararchy> We need easy to use template for answers :)
<FromGitter>
<bararchy> "/template windows"
<FromGitter>
<bararchy> that would be cool in a bot context
<oprypin>
muhajirframe, there is a fork of crystal that supports producing Windows binaries, with most of the standard library not working
<oprypin>
bararchy, DeBot has that, except it's inactive and doesnt care about Gitter
<FromGitter>
<bararchy> Oh
<FromGitter>
<Val> @oprypin (sorry for the lag) because I found that `@[Link(ldflags: "-lfoo")]` doen't work, see https://github.com/datanoise/mongo.cr/issues/22 . When using `--link-flags` it works :-/
<oprypin>
Val, what does yajl have to do with anything?
thelonelyghost has quit [Ping timeout: 240 seconds]
sija[m] has quit [Ping timeout: 240 seconds]
jplatte has quit [Ping timeout: 240 seconds]
Renich[m] has quit [Ping timeout: 264 seconds]
byteflame has quit [Ping timeout: 255 seconds]
TheGillies has quit [Ping timeout: 246 seconds]
watzon has quit [Ping timeout: 240 seconds]
olbat[m] has quit [Ping timeout: 240 seconds]
<crystal-gh>
[crystal] RX14 opened pull request #4824: Remove bare array creation from multi assign (master...feature/remove_auto_array) https://git.io/v7HmR
rizo[m] has quit [Ping timeout: 276 seconds]
<RX14>
oprypin, done
braidn[m] has quit [Ping timeout: 255 seconds]
<Papierkorb>
> while requiring "prelude": can't find file 'prelude' relative to '.../src/<Project>'
<Papierkorb>
Looks like the linter in atom is drunk
liosha has joined #crystal-lang
<liosha>
<Papierkorb> prelude problems happen when CRYSTAL_PATH is not set properly
liosha has left #crystal-lang [#crystal-lang]
d20master has joined #crystal-lang
<d20master>
"warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking .build/crystal.o"
<d20master>
I'm trying to cross compile the crystal compiler statically and I
<d20master>
am one step away from complete it seems
<Papierkorb>
Tried it compiling non-static? That is an artifact of static linking.
<d20master>
I have not tried it non-static yet, but I am confident that would work non-static
<d20master>
I know there is a way to specify that the glibc objects get dynamically linked; but I forget how
<d20master>
I am a stickler for security :-( @RX14 do you know the maintainer of that site? Do you think they would be willing to go forward with submitting the package to pkgs.alpinelinux.org ?
<RX14>
yes
<RX14>
the maintainer is a core developer of crystal
greengriminal has quit [Quit: This computer has gone to sleep]
<oprypin>
bararchy, well seems like someone tries to convert that actual string to_i
<FromGitter>
<bararchy> Well ... that's in the Core HTTP::Client, so.... a bug ?
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<oprypin>
bararchy, i'd just really like to see what reproduces the bug
<FromGitter>
<bararchy> I get it reproduced 100% of the times, against a specific application
<FromGitter>
<bararchy> let me see how I extract the code the blows it out
<oprypin>
seems to me more like a bug in traceback impl
<oprypin>
bararchy, do you have macro run involved anywhere? perhaps ECR?
<FromGitter>
<bararchy> Nope, just calling the Client with some wierd headers
_tsound has quit [Quit: WeeChat 1.9]
braidn[m] has quit [Ping timeout: 240 seconds]
jplatte has quit [Ping timeout: 240 seconds]
byteflame has quit [Ping timeout: 240 seconds]
thelonelyghost has quit [Ping timeout: 258 seconds]
TheGillies has quit [Ping timeout: 258 seconds]
Renich[m] has quit [Ping timeout: 255 seconds]
watzon has quit [Ping timeout: 240 seconds]
rizo[m] has quit [Ping timeout: 255 seconds]
sija[m] has quit [Ping timeout: 264 seconds]
vegai has quit [Ping timeout: 264 seconds]
olbat[m] has quit [Ping timeout: 255 seconds]
<oprypin>
I have a function accepting one integer input, returning some output (monotonically increasing) and i want to find the output that's the closest to some value
<oprypin>
i can use bsearch to find the smallest output that's >= the value
<oprypin>
but it is possible that the largest output that's <= the value is the closer answer
<oprypin>
so uh how can i do this without calling bsearch twice or something?
<Papierkorb>
oprypin: just find the value first (or the nearest available), and then compare to the values 'around' it.
<Papierkorb>
Err, just the one left/right to it
<Papierkorb>
if you find the value itself, the difference is 0 anyway lul
<oprypin>
the function is expensive
<Papierkorb>
what, the comparison?
<Papierkorb>
You only need one additional comparison over a bsearch
<oprypin>
no, the function. you're saying compare the values around it which assumes recomputing or storing them
<Papierkorb>
You said bsearch, thus I assumed you have all data, or at least, enough
<oprypin>
Papierkorb, i have all inputs (0..size) and can compute outputs
<oprypin>
i think i have a better idea. ignore the output of bsearch, and find the optimum manually, only relying on bsearch to limit the number of calls