Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 27 19:45
    mohd-akram synchronize #11439
  • Nov 27 19:14
    straight-shoota synchronize #11499
  • Nov 27 18:48
    mgomes ready_for_review #11482
  • Nov 27 18:20
    HertzDevil labeled #11482
  • Nov 27 18:20
    HertzDevil labeled #11482
  • Nov 27 18:17
    HertzDevil synchronize #11495
  • Nov 27 18:02
    HertzDevil labeled #11503
  • Nov 27 18:02
    HertzDevil labeled #11503
  • Nov 27 18:02
    HertzDevil labeled #11503
  • Nov 27 18:02
    HertzDevil opened #11503
  • Nov 27 17:42
    mgomes edited #11482
  • Nov 27 17:28
    mgomes synchronize #11482
  • Nov 27 15:42
    straight-shoota closed #11501
  • Nov 27 15:27
    straight-shoota labeled #11501
  • Nov 27 15:27
    straight-shoota unlabeled #11501
  • Nov 27 13:04
    HertzDevil synchronize #11502
  • Nov 27 11:47
    HertzDevil synchronize #11496
  • Nov 27 11:47
    HertzDevil synchronize #11495
  • Nov 27 10:48
    HertzDevil labeled #11502
  • Nov 27 10:48
    HertzDevil labeled #11502
From IRC (bridge bot)
@FromIRC
<RX14> ysbaddaden
<d20master> AWESOME! Thanks a bunch!
<RX14> the source files are on github
From IRC (bridge bot)
@FromIRC
From IRC (bridge bot)
@FromIRC
<_tsound> trying to cross-compile gave me [while requiring "c/dlfcn": can't find file 'c/dlfcn' relative to '/usr/lib/crystal']
<RX14> _tsound, what command did you use
<_tsound> [crystal build main.cr --cross-compile --target "i386-pc-elf"]
<RX14> we don't support that target
<RX14> that triple is only used for compiling for no OS
<RX14> use i386-linux-gnu
<_tsound> yeah i know i wanted to make an .img out of it
<RX14> oops, i686-linux-gnu
<RX14> you wanted to run it without an OS?
<RX14> then you need to remove the stdlib and start from scratch
<RX14> and you don't want to do that
<RX14> really
<_tsound> probably going to have to do that anyway
<_tsound> thanks though RX14
From IRC (bridge bot)
@FromIRC
<RX14> removing the stdlib isn't as easy as just passing --prelude=empty
<RX14> the crystal compiler is strongly linked to the current stdlibn
<RX14> and you're going to end up stubbing out loads of different functions to get anything working
<RX14> _tsound, if you really want to do it, at least use this as a resource: https://github.com/TheKernelCorp/NuummiteOS
<_tsound> ohey that looks like what i want \
<_tsound> more or less
Bar Hofesh
@bararchy
Does this error makes sense to anyone ?
Invalid Int32: HTML ["0xcd177c0d85: to_i32 at /usr/lib/crystal/string.cr 418:5", "0xcd177c0c7c: to_i at /usr/lib/crystal/string.cr 319:5", "0xcd178b303a: from_io? at /usr/lib/crystal/http/client/response.cr 124:19", "0xcd178a4ebe: exec_internal_single at /usr/lib/crystal/http/client.cr 503:5", "0xcd178a10dc: exec_internal at /usr/lib/crystal/http/client.cr 486:5", "0xcd178a0fc2: exec at /usr/lib/crystal/http/client.cr 483:5", "0xcd178a55f2: exec at /usr/lib/crystal/http/client.cr 586:5", "0xcd178a558e: post at /usr/lib/crystal/http/client.cr 329:3", "0xcd1779dded: ~procProc(Nil) at /usr/lib/crystal/kernel.cr 0:3", "0xcd177ba6ee: run at /usr/lib/crystal/fiber.cr 255:3", "0xcd17793386: ~proc2Proc(Fiber, (IO::FileDescriptor | Nil)) at /usr/lib/crystal/concurrent.cr 0:3", "0x0: ??? at ??"]
From IRC (bridge bot)
@FromIRC
<oprypin> @bararchy, well seems like someone tries to convert that actual string to_i
Bar Hofesh
@bararchy
Well ... that's in the Core HTTP::Client, so.... a bug ?
From IRC (bridge bot)
@FromIRC
<oprypin> @bararchy, i'd just really like to see what reproduces the bug
Bar Hofesh
@bararchy
I get it reproduced 100% of the times, against a specific application
let me see how I extract the code the blows it out
From IRC (bridge bot)
@FromIRC
<oprypin> seems to me more like a bug in traceback impl
<oprypin> @bararchy, do you have macro run involved anywhere? perhaps ECR?
Bar Hofesh
@bararchy
Nope, just calling the Client with some wierd headers
From IRC (bridge bot)
@FromIRC
<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.
From IRC (bridge bot)
@FromIRC
<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
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