Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:47
    straight-shoota closed #12051
  • 13:47
    straight-shoota closed #12050
  • 12:17
    beta-ziliani edited #7318
  • May 15 08:43
    r00ster91 closed #7318
  • May 15 08:17
    r00ster91 closed #7690
  • May 14 17:01
    Blacksmoke16 labeled #11995
  • May 14 13:03
    webhive closed #12055
  • May 14 10:19
    straight-shoota milestoned #12051
  • May 14 10:00
    I3oris edited #12051
  • May 14 08:45
    oprypin review_requested #11977
  • May 13 23:29
    Blacksmoke16 unlabeled #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 opened #12061
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota opened #12060
From IRC (bridge bot)
@FromIRC
<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
From IRC (bridge bot)
@FromIRC
<oprypin> yep
From IRC (bridge bot)
@FromIRC
<oprypin> solution https://carc.in/#/r/2iqs cc Papierkorb
From IRC (bridge bot)
@FromIRC
<oprypin> can be done without the storage but boy is it ugly
<oprypin> https://carc.in/#/r/2iqv yep totally ugly
<Papierkorb> and much more space efficient
From IRC (bridge bot)
@FromIRC
<oprypin> i actually cant deal with this ugly solution, don't care ¯_(ツ)_/
From IRC (bridge bot)
@FromIRC
<bmcginty> Is there a way to get a list of any objects crystal creates, as well as a list of the objects it deletes before they are deleted? I'm trying to track down a memory leak, and it'd be way easier if I could see which objects where hanging around between gc.collect calls.
Nick Franken
@fridgerator
@sdogruyol when will the results form the survey be available?
From IRC (bridge bot)
@FromIRC
* byteflame sent a long message: byteflame_2017-08-13_05:43:20.txt https://matrix.org/_matrix/media/v1/download/matrix.org/zsewrBvfTfvouCpNDBYiuwaa
<byteflame> Whoops, the first line in request should be req = HTTP::Request.new method, path, headers, body
Hanyuan Li
@hanyuone
I'm thinking of making a YAML-based GUI library as a binding for CrSFML, is this a good idea?
So you write YAML and stuff for making your GUI, instead of loads of function calls
I'm not sure if this would be a good idea, but eh
From IRC (bridge bot)
@FromIRC
<watzon> Querp-Derp: This is probably the one and only instance where I would suggest using XML, but something like that is definitely needed. No one wants to code all of that sh** by hand
<watzon> Qwerp-Derp *
<watzon> Wtf phone
<watzon> I give up
Hanyuan Li
@hanyuone
RenderWindow:
  name: window
  dimensions: [800, 600]
  items:
    RectangleShape:
      name: square
      dimensions: [100, 100]
      position: [100, 100]
Maybe something like this?
I can't really think of good syntax
From IRC (bridge bot)
@FromIRC
<watzon> I guess something like that could work out. Either way, as long as I don’t have to write actual code to make a button. I mean come on
Hanyuan Li
@hanyuone
My plan is you write a Button class with all of the commands and stuff in it
And then you write how it's going to be laid out using something like YAML
From IRC (bridge bot)
@FromIRC
<watzon> Rust actually has a plethora of GUI API wrappers, but I don’t think I’ve seen one yet that allows the use of XML or anything else to abstract away the actual design portion
Hanyuan Li
@hanyuone
I can't really think of a good syntax though
From IRC (bridge bot)
@FromIRC
<watzon> Take a look at android layouts and just translate the xml to yaml https://developer.android.com/guide/topics/ui/declaring-layout.html
<watzon> That should at least give you a starting point
<watzon> I still think XML might be better fitted to this use case though, I’m not sure if YAML is flexible enough
Hanyuan Li
@hanyuone
Hmmmmm
I wanted to reflect the whitespace-sensitive syntax of Crystal and Ruby, XML seems less user-friendly
From IRC (bridge bot)
@FromIRC
<watzon> You could alway write your own DSL or parser
<watzon> Might be a little more work, but it could be a fun project
<watzon> Not saying YAML won’t work of course, but I don’t know how well a UI in YAML will do
Hanyuan Li
@hanyuone
Can't I just use Crystal's YAML parser?
I wish there was a PEG parser in Crystal... :(
From IRC (bridge bot)
@FromIRC
<watzon> Either way good luck. Should be a fun project
Hanyuan Li
@hanyuone
:) It's a stepping stone to a bigger project
From IRC (bridge bot)
@FromIRC
<watzon> What GUI framework are you going to be generating code for though? Crystal is lacking in those right now
Hanyuan Li
@hanyuone
Probably CrSFML
It's not suited for GUIs, but it's the most developed library out there
For putting stuff on a screen :P and game dev
From IRC (bridge bot)
@FromIRC
<watzon> Yeah we could use some others for sure
<watzon> It’s just a lot of work