<< 12-02-2017 >>

00:00:45Araqrauss: that #define should have become a #def
00:00:50*libman quit (Quit: Connection closed for inactivity)
00:01:17dom96hrm, I wonder why c2nim translated `typedef JsRef JsValueRef;` to `type JsValueRef* = JsRef`
00:01:38dom96Araq: Shouldn't it be `type JsRef* = JsValueRef`
00:01:40dom96?
00:01:43Araqbecause that's exactyl what the C typedef means.
00:01:50raussdom96: It did that with a lot of my stuff
00:02:00*ofd quit (Client Quit)
00:02:20Araqc2nim has quirks but "it could the declaration order in typedef wrong" is not among these
00:02:30Araq*it could get
00:02:49dom96but what it generated doesn't make sense
00:03:00raussAraq: You're right, I didn't convert that to #def, missed it
00:03:00dom96does changing the #define to #def fix this problem?
00:04:02raussdom96: Yes it seemed to -_-. Sorry for the noise
00:04:35dom96No problem.
00:04:39Araqone day, I will implement a heuristic so that c2nim detects #def on its own.
00:04:49dom96I am puzzled why #def fixes this though
00:05:02Araqand that will be the cause for many more problems :P
00:05:28Araqdom96: the missing #def caused the other typedef to be miscompiled
00:05:39Araqbut not because the order in the typedef is not what you think it is.
00:05:54Araqbut because C function pointer declarations are beyond repair.
00:06:42dom96I still don't quite understand, but oh well. It's late.
00:06:44*bjz joined #nim
00:07:28*bjz quit (Client Quit)
00:07:48dom96'night
00:07:53Araqsame here, bye
00:08:14*bjz joined #nim
00:08:45raussbye
00:11:56*carterza joined #nim
00:28:32carterzaanyone have any experience with materials and nimassimp?
00:41:40*carterza quit (Quit: carterza)
00:42:51*ofd joined #nim
00:46:31*ofd quit (Client Quit)
00:50:38*ofd joined #nim
00:51:10*yglukhov joined #nim
00:55:35*yglukhov quit (Ping timeout: 255 seconds)
00:59:33*ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:06:08*carterza joined #nim
01:10:22*ofd joined #nim
01:11:12Araqcarterza: sounds familiar
01:20:03*FiveBroDeepBook joined #nim
01:20:29*FiveBroDeepBook left #nim (#nim)
01:32:33*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:33:32FromGitter<rosshadden> @Araq: Given this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=589fbb6a00c00c3d4f28618e]
01:33:36FromGitter<rosshadden> OOPS
01:34:16FromGitter<rosshadden> Disregard, hit enter too soon ^^
01:35:11FromGitter<rosshadden> @Araq Given this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=589fbbcdf045df0a22371655]
01:36:51raussAraq: And I have like ~20 other occurrences just like this
01:41:17Araqmaybe you should read c2nim's documentation again
01:41:26Araquse #dynlib or #header
01:53:11*yglukhov joined #nim
01:57:14*yglukhov quit (Ping timeout: 240 seconds)
01:58:00raussOkay, thank you. I will read it again
01:58:12raussRTFM
02:07:02*Xe quit (Ping timeout: 258 seconds)
02:23:04*ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:25:06*Xe joined #nim
02:27:20*bjz joined #nim
02:33:52*ofd joined #nim
02:41:45*ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:43:56*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:44:12*vlad1777d quit (Remote host closed the connection)
02:44:21*ofd joined #nim
02:44:47*chemist69 quit (Ping timeout: 256 seconds)
02:54:59*arnetheduck quit (Ping timeout: 264 seconds)
02:57:03*chemist69 joined #nim
02:59:04*bjz joined #nim
03:18:59*libman joined #nim
03:21:00carterzaI’m wondering if there’s a bug in nimassimp or if I’m just using it improperly… The function aiGetMaterialTexture seems to always return failure
03:21:58carterzaah nevermind I think I’m using it improperly
03:45:28*arnetheduck joined #nim
03:55:26*yglukhov joined #nim
04:00:06*yglukhov quit (Ping timeout: 276 seconds)
04:28:25*gangstacat quit (Quit: Ĝis)
04:30:19*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:43:19*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:57:46*yglukhov joined #nim
05:01:54*yglukhov quit (Ping timeout: 240 seconds)
05:06:19*bjz joined #nim
05:13:44carterzagot model / texture loading working - http://imgur.com/qlOwKLG
05:18:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:35:18raussAwesome!
05:39:54carterzathanks
05:40:50*libman quit (Quit: Connection closed for inactivity)
05:43:09*Jesin quit (Ping timeout: 240 seconds)
06:14:58*Jesin joined #nim
06:18:56*Jesin quit (Max SendQ exceeded)
06:19:46*Jesin joined #nim
06:23:28*Jesin quit (Max SendQ exceeded)
06:27:32*kunev quit (Ping timeout: 255 seconds)
06:28:44*kunev joined #nim
06:35:25carterzahttp://imgur.com/a/aWXcz
06:46:35*yglukhov joined #nim
06:51:12*yglukhov quit (Ping timeout: 252 seconds)
07:05:27*yglukhov joined #nim
07:06:10carterzahttp://imgur.com/a/nznre
07:07:28*rauss quit (Quit: WeeChat 1.7)
07:08:54*yglukhov quit (Remote host closed the connection)
07:13:56FromGitter<Varriount> Go carterza! :D
07:14:04carterza:)
07:43:24*nsf joined #nim
07:43:43Araqvarriount: I really want this download feature, you know... ;-)
07:56:37*bjz joined #nim
08:14:08*Arrrr joined #nim
08:14:23*vsagar joined #nim
08:19:51*hellcoderz joined #nim
08:20:29*hellcoderz quit (Remote host closed the connection)
08:20:30*vsagar quit (Remote host closed the connection)
08:32:21*djellemah quit (Ping timeout: 260 seconds)
08:35:14FromGitter<Varriount> Araq: And I would like a 28 hour day.
08:35:37FromGitter<Varriount> Still, I'll try to find the time
08:41:52*Vladar joined #nim
08:47:36*djellemah joined #nim
08:49:43*Kingsquee joined #nim
09:01:57*gokr joined #nim
09:14:52*nsf quit (Quit: WeeChat 1.7)
09:26:24*vlad1777d joined #nim
10:15:22*nsf joined #nim
10:27:14*shashlick quit (Ping timeout: 240 seconds)
10:29:05*shashlick joined #nim
11:02:56*gokr quit (Ping timeout: 258 seconds)
11:03:01*bjz_ joined #nim
11:04:14*bjz quit (Ping timeout: 240 seconds)
11:05:09*rokups joined #nim
11:10:53cheatfateVarriount: there is now way to make 28 hours per day, but there is a way how to get more work hours per day :)
11:10:59cheatfateno way*
11:11:08*carterza quit (Quit: carterza)
11:17:56*rusua joined #nim
11:26:06*Matthias247 joined #nim
11:49:15*yglukhov joined #nim
11:49:26*yglukhov quit (Remote host closed the connection)
11:49:40*yglukhov joined #nim
11:55:32*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:02:04*Snircle joined #nim
12:26:42*yglukhov quit (Remote host closed the connection)
12:30:22*confundus joined #nim
12:30:44*couven92 joined #nim
12:37:25*elrood joined #nim
12:43:54*yglukhov joined #nim
12:46:46flyxdom96, Araq: I am getting spam from the mail server at nim-lang.org
12:47:12dom96spam? what spam?
12:47:36flyxhttps://gist.github.com/flyx/198a1298852751a58848f8f49f96ea23
12:48:22flyxI believe this is a problem with a forum-mailinglist-link?
12:49:19dom96I guess so
12:49:59flyxI got multiple mails like this, first one at 2.2.
12:54:10dom96is it coming from nim-lang.org or freelists.org?
13:00:48*confundus quit (Quit: confundus)
13:03:28*Arrrr quit (Read error: Connection reset by peer)
13:11:57*gokr joined #nim
13:16:38*nhywyll joined #nim
13:24:21*yglukhov quit (Remote host closed the connection)
13:25:51*yglukhov joined #nim
13:27:36*nhywyll quit (Quit: nhywyll)
13:32:06*nhywyll joined #nim
13:35:08*yglukhov quit (Remote host closed the connection)
13:37:40*nhywyll quit (Quit: nhywyll)
13:37:58*nhywyll joined #nim
13:44:50demi-flyx: does nimyaml support multi-line strings?
13:46:05federico3speaking of which, dom96 have you noticed forum-to-mlist loss in the last weeks? Something wrong with SMTP?
13:52:29dom96I haven't had time to look into it
13:52:45*Salewski joined #nim
13:53:43*Salewski left #nim (#nim)
13:55:47*Salewski joined #nim
13:56:59SalewskiIn Ruby %w(foo bar) is a shortcut for ["foo", "bar"]. Is there something similar available in Nim? (I had the feeling yes, but can not find it.)
13:59:33FromGitter<Varriount> Salewski: You mean a string splitting procedure?
13:59:52flyxdemi-: yes
14:00:55SalewskiVarriount: No, just an easy way to write a long array literal containing many strings.
14:01:14flyxdemi-: you can just try things out at https://nimyaml.org/testing.html
14:01:47SalewskiCurrently I need an array containing all the Nim keywords -- lot of work to type...
14:02:08FromGitter<Varriount> Salewski: We only have array literals
14:02:13flyxdom96: sender is [email protected]
14:02:14demi-flyx: ok cool -- seems i was using the wrong identifier and was getting my newlines stripped by accident, all good now thanks
14:02:20FromGitter<Varriount> A macro could do it though
14:03:07SalewskiOK, thanks. Will try to make a macro later...
14:03:55FromGitter<Varriount> Salewski: What's wrong with a multi line array literal?
14:04:21dom96flyx: that sucks :\ I'm not sure what I can do to prevent that though.
14:04:59dom96flyx: awesome that you registered a domain for nimyaml :)
14:05:44flyxdom96: I had to so I can be able to use `tag:nimyaml.org,2016:` as official tag prefix ;)
14:09:25SalewskiVarriount: Sorry, no idea what multi line array literal is currently, will check the manual...
14:12:08SalewskiBut indeed, split() will do exactly what I need, when I provide a long string with all the keywords, I will get an array with all the strings.
14:12:16SalewskiThanks, bye...
14:12:20*Salewski left #nim (#nim)
14:20:08*carterza joined #nim
14:29:24*eizua quit (Quit: Leaving)
14:31:30*gamester joined #nim
14:34:29*byte512 joined #nim
14:39:38*BlaXpirit is now known as oprypin
14:41:14*oprypin is now known as BlaXpirit
14:50:47*gokr quit (Ping timeout: 264 seconds)
14:53:36*cjbest joined #nim
14:55:47*gokr joined #nim
15:00:32*krux02 quit (Quit: Leaving)
15:01:10flyxwhat could be the cause of an error like this: `lib/pure/times.nim(94, 7) Error: undeclared field: 'getDay'`
15:01:35flyxthe referenced line declares exactly that field
15:01:41*nsf quit (Quit: WeeChat 1.7)
15:03:42dom96hrm, need more info
15:03:47dom96Did you modify times?
15:04:06dom96if not, how are you using it?
15:04:43flyxI did not modify it. I am still trying to compile NimYAML to js. I tried to compile some minimal times examples to JS and that worked
15:05:37flyxwhat I use from times is basicaly parse() and toTime(), but both work in a minimal example
15:06:39flyxah, and getGMTime and format but those also work with a minimal example
15:06:47flyxI am not sure what I am doing different
15:07:48flyxwhat irritates me is that the error message gives a reference to the line the field is declared in. I would expect such an error message at a line where an undeclared field is used
15:09:58*ofd quit (Read error: Connection reset by peer)
15:11:34FromGitter<Varriount> flyx: Does it work with the C backend?
15:12:04flyxVarriount: yes. the given line is inside a when defined(JS) block
15:12:44flyxunfortunately, my stacktrace is incomplete because part of it is generated by a macro
15:12:45*yglukhov joined #nim
15:13:06flyxso I do not have the information which call exactly leads to this error :/
15:16:28*yglukhov quit (Remote host closed the connection)
15:17:00*yglukhov joined #nim
15:17:21flyxoh, I believe I found the reason
15:17:27flyxin js, Time is a ref type
15:18:19flyxwhich makes NimYAML handle it with the generic ref type loader instead of the proper Time loader
15:18:33flyxwell this will be funny to fix
15:21:06*yglukhov quit (Ping timeout: 240 seconds)
15:24:57*ibk joined #nim
15:27:36*yglukhov joined #nim
15:29:57*couven92 quit (Quit: Client disconnecting)
15:55:04flyxokay, now I get `internal error: gen: unknown node type: nkUInt64Lit`
15:55:12flyxI guess uint64 is not supported on JS?
15:56:05flyxhowever, I don't have an 'u64 literal anywhere in my code
15:56:35*ofd joined #nim
15:57:46*yglukhov quit (Remote host closed the connection)
15:59:42FromGitter<Varriount> flyx: Looks like a compiler error.
16:01:04ofdwhen should a proc be inlined?
16:01:41flyxVarriount: indeed. jsgen does not seem to expect int/uint literals at all.
16:02:04flyxthey probably should get transformed into float literals
16:02:08*Trustable joined #nim
16:04:24flyxah no, it does handle them, but not the nkUInt64lit
16:05:55Araqofd: when in doubt, don't inline it. enable link time optimizations instead.
16:07:17ofdunderstood... i am completely in doubt as i am new to nim :) i will read on link time optimizations. thank you
16:12:59*nsf joined #nim
16:18:04flyxAraq: is uint64 intentionally not supported in JS? if so, would you accept a PR that patches parseutils / strutils so that parseBiggestUInt uses uint32 in JS?
16:18:43Araqshouldn't BiggestUInt be uint32 for the JS target instead?
16:20:43flyxthere is no BiggestUInt. at least I found none
16:20:57flyxparseBiggestUInt uses uint64 directly
16:21:50flyxso the patch would be to add BiggestUInt to system and then use it in parseutils and strutils
16:22:31Araqsounds good
16:23:02*gangstacat joined #nim
16:23:56*yglukhov joined #nim
16:29:33*vlad1777d quit (Quit: Leaving)
16:30:22*planhths joined #nim
16:32:08*vlad1777d joined #nim
16:32:46*yglukhov quit (Remote host closed the connection)
16:34:56flyxdone
16:36:14*nhywyll quit (Quit: nhywyll)
17:05:06*filcuc joined #nim
17:05:16filcucAraq: ping :)
17:06:06filcucNimSuggest returns me no suggestions with nim absolute_path_:row:col
17:06:37filcucfor reproduce this is first spawn nimsuggest /absolute/path/to/main.nim
17:07:52filcucwait a second :)
17:09:30*yglukhov joined #nim
17:13:36filcucno ok solved, i open the main file with "nimsuggest main.nim" and then requested suggestions with "sug path_to_dirty:row:col"
17:14:03filcucbut i should have used "sug main.nim;path_to_dirty:row:col"
17:20:23*krux02 joined #nim
17:23:32*rauss joined #nim
17:25:49*yglukhov quit (Remote host closed the connection)
17:26:03Araqfilcuc: main.nim;dirty.nim is wrong, dirty.nim is where you store the file, eg
17:26:19Araqmymodule.nim;/tmp/mymodule_copy.nim
17:26:44Araqyou need to save the file so that nimsuggest can read the most recent version of the file
17:27:31Araqbut this save should be invisible, so the editor should use /tmp and the dirtyfile mechanism
17:32:37filcucAraq: yes that's what i do
17:33:00Araqand give it absolute paths
17:33:09filcucperfect
17:33:22Araqif the path has spaces, use "" around it
17:33:35filcucAraq: nice to know that
17:33:43filcucAraq: probably usefull on windows
17:33:49*dyce[m] quit (Ping timeout: 240 seconds)
17:34:06*MrAxilus[m] quit (Ping timeout: 245 seconds)
17:34:06*jivank[m] quit (Ping timeout: 245 seconds)
17:34:09*M-Quora quit (Ping timeout: 252 seconds)
17:34:17filcuci expect to have a somewhat working implementation inside QtCreator in next week
17:34:20*yglukhov joined #nim
17:36:09*TheManiac quit (Ping timeout: 240 seconds)
17:36:09*ehmry quit (Ping timeout: 240 seconds)
17:36:11*erwana[m] quit (Ping timeout: 245 seconds)
17:36:11*hohlerde quit (Ping timeout: 245 seconds)
17:36:23*stisa quit (Ping timeout: 264 seconds)
17:36:30*Jipok[m] quit (Ping timeout: 276 seconds)
17:36:30*Guest73656[m] quit (Ping timeout: 276 seconds)
17:38:13filcucthank you
17:38:15filcucbrb
17:38:48*filcuc quit (Quit: Konversation terminated!)
17:39:05*yglukhov quit (Remote host closed the connection)
17:39:28*cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:39:41carterzahrm
17:39:45carterzaphysics is going to be an issue
17:39:56carterzaI don’t think there are any good wrappers at the moment for any libraries
17:40:08carterzaI can’t get fowlmouth’s ODE wrapper to work
17:40:17carterzabullet3 looks like a bear to wrap...
17:40:53dom96ooh, physics, what are you working on?
17:41:19carterzawell I’ve been pulling together a bunch of libraries
17:41:24carterzainto kind of a game engine / framework of sorts
17:41:59dom96cool
17:42:32carterzahttp://imgur.com/a/tHfX8
17:42:51dom96wow, looks awesome
17:42:54carterzathanks
17:45:28carterzaI can get fowl’s ODE wrapper to initialize ODE, but once I get to setting up masses, it bombs out
17:45:34*yglukhov joined #nim
17:45:36carterzaso close
17:49:57*yglukhov quit (Ping timeout: 240 seconds)
17:50:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:52:56carterzaokay nevermind I got ode working
17:53:06carterza:D
17:53:52dom96\o/
17:54:13carterzaIt’s not bullet… but good enough for now
18:08:23*Jesin joined #nim
18:13:23*yglukhov joined #nim
18:19:27*yglukhov quit (Ping timeout: 240 seconds)
18:20:43*devted joined #nim
18:22:36*Jesin quit (Quit: Leaving)
18:27:29*Jesin joined #nim
18:29:05*arnetheduck quit (Ping timeout: 260 seconds)
18:32:13*arnetheduck joined #nim
18:34:14*nsf quit (Quit: WeeChat 1.7)
18:43:15*Jesin quit (Quit: Leaving)
18:51:52*Jesin joined #nim
18:53:12*cjbest joined #nim
18:53:34*yglukhov joined #nim
19:01:12krux02carterza: do you have ode wrapper published somewhere?
19:01:24carterzaI don’t but fowlmout does
19:01:28carterzafowlmouth*
19:01:39carterzaI had to do a little work to get it working with the latest version of ODE, not much but a little
19:02:04carterzahttps://github.com/fowlmouth/ODE
19:02:19krux02I once wrote a wrapper for ode on my own, but it was for go: https://github.com/krux02/gode
19:03:46krux02But I didn't do very much with it, and it was a lot of work to get it all up and running
19:04:32carterzayeah it is
19:04:39carterzaI got collision detection working now
19:04:42carterzabut it is a lot of code
19:15:56*dyce[m] joined #nim
19:20:56carterzalol
19:20:57carterzathis is good...
19:22:14carterzahttp://imgur.com/a/nKfJb
19:25:06*ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:36:07*ibk quit (Quit: Connection closed for inactivity)
19:38:00*yglukhov quit (Remote host closed the connection)
19:47:39*yglukhov joined #nim
19:49:20*ofd joined #nim
19:52:12*yglukhov quit (Ping timeout: 252 seconds)
19:52:48FromGitter<Varriount> carterza: Just so you know, I'm serious about donating money towards
19:53:14carterzaah I could use help more than money probably
19:53:25carterzasomeone wrapping bullet so we could use that instead of ODE would be a huge help
19:53:30carterzabut I know everyone is so busy
19:54:06FromGitter<Varriount> Hm. Does bullet have a C api?
19:54:25carterzait’s extremely confusing
19:54:57carterzaaccording to the github there is one - https://github.com/bulletphysics/bullet3
19:55:01carterzaA new physics-engine agnostic C-API is created, see examples/SharedMemory/PhysicsClientC_API.h
19:56:00*bjz_ quit (Ping timeout: 260 seconds)
19:56:16carterzabut I don’t see a C API for much else - looks like a bunch of network related code in there
19:56:53*bjz joined #nim
20:02:36carterzaif I had access to some good sci-fi themed 2d art I’d just focus on 2d and use chipmunk or box2d
20:04:15krux02carterza: I have to tell you the uncomfortable truth, a physics engine does not really solve much for creating a game
20:04:27krux02you probably have to do game related physics manually anyway
20:04:45carterzaI’m not really trying to create a game at the moment
20:04:47carterzawell that’s my end goal
20:04:58carterzaat the moment it’s more of building a framework for creating games
20:05:01krux02unless you want to create something like marble madness
20:05:10carterzabut you’re right
20:05:32krux02I onece used box2d and wanted it to integrate it with my tile map in 2D
20:05:35krux02it was just horrible
20:05:49krux02box2d insistend on having boxes and stuff
20:05:54carterzait’s not pleasant, you gotta write a lotta glue code
20:05:55carterzayeah
20:05:58krux02but you couldn't just create a box fear each tile
20:06:02carterzaor a lot of box2d code
20:06:14carterzahmm
20:06:18carterzaI’ve only used it through libgdx
20:06:30krux02so you would be required to export some surface mesh
20:06:43krux02and that eleminates almost all advantages of the simplicity of using tiles in the first place
20:07:17carterzaright
20:07:23krux02and at the end of the day the collision response of box2D (falling boxes) doesn't really solve anything when you want to let a player jump around in a level
20:08:08krux02a player is not a box you can push around
20:08:18krux02that just doesn't work that way
20:08:40krux02one example is friction
20:09:29krux02you want high friction == good grip == good acceleration/break. When your player is a box you just apply forces to, your behavior is exactly the opposite
20:09:58*hohlerde joined #nim
20:09:58*jivank[m] joined #nim
20:10:01*MrAxilus[m] joined #nim
20:10:02krux02player movements are always a hack
20:10:03*M-Quora joined #nim
20:10:05*erwana[m] joined #nim
20:10:05*ehmry joined #nim
20:10:06*stisa joined #nim
20:10:10*TheManiac joined #nim
20:10:10*Guest73656[m] joined #nim
20:10:10*Jipok[m] joined #nim
20:10:29krux02I think the guy from N really did a great job at explaining some parts of it, but in the end of the day you have to do it on your own
20:12:08*rokups quit (Quit: Connection closed for inactivity)
20:13:10krux02http://www.metanetsoftware.com/2016/n-tutorial-a-collision-detection-and-response
20:14:44krux02and then for the player physics it is best when you have two states, a) in air b) on ground
20:15:43krux02but anyway, I am explaining too much again
20:33:35*byte512 quit (Ping timeout: 240 seconds)
20:38:58*cjbest quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:39:25*cjbest joined #nim
20:39:45*cjbest quit (Client Quit)
20:39:54FromGitter<Varriount> Aren't physics engines usually kept separate from game engines?
20:40:25*cjbest joined #nim
20:40:33*cjbest quit (Client Quit)
20:41:15*cjbest joined #nim
20:41:21*cjbest quit (Client Quit)
20:42:02*nsf joined #nim
20:42:03*cjbest joined #nim
20:42:10*cjbest quit (Client Quit)
20:42:43*cjbest joined #nim
20:42:57*cjbest quit (Client Quit)
20:43:38*cjbest joined #nim
20:43:45*cjbest quit (Client Quit)
20:44:25*cjbest joined #nim
20:44:33*cjbest quit (Client Quit)
20:45:13*cjbest joined #nim
20:45:21*cjbest quit (Client Quit)
20:46:02*cjbest joined #nim
20:46:09*cjbest quit (Client Quit)
20:46:42*cjbest joined #nim
20:46:57*cjbest quit (Client Quit)
20:47:37*cjbest joined #nim
20:47:45*cjbest quit (Client Quit)
20:47:55*yay joined #nim
20:48:03*handlex joined #nim
20:48:20*handlex quit (Client Quit)
20:49:24*cjbest joined #nim
20:49:27*handlex joined #nim
20:50:43*handlex quit (Client Quit)
20:52:26*handlex joined #nim
20:58:22demi-are there any examples of correct usage of `{.async.}` i was about to implement something like the async httpclient example in the httpclient docs but that doesn't seem to work with 0.16.1, says that it doesn't recognize the `async` pragma.
21:00:33*handlex quit (Quit: handlex)
21:01:53*cjbest quit (Quit: Textual IRC Client: www.textualapp.com)
21:02:51stisademi- did you ``import asyncdispatch`` ? https://nim-lang.org/docs/asyncdispatch.html#async.m,untyped
21:09:06demi-stisa: yeah that was it, thanks
21:22:46*vlad1777d quit (Quit: Leaving)
21:32:25*vlad1777d joined #nim
21:33:38FromGitter<zzz125> test
21:33:53FromGitter<zzz125> /name test
21:34:26*carterza quit (Quit: carterza)
21:35:38demi-hmmm, i think i found a bug in asyncdispatch?
21:38:35FromGitter<Varriount> demi: What?
21:39:30*Trustable quit (Remote host closed the connection)
21:41:22*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:41:58demi-when i try to compile this: https://github.com/samdmarshall/docset/blob/master/docset.nim -- i get this error: https://gist.github.com/samdmarshall/f1d72e93530305b8a12062ceff41abda which doesn't seem right?
21:43:49*Trioxin joined #nim
21:43:51*bjz joined #nim
21:44:18TrioxinI'm getting "out of memory" error when I run my app but why? I'm not out of memory
21:45:36Trioxinoh wait nvm
21:46:46FromGitter<zzz125> 150 people wow
21:46:54federico3:)
21:48:46FromGitter<zzz125> nim is so mainstream it hurts
21:49:28FromGitter<Varriount> Now of only we could get more coverage on hacker news and reddit
21:49:33*yglukhov joined #nim
21:51:33FromGitter<Varriount> demi-: The error message is correct, even if the function it is naming is not
21:51:59FromGitter<Varriount> Your closure isn't GC safe, as it is changing a global variable.
21:52:13FromGitter<Varriount> Are you trying to compile this with threading turned on?
21:53:25demi-yes
21:53:41*yglukhov quit (Ping timeout: 245 seconds)
21:54:08FromGitter<Varriount> Well, there you go then.
21:55:05FromGitter<Varriount> Also, you'll need to do somrthing special with regards to openssl.
21:55:43FromGitter<Varriount> You need to create a context manually and pass it in. The default action is to use a global context variable.
21:56:08dom96IIRC the default context is gcsafe now
21:56:32shashlickis it possible to compile in pcre32.dll into the binary, or is there a pure Nim RE engine?
21:57:51demi-I don't really understand what the purpose of a async callback is if you cannot have it call something else to update a display or some global state.
22:00:08FromGitter<Varriount> demi-: Simple. Pass in your global state through a captured variable or parameter.
22:01:16dom96This isn't exclusive to async. Each thread in Nim has its own memory heap.
22:01:20demi-varriount, how when the proc is already defined? https://nim-lang.org/docs/httpclient.html#ProgressChangedProc
22:01:56FromGitter<Varriount> demi-: It's a closure. Capture a variable in the surrounding scope.
22:02:33FromGitter<Varriount> dom96: Do you know if threadvar globals can be used in gcsafe code?
22:02:49dom96yes, that is their purpose.
22:03:01dom96But then you need to make sure to initialise the variable in each thread.
22:03:30dom96demi-: What are you using threads for?
22:03:31FromGitter<Varriount> demi-: As I see it, you have two options, depending on how you're threading things:
22:04:27FromGitter<Varriount> If only one thread is using the `downloaderBar` global, annotate it with the threadvar pragma and initialize it appropriately.
22:04:43demi-dom96: i'm downloading a file through an asynchttpclient, i want to update a UI display when the progressChanged callback is called.
22:04:53FromGitter<zzz125> 8===э
22:05:09dom96demi-: You shouldn't need threads for that.
22:05:25dom96You should be able to call your UIs event loop asynchronously as well
22:05:35FromGitter<Varriount> dom96: demi- will if the download takes a long time and/or is not async compliant.
22:06:09dom96Varriount: demi- is using the async http client
22:06:24FromGitter<Varriount> dom96: But not necessarily an async GUI
22:06:48dom96I am yet to find a UI that doesn't support this.
22:06:57FromGitter<Varriount> demi-: If multiple threads need to use that progress bar variable, use a channel to send an update message.
22:07:45demi-no, this is literally the only thing that is going to happen
22:08:00FromGitter<Varriount> *send an update message to the GUI loop.
22:08:29krux02I got a compiler error, but there is no stacktrace: http://ix.io/1Tdc
22:08:34krux02what should I do?
22:08:47krux02I used ./koch temp ARGS...
22:08:51demi-I'm not using GUI?
22:09:21Araqdemi-: you might want to take a look at tools/downloader.nim
22:09:21FromGitter<Varriount> > **<demi->** @dom96: i'm downloading a file through an asynchttpclient, i want to update a UI display when the progressChanged callback is called.
22:09:23dom96demi-: then why do you need threads?
22:09:48demi-i'm writing to stdout
22:10:15demi-as far as I am aware, there is no loop for that
22:10:19FromGitter<Varriount> krux02: If temp is failing, I'd try manually compiling the compiler in debug mode
22:10:21dom96krux02: it seems like this is koch attempting to compile Nim using the Nim that is in your PATH (which presumably was compiled in release mode)
22:10:44krux02Varriount: how do you do that?
22:11:07Araqdemi-: writing to stdout is .gcsafe
22:11:09FromGitter<Varriount> `koch boot --stackTrace:on --lineTrace:on`
22:11:21*elrood quit (Quit: Leaving)
22:11:23dom96demi-: writing to stdout is non-blocking
22:11:32FromGitter<Varriount> Or my favorite, `koch boot -d:release --stackTrace:on --lineTrace:on`
22:11:34FromGitter<zzz125> why not use system("wget ... -o /tmp/myfile &")? + fstat
22:11:59FromGitter<Varriount> Although @Araq has complained about me suggesting that particular combination before.
22:11:59dom96Varriount: there is no need for those flags
22:12:14FromGitter<Varriount> @zzz125 Well, such a method isn't cross-platform.
22:12:19dom96`./koch boot` bootstraps in debug mode which includes stack trace info
22:12:24FromGitter<zzz125> i know
22:12:33FromGitter<zzz125> but its funny
22:13:12Araqkrux02: 'koch temp' always produces a stacktrace, you're holding it wrong ;-)
22:13:18demi-ok, so, is there actually any way to tell the nim compiler that this variable will infact be thread safe and not disappear out from under it during use?
22:13:59dom96demi-: var progressBar: ProgressBar {.threadvar.}
22:14:17dom96But I don't think you need threads
22:14:44dom96krux02: I'm guessing but I think that you need to compile `which nim` in debug mode.
22:14:59dom96because it is crashing trying to compile a temporary Nim compiler for you
22:15:24krux02thanks I got my line traces now
22:15:26*planhths quit (Quit: Konversation terminated!)
22:15:34krux02`koch boot --stackTrace:on --lineTrace:on` did work
22:15:48dom96and `koch boot` didn't?
22:16:36krux02I don't know ./koch temp definitively did not work
22:17:05dom96krux02: what are you trying to do?
22:17:26dom96Are you modifying the compiler code?
22:17:31Araqkrux02: your gist doesn't even have "koch temp"
22:17:52Araqhard to help you when your output contradicts your claims.
22:18:10dom96Araq: I'm guessing the output he posted was truncated
22:18:24Araqthere is no way 'koch boot' produces a debug compiler and 'koch temp' doesn't.
22:19:43*Matthias247 quit (Read error: Connection reset by peer)
22:22:24Araqdemi-: with a minor refactoring your program works without .threadvar hacks, but I'm tired, so write {.gcsafe.}: downloaderBar.set(int(percentage))
22:22:30Araqto make the compiler shut up.
22:25:43dom96Araq: isn't it time for this to just be 'gcsafe: ...'?
22:26:14krux02Araq: it is just the stdout from the compile command
22:26:28krux02I used <compile-command> | ix
22:26:40krux02didn't work that well, because stderr was missing
22:27:18Araqdom96: I don't believe in giving unsafe things a nice syntax
22:29:42*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:29:53shashlickanyone has Vim syntax highlighting working using nim.vim?
22:30:13shashlickI got it installed through Vundle but it doesn't highlight anything
22:30:57FromGitter<zzz125> fatih/vim-go works for me
22:32:14euantorOh, nice to see somebody using progress
22:32:14FromGitter<zzz125> :se ft?
22:32:20shashlickisn't that for Golang?
22:32:31FromGitter<zzz125> oh fuck i meant ":se ft?"
22:32:50FromGitter<zzz125> mine shows "nim" so the filetype is correct
22:33:18FromGitter<zzz125> oh sorry
22:33:24FromGitter<zzz125> i have both wait a sec
22:35:02raussshashlick: I use zah/nim.vim
22:35:33FromGitter<zzz125> i use 'baabelfish/nvim-nim' but can test zah's too since its installed
22:35:36shashlickfor some reason, filetype isn't automatically detected, Vundle says to set filetype off
22:35:47FromGitter<zzz125> nvim-nim works in both vim/gvim and nvim iirc
22:36:04raussshashlick: Dunno. I use `Plug 'zah/nim.vim', { 'for': 'nim' }`
22:36:15raussWith vim-plug. Filetype is definitely on.
22:36:27shashlickworks now - I set filetype on and it works fine
22:36:31FromGitter<zzz125> i use vim-plug too
22:36:34raussAlso I use nvim
22:36:48rausszzz125: I didn't know there was nvim-nim. I'll have to look into that
22:36:58bblhello, author here
22:37:30krux02I use bundle
22:37:32bblare you using it with vim or neovim?
22:37:34FromGitter<zzz125> @rauss it seems nicer than zah's plugin, i also use Neomake! with it
22:37:45rauss+1
22:37:49krux02it it matter at all
22:37:55bblit matters
22:38:00krux02but now I mostly use emacs
22:39:27*nsf quit (Quit: WeeChat 1.7)
22:39:41*Trioxin quit (Ping timeout: 255 seconds)
22:39:53bblIt uses neovim's async features but can be run without them
22:40:32bblAnd the autocompletion really needs a autocompletion library lice YCM
22:40:39bbls/lice/like
22:40:50krux02I started using bundle as plugin manager in vim, and never thought about anything else. It feels like an on the spot solution well crafted nothing missing and no fuzz around it. Never thought about thinking about alternatives.
22:41:05bblvim-plug is really nice
22:42:32krux02ok sorry, I use vim-plug, too
22:42:39bblIf it's any use here is my neovim config https://gitlab.com/baabelfish/dotfiles/blob/master/.config/nvim/init.vim
22:42:55krux02I just rarely use vim anymore
22:46:01*libman joined #nim
22:46:11FromGitter<zzz125> the only thing i don't like in vim is that its incompatible with Colemak layout, i had to fall back to using arrow keys becase of it, and nobody can find a good combination for homerow (modal) editing
22:46:45*Vladar quit (Quit: Leaving)
22:47:21bblYou shouldn't be using hjkl too much anyways ;)
22:47:37*gamester quit (Remote host closed the connection)
22:48:03krux02zzz125: I use the neo layout, and yes hjkl are crap there, too
22:48:06*aziz joined #nim
22:49:05krux02but it's not too bad, neo has it's own arrow keys build in the keyboard layout, so no need for editor features, it's all done by the layout and works in every editor yay
22:55:40shashlickhaven't tried neovim yet, what's the main reason to move?
22:56:17FromGitter<Varriount> shashlick: Probably a saner plugin interface.
22:56:25FromGitter<zzz125> async editing, but it was added to the latest vim 8.0
22:56:27raussshashlick: Vim is kind of limited in the sense that it's mainly one guy, Bram, who doesn't like to change or add things.
22:56:32bblshashlick: I jumped at the async features, true color support and dynamic cursor style
22:56:45raussshashlick: Though vim8 came out since, with some of the async stuff, so he did cave in a sense :)
22:56:50bblI feel vim 8 is saner :P
22:58:39krux02I think the vim developer became lazy with getting things done so people got frustrated and someone founded neovim, and then the vim developer though oh shit I have to get updates and he made vim8
22:59:19krux02don't take it serious though, it's just my personal impression
23:00:38bblkrux02: whatever the reason vim got a nice boost
23:01:28FromGitter<zzz125> neovim was started when vim maintainers refused to accept some async patches because they thought they were unneccessary iirc
23:02:22*ofd quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:02:27*arnetheduck quit (Ping timeout: 258 seconds)
23:03:41krux02I mean this is not really nim at all, but as long as nobody else is talking about nim here, who cares that we talk about vim?
23:04:22*Snircle joined #nim
23:04:33*carterza joined #nim
23:04:40bblthe name is almost the same
23:04:50krux02I like neovim simply for the fact that it has a few saner defaults.
23:14:12dom96feel free to discuss vim here and any other programming topics
23:14:14*sz0 quit (Quit: Connection closed for inactivity)
23:14:37shashlickwell, neovim isn't really ready for Windows, so vim in msys2 it is
23:17:38krux02I recently saw, that windows 10 preinstalls candy crush on everybodys computer. So now bloatware is included in windows. Those are the moments where I feel I did the right thing on being on linux exclusively, becaus shat like that just doesn't happen.
23:18:04federico3neovim wasn't just about async. The main reason was to clean up the code
23:18:20krux02yes get rid of legacy
23:18:47krux02apropos legacy, my integration test for the legacy removal pull request just passed
23:19:01krux02https://github.com/nim-lang/Nim/pull/5371
23:19:20krux02no compiler internal list implementation anymore to worry about
23:19:22krux02it's gone
23:19:33krux02if the pull request get's accepted
23:19:40shashlickis there any plan to make an msys2 package for Nim? So you could just do pacman -S nim
23:20:02krux02it would be what I would use on windows
23:20:46dom96shashlick: feel free to create one :)
23:21:13krux02how much work is it to create an msys package, when there is already an arch package?
23:22:20FromGitter<zzz125> > loatware ⏎ how about this? https://boingboing.net/2016/06/15/intel-x86-processors-ship-with.html
23:22:40FromGitter<zzz125> > est
23:22:45FromGitter<zzz125> hmm
23:22:50federico3https://github.com/FedericoCeratto/nim-testrunner enjoy
23:24:00libmanboo hoo GPL3.
23:24:37dom96federico3: ooh, gifs too, nice
23:25:32dom96Note: fsmonitor is linux-only
23:26:36federico3and a bit untested, btw. Anyhow I could make file monitoring live under a when...
23:27:23*gangstacat quit (Ping timeout: 255 seconds)
23:28:24dom96a async-await-compatible fs monitor package/module is always welcome :)
23:28:31krux02federico3: interesting article
23:28:52krux02sounds great
23:29:40dom96krux02: you mean zzz125?
23:29:56krux02yes I do
23:29:58krux02sorry
23:30:11dom96federico3: btw are those dots in the output just colored unicode?
23:31:16federico3yep and it's optional
23:31:27dom96they look nice
23:31:37federico3thanks!
23:34:08krux02my suggestion is to put all output that does not report error on the same line ('\r'), then you still have feedback that tests are running, but you only get output of programs that failed
23:34:33krux02helps to not spam the console with tests that are all fine
23:35:18krux02that are just my lazy two cents
23:35:51*ftsf joined #nim
23:36:23krux02I haven't tested it so don't take it too serious yet.
23:36:56federico3krux02: capturing the output is going to be more tricky if the user still expects to see the output in real time
23:37:53krux02I am not sure entirely, how it works, but there is a way to detect if a program is run interactively or in for example a pipe (you do not want colors when used in a pipe)
23:38:16krux02and there is a program called tie for exactly that pupose
23:38:28federico3is it related to the previous comment?
23:39:13*carterza quit (Quit: carterza)
23:39:34krux02wait sorry, I have to look up which program it was
23:40:11federico3krux02: are you talking about testrunner itself being piped into something else and going --nocolor automatically?
23:41:12krux02not anymore, I thought tie was the program to pipe the output into a file or another stream and at the same time still have it printed on screen
23:41:28federico3ah
23:41:28krux02good for logging, but now that it testetd it, I am not sure if my memory is correct
23:41:45federico3tee
23:41:51krux02yes
23:41:55krux02tee it was
23:42:10krux02apropos tee I am drinking tee (tea)
23:42:10federico3yup, I guess it polls its input pipe and prints output constantly
23:44:53*ofd joined #nim
23:47:02FromGitter<zzz125> 卍卍卍NSDAP1933卍卍卍
23:48:21krux02zzz125: you want to be unpopular?
23:48:46FromGitter<zzz125> why unpopular?
23:49:01FromGitter<zzz125> hitler did nothing wrong
23:49:19krux02are you trolling or is that your opinion?
23:49:36FromGitter<zzz125> probably both
23:50:27krux02well I don't have the power to do so, but this behavior is inacceptable.
23:50:42FromGitter<zzz125> maybe
23:50:52krux02not maybe, it is.
23:50:58*yglukhov joined #nim
23:51:26krux02So when you don't want a ban, you simply should not post something like that.
23:52:32krux02I do not have the power to ban you, but if I had, I would make you apologize, and if you didn't apologize ban you instantly.
23:52:58FromGitter<zzz125> its ok, i used to being banned anyway
23:53:23FromGitter<zzz125> for virtually anything
23:53:26krux02then why do you do that
23:53:35FromGitter<zzz125> i don't know
23:53:47krux02how about you just stop being a dick, and just play according to the rules.
23:54:14krux02It is literally asking: "please ban me right now"
23:54:19FromGitter<zzz125> i think i didn't broke any rules yet
23:54:32krux02yes you did
23:54:47FromGitter<zzz125> i posted something illegal?
23:55:00krux02yes you did
23:55:10FromGitter<zzz125> dunno
23:55:21*yglukhov quit (Ping timeout: 245 seconds)
23:55:45krux02randomly posting NAZI propaganda without context and critical context is in fact illegal in my country
23:56:05krux02so yes you just crossed the line
23:56:14krux02don't do that
23:56:37FromGitter<zzz125> but i heard mein kapf is not banned in germany, its banned in my country for example as a "terrorist book"
23:56:49FromGitter<zzz125> just saying
23:56:56krux02That is a completely different topic
23:57:30krux02you just broke the rules by posting propaganda. And that's the topic, now you open another one
23:58:04dom96He/she is banned now.
23:58:57dom96We most certainly do not tolerate such crap here. Feel free to highlight me next time.