00:00:44 | reactormonk | wu-lee, proc delay(ms: int) {.importc: "delay".} |
00:01:08 | reactormonk | actually proc delay(ms: int) {.importc.} |
00:01:12 | wu-lee | aha, useful thanks. |
00:01:53 | reactormonk | does digitalWrite work or is that arduino-specific? |
00:01:55 | reactormonk | time to find out |
00:02:11 | wu-lee | dunno, I avoided anything like that |
00:04:13 | wu-lee | of course: the raw C may have the wrong port offsets for the uno |
00:05:07 | wu-lee | I 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:19 | reactormonk | hum. it blinks three times. |
00:07:27 | reactormonk | but otherwise it works. |
00:07:49 | wu-lee | "three is the magic number" |
00:08:07 | reactormonk | blinks anyway |
00:08:07 | wu-lee | better than no blinks. |
00:08:10 | reactormonk | ... it's not the code. |
00:09:02 | wu-lee | this is nim blinking, or C? |
00:10:28 | wu-lee | gone 1am here in Edinburgh, I feel a strong need to sleeeep |
00:11:21 | wu-lee | reactormonk, you've been extremely helpful, thanks, I will need to check back later. |
00:11:30 | reactormonk | wu-lee, it just blinks whenever I upload stuff |
00:11:32 | reactormonk | will mess some more |
00:11:54 | wu-lee | oh, I see, that may just be the upload process. |
00:12:36 | reactormonk | yup |
00:12:36 | wu-lee | the the LED which should blink is a different one |
00:12:43 | reactormonk | nah, I changed it |
00:12:55 | reactormonk | took an example from the book |
00:13:03 | reactormonk | https://gist.github.com/1866f41512899bcfa93c |
00:13:17 | * | BitPuffin|osx joined #nim |
00:13:29 | wu-lee | ok, on my board, the upload flashes TX and RX LEDs, and the L LED once. |
00:15:02 | wu-lee | I forget which pin the built in LED is on, but that's the one my code flashes |
00:15:34 | wu-lee | when it works. |
00:15:37 | reactormonk | ah, wrong -p |
00:15:46 | reactormonk | here it's 13 |
00:16:39 | wu-lee | same here by the looks of the example |
00:17:50 | reactormonk | can confirm https://balau82.wordpress.com/2011/03/29/programming-arduino-uno-in-pure-c/ works |
00:18:02 | wu-lee | but I've stolen code from all over, and hacked to about. |
00:18:32 | wu-lee | yes, that's one of my sources. |
00:21:11 | * | wu-lee creeps off to bed |
00:21:14 | wu-lee | laterz |
00:33:24 | reactormonk | Araq, any way to mark a proc not to be deadcodeelimd? |
00:33:38 | reactormonk | the entry point is defined by another program |
00:34:13 | reactormonk | hm, that might pose problems to nim init |
00:35:08 | Varriount | reactormonk: Can't you use the push and pop pragmas to turn it off? |
00:35:19 | reactormonk | Varriount, nah, doesn't work |
00:36:36 | Varriount | reactormonk: 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:50 | reactormonk | that might be an idea |
00:37:28 | reactormonk | ehh whut |
00:37:38 | reactormonk | successful but it doesn't produce a binary |
00:37:48 | Varriount | ?!?! |
00:38:42 | * | dddddd quit (Ping timeout: 252 seconds) |
00:40:11 | reactormonk | Varriount, https://github.com/reactormonk/nim-test/tree/arduino |
00:40:21 | reactormonk | nim c -d:release --cpu:avr --os:standalone --deadCodeElim:on --gc:none --parallelBuild:1 -mmcu=atmega328 blink.nim |
00:40:31 | reactormonk | you're gonna need avr-gcc and avr-glibc |
00:40:59 | Varriount | reactormonk: Are those available on Windows? |
00:41:05 | reactormonk | no idea |
00:41:10 | reactormonk | I think so |
00:41:24 | reactormonk | Varriount, http://www.arduino.cc/en/Main/Software |
00:41:28 | Varriount | Although, I guess it's about time I set up a good Linux VM. |
00:41:58 | reactormonk | Varriount, https://wiki.archlinux.org/index.php/VMware/Installing_Arch_as_a_guest |
00:42:06 | Varriount | reactormonk: Yep. |
00:45:10 | Varriount | reactormonk: What does the -mmcu option do? |
00:47:11 | reactormonk | Varriount, target arch or something |
00:58:52 | * | gyeates quit (Ping timeout: 252 seconds) |
01:01:16 | reactormonk | Varriount, 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:27 | Varriount | reactormonk: Sorry, can't seem to set up my environment right. I'll try a bit more tomorrow |
03:05:00 | dtscode | thats 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:28 | rgv151 | hi guys |
04:49:33 | avsej | Araq, is there reason not to include all docs into distribution? https://github.com/nim-lang/Nim/pull/2969/files |
04:49:55 | rgv151 | do Nim have magic consts like __FILE__, __LINE__, __METHOD__ in PHP? |
04:50:10 | Quora | rgv151: I wouldn't think so |
04:50:45 | fowl | isMainModule, instantiationInfo() |
04:51:06 | fowl | there are some magic constants in system.nim |
04:51:50 | rgv151 | thx fowl |
04:53:04 | * | gyeates quit (Ping timeout: 255 seconds) |
04:53:40 | fowl | No direct equivalents to the ones you listed |
04:58:01 | rgv151 | it'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:26 | Araq | avsej: cause they can be built and I like to keep the downloads smaller |
07:27:48 | Araq | reactormonk: use .exportc to tell the compiler that it must not optimize it away |
07:28:13 | Araq | also different entry points are not a problem at all, use --noMain for it |
07:30:14 | avsej | Araq, 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:15 | Uint2048 | Hi, I'm learning Nim and trying to use SDL2 |
09:29:42 | Uint2048 | but when I try to load a png or jpg texture, it returns a nil ptr |
09:29:47 | Uint2048 | I can only use bmp |
09:29:59 | Uint2048 | Here's the code: http://pastebin.com/Q6vUDKR3 |
09:30:27 | Uint2048 | pngTexture, jpgTexture, pngSurface and newPngTexture are nil |
09:30:34 | fowl | Uint2048: thats SDL it only supports BMPs, use IMG_load in sdl2/image it requires sdl2_image |
09:31:16 | Uint2048 | I did |
09:31:50 | Uint2048 | in my code I use "loadTexture()", which is IMG_LoadTexture |
09:32:51 | Uint2048 | and load() (IMG_Load()), which should return a surfaceptr, but it only works with BMP too |
09:33:11 | Uint2048 | what am I doing wrong |
09:33:17 | fowl | Let me look |
09:33:21 | fowl | I'm on my phone |
09:33:50 | Uint2048 | Thanks |
09:33:52 | fowl | Do you call image.init() |
09:34:14 | Uint2048 | .... |
09:34:15 | Uint2048 | no |
09:34:31 | Uint2048 | Let me try... |
09:36:22 | Uint2048 | in image.nim, there's a comment |
09:36:24 | Uint2048 | "This is completely different than SDL_Init() -_-" |
09:36:36 | Uint2048 | apparently 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:11 | fowl | Did it work? |
09:39:18 | fowl | iirc loadTexture wants a power of two sized image, load() and createtexture() should work |
09:40:02 | Uint2048 | no, image.load() returns an error |
09:40:11 | Uint2048 | it returns 0 |
09:40:27 | Uint2048 | image.init() |
09:40:31 | Uint2048 | I mean |
09:40:37 | * | tennix quit (Remote host closed the connection) |
09:40:41 | fowl | Check geterror from sdl |
09:40:56 | fowl | Or w/e the function that returns the last error |
09:41:26 | Uint2048 | I'm stupid |
09:41:29 | fowl | Returning 0 may be good |
09:41:30 | Uint2048 | wow |
09:41:40 | Uint2048 | forgot a dll |
09:41:54 | Uint2048 | I haven't used SDL for 6 months and I already forgot everything |
09:42:28 | fowl | Lol |
09:42:57 | Uint2048 | It works! |
09:43:05 | Uint2048 | I forgot the libpng dll |
09:43:12 | fowl | Awesome |
09:43:13 | Uint2048 | Thanks a lot! |
09:43:25 | * | jubalh quit (Remote host closed the connection) |
09:43:28 | fowl | No prob |
09:48:22 | * | jubalh joined #nim |
09:57:13 | * | milosn quit (Ping timeout: 256 seconds) |
09:57:25 | * | trafcio joined #nim |
09:57:47 | Araq | fowl: can you port graphics.nim to use SDL 2? |
09:57:56 | Araq | and make it a nimble package? |
10:00:29 | fowl | Araq, i dont think its needed with sdl2 |
10:00:44 | Araq | hrm? |
10:00:45 | * | trafcio quit (Client Quit) |
10:01:01 | fowl | everything in here can be done with the gfx ttf and image addons |
10:01:36 | Araq | but 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:53 | vvova | Hi guys! I'm trying to figure out how to use Nim to create shared libraries under Linux |
10:41:16 | vvova | But my simple example crashes when I call library code from different threads |
10:41:25 | * | tennix joined #nim |
10:41:25 | vvova | I use system.setupForeignThreadGC() but probably missing something |
10:41:48 | vvova | Here'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:35 | fowl | yglukhov: nimx is complex man |
11:25:29 | fowl | But 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:46 | yglukhov | fowl, the view hierarchy system is alike to MacOS AppKit or iOS UIKit |
11:40:01 | yglukhov | you can see a smaple_controls.nim |
11:40:19 | yglukhov | it creates a view and populates it with different controls, that are currently available |
11:41:51 | yglukhov | custom 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:22 | yglukhov | a simple example of composition you can see in the first sample, where a rect is just filled with gradient |
11:42:40 | yglukhov | more complex examples in control implementations |
11:43:01 | * | jubalh quit (Quit: Leaving) |
11:43:13 | fowl | yglukhov: 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:06 | yglukhov | well, 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:42 | fowl | yglukhov: 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:39 | Araq | fowl: porting seems rather trivial with c2nim |
11:59:12 | yglukhov | fowl, 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:41 | yglukhov | btw what do you need beziers for? |
11:59:56 | yglukhov | maybe i'd suggest sonething else instead of them ;) |
11:59:58 | fowl | Araq: 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:07 | Araq | yglukhov: oh btw you could also start on the GPU backend if LL is too tedious ;-) |
12:00:18 | Araq | fowl: 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:05 | yglukhov | Araq, no, I will fix that bug in your gist as soon as i find some time. |
12:01:41 | yglukhov | besides, i think that glsl transaltion can be easily implemented in a lib, not compiler |
12:01:54 | yglukhov | * relatively easily ;) |
12:01:56 | * | betawaffle joined #nim |
12:02:12 | fowl | yglukhov: 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:27 | fowl | Er lines |
12:03:49 | yglukhov | I see. nimx probably will not help as it stands now ( |
12:03:56 | * | betawaffle left #nim (#nim) |
12:04:35 | yglukhov | you 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:51 | fowl | yglukhov: I just need enough GUI to make a live system browser |
12:05:22 | * | irezvov joined #nim |
12:06:00 | fowl | This will do nicely :) |
12:06:20 | yglukhov | ok 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:48 | Uint2048 | Hey, is there a way to remove an element from a seq? |
14:18:03 | * | tennix quit (Ping timeout: 264 seconds) |
14:18:07 | Uint2048 | and have it resize dynamically |
14:18:15 | Araq | del or delete |
14:19:43 | Uint2048 | Thanks |
14:20:20 | fowl | del replaces idx with the last item in the seq |
14:20:47 | Uint2048 | while delete keeps the order? |
14:21:04 | fowl | yes |
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:07 | jackv | is casting the best way to convert an unsigned integer to a signed integer? |
14:43:50 | Araq | you can also use type conversion T(x) |
14:44:38 | jackv | Araq, but conversion from, say uint8(255) to int8 is invalid |
14:45:22 | Araq | yeah, if you just want to fuck with bits, use cast |
14:45:28 | jackv | alright |
14:46:44 | jackv | although I discovered that 'uint8(int8(-127) and 255)' will work for converting in the other direction |
14:46:54 | jackv | not sure if that's a bug or a feature though |
14:47:23 | Araq | feature |
14:47:31 | jackv | sweet |
14:47:45 | jackv | that's safer than casting, correct? |
14:48:00 | Araq | a bit |
14:48:25 | jackv | heh, 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:41 | reactormonk | Araq, 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:15 | boopsies | so 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:20 | boopsies | (contrived example, buuut..) |
16:19:24 | * | mnemonikk quit (Changing host) |
16:19:24 | * | mnemonikk joined #nim |
16:19:33 | boopsies | doing table.keys().join(", ") doesn't work |
16:19:42 | boopsies | presumably because keys is an iterator.. |
16:19:44 | boopsies | http://nim-lang.org/docs/strtabs.html#keys.i,StringTableRef |
16:19:50 | boopsies | what's the proper way to do this? |
16:20:14 | * | yglukhov____ quit (Client Quit) |
16:22:17 | boopsies | hmm.. wrapping in toSeq() seems to work |
16:22:20 | boopsies | nevermind! |
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:18 | Arrrr | it 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:15 | Araq | Arrrr: nope |
18:42:22 | * | zaquest quit (Ping timeout: 276 seconds) |
18:43:04 | Arrrr | well, 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:00 | Arrrr | "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:00 | fowl | Arrrr: it means you can't use it at compile time |
19:16:53 | * | rkj-b joined #nim |
19:17:28 | Arrrr | You 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:25 | federico3 | any plan for the next Nim release? |
19:44:42 | * | tennix quit (Ping timeout: 256 seconds) |
19:45:25 | Arrrr | I's going to be renamed to 'N' |
19:45:39 | Araq | federico3: not really. I'm busy until the end of July. |
19:45:44 | Araq | Arrrr: lol. |
19:46:31 | Araq | perhaps 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:03 | federico3 | yes, please! |
19:48:22 | Araq | also I think I can merge my "simple and safe and ultimately insane" memory sharing for threading prototype |
19:50:05 | FedeOmoto | that'd be really cool! :) |
19:52:15 | * | gyeates quit (Ping timeout: 248 seconds) |
19:52:42 | * | gyeates joined #nim |
19:55:31 | FedeOmoto | isn't this supposed to work?: |
19:55:44 | FedeOmoto | type 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:08 | FedeOmoto | a.nim(11, 8) Error: type mismatch: got (seq[SubType]) but expected one of: a.testSeq(s: seq[Type]) |
19:56:42 | FedeOmoto | let me try to indent that... |
19:56:51 | Araq | subtyping doesn't compose. |
19:56:51 | FedeOmoto | type |
19:57:00 | FedeOmoto | Type = ref object of RootObj |
19:57:16 | fowl | FedeOmoto, hey |
19:57:25 | FedeOmoto | hey fowl! |
19:57:44 | Araq | A <: B does not imply seq A <: seq B |
19:57:47 | fowl | I saw you are working on a smalltalk, I am making one too :) |
19:57:57 | FedeOmoto | LOL! |
19:57:58 | FedeOmoto | hahaha |
19:58:01 | Araq | not does it imply seq B <: seq A |
19:58:22 | Araq | *nor |
19:58:37 | FedeOmoto | yeah, I think I finally came to the right language to implement a Smalltalk ;) |
19:58:38 | Araq | I dunno why that's not common knowledge by now |
19:58:45 | FedeOmoto | I see, thx Araq! |
19:59:21 | fowl | FedeOmoto, i have a simple irc bot atm, working on gui next https://github.com/fowlmouth/ducking-robot/blob/master/ircbot.nim#L220 |
19:59:45 | FedeOmoto | wow! that's really cool! |
19:59:50 | fowl | it was simple because it just uses nims irc module |
20:00:53 | FedeOmoto | What do you plan to use for the GUI part? I was planning on using IUP, I really like native interfaces... |
20:01:18 | fowl | not sure yet |
20:01:40 | fowl | maybe nimx |
20:02:58 | federico3 | what is the right tool to use for cmdline parsing? |
20:03:20 | federico3 | parseopt? parseopt2? parseCmdLine? |
20:03:21 | FedeOmoto | FYI, besides LLVM, I recently created a wrapper around GMP, maybe it can be of use for your Smalltalk ;) |
20:05:07 | fowl | cool |
20:05:30 | * | BitPuffin joined #nim |
20:09:43 | * | Uint2048 quit (Quit: Page closed) |
20:11:40 | Araq | FedeOmoto: there are a couple of these around already. did you check nimble? |
20:12:30 | Araq | federico3: parseopt, IMO |
20:12:54 | FedeOmoto | Araq: bignum libs? |
20:13:04 | Araq | FedeOmoto: GMP wrappers |
20:13:14 | Araq | and bignum libs too of course |
20:14:03 | * | flaviu joined #nim |
20:14:26 | FedeOmoto | Araq: 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:37 | Araq | ok 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:38 | reactormonk | pigmej, if you like https://github.com/nim-lang/nim-mode/pull/32, feel free to merge it |
20:35:32 | pigmej | reactormonk: I'm not so sure about that lexical bind, but that would explain why we needed some defered hacks :) |
20:35:42 | reactormonk | pigmej, yup |
20:35:53 | reactormonk | gotta need lexical bind for lambdas |
20:36:13 | pigmej | yeah |
20:36:23 | pigmej | but then no lexical-let needed ;-) |
20:36:25 | pigmej | so probably it will work as it is |
20:38:08 | reactormonk | test it if possible |
20:38:24 | pigmej | yaeh sure |
20:39:33 | reactormonk | also, 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:01 | pigmej | reactormonk: I renamed call-signatures to thing-at-point |
20:48:26 | reactormonk | pigmej, if that's the official name :-) |
20:48:40 | pigmej | well, because we can do more than call signatures :P |
20:48:52 | pigmej | it wil work for macros, variables loops etc |
20:49:34 | reactormonk | awesome |
20:49:38 | pigmej | and we will need temporary buffer to apply syntax rules / coloring on text, and then dispaly it as it is in minibuffer ;) |
20:49:47 | pigmej | display* |
20:51:18 | pigmej | because 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:10 | reactormonk | Sure, why not |
20:53:14 | reactormonk | sounds like the emacs way to do it |
20:53:53 | pigmej | org-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:31 | pigmej | reactormonk: that pull/32 works for me |
21:07:11 | reactormonk | pigmej, then merge it |
21:08:05 | pigmej | yeah I just did it:) |
21:08:24 | reactormonk | perfect |
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:05 | FedeOmoto | see 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:35 | wu-lee | reactormonk, did you get anywhere with arduino? |
21:50:40 | * | doxavore quit (Read error: Connection reset by peer) |
21:50:51 | reactormonk | wu-lee, nope, I'll take another look in ~2-3h |
21:51:17 | reactormonk | maybe with --noMain and {.exportc.} on loop and setup procs it might work |
21:51:17 | wu-lee | ok, 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:44 | reactormonk | Not 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:42 | wu-lee | reactormonk, if main() is moved to top of blink.c nimcache file, it can upload and run successfully |
23:05:00 | reactormonk | wu-lee, so the entry point is the problem |
23:05:16 | wu-lee | currently hunting for magic incantations to get nim compiler to do that, without dead code elim removing call to NimMain |
23:05:54 | reactormonk | just use exportC |
23:06:01 | reactormonk | then deadcodeelim shouldn't touch it |
23:06:55 | reactormonk | maybe via noMain and hack it manually? |
23:07:02 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:07:50 | wu-lee | I am using exportc pragma on an explicit main(), which calls discard NimMain, which is {.importc,cdecl.} |
23:08:04 | wu-lee | however, no call to NimMain appears in generated code |
23:08:28 | reactormonk | why discard? |
23:08:32 | wu-lee | (also with --noMain as suggested) |
23:08:47 | reactormonk | you marking the main with exportc? |
23:08:49 | wu-lee | because 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:50 | wu-lee | https://gist.github.com/wu-lee/902446e8dad3f905f317 |
23:11:33 | * | vendethiel joined #nim |
23:11:33 | wu-lee | resulting main() function simply returns 0 |
23:13:17 | reactormonk | hm |
23:13:25 | * | Demon_Fox joined #nim |
23:13:29 | reactormonk | maybe recursion problem? |
23:14:09 | wu-lee | dunno, I see no obvious errors or evidence of recursion |
23:14:16 | Demos | Status on the module init name mangleing bug? |
23:14:33 | Xe | Demos: ? |
23:14:54 | Demos | you can get linker errors due to the way we generate our module initialization functions |
23:15:36 | Xe | is there a github ticket for it? |
23:16:09 | reactormonk | Xe, I don't think so |
23:17:34 | reactormonk | Demos, was that the bug from twitter that no one put into the issue tracker? |
23:17:45 | Demos | yeah |
23:17:57 | Demos | I guess I should make an issue huh |
23:18:07 | reactormonk | Demos, or forward how to do it ;-) |
23:18:24 | Araq | and create a PR to fix it, it's trivial |
23:18:45 | Araq | just append 000 to the Init string literal in the C code generator |
23:19:12 | Demos | are numbers not valid trailing characters for module names or something? |
23:19:33 | reactormonk | Demos, nah, just no one ever bothered |
23:19:47 | Demos | like won't that just change the names you need to use to trigger the bug |
23:20:17 | Demos | I gotta install the whole dev stack to change it. I'll get started tho |
23:20:32 | reactormonk | Demos, yeah. But who calls their function FooInit0000 |
23:20:58 | Demos | ugh. We should use invalid/reserved nim names |
23:21:08 | reactormonk | there are no reserved names |
23:21:14 | reactormonk | it's still gotta be a C function name |
23:21:42 | Demos | I suppose |
23:23:07 | Araq | Demos: yeah all you can do is come up with names that are unlikely to produce conflicts |
23:27:04 | * | Uint2048 joined #nim |
23:30:57 | Uint2048 | Hi, I want a variable in a module be accessible from other modules but not modifiable directly |
23:31:30 | Uint2048 | so I have a variable FRenderer: RendererPtr, and a "getter" proc renderer*() that returns it |
23:32:38 | reactormonk | Uint2048, imo don't use getter procs |
23:32:56 | reactormonk | and not modifiable is via not specifying "var" - not sure about ref types though |
23:32:57 | Araq | that sounds really bad. the pointer allows write access anyway |
23:33:53 | Uint2048 | but |
23:35:11 | * | vendethiel quit (Ping timeout: 248 seconds) |
23:35:51 | wu-lee | reactormonk: no more progress making main() call NimMain(), calling it a day. |
23:38:14 | reactormonk | wu-lee, ah fuck |
23:41:41 | federico3 | parseopt? parseopt2? parseCmdLine? |
23:46:30 | Uint2048 | Ah well, I fixed the problem (that I didn't explain) |
23:46:40 | Uint2048 | I 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:10 | Uint2048 | reactormonk, is this bad? http://pastebin.com/STMpmqbQ |
23:59:10 | * | vendethiel joined #nim |