<< 19-09-2019 >>

00:21:51*sagax quit (Remote host closed the connection)
00:33:15*sagax joined #nim
01:09:37FromGitter<iffy> In a test I want to assert that the Exception returned by myfuture.readError() is of type DisconnectedError (custom exception). How do I do that?
01:21:48disruptekhttps://nim-lang.org/docs/unittest.html#expect.m%2Cvarargs%5Btyped%5D%2Cuntyped
01:22:04disruptekiffy ^
01:23:22*treeform quit (Remote host closed the connection)
01:30:40*laaron quit (Remote host closed the connection)
01:34:40*laaron joined #nim
01:38:31*endragor joined #nim
01:47:39*NimBot joined #nim
01:58:15*rockcavera quit (Ping timeout: 265 seconds)
02:06:50*exelotl quit (Ping timeout: 246 seconds)
02:21:27*Tanger quit (Remote host closed the connection)
02:27:30*Tanger joined #nim
02:28:19*rockcavera joined #nim
02:36:39FromGitter<iffy> disruptek, so maybe `expect DisconnectedError: raise myfuture.readError()`?
02:37:36disrupteksounds good.
02:42:03*laaron quit (Remote host closed the connection)
03:07:44*chemist69 quit (Ping timeout: 276 seconds)
03:08:49*laaron joined #nim
03:09:14*chemist69 joined #nim
03:12:02*lritter quit (Ping timeout: 240 seconds)
03:13:08*lritter joined #nim
03:27:34*doesntgolf quit (Read error: Connection reset by peer)
03:30:47*dddddd quit (Remote host closed the connection)
03:37:54*rockcavera quit (Remote host closed the connection)
04:11:28*actuallybatman quit (Quit: leaving)
04:50:43*nsf joined #nim
05:42:04*narimiran joined #nim
05:47:23*fjellfras joined #nim
05:52:44*solitudesf joined #nim
06:12:12FromGitter<gogolxdong> How to prevent background console when running windows executable?
06:15:43nc-x[m]gogolxdong: idk if nim compiler has a switch for it, but you can pass argument to the c compiler to do that
06:15:47*mal`` quit (Quit: Leaving)
06:16:58nc-x[m]for msvc compiler it is /subsystem:windows iirc
06:17:46*absolutejam joined #nim
06:18:23leorizegogolxdong: --app:gui
06:19:01leorizenote that stdin/out won't work then
06:19:21FromGitter<gogolxdong> Where is the document?
06:20:41leorizenim --fullhelp
06:20:46*mal`` joined #nim
06:20:56leorizefor actual docs on how --app:gui behaves, you'd need to refer to win32 documentation
06:21:33*fjellfras quit (Quit: Leaving)
06:22:06leorizesome (undocumented) behaviors in Nim when you use --app:gui (windows-only, this switch does nothing on *nix afaik):
06:22:29leorizeunhandled exceptions will spawn a dialog with the details
06:23:05leorizeerrors like unable to find a {.dynlib.} will also be presented in a dialog
06:23:25leorizethat's all
06:24:04leorizerestrictions such as stdin/stdout won't work is due to how Windows work, so you'll have to log to a file
06:26:53*absolutejam quit (Ping timeout: 246 seconds)
06:31:27FromGitter<gogolxdong> Thanks, it's very elaborative. What do you mean by stdin/stdout won't work, stdin works in nimx demonstration built with --app:gui.
06:32:20leorizeiirc stdout is blocked by windows if your app is built as a gui app
06:32:26leorizeI might be wrong about stdin though
06:33:06FromGitter<zacharycarter> windows is weird with stdout
06:33:18FromGitter<zacharycarter> I often times have to use debug viewer to see stdout
06:33:45FromGitter<zacharycarter> https://docs.microsoft.com/en-us/sysinternals/downloads/debugview
06:41:44*alexander92 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:25*Vladar joined #nim
07:04:46*gmpreussner joined #nim
07:08:45*laaron quit (Remote host closed the connection)
07:12:06*laaron joined #nim
07:12:07*absolutejam joined #nim
07:22:42alexander92hm, is "wait for recvLine, if the received data is empty, sleep a bit and wait again"
07:23:00alexander92a good pattern for low-cpu socket "server"
07:30:45leorizeto be fully optimal use blocking I/O instead :P
07:31:14*couven92 joined #nim
07:48:15*pigmej[m] is now known as pigmej
07:48:45*pigmej is now known as Guest96279
08:18:51*Guest96279 is now known as pigmej
08:18:51ZevvI'm so used to nim.nvim+nimsuggest really *understand* what I'm trying to lookup, that ctags/cscope is really annoying me these days. Are there solutions to get the nimsuggest experience with C++?
08:19:14*alexander92 quit (Ping timeout: 240 seconds)
08:19:26Zevv(yes, wrong channel, of course, but still!)
08:20:27Araqah so nimsuggest does work, nice
08:21:01*couven92 quit (Read error: Connection reset by peer)
08:21:18Zevvtogether with nvim.vim, it's a real pleasure to use. I especially love how you just hop your way into the stdlib when figuring out what stuff actually does.
08:22:06ZevvAnd for C I've used decades of cscope/ctags, which is ok for that language. But I'm still annoyed when trying to do similar stuff with C++
08:28:39*couven92 joined #nim
08:30:45leorizeZevv: clangd is your friend
08:32:33Zevvsweet, that should easy my pain and relieve my horrendous suffering a bit \o/
08:32:40ZevvHow do I plug that on the [n]vim side?
08:33:37Zevvvim-lsp?
08:34:59leorizeyea, there's also an lsp plugin for asyncomplete
08:36:41Zevvok, something works, seem to be getting there
08:39:09Zevvwell, this is pretty usable, it saves me from generating cscope databases. But it still does stupid things, offering all textual matches in a go-to-definition, instead of deducing from the types where it should go
08:39:59Zevvtodays applause goes to leorize! again.
08:57:32leorizeI guess that just shows how good nim.nvim is \o/
08:58:09leorizealthough apparently most can't write the plugin name :P
08:58:38Zevvwell, you could drop the 'n'
08:58:40Zevvthat would make it easier
08:58:46Zevvbut then you'd have to make it work with vim8 of course
08:59:23narimiranim.nvim??
08:59:48Zevvsure, why not
09:01:10leorizeI'm too lazy to make stuff work with vim8 :p
09:03:57Zevvwell, *there* it is. That was hard, was it :)
09:16:43*PMunch joined #nim
09:29:19*clyybber joined #nim
09:35:39*abm joined #nim
09:52:32*enthus1ast joined #nim
10:06:43federico3how can check if a TCP connection is closed in asyncnet?
10:06:58federico3 await read() just blocks
10:10:20ZevvisClosed?
10:12:01*clyybber quit (Quit: WeeChat 2.6)
10:12:13*clyybber joined #nim
10:15:53federico3thanks
10:16:05Araqclyybber, https://github.com/nim-lang/Nim/pull/12168 maybe you want to work on it
10:17:09clyybberAh, you reverted the refactoring
10:17:40clyybberSure, in hindsight maybe a refactor that doesn't do pExpr/pStmt would be better
10:17:43clyybberI could try
10:21:09*alexander92 joined #nim
10:21:18Araqclyybber, nothing works with my PR, but it's how I would do it and we need it to fix more bugs ;-)
10:21:18alexander92@leorize HAHAH
10:21:24alexander92yes, i can use it
10:21:27alexander92but ill ponder a bit more
10:21:37alexander92Araq, is the araq gc ready
10:21:43alexander92i wait for the repo :P
10:23:22*rockcavera joined #nim
10:30:55*ng0 joined #nim
10:36:14*owl_000 quit (Ping timeout: 276 seconds)
10:36:46clyybberalexander92: the araq gc?
10:39:28lqdev[m]clyybber: Araq recently mentioned that devel supports custom GCs, and that he would create an 'araqsgc' repo with his own GC
10:40:54clyybberAh cool
10:41:27clyybberAraq: Can you unsquash the commits on your PR? Would make it quite a bit easier to read
10:42:46Araqclyybber, iirc I did it in one go... nothing to unsquash here
10:53:14*enthus1ast quit (Remote host closed the connection)
10:58:35PMunchdisruptek, did you play any more with the async stuff after I left yesterday?
10:58:45PMunchI saw something in the logs, but I forgot what it was
11:01:39*Perkol joined #nim
11:05:08*leorize quit (Ping timeout: 260 seconds)
11:09:12alexander92i wondered why my electron app is so slow to start
11:09:22alexander92found out i wrote await wait(2500)
11:09:27alexander92somewhere in the init code
11:10:19alexander92the bad thing is i did need some wait because of another bug
11:13:32*Hideki_ joined #nim
11:13:55*Hideki_ quit (Remote host closed the connection)
11:14:37PMunchOoof, the "wait because of a bug" thing..
11:14:40PMunchNot good
11:15:08PMunchAnd your electron app is probably slow to start because it's an electron app..
11:19:58alexander92well, that's the joke ;)
11:20:06alexander92everybody thinks it is because "electron"
11:20:15alexander92but usually the reason is just logical errors/sloppy code
11:20:56alexander92or manual "sleep 2.5 seconds" :)
11:33:51*leorize joined #nim
11:34:03*krux02_ quit (Ping timeout: 245 seconds)
11:35:09Araqalexander92, I'm still tinkering with the "new GC"
11:36:33*Hideki_ joined #nim
11:36:39*Hideki_ quit (Remote host closed the connection)
11:38:08*Perkol quit (Quit: Leaving)
11:38:26*capr1 left #nim ("Leaving")
11:40:36alexander92does it already function
11:42:38FromGitter<zacharycarter> what's this new GC?
11:42:56FromGitter<zacharycarter> I saw the project on github but is there anything other than the repo description as far as info goes?
11:44:34*nsf quit (Quit: WeeChat 2.5)
11:44:37Araqalexander92, so far it does what I wanted to do
11:44:44Araqshould push it I guess
11:45:27*Hideki_ joined #nim
11:46:13Araqit's pretty slow though, 3x worse than Boehm
11:46:36Zevvaraq, I remember you were trying to get utf output to work on the windows console some time ago, did you manage this?
11:46:47Araqyeah, it's in devel
11:47:42Zevvgreat, ok I'll look it up, thanks
11:49:51*Hideki_ quit (Ping timeout: 265 seconds)
11:51:29*dddddd joined #nim
11:58:24*absolutejam quit (Ping timeout: 258 seconds)
11:58:26PMunchHmm, should I just submit a bug for the async stuff I found yesterday?
11:58:45Zevvplease do; it sounds like I've heard this one before
12:00:36Zevviirc it's one of the things chronos mentioned in their chronos-vs-stdlib
12:03:33*endragor quit (Remote host closed the connection)
12:04:10*odinfinch joined #nim
12:08:48federico3https://github.com/status-im/nim-chronos/wiki/AsyncDispatch-comparison
12:09:18disruptekPMunch: should be an easy fix since it was already implemented for the i/o loop.
12:09:20*absolutejam joined #nim
12:11:10disruptekchronos has a smaller-than-500ms delay, but this behavior is an actual bug, not a design feature of either impl.
12:24:47PMunchDid you try this with chronos?
12:34:28*livcd quit (Ping timeout: 245 seconds)
12:39:25PMunchOkay, just tested this with chronos and it's not an issue there
12:39:57PMunchSo it might be possible to simply port a fix from that
12:40:26alexander92can it be just because of different timing
12:41:20PMunchhttp://ix.io/1mc6
12:41:33PMunchalexander92, what do you mean?
12:45:33*narimiran quit (Remote host closed the connection)
12:46:19shashlickWhat's this new gc, how's it different than the default gc
12:46:20*narimiran_ joined #nim
12:48:51disruptekPMunch: this is the fix for the problem we already ran into: https://github.com/nim-lang/Nim/pull/11263
12:54:18Zevvwhat is the default git client I should install on windows in order for nimble to work?
12:54:31*disruptek 🤣
12:54:38Zevvthere's git-scm, atlassian, git-for-windows, etc?
12:54:50disruptekstop, you're killing me
12:55:00Zevvbwaaah
12:55:36disruptekonly Araq would offer an answer i'd accept, as it would involve the minimal amount of fuckery.
12:55:44Zevvnim setup installs a c compiler and nimble for me, but no git
12:56:10Zevv45 MB?!
12:56:13Zevvcompressed?!
12:56:46Zevvrequires 250MB to install?!
12:56:55disruptekmaybe it's smaller on the inside?
12:57:06*nif quit (Quit: ...)
12:57:18*nif joined #nim
12:57:30Zevvlike Doctor Who's phone boot to the power -1
12:57:44Zevvwhy am I even doing this
12:59:08disruptekglutton for punishment?
13:02:14PMunchIs git on Windows a 250MB install?
13:02:25Zevvit is
13:03:02PMunchInstalled size of the git package on my Arch install is 36.25Mib
13:03:25PMunchOf course it depends on some stuff that is probably bundled in Windows..
13:03:55Zevvnevermind, I just stopped what I was trying to do
13:04:05PMunchWhich was?
13:04:17disruptekZevv: down, not across
13:04:39Zevvtrying to get nim to run on a windows vm to see if I can get utf8 output at compile time working
13:04:40Araqhmm? I'm not following
13:04:44Araqwhat's up with me?
13:04:50Zevvno idea?
13:04:58disruptekAraq: what's up with you?
13:05:05Araqexactly
13:05:26Araq"only Araq would offer an answer i'd accept"
13:05:33*krux02 joined #nim
13:05:36PMunchThey were wondering what kind of Git you use on Windows
13:05:42PMunchTo get nimble working
13:05:45disruptekwell, i think you still use windows, right?
13:06:00Araqsomebody has to, yes
13:06:21Araqbut I don't remember what git I use, "git for windows"?
13:06:47AraqI never update my git, it barely works on Windows, that's good enough
13:07:18Zevvbah, `staticExec("chcp 65001")` doesn't work for me :(
13:07:36AraqZevv: we have a start.bat file for you
13:08:03CalinouGit for Windows bundles many things like a Git Bash installation
13:08:04Zevvyeah, I noticed. No way around that I guess.
13:08:08Calinouit's larger than a minimal install could be
13:08:41CalinouMinGit seems to be available though: https://github.com/git-for-windows/git/releases/tag/v2.23.0.windows.1
13:08:58Calinouthe one with BusyBox is even smaller, only 18 MB
13:09:10Araqof course it comes with Bash, how else can you get shellshock on Windows
13:11:20Araqit should also ship with python, perl, ruby and php interpreters, but not with x11, because that would be a security problem, better use no mouse support to admin your server
13:12:16disrupteki'm starting to regret deferring to araq.
13:12:37disruptekbtw, you don't need bash to get shellshocked.
13:14:18alexander92btw
13:14:22Araqoh I forget, can't use a remote desktop because the server has no monitor. (Hmmm, it doesn't have a keyboard either...)
13:14:23alexander92does the window subsystem work well
13:14:28alexander92windows linux sub*
13:14:58Araqif I want Linux, I know where to find it. I prefer to have working printers though.
13:15:10Zevvhm this start.bat is not shipped with nim, is it?
13:15:10disruptekoh snap
13:15:27AraqZevv: it is but it depends on how you installed Nim
13:15:39ZevvI went to nim-lang and clicked 'download for windows'
13:15:50disrupteksilly rabbit
13:16:20AraqI'm not silly, I merely repeat the silly bullshit I had to listen to for a decade
13:17:24disrupteki wouldn't have thought zevv's install was silly, either, yet somehow...
13:18:20alexander92have you guys used mprotect until now?
13:18:26AraqZevv: there is tools/start.bat
13:18:26alexander92i am going to try to debug some stuff with it
13:18:54alexander92wondering if it's gonna be useful for tracking nim sequences
13:18:57alexander92somehow
13:19:18Zevvah it is in tools. That seems to work yes, but I can't assume the regular joe uses that to setup is nim envirnoment.
13:19:40Araqregular joe can select "create start menu entry"
13:19:44ZevvI'll just do `----<-----' instead of ╰────«─────╯
13:20:29disruptekthose aren't even unicode, afaik
13:20:32Araqoh it's for end users, end users on Windows expect a UI though, not some "crazy DOS" shit
13:21:17Zevvok then. I have Runes with crazy unicode shit at compile time, which I'd like to show the user at compile time.
13:22:05Araqlol
13:22:35ZevvOr am I aiming too high?
13:22:51alexander92wasn't there an installer
13:22:54alexander92niminst?
13:22:59*PMunch quit (Remote host closed the connection)
13:23:11disrupteki would say targeting windows is aiming low, but i think i'm in the minority.
13:23:45Zevvwell, sending output to the command line is not the way to go. But vscode also does not know how to consume anything bigger then 1980's ASCII
13:24:06Araqupdate vscode, it got significantly better
13:24:10disruptekbut your example **is** 1980s ascii.
13:24:25Araqbut tell me why you output ascii art at compile time?
13:24:31Araqwhat's the point?
13:24:41disruptekdo it in color. people love color.
13:24:44ZevvAraq: https://zevv.nl/div/java.html stuff like that
13:24:56ZevvI do it in color, even. Because people love color.
13:25:22Araqparser generator?
13:25:30Zevvright
13:25:47Araqhmm
13:26:07Araqok, I have to admit that's pretty cool
13:26:11disruptekit's just a tool to generate ascii art at compile time.
13:26:12ZevvPersonally, I think it's pretty nifty. And it's even really helpful, because I tend to look at those myself
13:26:37Zevvit is. IT's not 1980's ascii, I just happened to choose a few unicode codepoints which are also in the old DOS high ASCII page.
13:26:42disruptekyou type up a long peg and it turns it into colorful line drawings for ya.
13:26:51Zevvis that cool or what
13:27:04disruptekpretty cute.
13:27:15AraqI don't but never mind. I find them more confusing than looking at grammar rules
13:27:41alexander92is this rail diagram
13:27:42ZevvFeel free to find that, of course
13:27:52alexander92somebody here told me about those
13:27:56alexander92railway graphs?
13:28:08Zevvsyntax diagram aka railroad diagram yes
13:28:15alexander92oh yes
13:28:33Zevvimplementation was pretty straighforward and trivial, until someone wanted to see those on windows :(
13:28:40disruptekZevv: is this example a complete java parser?
13:28:45Zevvdisruptek: it is
13:28:51disruptekit looks pretty complete. :-/
13:28:58alexander92good work
13:29:49disruptekzevv, you're one scary dude, y'know that?
13:29:55ZevvNAh, I just stole it. It was in a different form, and I just made a tiny PEG parser to translate that peg form to npeg peg :)
13:30:59ZevvBut still: if anyone has any ideas how to do a similar presentation on windows at compile time, I'd be delighted. Maybe I should render to SVG and spawn a browser to load the image instead?
13:31:44Araqlol
13:31:49disruptekhonestly, i would just convert the characters to ascii and call it good. i haven't seen any unicode, so to my eye, you're already done.
13:31:57Araqyou can try...
13:33:40clyybberWhy does it not work on windows again?
13:34:10Zevvthe console does not eat UTF-8 by default, and vscode seems to choke on that as well
13:34:35Zevvhttps://cdn.discordapp.com/attachments/239878713016188939/623608647800586261/unknown.png
13:34:47disrupteklooks fine to me.
13:35:13disruptekthat's a linenoise parser, right?
13:35:49disrupteki recognize a few notes of 300 baud. amazing what lodges in your memory as a youngster.
13:35:55Zevvyou should *hear* this shit
13:36:03disruptek🤣
13:36:37Zevvmy brother would alway start whistling to make the dogs bark, causing my modem to hang up.
13:36:42Zevv300/1200, air-gap modem
13:37:09disruptekyeah, you could read faster than those things. incredible.
13:38:00Zevv*type* faster
13:38:34disruptek300 maybe, sure.
13:41:44ZevvHm ok, codepage 437 it is
13:42:42Zevvand araq doesn't like the drawings, so I might as well throw them out
13:47:06clyybberDoesn't nim automagically switch the codepages on startup?
13:47:12Zevvstart.bat does :(
13:47:19disruptekjust add a check for his username and output binary strings; he finds those easier to read.
13:47:31Zevvdisruptek: genius! :)
13:48:15clyybberZevv: Whats start.bat?
13:48:46clyybberI mean at runtime the exe does it right?
13:48:57clyybberSo at compile time the compiler could do it I suppose
13:49:29Zevvhttps://github.com/nim-lang/Nim/blob/devel/tools/start.bat
13:50:09AraqZevv: firstly, the Nim stdlib also now sets it to utf-8, not sure why it doesn't work
13:50:19Araqsecondly, it might be due to your installed fonts
13:50:52disruptekthe ol' wingdings defense, huh?
13:51:52*ng0 quit (Remote host closed the connection)
13:53:14clyybberZevv: Yeah I thought https://github.com/nim-lang/Nim/commit/7cb31455ee949ee006e2f314daa74866cf37a74e would fix it
13:54:18Zevvhm yes, that's post 20.2 release probably, which explains why my default noob-install doesn't work yet
13:54:28Zevvbut thanks for pointing that out, that should help!
13:54:37*ng0 joined #nim
14:01:15*nsf joined #nim
14:13:38*narimiran_ quit (Ping timeout: 245 seconds)
14:24:19*clyybber quit (Quit: WeeChat 2.6)
14:32:59*PMunch joined #nim
14:35:04federico3Zevv: that ascii diagram is really nice
14:35:49*solitudesf- joined #nim
14:38:02*solitudesf quit (Ping timeout: 240 seconds)
14:55:11*Hideki_ joined #nim
15:01:03*abm quit (Quit: Leaving)
15:05:32*nsf quit (Quit: WeeChat 2.5)
15:10:48*Hideki_ quit ()
15:11:11*absolutejam quit (Ping timeout: 268 seconds)
15:17:02Zevvnot if you're running on windows :)
15:21:44*abm joined #nim
15:27:21*laaron quit (Remote host closed the connection)
15:28:10*ng0 quit (Remote host closed the connection)
15:29:17*ng0 joined #nim
15:30:44*couven92 quit (Ping timeout: 265 seconds)
15:58:21disruptekif you're on windows, you can just send it to a printer.
15:59:17disruptekmaybe that's your best solution for araq: compile-time rendering to PCL.
15:59:56*abm quit (Ping timeout: 276 seconds)
16:05:25*Kaivo quit (Quit: WeeChat 2.6)
16:06:01*laaron joined #nim
16:08:58shashlickGood to know about mingit
16:09:32disruptekZevv: seems your npeg 0.17.0 release is emiting `Getcap, 0` on stdout at runtime?
16:20:26*absolutejam joined #nim
16:20:34*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:20:54*pbb joined #nim
16:23:00*pbb quit (Client Quit)
16:23:14*pbb joined #nim
16:26:26*PMunch quit (Remote host closed the connection)
16:29:34*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:29:51*pbb joined #nim
16:36:59*laaron quit (Remote host closed the connection)
16:38:48Zevvoh dang, did I tag the wrong side of the cleanup :/
16:38:53Zevvlemmefixthat
16:39:33*laaron joined #nim
16:39:53alexander92hey zevv
16:40:00alexander92you're hood with low level
16:40:30alexander92am i misunderstanding mprotect completely? shouldn't it make the pages i protect with it segfault on write
16:41:40alexander92ohhh got it .. i should tell it what is permitted, not what is forbidden!
16:42:14Zevvright :)
16:42:46Zevvif you want to do really fun things, you should catch sigsegv and do virtual memory in user space
16:44:59Zevvalso handy is to mmap something on 0x00 to get rid of those dreaded null pointer dereferences
16:45:39*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
16:47:28*leorize quit (Remote host closed the connection)
16:48:56*leorize joined #nim
16:49:04*leorize quit (Remote host closed the connection)
16:49:31*laaron joined #nim
16:50:17*laaron quit (Client Quit)
16:50:35*Trustable joined #nim
16:50:45*leorize joined #nim
16:53:37*laaron joined #nim
16:53:41alexander92oh !
16:54:10*ng0 quit (Quit: Alexa, when is the end of world?)
16:54:19alexander92that's too much
16:54:21alexander92for me
16:54:39alexander92i mostly want to just log writes for a sequence
16:55:00alexander92but this means, that my debugger should be able to log and then ignore those segfaults
16:55:04alexander92which seems possible in gdb
16:55:32Zevvdisruptek: bugfix release was made. thanks for reporting
17:00:12*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:00:59*laaron joined #nim
17:01:51*drewr quit (Ping timeout: 264 seconds)
17:07:20*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:09:29*absolutejam quit (Ping timeout: 246 seconds)
17:19:35*drewr joined #nim
17:20:55lqdev[m]treeform: how can I deal with the fact that there are 10 possible images for each character I render? I'm using a texture packer, so basically I'll be able to fit 10× less letters in a single page.
17:21:52lqdev[m]I was thinking I could get away with just 0.0 and 0.5 subpixels but that will probably result in keming
17:40:39*laaron joined #nim
17:41:30*laaron quit (Client Quit)
17:43:47*laaron joined #nim
17:46:28FromGitter<brentp> this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ as expected, echos "10". what's the simplest way to capture the outer_val at time of function creation? wrap in another function and call it? [https://gitter.im/nim-lang/Nim?at=5d83bef41998d516956733da]
17:46:33*laaron quit (Client Quit)
17:47:07*laaron joined #nim
17:56:31*doesntgolf joined #nim
17:58:18ZevvIndeed. If you want to capture something, you make a closure just so
18:00:26*alexander92 quit (Ping timeout: 240 seconds)
18:02:07Zevvhttp://ix.io/1IzX. The proc signature gets a bit noisy, though
18:02:10*vsantana joined #nim
18:03:09*treeform joined #nim
18:09:12FromGitter<brentp> cheers.
18:09:15*nsf joined #nim
18:09:48FromGitter<brentp> and any idea on how to get this to work for `<`, `>`, `<=`, etc. without having to create a function for each? http://ix.io/1IAe
18:10:47treeformdon't they all work off the cmp function?
18:11:57treeformlqdev, yeah you would be able to fit less characters. You could try with less versions up to you.
18:12:22FromGitter<brentp> here's a correct version in current form: http://ix.io/1IAP
18:12:25treeformlqdev, I use a runtime texture packer so unused chars will get removed
18:12:53lqdev[m]I also use a runtime texture packer, I haven't implemented removing functionality though
18:13:09treeformlqdev, you muse use a runtime texture packer if you want to draw CJK (Chinese Japanese Korean) text.
18:13:18lqdev[m]ikr
18:13:21lqdev[m]I do
18:13:45treeformbut they don't have to be subpixel aligned latest :)
18:16:14treeformI slowly fill the texture, when I get to the end I clear everything and start from scratch
18:16:38treeformI use a 4kx4k I almost never get to the end
18:17:08treeformI would probably get there on level switches when big background objects would need to switch.
18:19:35*abm joined #nim
18:26:12lqdev[m]hmm
18:26:28lqdev[m]my game doesn't switch levels 😂
18:26:44lqdev[m]but clearing is probably the proper solution
18:27:02lqdev[m]I never really implemented an overflow handler for my texture packer
18:27:56lqdev[m]previously, I went with 512×512 textures but I guess that won't be quite enough for this case
18:33:36treeformeach letter should be less then 24px (you don't need subpixel for bigger letters)
18:33:51treeformif you only do english it should fit into 512x512 texture
18:34:18treeformBut I would use a bigger texture size 2k or 4k or 8k texture.
18:34:47treeformbut each font and letter size is another copy of all letters
18:35:33*vsantana quit (Quit: leaving)
18:35:52*vsantana joined #nim
18:38:56*jken_ left #nim ("Leaving")
18:43:10Zevvbwah I just made a little toy based on brentp's example, trying to make nested calls a proc-generating-iterator, but now I broke nim :)
18:46:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:46:51*laaron joined #nim
18:47:20FromGitter<brentp> @Zevv, I got it working well enough for now.
18:48:34*absolutejam joined #nim
18:52:46treeformSo I have this issue is that my seq has address of 4983943248 for a while then while inside a loop it switches to address 40 yeah just 40... is 40 a marker for some thing like GC empty or some thing?
18:53:13treeformwhat can a pointer to 40 mean?
18:53:25treeformwhy a sudden switch
18:54:54*alexander92 joined #nim
18:55:58*alguem joined #nim
18:56:35FromGitter<alehander42> great place for a watchpoint
18:56:43*alguem quit (Remote host closed the connection)
19:00:41*Ven`` joined #nim
19:02:21Zevvtreeform: can you share code?
19:02:42*exelotl joined #nim
19:03:29Zevvand indeed, watchpoint, sanitizer or valgrind to the rescue
19:06:21treeformZevv there is a ton of code to share
19:06:37Zevvwell, can you share a *small* example doing the nasty thing :)
19:06:41treeformalehander42 I am not sure how to set a watchpoint in nim code on XCode running on ios emulator
19:06:45*solitudesf-- joined #nim
19:06:58*exelotl quit (Ping timeout: 245 seconds)
19:07:13treeformZevv you right I need to remove code till its tiny then I can see more
19:07:29treeformthis code works fine running normally
19:07:34treeformits only when it runs on iOS its the issue
19:09:37*solitudesf- quit (Ping timeout: 245 seconds)
19:11:20*absolutejam quit (Quit: WeeChat 2.5)
19:12:00dom96treeform: argh, that sounds like a painful bug
19:12:12dom96maybe it's some ARM issue?
19:13:17treeformit could be an arm issue
19:13:25treeformI shifted code around now its happening some other place
19:13:33ZevvI say there's just something poking out of bounds. You're blitting and copying textures around and stuff like that, right?
19:13:41treeformits probably some general memory corruption.
19:14:06treeformZevv yeah it could be some out of bounds writes
19:14:38ZevvHave that every now and then, and it is always my own fault
19:14:57ZevvThat is why I like Nim instead of only C. I only found 1 bug in gcc in my career, but already tons in Nim. So it's easier to blame the compiler
19:15:34dom96That's why you like Nim more? How is that?
19:15:46ZevvTrolling dom96, trolling
19:15:55dom96lol ok
19:16:20dom96I'll be looking forward to doing exactly what treeform is doing for my game D:
19:16:32Zevvwhat, writing out of bounds over your seq headers?
19:17:05dom96I'm sure I'll run into at least a few incredibly confusing and time-consuming issues
19:17:21Zevvwhat exactly *are* you doing btw, treeform?
19:20:03*exelotl joined #nim
19:20:35dom96Looks like we've got some different benchmarks for httpbeast/jester https://github.com/waghanza/http-benchmark/tree/one_by_one#results
19:22:27treeformZevv, I am trying to make nim compiling for Android and iOS easy for everyone.
19:22:36Zevv\o/
19:22:43treeformhttps://forum.nim-lang.org/t/5197
19:25:26Zevvdom96: congrats with the making the top 10! interesting list of numbers that is by the way, something is fishy in the top 3 I feel
19:25:44ZevvI wonder what magic was done in the #1
19:25:58dom96the throughput to me seems fishy
19:26:08dom96possible that every framework sends different data
19:26:47treeformgood job dom96
19:27:27treeformI bet the top #1 just skips all parsing and does no extra work outside the benchmark
19:27:30Zevvand really, python/japronto. Is that really python running, or is it a C-based python lib?
19:28:30Zevvhttps://github.com/waghanza/http-benchmark/blob/one_by_one/rust/nickel/src/main.rs
19:28:34Zevvhttps://github.com/waghanza/http-benchmark/blob/one_by_one/nim/httpbeast/server.nim
19:30:01dom96that's strange code, looks as if it doesn't respond
19:30:19dom96but I guess it works by implicit returns
19:30:57dom96japronto is definitely C https://github.com/squeaky-pl/japronto
19:31:18Zevvwas this build with -d:danger on new nim?
19:31:32dom96not sure, I've suggested it in the PR
19:31:39dom96but not certain the suggestion was taken
19:31:41Zevvoh yes it is, see dockerfile
19:31:57Zevvdefinitely did his best: https://github.com/waghanza/http-benchmark/blob/one_by_one/nim/Dockerfile
19:32:20*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
19:32:32dom96cool
19:34:04alexander92he passes both
19:34:52alexander92but that's not really his fault, it's totally not obvious how they interact for a new nim user probably
19:34:58dom96that's probably fine
19:36:09alexander92but otherwise very detailed options, good stuff
19:36:30Zevvso, let's make it faster
19:37:56alexander92one thing i dont understand is, would it be ok for different nim frameworks to join
19:38:02alexander92if they all use the same server
19:38:22alexander92i guess yes, because it measures also framework middleware and stuff
19:39:44*alexander92 left #nim ("WeeChat 2.4")
19:41:49dom96sure
19:42:10dom96also yeah, if you can make it demonstrably faster I will accept any PRs
19:42:23dom96maybe even some crazy ones :P
19:42:48treeformdo you have user agent parsing?
19:43:11dom96you mean in httpbeast or in general?
19:43:15treeformbecause I do: https://github.com/treeform/useragents
19:43:43Zevvdom96: trying to get it to reproduce first. They use a test tool I don't know
19:44:28dom96Zevv, yeah, I would bet that runs vary significantly between runs. When I was working on httpbeast getting an accurate reading whether a change makes performance worse or better was tough
19:45:02Zevvsure
19:48:27Zevvwell, like almost all nim code I profile: #1 is memset
19:48:54ZevvsplitChunk is also coming up high in Nim-land
19:49:51*Vladar quit (Remote host closed the connection)
19:52:15*clyybber joined #nim
20:00:58Zevvtreeform: just now realize that nim forum post is yours.
20:02:04Zevvdid you ever see the project from Frederico Ceratto, "Dali"?
20:02:10Zevvyou might share common interests
20:02:22Zevvhttps://forum.nim-lang.org/t/4840
20:02:27federico3?
20:03:27Zevvoh no sorry, messed up my mail thread, Mateusz Czaplinski it was
20:04:10Zevvanyhow, he concentrated on replacing the horrendous tooling needed to get code running on android by a separate nim-based toolchain
20:04:46Zevvhere is Nim code build and running without android studio: https://github.com/akavel/hellomello
20:05:40Zevvand also the idea came up to target Dex bytecode in the nim compiler, so you compile your nim to run directly on zygoty/dalvik/art
20:09:10FromGitter<brentp> anyone got or seen a nim decision tree implementation?
20:15:51disruptekno, but i finally published this: https://github.com/disruptek/atoz
20:20:31FromGitter<brentp> well, that *is* pretty cool.
20:21:48*nsf quit (Quit: WeeChat 2.5)
20:22:05disruptekvery much incomplete, but it got to the point where i felt it would be useful and i don't want to rewrite anything i have that uses it.
20:26:57treeformSo this is said, my code works great when compiling normally. My code segfaults with very odd problems on iOS. If I compile with --gc:none it runs fine on iOS. So some thing is GC related is fishy.
20:29:51*Perkol joined #nim
20:30:07disruptekminimal repro?
20:32:47Zevvhttps://github.com/nim-lang/Nim/wiki/Hunting-crashes:-The-ultimate-guide treeform
20:33:26*pbb joined #nim
20:34:17*vsantana quit (Quit: leaving)
20:48:52*tiorock joined #nim
20:48:52*tiorock quit (Changing host)
20:48:52*tiorock joined #nim
20:48:52*rockcavera is now known as Guest90592
20:48:52*Guest90592 quit (Killed (weber.freenode.net (Nickname regained by services)))
20:48:52*tiorock is now known as rockcavera
20:49:37treeform^ thanks thats a good link
20:50:06treeformI just want to get some thing on screen how to feel good
20:50:16treeformI will debug memory issues later
20:51:07treeformI'll just leak memory like a faucet with --gc:none
20:59:27PerkolHow do I curl -Ff=@- someurle in nim?
21:03:29*Trustable quit (Remote host closed the connection)
21:21:24*nif quit (Quit: ...)
21:21:35*nif joined #nim
21:28:24*solitudesf-- quit (Ping timeout: 265 seconds)
21:37:00treeformI don't know what "curl -Ff=@-" does.
21:37:45*Perkol quit (Quit: Leaving)
21:41:05*ng0 joined #nim
22:04:45*clyybber quit (Quit: WeeChat 2.6)
22:05:35*gangstacat quit (Ping timeout: 246 seconds)
22:15:35*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:16:09*Ven`` joined #nim
22:16:24*Ven`` quit (Client Quit)
22:19:42*gangstacat joined #nim
23:04:55*ng0 quit (Quit: Alexa, when is the end of world?)
23:15:17*koranza joined #nim
23:19:09*koranza quit (Remote host closed the connection)
23:19:45*koranza joined #nim
23:20:15*koranza quit (Remote host closed the connection)
23:25:08*krux02 quit (Remote host closed the connection)
23:38:31*nif quit (Quit: ...)
23:38:40*nif joined #nim