<< 22-06-2015 >>

00:00:44reactormonkwu-lee, proc delay(ms: int) {.importc: "delay".}
00:01:08reactormonkactually proc delay(ms: int) {.importc.}
00:01:12wu-leeaha, useful thanks.
00:01:53reactormonkdoes digitalWrite work or is that arduino-specific?
00:01:55reactormonktime to find out
00:02:11wu-leedunno, I avoided anything like that
00:04:13wu-leeof course: the raw C may have the wrong port offsets for the uno
00:05:07wu-leeI am still figuring out nim, didn't want to add layers for me to untangle.
00:06:10*pregressive quit (Remote host closed the connection)
00:07:19reactormonkhum. it blinks three times.
00:07:27reactormonkbut otherwise it works.
00:07:49wu-lee"three is the magic number"
00:08:07reactormonkblinks anyway
00:08:07wu-leebetter than no blinks.
00:08:10reactormonk... it's not the code.
00:09:02wu-leethis is nim blinking, or C?
00:10:28wu-leegone 1am here in Edinburgh, I feel a strong need to sleeeep
00:11:21wu-leereactormonk, you've been extremely helpful, thanks, I will need to check back later.
00:11:30reactormonkwu-lee, it just blinks whenever I upload stuff
00:11:32reactormonkwill mess some more
00:11:54wu-leeoh, I see, that may just be the upload process.
00:12:36reactormonkyup
00:12:36wu-leethe the LED which should blink is a different one
00:12:43reactormonknah, I changed it
00:12:55reactormonktook an example from the book
00:13:03reactormonkhttps://gist.github.com/1866f41512899bcfa93c
00:13:17*BitPuffin|osx joined #nim
00:13:29wu-leeok, on my board, the upload flashes TX and RX LEDs, and the L LED once.
00:15:02wu-leeI forget which pin the built in LED is on, but that's the one my code flashes
00:15:34wu-leewhen it works.
00:15:37reactormonkah, wrong -p
00:15:46reactormonkhere it's 13
00:16:39wu-leesame here by the looks of the example
00:17:50reactormonkcan confirm https://balau82.wordpress.com/2011/03/29/programming-arduino-uno-in-pure-c/ works
00:18:02wu-leebut I've stolen code from all over, and hacked to about.
00:18:32wu-leeyes, that's one of my sources.
00:21:11*wu-lee creeps off to bed
00:21:14wu-leelaterz
00:33:24reactormonkAraq, any way to mark a proc not to be deadcodeelimd?
00:33:38reactormonkthe entry point is defined by another program
00:34:13reactormonkhm, that might pose problems to nim init
00:35:08Varriountreactormonk: Can't you use the push and pop pragmas to turn it off?
00:35:19reactormonkVarriount, nah, doesn't work
00:36:36Varriountreactormonk: The manual states that you can turn it off on a per-module basis. Can't you stick the proc you want in it's own module?
00:36:50reactormonkthat might be an idea
00:37:28reactormonkehh whut
00:37:38reactormonksuccessful but it doesn't produce a binary
00:37:48Varriount?!?!
00:38:42*dddddd quit (Ping timeout: 252 seconds)
00:40:11reactormonkVarriount, https://github.com/reactormonk/nim-test/tree/arduino
00:40:21reactormonknim c -d:release --cpu:avr --os:standalone --deadCodeElim:on --gc:none --parallelBuild:1 -mmcu=atmega328 blink.nim
00:40:31reactormonkyou're gonna need avr-gcc and avr-glibc
00:40:59Varriountreactormonk: Are those available on Windows?
00:41:05reactormonkno idea
00:41:10reactormonkI think so
00:41:24reactormonkVarriount, http://www.arduino.cc/en/Main/Software
00:41:28VarriountAlthough, I guess it's about time I set up a good Linux VM.
00:41:58reactormonkVarriount, https://wiki.archlinux.org/index.php/VMware/Installing_Arch_as_a_guest
00:42:06Varriountreactormonk: Yep.
00:45:10Varriountreactormonk: What does the -mmcu option do?
00:47:11reactormonkVarriount, target arch or something
00:58:52*gyeates quit (Ping timeout: 252 seconds)
01:01:16reactormonkVarriount, ping me when you got your instance up
01:02:25*strcmp1 quit (Quit: Leaving)
01:02:47*tennix joined #nim
01:12:23*gyeates joined #nim
01:19:46*gyeates quit (Ping timeout: 255 seconds)
01:31:36*jaco60 quit (Ping timeout: 256 seconds)
01:58:54*pregressive joined #nim
02:01:50*BitPuffin|osx quit (Ping timeout: 264 seconds)
02:25:11*Jev quit (Quit: Leaving)
02:28:27*def- quit (Quit: -)
02:40:36*def- joined #nim
02:42:19*darkf joined #nim
02:58:27Varriountreactormonk: Sorry, can't seem to set up my environment right. I'll try a bit more tomorrow
03:05:00dtscodethats cause you're on windows
03:09:02*chdsbd quit (Quit: Page closed)
03:31:13*strcmp1 joined #nim
03:37:24*Demos quit (Read error: Connection reset by peer)
03:38:55*gyeates joined #nim
04:04:54*pregressive quit (Remote host closed the connection)
04:48:41*rgv151 joined #nim
04:48:44*rgv151 quit (Changing host)
04:48:44*rgv151 joined #nim
04:49:28rgv151hi guys
04:49:33avsejAraq, is there reason not to include all docs into distribution? https://github.com/nim-lang/Nim/pull/2969/files
04:49:55rgv151do Nim have magic consts like __FILE__, __LINE__, __METHOD__ in PHP?
04:50:10Quorargv151: I wouldn't think so
04:50:45fowlisMainModule, instantiationInfo()
04:51:06fowlthere are some magic constants in system.nim
04:51:50rgv151thx fowl
04:53:04*gyeates quit (Ping timeout: 255 seconds)
04:53:40fowlNo direct equivalents to the ones you listed
04:58:01rgv151it's ok, i'm trying implement them myself
05:12:40*Kingsquee joined #nim
05:31:08*darkf_ joined #nim
05:34:39*darkf quit (Ping timeout: 248 seconds)
05:34:53*darkf_ is now known as darkf
05:40:44*darkf_ joined #nim
05:43:11*darkf quit (Ping timeout: 248 seconds)
05:43:14*darkf_ is now known as darkf
05:53:41*darkf_ joined #nim
05:57:03*darkf quit (Ping timeout: 248 seconds)
05:59:04*darkf_ is now known as darkf
06:12:04*irezvov quit (Ping timeout: 246 seconds)
06:14:18*tennix quit (Remote host closed the connection)
06:29:41*ozra joined #nim
06:30:16*tennix joined #nim
06:59:15*jubalh joined #nim
07:00:53*Sembei joined #nim
07:01:09*Trustable joined #nim
07:02:56*Pisuke quit (Ping timeout: 272 seconds)
07:03:41*jszymanski joined #nim
07:27:26Araqavsej: cause they can be built and I like to keep the downloads smaller
07:27:48Araqreactormonk: use .exportc to tell the compiler that it must not optimize it away
07:28:13Araqalso different entry points are not a problem at all, use --noMain for it
07:30:14avsejAraq, okay I see
07:31:56*skyfex_ quit (Ping timeout: 252 seconds)
07:40:28*[CBR]Unspoken joined #nim
07:40:51*Demon_Fox quit (Ping timeout: 264 seconds)
07:48:28*jubalh quit (Quit: Leaving)
07:57:19*yglukhov joined #nim
07:57:39*jubalh joined #nim
08:03:29*coffeepot joined #nim
08:18:26*dddddd joined #nim
08:22:56*tennix quit (Remote host closed the connection)
08:28:29*tennix joined #nim
08:28:29*tennix quit (Changing host)
08:28:29*tennix joined #nim
08:30:34*Demon_Fox joined #nim
08:31:11*Ven joined #nim
08:57:00*jubalh quit (Quit: Leaving)
08:59:13*jubalh joined #nim
09:07:11*tennix quit (Remote host closed the connection)
09:08:10*vikaton quit (Quit: Connection closed for inactivity)
09:15:10*jaco60 joined #nim
09:26:59*Uint2048 joined #nim
09:29:15Uint2048Hi, I'm learning Nim and trying to use SDL2
09:29:42Uint2048but when I try to load a png or jpg texture, it returns a nil ptr
09:29:47Uint2048I can only use bmp
09:29:59Uint2048Here's the code: http://pastebin.com/Q6vUDKR3
09:30:27Uint2048pngTexture, jpgTexture, pngSurface and newPngTexture are nil
09:30:34fowlUint2048: thats SDL it only supports BMPs, use IMG_load in sdl2/image it requires sdl2_image
09:31:16Uint2048I did
09:31:50Uint2048in my code I use "loadTexture()", which is IMG_LoadTexture
09:32:51Uint2048and load() (IMG_Load()), which should return a surfaceptr, but it only works with BMP too
09:33:11Uint2048what am I doing wrong
09:33:17fowlLet me look
09:33:21fowlI'm on my phone
09:33:50Uint2048Thanks
09:33:52fowlDo you call image.init()
09:34:14Uint2048....
09:34:15Uint2048no
09:34:31Uint2048Let me try...
09:36:22Uint2048in image.nim, there's a comment
09:36:24Uint2048"This is completely different than SDL_Init() -_-"
09:36:36Uint2048apparently I'm not the only one who made that mistake haha
09:37:30*tennix joined #nim
09:37:30*tennix quit (Changing host)
09:37:30*tennix joined #nim
09:38:11fowlDid it work?
09:39:18fowliirc loadTexture wants a power of two sized image, load() and createtexture() should work
09:40:02Uint2048no, image.load() returns an error
09:40:11Uint2048it returns 0
09:40:27Uint2048image.init()
09:40:31Uint2048I mean
09:40:37*tennix quit (Remote host closed the connection)
09:40:41fowlCheck geterror from sdl
09:40:56fowlOr w/e the function that returns the last error
09:41:26Uint2048I'm stupid
09:41:29fowlReturning 0 may be good
09:41:30Uint2048wow
09:41:40Uint2048forgot a dll
09:41:54Uint2048I haven't used SDL for 6 months and I already forgot everything
09:42:28fowlLol
09:42:57Uint2048It works!
09:43:05Uint2048I forgot the libpng dll
09:43:12fowlAwesome
09:43:13Uint2048Thanks a lot!
09:43:25*jubalh quit (Remote host closed the connection)
09:43:28fowlNo prob
09:48:22*jubalh joined #nim
09:57:13*milosn quit (Ping timeout: 256 seconds)
09:57:25*trafcio joined #nim
09:57:47Araqfowl: can you port graphics.nim to use SDL 2?
09:57:56Araqand make it a nimble package?
10:00:29fowlAraq, i dont think its needed with sdl2
10:00:44Araqhrm?
10:00:45*trafcio quit (Client Quit)
10:01:01fowleverything in here can be done with the gfx ttf and image addons
10:01:36Araqbut it's a different API
10:03:10*milosn joined #nim
10:07:29*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:11:51*vvova joined #nim
10:36:22*delian66 quit (Ping timeout: 272 seconds)
10:38:33*delian66 joined #nim
10:40:53vvovaHi guys! I'm trying to figure out how to use Nim to create shared libraries under Linux
10:41:16vvovaBut my simple example crashes when I call library code from different threads
10:41:25*tennix joined #nim
10:41:25vvovaI use system.setupForeignThreadGC() but probably missing something
10:41:48vvovaHere's the main program: http://pastebin.com/gfe1Qd8R , Nim library: http://pastebin.com/X4CwqxWw , and how I build it together: http://pastebin.com/x5532pAz
10:42:22*klayd joined #nim
10:43:08*jubalh quit (Remote host closed the connection)
10:43:11*delian66 quit (*.net *.split)
10:43:11*dddddd quit (*.net *.split)
10:43:11*[CBR]Unspoken quit (*.net *.split)
10:43:12*Quora quit (*.net *.split)
10:43:12*mnemonikk quit (*.net *.split)
10:43:13*Shoozza quit (*.net *.split)
10:43:13*someplace quit (*.net *.split)
10:43:13*huonw quit (*.net *.split)
10:43:33*delian66 joined #nim
10:43:36*dddddd joined #nim
10:43:37*huonw joined #nim
10:43:42*someplace joined #nim
10:43:59*[CBR]Unspoken joined #nim
10:44:05*Shoozza joined #nim
10:44:32*Heartmender joined #nim
10:45:20*Heartmender is now known as Guest6016
10:46:05*tennix quit (Ping timeout: 252 seconds)
10:46:57*jubalh joined #nim
10:47:28*mnemonikk joined #nim
10:47:28*mnemonikk quit (Changing host)
10:47:28*mnemonikk joined #nim
10:49:14*Kingsquee quit (Quit: Konversation terminated!)
11:06:01*mnemonikk quit (Ping timeout: 276 seconds)
11:12:43*Demon_Fox quit (Quit: Leaving)
11:24:35fowlyglukhov: nimx is complex man
11:25:29fowlBut I think it will work nicely once I figure it out
11:39:45*mnemonikk joined #nim
11:39:45*mnemonikk quit (Changing host)
11:39:45*mnemonikk joined #nim
11:39:46yglukhovfowl, the view hierarchy system is alike to MacOS AppKit or iOS UIKit
11:40:01yglukhovyou can see a smaple_controls.nim
11:40:19yglukhovit creates a view and populates it with different controls, that are currently available
11:41:51yglukhovcustom drawing is a bit tricky. context can draw some primitive shapes with fill and stroke colors, but for anything more complex, you should do a composition with GLSL. in future i'll try to make it a bit higher level, so there would be no need to know GLSL
11:42:22yglukhova simple example of composition you can see in the first sample, where a rect is just filled with gradient
11:42:40yglukhovmore complex examples in control implementations
11:43:01*jubalh quit (Quit: Leaving)
11:43:13fowlyglukhov: I'm happy with text and windows/controls for now but in the future more vector graphics like paths would be awesome
11:43:17*jubalh joined #nim
11:45:06yglukhovwell, currently I dont know how to do cubic beziers in GLSL effectively. but you already can combine different shapes (rects, ellipses, circles) in a set-like manner (and, or, subtract) to get complex shapes.
11:48:42fowlyglukhov: I will probably wrap or port this https://github.com/memononen/nanovg
11:50:23*gokr1 left #nim (#nim)
11:50:50*mnemonikk quit (Ping timeout: 275 seconds)
11:53:25*gokr joined #nim
11:58:39Araqfowl: porting seems rather trivial with c2nim
11:59:12yglukhovfowl, I know you wanted to. good luck with that ;) please note however, that my primary goal was to move all shape computations to gpu, and nanovg seems to do a lot of stuff on the cpu
11:59:41yglukhovbtw what do you need beziers for?
11:59:56yglukhovmaybe i'd suggest sonething else instead of them ;)
11:59:58fowlAraq: I started doing it but a major issue is how ints in c are boolean. I change that to != 0 but I'm not sure thats correct
12:00:07Araqyglukhov: oh btw you could also start on the GPU backend if LL is too tedious ;-)
12:00:18Araqfowl: it is.
12:00:20*gokr quit (Read error: Connection reset by peer)
12:01:01*betawaffle left #nim ("Textual IRC Client: www.textualapp.com")
12:01:05yglukhovAraq, no, I will fix that bug in your gist as soon as i find some time.
12:01:41yglukhovbesides, i think that glsl transaltion can be easily implemented in a lib, not compiler
12:01:54yglukhov* relatively easily ;)
12:01:56*betawaffle joined #nim
12:02:12fowlyglukhov: I want to do a game that involves drawing out neural nets, a shader could probably make gross rectangles look like curvy paths though
12:02:27fowlEr lines
12:03:49yglukhovI see. nimx probably will not help as it stands now (
12:03:56*betawaffle left #nim (#nim)
12:04:35yglukhovyou can draw any shape with a shader as long as you can define a distance function for this shape. so if you can, nimx may help ;)
12:04:51fowlyglukhov: I just need enough GUI to make a live system browser
12:05:22*irezvov joined #nim
12:06:00fowlThis will do nicely :)
12:06:20yglukhovok then =)
12:07:51*gokr joined #nim
12:23:11*mnemonikk joined #nim
12:23:20*mnemonikk quit (Changing host)
12:23:20*mnemonikk joined #nim
12:25:57*milosn quit (Quit: Lost terminal)
12:27:16*milosn joined #nim
12:42:50*tennix joined #nim
12:47:07*HoloIRCUser1 joined #nim
12:47:16*tennix quit (Ping timeout: 252 seconds)
12:47:48*HoloIRCUser1 left #nim (#nim)
12:53:12*HoloIRCUser3 joined #nim
12:57:02*HoloIRCUser joined #nim
12:57:02*HoloIRCUser3 quit (Read error: Connection reset by peer)
12:59:20*HoloIRCUser quit (Remote host closed the connection)
13:01:21*yglukhov_ joined #nim
13:02:14*yglukhov__ joined #nim
13:02:14*yglukhov_ quit (Read error: Connection reset by peer)
13:04:03*gyeates joined #nim
13:04:47*yglukhov quit (Ping timeout: 256 seconds)
13:19:29*Jev joined #nim
13:20:19*lyro quit (Read error: No route to host)
13:21:35*yglukhov___ joined #nim
13:21:35*yglukhov__ quit (Read error: Connection reset by peer)
13:25:15*FedeOmoto joined #nim
13:26:39*irezvov quit (Quit: Page closed)
13:35:41*yglukhov____ joined #nim
13:35:41*yglukhov___ quit (Read error: Connection reset by peer)
13:35:53*yglukhov____ quit (Remote host closed the connection)
13:36:26*yglukhov____ joined #nim
13:49:18*bjz joined #nim
13:50:35*boopsiesisaway is now known as boopsies
13:53:43*FedeOmoto quit (Ping timeout: 246 seconds)
13:53:49*saml joined #nim
14:03:26*mnemonikk quit (Ping timeout: 276 seconds)
14:13:34*tennix joined #nim
14:17:48Uint2048Hey, is there a way to remove an element from a seq?
14:18:03*tennix quit (Ping timeout: 264 seconds)
14:18:07Uint2048and have it resize dynamically
14:18:15Araqdel or delete
14:19:43Uint2048Thanks
14:20:20fowldel replaces idx with the last item in the seq
14:20:47Uint2048while delete keeps the order?
14:21:04fowlyes
14:26:25*saml quit (Quit: Leaving)
14:28:31*mnemonikk joined #nim
14:28:51*saml joined #nim
14:29:01*mnemonikk quit (Changing host)
14:29:01*mnemonikk joined #nim
14:43:07jackvis casting the best way to convert an unsigned integer to a signed integer?
14:43:50Araqyou can also use type conversion T(x)
14:44:38jackvAraq, but conversion from, say uint8(255) to int8 is invalid
14:45:22Araqyeah, if you just want to fuck with bits, use cast
14:45:28jackvalright
14:46:44jackvalthough I discovered that 'uint8(int8(-127) and 255)' will work for converting in the other direction
14:46:54jackvnot sure if that's a bug or a feature though
14:47:23Araqfeature
14:47:31jackvsweet
14:47:45jackvthat's safer than casting, correct?
14:48:00Araqa bit
14:48:25jackvheh, I'll take it. I was just wondering if there was some feature that worked in the other direction that I could take advantage of
14:50:52*Guest6016 quit (Changing host)
14:50:52*Guest6016 joined #nim
14:50:52*Guest6016 quit (Changing host)
14:50:52*Guest6016 joined #nim
14:52:39*Guest6016 is now known as Quora
14:55:17*keypusher joined #nim
14:55:41reactormonkAraq, I did - ok, --noMain it is
15:01:26*Arrrr joined #nim
15:01:35*doxavore joined #nim
15:01:56*wan quit (Ping timeout: 256 seconds)
15:02:23*wan joined #nim
15:14:51*mnemonikk quit (Ping timeout: 276 seconds)
15:25:07*ray- is now known as \u
15:25:20*Jev quit (Quit: Leaving)
15:25:37*\u is now known as Guest30651
15:25:52*Guest30651 quit (Changing host)
15:25:52*Guest30651 joined #nim
15:25:58*Guest30651 is now known as \q
15:26:24*BitPuffin|osx joined #nim
15:28:38*jszymanski quit (Quit: computer sleeps...)
15:29:39*ChrisMAN_ joined #nim
15:36:26*yglukhov____ quit (Ping timeout: 246 seconds)
15:38:00*mnemonikk joined #nim
15:38:48*mnemonikk quit (Changing host)
15:38:48*mnemonikk joined #nim
15:43:51*jubalh quit (Quit: Leaving)
15:46:04*mnemonikk quit (Ping timeout: 276 seconds)
15:52:51*mnemonikk joined #nim
15:53:47*mnemonikk quit (Changing host)
15:53:47*mnemonikk joined #nim
16:02:21*tennix joined #nim
16:07:06*tennix quit (Ping timeout: 265 seconds)
16:12:14*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:13:08*federico3 quit (Quit: WeeChat 1.1.1)
16:14:22*federico3 joined #nim
16:16:28*mnemonikk quit (Ping timeout: 276 seconds)
16:18:11*mnemonikk joined #nim
16:19:15boopsiesso let's say i have a strtab, and i want to take all the keys and join then
16:19:19*yglukhov____ joined #nim
16:19:20boopsies(contrived example, buuut..)
16:19:24*mnemonikk quit (Changing host)
16:19:24*mnemonikk joined #nim
16:19:33boopsiesdoing table.keys().join(", ") doesn't work
16:19:42boopsiespresumably because keys is an iterator..
16:19:44boopsieshttp://nim-lang.org/docs/strtabs.html#keys.i,StringTableRef
16:19:50boopsieswhat's the proper way to do this?
16:20:14*yglukhov____ quit (Client Quit)
16:22:17boopsieshmm.. wrapping in toSeq() seems to work
16:22:20boopsiesnevermind!
16:28:51*vendethiel quit (Ping timeout: 250 seconds)
16:32:01*darkf quit (Quit: Leaving)
16:32:04*vendethiel joined #nim
16:32:41*yglukhov____ joined #nim
16:42:29*jszymanski joined #nim
16:50:24*yglukhov____ quit (Quit: Be back later ...)
16:52:49*xcombelle joined #nim
16:53:08*vendethiel quit (Ping timeout: 244 seconds)
16:55:40*mnemonikk quit (Ping timeout: 276 seconds)
16:55:49*yglukhov____ joined #nim
16:56:33*doxavore quit (Quit: I said good day, sir.)
17:03:57*yglukhov____ quit (Quit: Be back later ...)
17:05:01*vendethiel joined #nim
17:05:02*gyeates quit (Ping timeout: 252 seconds)
17:06:32*mnemonikk joined #nim
17:06:36*mnemonikk quit (Changing host)
17:06:36*mnemonikk joined #nim
17:09:13*doxavore joined #nim
17:13:58*vikaton joined #nim
17:29:01*gyeates joined #nim
17:33:09*Kelet joined #nim
17:37:55*silven_ quit (Ping timeout: 256 seconds)
17:39:28*silven joined #nim
17:41:55*Kelet quit (Ping timeout: 246 seconds)
17:48:54*mnemonikk quit (Ping timeout: 275 seconds)
17:51:05*FedeOmoto joined #nim
17:51:13*tennix joined #nim
17:53:05*Matthias247 joined #nim
17:54:16*vendethiel quit (Ping timeout: 255 seconds)
17:55:18*vendethiel joined #nim
17:56:13*tennix quit (Ping timeout: 276 seconds)
18:00:38*mnemonikk joined #nim
18:01:33*mnemonikk quit (Changing host)
18:01:33*mnemonikk joined #nim
18:09:49*gmpreussner|work joined #nim
18:09:51*gyeates quit (Ping timeout: 248 seconds)
18:11:02*askatasuna joined #nim
18:18:55*vendethiel quit (Ping timeout: 248 seconds)
18:24:59*vendethiel joined #nim
18:25:11*askatasuna quit (Read error: Connection reset by peer)
18:25:37*askatasuna joined #nim
18:26:52*shodan45 quit (Quit: Konversation terminated!)
18:38:31*gyeates joined #nim
18:40:18Arrrrit is possible to push the public ('*') modifier?
18:41:22*Jev joined #nim
18:41:22*Jev quit (Changing host)
18:41:22*Jev joined #nim
18:42:15AraqArrrr: nope
18:42:22*zaquest quit (Ping timeout: 276 seconds)
18:43:04Arrrrwell, thanks
18:44:47*zaquest joined #nim
18:46:33*yglukhov____ joined #nim
18:47:50*vendethiel quit (Ping timeout: 272 seconds)
18:48:54*vendethiel joined #nim
18:48:55*filcuc joined #nim
18:53:48*mnemonikk quit (Ping timeout: 276 seconds)
18:55:49*mnemonikk joined #nim
18:55:49*mnemonikk quit (Changing host)
18:55:49*mnemonikk joined #nim
19:02:00Arrrr"nim\lib\pure\endians.nim(30, 11) Error: VM is not allowed to 'cast'" is this ok? https://github.com/nim-lang/Nim/blob/master/lib/pure/endians.nim#L30
19:05:46*Jev quit (Quit: Leaving)
19:12:44*keypusher quit (Quit: Konversation terminated!)
19:15:00fowlArrrr: it means you can't use it at compile time
19:16:53*rkj-b joined #nim
19:17:28ArrrrYou are right fowl, it is used for a const def
19:17:51*zahary quit (Ping timeout: 250 seconds)
19:24:13*xcombelle quit (Quit: Leaving)
19:31:21*rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253])
19:33:29*Trustable quit (Ping timeout: 265 seconds)
19:34:21*Trustable joined #nim
19:39:48*tennix joined #nim
19:43:25federico3any plan for the next Nim release?
19:44:42*tennix quit (Ping timeout: 256 seconds)
19:45:25ArrrrI's going to be renamed to 'N'
19:45:39Araqfederico3: not really. I'm busy until the end of July.
19:45:44AraqArrrr: lol.
19:46:31Araqperhaps we can release 0.11.4 with some fixes and that cleaned up the Nim library and the 32 vs 64bit issues on windows
19:47:03federico3yes, please!
19:48:22Araqalso I think I can merge my "simple and safe and ultimately insane" memory sharing for threading prototype
19:50:05FedeOmotothat'd be really cool! :)
19:52:15*gyeates quit (Ping timeout: 248 seconds)
19:52:42*gyeates joined #nim
19:55:31FedeOmotoisn't this supposed to work?:
19:55:44FedeOmototype Type = ref object of RootObj SubType = ref object of Type proc newSubType: SubType = new(result) proc testSeq(s: seq[Type]) = discard testSeq(@[newSubType()])
19:56:08FedeOmotoa.nim(11, 8) Error: type mismatch: got (seq[SubType]) but expected one of: a.testSeq(s: seq[Type])
19:56:42FedeOmotolet me try to indent that...
19:56:51Araqsubtyping doesn't compose.
19:56:51FedeOmototype
19:57:00FedeOmoto Type = ref object of RootObj
19:57:16fowlFedeOmoto, hey
19:57:25FedeOmotohey fowl!
19:57:44AraqA <: B does not imply seq A <: seq B
19:57:47fowlI saw you are working on a smalltalk, I am making one too :)
19:57:57FedeOmotoLOL!
19:57:58FedeOmotohahaha
19:58:01Araqnot does it imply seq B <: seq A
19:58:22Araq*nor
19:58:37FedeOmotoyeah, I think I finally came to the right language to implement a Smalltalk ;)
19:58:38AraqI dunno why that's not common knowledge by now
19:58:45FedeOmotoI see, thx Araq!
19:59:21fowlFedeOmoto, i have a simple irc bot atm, working on gui next https://github.com/fowlmouth/ducking-robot/blob/master/ircbot.nim#L220
19:59:45FedeOmotowow! that's really cool!
19:59:50fowlit was simple because it just uses nims irc module
20:00:53FedeOmotoWhat do you plan to use for the GUI part? I was planning on using IUP, I really like native interfaces...
20:01:18fowlnot sure yet
20:01:40fowlmaybe nimx
20:02:58federico3what is the right tool to use for cmdline parsing?
20:03:20federico3parseopt? parseopt2? parseCmdLine?
20:03:21FedeOmotoFYI, besides LLVM, I recently created a wrapper around GMP, maybe it can be of use for your Smalltalk ;)
20:05:07fowlcool
20:05:30*BitPuffin joined #nim
20:09:43*Uint2048 quit (Quit: Page closed)
20:11:40AraqFedeOmoto: there are a couple of these around already. did you check nimble?
20:12:30Araqfederico3: parseopt, IMO
20:12:54FedeOmotoAraq: bignum libs?
20:13:04AraqFedeOmoto: GMP wrappers
20:13:14Araqand bignum libs too of course
20:14:03*flaviu joined #nim
20:14:26FedeOmotoAraq: yeah, I'm aware of def's one, and the other one I know of is jovial's one. In fact, mine is a wrapper around jovial's GMP bindings
20:14:37Araqok good
20:14:50*key_ joined #nim
20:15:31*Arrrr quit (Quit: WeeChat 1.2)
20:16:20*Trustable quit (Remote host closed the connection)
20:18:11*vikaton quit (Quit: Connection closed for inactivity)
20:22:42*jszymanski quit (Quit: computer sleeps...)
20:26:38reactormonkpigmej, if you like https://github.com/nim-lang/nim-mode/pull/32, feel free to merge it
20:35:32pigmejreactormonk: I'm not so sure about that lexical bind, but that would explain why we needed some defered hacks :)
20:35:42reactormonkpigmej, yup
20:35:53reactormonkgotta need lexical bind for lambdas
20:36:13pigmejyeah
20:36:23pigmejbut then no lexical-let needed ;-)
20:36:25pigmejso probably it will work as it is
20:38:08reactormonktest it if possible
20:38:24pigmejyaeh sure
20:39:33reactormonkalso, if you're first, you can choose the lib https://github.com/nim-lang/nim-mode/issues/33
20:42:34*gyeates quit (Ping timeout: 255 seconds)
20:48:01pigmejreactormonk: I renamed call-signatures to thing-at-point
20:48:26reactormonkpigmej, if that's the official name :-)
20:48:40pigmejwell, because we can do more than call signatures :P
20:48:52pigmejit wil work for macros, variables loops etc
20:49:34reactormonkawesome
20:49:38pigmejand we will need temporary buffer to apply syntax rules / coloring on text, and then dispaly it as it is in minibuffer ;)
20:49:47pigmejdisplay*
20:51:18pigmejbecause my current method...https://github.com/pigmej/nim-mode/blob/thing-at-point/nim-thing-at-point.el#L40 is bad, and we would die with it:P
20:53:10reactormonkSure, why not
20:53:14reactormonksounds like the emacs way to do it
20:53:53pigmejorg-mode does it with that temp buffer
21:02:35*yglukhov____ quit (Quit: Be back later ...)
21:05:51*Jesin joined #nim
21:05:54*mnemonikk quit (Ping timeout: 277 seconds)
21:06:31pigmejreactormonk: that pull/32 works for me
21:07:11reactormonkpigmej, then merge it
21:08:05pigmejyeah I just did it:)
21:08:24reactormonkperfect
21:08:50*mnemonikk joined #nim
21:08:51*mnemonikk quit (Changing host)
21:08:51*mnemonikk joined #nim
21:15:45*key_ quit (Quit: Konversation terminated!)
21:21:03*dalarmmst quit (Ping timeout: 264 seconds)
21:23:05FedeOmotosee you guys
21:23:15*FedeOmoto quit (Quit: Page closed)
21:24:53*filcuc quit (Quit: Konversation terminated!)
21:28:33*tennix joined #nim
21:34:28*flaviu quit (Ping timeout: 276 seconds)
21:36:20*tennix quit (Ping timeout: 256 seconds)
21:36:38*flaviu joined #nim
21:38:32*dalarmmst joined #nim
21:40:08*apense joined #nim
21:44:07*gsingh93_ joined #nim
21:50:35wu-leereactormonk, did you get anywhere with arduino?
21:50:40*doxavore quit (Read error: Connection reset by peer)
21:50:51reactormonkwu-lee, nope, I'll take another look in ~2-3h
21:51:17reactormonkmaybe with --noMain and {.exportc.} on loop and setup procs it might work
21:51:17wu-leeok, no especial hurry, just curious
21:52:51*mahlon quit (Read error: Connection reset by peer)
21:53:24*Xe quit (Ping timeout: 272 seconds)
21:55:45*Xe joined #nim
21:56:30*mahlon joined #nim
22:06:51*gyeates joined #nim
22:09:55*MatrixBridge joined #nim
22:11:09*mnemonikk quit (Ping timeout: 276 seconds)
22:11:25*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:15:01*profan quit (Ping timeout: 244 seconds)
22:17:57*mnemonikk joined #nim
22:19:02*mnemonikk quit (Changing host)
22:19:02*mnemonikk joined #nim
22:21:50*askatasuna quit (Ping timeout: 252 seconds)
22:22:28*brson joined #nim
22:22:28*brson quit (Client Quit)
22:22:56*brson joined #nim
22:26:17*key_ joined #nim
22:27:19*Tm_ joined #nim
22:31:02*mnemonikk quit (Ping timeout: 276 seconds)
22:31:52*mnemonikk joined #nim
22:31:52*mnemonikk quit (Changing host)
22:31:52*mnemonikk joined #nim
22:32:35*heinrich5991 quit (Ping timeout: 256 seconds)
22:33:28*Tm_ quit (Ping timeout: 246 seconds)
22:35:44reactormonkNot sure why people insist on squashing commits :-/
22:37:00*heinrich5991 joined #nim
22:47:03*tennix joined #nim
22:51:29*tennix quit (Ping timeout: 250 seconds)
22:55:04*key_ quit (Quit: Konversation terminated!)
23:00:32*vendethiel quit (Ping timeout: 272 seconds)
23:04:42wu-leereactormonk, if main() is moved to top of blink.c nimcache file, it can upload and run successfully
23:05:00reactormonkwu-lee, so the entry point is the problem
23:05:16wu-leecurrently hunting for magic incantations to get nim compiler to do that, without dead code elim removing call to NimMain
23:05:54reactormonkjust use exportC
23:06:01reactormonkthen deadcodeelim shouldn't touch it
23:06:55reactormonkmaybe via noMain and hack it manually?
23:07:02*Matthias247 quit (Read error: Connection reset by peer)
23:07:50wu-leeI am using exportc pragma on an explicit main(), which calls discard NimMain, which is {.importc,cdecl.}
23:08:04wu-leehowever, no call to NimMain appears in generated code
23:08:28reactormonkwhy discard?
23:08:32wu-lee(also with --noMain as suggested)
23:08:47reactormonkyou marking the main with exportc?
23:08:49wu-leebecause NimMain returns no value, and the compiler seems to insist
23:10:02*Demos joined #nim
23:10:13*boopsies is now known as boopsiesisaway
23:10:50wu-leehttps://gist.github.com/wu-lee/902446e8dad3f905f317
23:11:33*vendethiel joined #nim
23:11:33wu-leeresulting main() function simply returns 0
23:13:17reactormonkhm
23:13:25*Demon_Fox joined #nim
23:13:29reactormonkmaybe recursion problem?
23:14:09wu-leedunno, I see no obvious errors or evidence of recursion
23:14:16DemosStatus on the module init name mangleing bug?
23:14:33XeDemos: ?
23:14:54Demosyou can get linker errors due to the way we generate our module initialization functions
23:15:36Xeis there a github ticket for it?
23:16:09reactormonkXe, I don't think so
23:17:34reactormonkDemos, was that the bug from twitter that no one put into the issue tracker?
23:17:45Demosyeah
23:17:57DemosI guess I should make an issue huh
23:18:07reactormonkDemos, or forward how to do it ;-)
23:18:24Araqand create a PR to fix it, it's trivial
23:18:45Araqjust append 000 to the Init string literal in the C code generator
23:19:12Demosare numbers not valid trailing characters for module names or something?
23:19:33reactormonkDemos, nah, just no one ever bothered
23:19:47Demoslike won't that just change the names you need to use to trigger the bug
23:20:17DemosI gotta install the whole dev stack to change it. I'll get started tho
23:20:32reactormonkDemos, yeah. But who calls their function FooInit0000
23:20:58Demosugh. We should use invalid/reserved nim names
23:21:08reactormonkthere are no reserved names
23:21:14reactormonkit's still gotta be a C function name
23:21:42DemosI suppose
23:23:07AraqDemos: yeah all you can do is come up with names that are unlikely to produce conflicts
23:27:04*Uint2048 joined #nim
23:30:57Uint2048Hi, I want a variable in a module be accessible from other modules but not modifiable directly
23:31:30Uint2048so I have a variable FRenderer: RendererPtr, and a "getter" proc renderer*() that returns it
23:32:38reactormonkUint2048, imo don't use getter procs
23:32:56reactormonkand not modifiable is via not specifying "var" - not sure about ref types though
23:32:57Araqthat sounds really bad. the pointer allows write access anyway
23:33:53Uint2048but
23:35:11*vendethiel quit (Ping timeout: 248 seconds)
23:35:51wu-leereactormonk: no more progress making main() call NimMain(), calling it a day.
23:38:14reactormonkwu-lee, ah fuck
23:41:41federico3parseopt? parseopt2? parseCmdLine?
23:46:30Uint2048Ah well, I fixed the problem (that I didn't explain)
23:46:40Uint2048I was using "renderer" without parentheses
23:46:52*egrep left #nim ("I'm in enough language channels... so /part them all! :P")
23:47:10*saml_ joined #nim
23:51:10Uint2048reactormonk, is this bad? http://pastebin.com/STMpmqbQ
23:59:10*vendethiel joined #nim