00:21:51 | * | sagax quit (Remote host closed the connection) |
00:33:15 | * | sagax joined #nim |
01:09:37 | FromGitter | <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:48 | disruptek | https://nim-lang.org/docs/unittest.html#expect.m%2Cvarargs%5Btyped%5D%2Cuntyped |
01:22:04 | disruptek | iffy ^ |
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:39 | FromGitter | <iffy> disruptek, so maybe `expect DisconnectedError: raise myfuture.readError()`? |
02:37:36 | disruptek | sounds 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:12 | FromGitter | <gogolxdong> How to prevent background console when running windows executable? |
06:15:43 | nc-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:58 | nc-x[m] | for msvc compiler it is /subsystem:windows iirc |
06:17:46 | * | absolutejam joined #nim |
06:18:23 | leorize | gogolxdong: --app:gui |
06:19:01 | leorize | note that stdin/out won't work then |
06:19:21 | FromGitter | <gogolxdong> Where is the document? |
06:20:41 | leorize | nim --fullhelp |
06:20:46 | * | mal`` joined #nim |
06:20:56 | leorize | for actual docs on how --app:gui behaves, you'd need to refer to win32 documentation |
06:21:33 | * | fjellfras quit (Quit: Leaving) |
06:22:06 | leorize | some (undocumented) behaviors in Nim when you use --app:gui (windows-only, this switch does nothing on *nix afaik): |
06:22:29 | leorize | unhandled exceptions will spawn a dialog with the details |
06:23:05 | leorize | errors like unable to find a {.dynlib.} will also be presented in a dialog |
06:23:25 | leorize | that's all |
06:24:04 | leorize | restrictions 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:27 | FromGitter | <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:20 | leorize | iirc stdout is blocked by windows if your app is built as a gui app |
06:32:26 | leorize | I might be wrong about stdin though |
06:33:06 | FromGitter | <zacharycarter> windows is weird with stdout |
06:33:18 | FromGitter | <zacharycarter> I often times have to use debug viewer to see stdout |
06:33:45 | FromGitter | <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:42 | alexander92 | hm, is "wait for recvLine, if the received data is empty, sleep a bit and wait again" |
07:23:00 | alexander92 | a good pattern for low-cpu socket "server" |
07:30:45 | leorize | to 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:51 | Zevv | I'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:26 | Zevv | (yes, wrong channel, of course, but still!) |
08:20:27 | Araq | ah so nimsuggest does work, nice |
08:21:01 | * | couven92 quit (Read error: Connection reset by peer) |
08:21:18 | Zevv | together 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:06 | Zevv | And 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:45 | leorize | Zevv: clangd is your friend |
08:32:33 | Zevv | sweet, that should easy my pain and relieve my horrendous suffering a bit \o/ |
08:32:40 | Zevv | How do I plug that on the [n]vim side? |
08:33:37 | Zevv | vim-lsp? |
08:34:59 | leorize | yea, there's also an lsp plugin for asyncomplete |
08:36:41 | Zevv | ok, something works, seem to be getting there |
08:39:09 | Zevv | well, 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:59 | Zevv | todays applause goes to leorize! again. |
08:57:32 | leorize | I guess that just shows how good nim.nvim is \o/ |
08:58:09 | leorize | although apparently most can't write the plugin name :P |
08:58:38 | Zevv | well, you could drop the 'n' |
08:58:40 | Zevv | that would make it easier |
08:58:46 | Zevv | but then you'd have to make it work with vim8 of course |
08:59:23 | narimiran | im.nvim?? |
08:59:48 | Zevv | sure, why not |
09:01:10 | leorize | I'm too lazy to make stuff work with vim8 :p |
09:03:57 | Zevv | well, *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:43 | federico3 | how can check if a TCP connection is closed in asyncnet? |
10:06:58 | federico3 | await read() just blocks |
10:10:20 | Zevv | isClosed? |
10:12:01 | * | clyybber quit (Quit: WeeChat 2.6) |
10:12:13 | * | clyybber joined #nim |
10:15:53 | federico3 | thanks |
10:16:05 | Araq | clyybber, https://github.com/nim-lang/Nim/pull/12168 maybe you want to work on it |
10:17:09 | clyybber | Ah, you reverted the refactoring |
10:17:40 | clyybber | Sure, in hindsight maybe a refactor that doesn't do pExpr/pStmt would be better |
10:17:43 | clyybber | I could try |
10:21:09 | * | alexander92 joined #nim |
10:21:18 | Araq | clyybber, nothing works with my PR, but it's how I would do it and we need it to fix more bugs ;-) |
10:21:18 | alexander92 | @leorize HAHAH |
10:21:24 | alexander92 | yes, i can use it |
10:21:27 | alexander92 | but ill ponder a bit more |
10:21:37 | alexander92 | Araq, is the araq gc ready |
10:21:43 | alexander92 | i 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:46 | clyybber | alexander92: the araq gc? |
10:39:28 | lqdev[m] | clyybber: Araq recently mentioned that devel supports custom GCs, and that he would create an 'araqsgc' repo with his own GC |
10:40:54 | clyybber | Ah cool |
10:41:27 | clyybber | Araq: Can you unsquash the commits on your PR? Would make it quite a bit easier to read |
10:42:46 | Araq | clyybber, iirc I did it in one go... nothing to unsquash here |
10:53:14 | * | enthus1ast quit (Remote host closed the connection) |
10:58:35 | PMunch | disruptek, did you play any more with the async stuff after I left yesterday? |
10:58:45 | PMunch | I 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:12 | alexander92 | i wondered why my electron app is so slow to start |
11:09:22 | alexander92 | found out i wrote await wait(2500) |
11:09:27 | alexander92 | somewhere in the init code |
11:10:19 | alexander92 | the 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:37 | PMunch | Ooof, the "wait because of a bug" thing.. |
11:14:40 | PMunch | Not good |
11:15:08 | PMunch | And your electron app is probably slow to start because it's an electron app.. |
11:19:58 | alexander92 | well, that's the joke ;) |
11:20:06 | alexander92 | everybody thinks it is because "electron" |
11:20:15 | alexander92 | but usually the reason is just logical errors/sloppy code |
11:20:56 | alexander92 | or manual "sleep 2.5 seconds" :) |
11:33:51 | * | leorize joined #nim |
11:34:03 | * | krux02_ quit (Ping timeout: 245 seconds) |
11:35:09 | Araq | alexander92, 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:36 | alexander92 | does it already function |
11:42:38 | FromGitter | <zacharycarter> what's this new GC? |
11:42:56 | FromGitter | <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:37 | Araq | alexander92, so far it does what I wanted to do |
11:44:44 | Araq | should push it I guess |
11:45:27 | * | Hideki_ joined #nim |
11:46:13 | Araq | it's pretty slow though, 3x worse than Boehm |
11:46:36 | Zevv | araq, I remember you were trying to get utf output to work on the windows console some time ago, did you manage this? |
11:46:47 | Araq | yeah, it's in devel |
11:47:42 | Zevv | great, 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:26 | PMunch | Hmm, should I just submit a bug for the async stuff I found yesterday? |
11:58:45 | Zevv | please do; it sounds like I've heard this one before |
12:00:36 | Zevv | iirc 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:48 | federico3 | https://github.com/status-im/nim-chronos/wiki/AsyncDispatch-comparison |
12:09:18 | disruptek | PMunch: should be an easy fix since it was already implemented for the i/o loop. |
12:09:20 | * | absolutejam joined #nim |
12:11:10 | disruptek | chronos has a smaller-than-500ms delay, but this behavior is an actual bug, not a design feature of either impl. |
12:24:47 | PMunch | Did you try this with chronos? |
12:34:28 | * | livcd quit (Ping timeout: 245 seconds) |
12:39:25 | PMunch | Okay, just tested this with chronos and it's not an issue there |
12:39:57 | PMunch | So it might be possible to simply port a fix from that |
12:40:26 | alexander92 | can it be just because of different timing |
12:41:20 | PMunch | http://ix.io/1mc6 |
12:41:33 | PMunch | alexander92, what do you mean? |
12:45:33 | * | narimiran quit (Remote host closed the connection) |
12:46:19 | shashlick | What's this new gc, how's it different than the default gc |
12:46:20 | * | narimiran_ joined #nim |
12:48:51 | disruptek | PMunch: this is the fix for the problem we already ran into: https://github.com/nim-lang/Nim/pull/11263 |
12:54:18 | Zevv | what is the default git client I should install on windows in order for nimble to work? |
12:54:31 | * | disruptek 🤣 |
12:54:38 | Zevv | there's git-scm, atlassian, git-for-windows, etc? |
12:54:50 | disruptek | stop, you're killing me |
12:55:00 | Zevv | bwaaah |
12:55:36 | disruptek | only Araq would offer an answer i'd accept, as it would involve the minimal amount of fuckery. |
12:55:44 | Zevv | nim setup installs a c compiler and nimble for me, but no git |
12:56:10 | Zevv | 45 MB?! |
12:56:13 | Zevv | compressed?! |
12:56:46 | Zevv | requires 250MB to install?! |
12:56:55 | disruptek | maybe it's smaller on the inside? |
12:57:06 | * | nif quit (Quit: ...) |
12:57:18 | * | nif joined #nim |
12:57:30 | Zevv | like Doctor Who's phone boot to the power -1 |
12:57:44 | Zevv | why am I even doing this |
12:59:08 | disruptek | glutton for punishment? |
13:02:14 | PMunch | Is git on Windows a 250MB install? |
13:02:25 | Zevv | it is |
13:03:02 | PMunch | Installed size of the git package on my Arch install is 36.25Mib |
13:03:25 | PMunch | Of course it depends on some stuff that is probably bundled in Windows.. |
13:03:55 | Zevv | nevermind, I just stopped what I was trying to do |
13:04:05 | PMunch | Which was? |
13:04:17 | disruptek | Zevv: down, not across |
13:04:39 | Zevv | trying to get nim to run on a windows vm to see if I can get utf8 output at compile time working |
13:04:40 | Araq | hmm? I'm not following |
13:04:44 | Araq | what's up with me? |
13:04:50 | Zevv | no idea? |
13:04:58 | disruptek | Araq: what's up with you? |
13:05:05 | Araq | exactly |
13:05:26 | Araq | "only Araq would offer an answer i'd accept" |
13:05:33 | * | krux02 joined #nim |
13:05:36 | PMunch | They were wondering what kind of Git you use on Windows |
13:05:42 | PMunch | To get nimble working |
13:05:45 | disruptek | well, i think you still use windows, right? |
13:06:00 | Araq | somebody has to, yes |
13:06:21 | Araq | but I don't remember what git I use, "git for windows"? |
13:06:47 | Araq | I never update my git, it barely works on Windows, that's good enough |
13:07:18 | Zevv | bah, `staticExec("chcp 65001")` doesn't work for me :( |
13:07:36 | Araq | Zevv: we have a start.bat file for you |
13:08:03 | Calinou | Git for Windows bundles many things like a Git Bash installation |
13:08:04 | Zevv | yeah, I noticed. No way around that I guess. |
13:08:08 | Calinou | it's larger than a minimal install could be |
13:08:41 | Calinou | MinGit seems to be available though: https://github.com/git-for-windows/git/releases/tag/v2.23.0.windows.1 |
13:08:58 | Calinou | the one with BusyBox is even smaller, only 18 MB |
13:09:10 | Araq | of course it comes with Bash, how else can you get shellshock on Windows |
13:11:20 | Araq | it 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:16 | disruptek | i'm starting to regret deferring to araq. |
13:12:37 | disruptek | btw, you don't need bash to get shellshocked. |
13:14:18 | alexander92 | btw |
13:14:22 | Araq | oh I forget, can't use a remote desktop because the server has no monitor. (Hmmm, it doesn't have a keyboard either...) |
13:14:23 | alexander92 | does the window subsystem work well |
13:14:28 | alexander92 | windows linux sub* |
13:14:58 | Araq | if I want Linux, I know where to find it. I prefer to have working printers though. |
13:15:10 | Zevv | hm this start.bat is not shipped with nim, is it? |
13:15:10 | disruptek | oh snap |
13:15:27 | Araq | Zevv: it is but it depends on how you installed Nim |
13:15:39 | Zevv | I went to nim-lang and clicked 'download for windows' |
13:15:50 | disruptek | silly rabbit |
13:16:20 | Araq | I'm not silly, I merely repeat the silly bullshit I had to listen to for a decade |
13:17:24 | disruptek | i wouldn't have thought zevv's install was silly, either, yet somehow... |
13:18:20 | alexander92 | have you guys used mprotect until now? |
13:18:26 | Araq | Zevv: there is tools/start.bat |
13:18:26 | alexander92 | i am going to try to debug some stuff with it |
13:18:54 | alexander92 | wondering if it's gonna be useful for tracking nim sequences |
13:18:57 | alexander92 | somehow |
13:19:18 | Zevv | ah 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:40 | Araq | regular joe can select "create start menu entry" |
13:19:44 | Zevv | I'll just do `----<-----' instead of ╰────«─────╯ |
13:20:29 | disruptek | those aren't even unicode, afaik |
13:20:32 | Araq | oh it's for end users, end users on Windows expect a UI though, not some "crazy DOS" shit |
13:21:17 | Zevv | ok then. I have Runes with crazy unicode shit at compile time, which I'd like to show the user at compile time. |
13:22:05 | Araq | lol |
13:22:35 | Zevv | Or am I aiming too high? |
13:22:51 | alexander92 | wasn't there an installer |
13:22:54 | alexander92 | niminst? |
13:22:59 | * | PMunch quit (Remote host closed the connection) |
13:23:11 | disruptek | i would say targeting windows is aiming low, but i think i'm in the minority. |
13:23:45 | Zevv | well, 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:06 | Araq | update vscode, it got significantly better |
13:24:10 | disruptek | but your example **is** 1980s ascii. |
13:24:25 | Araq | but tell me why you output ascii art at compile time? |
13:24:31 | Araq | what's the point? |
13:24:41 | disruptek | do it in color. people love color. |
13:24:44 | Zevv | Araq: https://zevv.nl/div/java.html stuff like that |
13:24:56 | Zevv | I do it in color, even. Because people love color. |
13:25:22 | Araq | parser generator? |
13:25:30 | Zevv | right |
13:25:47 | Araq | hmm |
13:26:07 | Araq | ok, I have to admit that's pretty cool |
13:26:11 | disruptek | it's just a tool to generate ascii art at compile time. |
13:26:12 | Zevv | Personally, I think it's pretty nifty. And it's even really helpful, because I tend to look at those myself |
13:26:37 | Zevv | it 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:42 | disruptek | you type up a long peg and it turns it into colorful line drawings for ya. |
13:26:51 | Zevv | is that cool or what |
13:27:04 | disruptek | pretty cute. |
13:27:15 | Araq | I don't but never mind. I find them more confusing than looking at grammar rules |
13:27:41 | alexander92 | is this rail diagram |
13:27:42 | Zevv | Feel free to find that, of course |
13:27:52 | alexander92 | somebody here told me about those |
13:27:56 | alexander92 | railway graphs? |
13:28:08 | Zevv | syntax diagram aka railroad diagram yes |
13:28:15 | alexander92 | oh yes |
13:28:33 | Zevv | implementation was pretty straighforward and trivial, until someone wanted to see those on windows :( |
13:28:40 | disruptek | Zevv: is this example a complete java parser? |
13:28:45 | Zevv | disruptek: it is |
13:28:51 | disruptek | it looks pretty complete. :-/ |
13:28:58 | alexander92 | good work |
13:29:49 | disruptek | zevv, you're one scary dude, y'know that? |
13:29:55 | Zevv | NAh, 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:59 | Zevv | But 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:44 | Araq | lol |
13:31:49 | disruptek | honestly, 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:57 | Araq | you can try... |
13:33:40 | clyybber | Why does it not work on windows again? |
13:34:10 | Zevv | the console does not eat UTF-8 by default, and vscode seems to choke on that as well |
13:34:35 | Zevv | https://cdn.discordapp.com/attachments/239878713016188939/623608647800586261/unknown.png |
13:34:47 | disruptek | looks fine to me. |
13:35:13 | disruptek | that's a linenoise parser, right? |
13:35:49 | disruptek | i recognize a few notes of 300 baud. amazing what lodges in your memory as a youngster. |
13:35:55 | Zevv | you should *hear* this shit |
13:36:03 | disruptek | 🤣 |
13:36:37 | Zevv | my brother would alway start whistling to make the dogs bark, causing my modem to hang up. |
13:36:42 | Zevv | 300/1200, air-gap modem |
13:37:09 | disruptek | yeah, you could read faster than those things. incredible. |
13:38:00 | Zevv | *type* faster |
13:38:34 | disruptek | 300 maybe, sure. |
13:41:44 | Zevv | Hm ok, codepage 437 it is |
13:42:42 | Zevv | and araq doesn't like the drawings, so I might as well throw them out |
13:47:06 | clyybber | Doesn't nim automagically switch the codepages on startup? |
13:47:12 | Zevv | start.bat does :( |
13:47:19 | disruptek | just add a check for his username and output binary strings; he finds those easier to read. |
13:47:31 | Zevv | disruptek: genius! :) |
13:48:15 | clyybber | Zevv: Whats start.bat? |
13:48:46 | clyybber | I mean at runtime the exe does it right? |
13:48:57 | clyybber | So at compile time the compiler could do it I suppose |
13:49:29 | Zevv | https://github.com/nim-lang/Nim/blob/devel/tools/start.bat |
13:50:09 | Araq | Zevv: firstly, the Nim stdlib also now sets it to utf-8, not sure why it doesn't work |
13:50:19 | Araq | secondly, it might be due to your installed fonts |
13:50:52 | disruptek | the ol' wingdings defense, huh? |
13:51:52 | * | ng0 quit (Remote host closed the connection) |
13:53:14 | clyybber | Zevv: Yeah I thought https://github.com/nim-lang/Nim/commit/7cb31455ee949ee006e2f314daa74866cf37a74e would fix it |
13:54:18 | Zevv | hm yes, that's post 20.2 release probably, which explains why my default noob-install doesn't work yet |
13:54:28 | Zevv | but 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:04 | federico3 | Zevv: 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:02 | Zevv | not 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:21 | disruptek | if you're on windows, you can just send it to a printer. |
15:59:17 | disruptek | maybe 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:58 | shashlick | Good to know about mingit |
16:09:32 | disruptek | Zevv: 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:48 | Zevv | oh dang, did I tag the wrong side of the cleanup :/ |
16:38:53 | Zevv | lemmefixthat |
16:39:33 | * | laaron joined #nim |
16:39:53 | alexander92 | hey zevv |
16:40:00 | alexander92 | you're hood with low level |
16:40:30 | alexander92 | am i misunderstanding mprotect completely? shouldn't it make the pages i protect with it segfault on write |
16:41:40 | alexander92 | ohhh got it .. i should tell it what is permitted, not what is forbidden! |
16:42:14 | Zevv | right :) |
16:42:46 | Zevv | if you want to do really fun things, you should catch sigsegv and do virtual memory in user space |
16:44:59 | Zevv | also 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:41 | alexander92 | oh ! |
16:54:10 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
16:54:19 | alexander92 | that's too much |
16:54:21 | alexander92 | for me |
16:54:39 | alexander92 | i mostly want to just log writes for a sequence |
16:55:00 | alexander92 | but this means, that my debugger should be able to log and then ignore those segfaults |
16:55:04 | alexander92 | which seems possible in gdb |
16:55:32 | Zevv | disruptek: 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:55 | lqdev[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:52 | lqdev[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:28 | FromGitter | <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:18 | Zevv | Indeed. If you want to capture something, you make a closure just so |
18:00:26 | * | alexander92 quit (Ping timeout: 240 seconds) |
18:02:07 | Zevv | http://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:12 | FromGitter | <brentp> cheers. |
18:09:15 | * | nsf joined #nim |
18:09:48 | FromGitter | <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:47 | treeform | don't they all work off the cmp function? |
18:11:57 | treeform | lqdev, yeah you would be able to fit less characters. You could try with less versions up to you. |
18:12:22 | FromGitter | <brentp> here's a correct version in current form: http://ix.io/1IAP |
18:12:25 | treeform | lqdev, I use a runtime texture packer so unused chars will get removed |
18:12:53 | lqdev[m] | I also use a runtime texture packer, I haven't implemented removing functionality though |
18:13:09 | treeform | lqdev, you muse use a runtime texture packer if you want to draw CJK (Chinese Japanese Korean) text. |
18:13:18 | lqdev[m] | ikr |
18:13:21 | lqdev[m] | I do |
18:13:45 | treeform | but they don't have to be subpixel aligned latest :) |
18:16:14 | treeform | I slowly fill the texture, when I get to the end I clear everything and start from scratch |
18:16:38 | treeform | I use a 4kx4k I almost never get to the end |
18:17:08 | treeform | I would probably get there on level switches when big background objects would need to switch. |
18:19:35 | * | abm joined #nim |
18:26:12 | lqdev[m] | hmm |
18:26:28 | lqdev[m] | my game doesn't switch levels 😂 |
18:26:44 | lqdev[m] | but clearing is probably the proper solution |
18:27:02 | lqdev[m] | I never really implemented an overflow handler for my texture packer |
18:27:56 | lqdev[m] | previously, I went with 512×512 textures but I guess that won't be quite enough for this case |
18:33:36 | treeform | each letter should be less then 24px (you don't need subpixel for bigger letters) |
18:33:51 | treeform | if you only do english it should fit into 512x512 texture |
18:34:18 | treeform | But I would use a bigger texture size 2k or 4k or 8k texture. |
18:34:47 | treeform | but 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:10 | Zevv | bwah 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:20 | FromGitter | <brentp> @Zevv, I got it working well enough for now. |
18:48:34 | * | absolutejam joined #nim |
18:52:46 | treeform | So 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:13 | treeform | what can a pointer to 40 mean? |
18:53:25 | treeform | why a sudden switch |
18:54:54 | * | alexander92 joined #nim |
18:55:58 | * | alguem joined #nim |
18:56:35 | FromGitter | <alehander42> great place for a watchpoint |
18:56:43 | * | alguem quit (Remote host closed the connection) |
19:00:41 | * | Ven`` joined #nim |
19:02:21 | Zevv | treeform: can you share code? |
19:02:42 | * | exelotl joined #nim |
19:03:29 | Zevv | and indeed, watchpoint, sanitizer or valgrind to the rescue |
19:06:21 | treeform | Zevv there is a ton of code to share |
19:06:37 | Zevv | well, can you share a *small* example doing the nasty thing :) |
19:06:41 | treeform | alehander42 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:13 | treeform | Zevv you right I need to remove code till its tiny then I can see more |
19:07:29 | treeform | this code works fine running normally |
19:07:34 | treeform | its 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:00 | dom96 | treeform: argh, that sounds like a painful bug |
19:12:12 | dom96 | maybe it's some ARM issue? |
19:13:17 | treeform | it could be an arm issue |
19:13:25 | treeform | I shifted code around now its happening some other place |
19:13:33 | Zevv | I say there's just something poking out of bounds. You're blitting and copying textures around and stuff like that, right? |
19:13:41 | treeform | its probably some general memory corruption. |
19:14:06 | treeform | Zevv yeah it could be some out of bounds writes |
19:14:38 | Zevv | Have that every now and then, and it is always my own fault |
19:14:57 | Zevv | That 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:34 | dom96 | That's why you like Nim more? How is that? |
19:15:46 | Zevv | Trolling dom96, trolling |
19:15:55 | dom96 | lol ok |
19:16:20 | dom96 | I'll be looking forward to doing exactly what treeform is doing for my game D: |
19:16:32 | Zevv | what, writing out of bounds over your seq headers? |
19:17:05 | dom96 | I'm sure I'll run into at least a few incredibly confusing and time-consuming issues |
19:17:21 | Zevv | what exactly *are* you doing btw, treeform? |
19:20:03 | * | exelotl joined #nim |
19:20:35 | dom96 | Looks like we've got some different benchmarks for httpbeast/jester https://github.com/waghanza/http-benchmark/tree/one_by_one#results |
19:22:27 | treeform | Zevv, I am trying to make nim compiling for Android and iOS easy for everyone. |
19:22:36 | Zevv | \o/ |
19:22:43 | treeform | https://forum.nim-lang.org/t/5197 |
19:25:26 | Zevv | dom96: 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:44 | Zevv | I wonder what magic was done in the #1 |
19:25:58 | dom96 | the throughput to me seems fishy |
19:26:08 | dom96 | possible that every framework sends different data |
19:26:47 | treeform | good job dom96 |
19:27:27 | treeform | I bet the top #1 just skips all parsing and does no extra work outside the benchmark |
19:27:30 | Zevv | and really, python/japronto. Is that really python running, or is it a C-based python lib? |
19:28:30 | Zevv | https://github.com/waghanza/http-benchmark/blob/one_by_one/rust/nickel/src/main.rs |
19:28:34 | Zevv | https://github.com/waghanza/http-benchmark/blob/one_by_one/nim/httpbeast/server.nim |
19:30:01 | dom96 | that's strange code, looks as if it doesn't respond |
19:30:19 | dom96 | but I guess it works by implicit returns |
19:30:57 | dom96 | japronto is definitely C https://github.com/squeaky-pl/japronto |
19:31:18 | Zevv | was this build with -d:danger on new nim? |
19:31:32 | dom96 | not sure, I've suggested it in the PR |
19:31:39 | dom96 | but not certain the suggestion was taken |
19:31:41 | Zevv | oh yes it is, see dockerfile |
19:31:57 | Zevv | definitely 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:32 | dom96 | cool |
19:34:04 | alexander92 | he passes both |
19:34:52 | alexander92 | but that's not really his fault, it's totally not obvious how they interact for a new nim user probably |
19:34:58 | dom96 | that's probably fine |
19:36:09 | alexander92 | but otherwise very detailed options, good stuff |
19:36:30 | Zevv | so, let's make it faster |
19:37:56 | alexander92 | one thing i dont understand is, would it be ok for different nim frameworks to join |
19:38:02 | alexander92 | if they all use the same server |
19:38:22 | alexander92 | i guess yes, because it measures also framework middleware and stuff |
19:39:44 | * | alexander92 left #nim ("WeeChat 2.4") |
19:41:49 | dom96 | sure |
19:42:10 | dom96 | also yeah, if you can make it demonstrably faster I will accept any PRs |
19:42:23 | dom96 | maybe even some crazy ones :P |
19:42:48 | treeform | do you have user agent parsing? |
19:43:11 | dom96 | you mean in httpbeast or in general? |
19:43:15 | treeform | because I do: https://github.com/treeform/useragents |
19:43:43 | Zevv | dom96: trying to get it to reproduce first. They use a test tool I don't know |
19:44:28 | dom96 | Zevv, 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:02 | Zevv | sure |
19:48:27 | Zevv | well, like almost all nim code I profile: #1 is memset |
19:48:54 | Zevv | splitChunk 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:58 | Zevv | treeform: just now realize that nim forum post is yours. |
20:02:04 | Zevv | did you ever see the project from Frederico Ceratto, "Dali"? |
20:02:10 | Zevv | you might share common interests |
20:02:22 | Zevv | https://forum.nim-lang.org/t/4840 |
20:02:27 | federico3 | ? |
20:03:27 | Zevv | oh no sorry, messed up my mail thread, Mateusz Czaplinski it was |
20:04:10 | Zevv | anyhow, he concentrated on replacing the horrendous tooling needed to get code running on android by a separate nim-based toolchain |
20:04:46 | Zevv | here is Nim code build and running without android studio: https://github.com/akavel/hellomello |
20:05:40 | Zevv | and 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:10 | FromGitter | <brentp> anyone got or seen a nim decision tree implementation? |
20:15:51 | disruptek | no, but i finally published this: https://github.com/disruptek/atoz |
20:20:31 | FromGitter | <brentp> well, that *is* pretty cool. |
20:21:48 | * | nsf quit (Quit: WeeChat 2.5) |
20:22:05 | disruptek | very 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:57 | treeform | So 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:07 | disruptek | minimal repro? |
20:32:47 | Zevv | https://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:37 | treeform | ^ thanks thats a good link |
20:50:06 | treeform | I just want to get some thing on screen how to feel good |
20:50:16 | treeform | I will debug memory issues later |
20:51:07 | treeform | I'll just leak memory like a faucet with --gc:none |
20:59:27 | Perkol | How 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:00 | treeform | I 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 |