00:00:01 | toadest | It compiles on Linux |
00:00:03 | ozra | toadest: Hey, I dunno windows :-/ sorry man |
00:00:03 | _44535463686f646 | ... |
00:00:08 | toadest | Ok |
00:00:23 | _44535463686f646 | i use Make and gcc the same on linux and windows |
00:00:25 | toadest | Whats linux speciufic are the scripts, full version of GCC natively |
00:00:31 | toadest | Cross compilers |
00:00:32 | ozra | only coded on it for profession - but that was ofc windowsy stuff then.. |
00:00:34 | * | jaco60 quit (Ping timeout: 256 seconds) |
00:00:44 | toadest | Use same? Sure Are same? No |
00:00:45 | ozra | (VC) |
00:00:52 | ozra | (and Delphi) |
00:00:54 | toadest | Yeah... |
00:00:57 | toadest | XD |
00:01:08 | toadest | Anyone here ever used Bloodshed Dev-C++ ?? |
00:01:17 | toadest | Those were the days.... that thing was amazing |
00:01:33 | toadest | Now there's orwell..... still good but not known to well |
00:02:33 | toadest | _44535463686f646: Comprehendes? |
00:02:39 | ozra | Well, you have some suggestions above now, one of them is probably the faster road :) |
00:02:47 | toadest | Yep |
00:02:55 | toadest | I do use c9.io and occasionally coding |
00:02:58 | toadest | *koding |
00:03:01 | toadest | No vps though |
00:03:41 | toadest | No tengo un ¿ aqui ;-; |
00:03:54 | ozra | See if you can find a VPS that rents per day, and you can use it til you get your machine back.. |
00:04:09 | _44535463686f646 | mingw |
00:04:14 | toadest | Yeah... |
00:04:18 | ozra | Or that :) |
00:04:31 | _44535463686f646 | your bash script will still work etc |
00:04:49 | _44535463686f646 | unless you tell me the specifics that arent working |
00:04:55 | _44535463686f646 | i cant tell you anything but to use linux |
00:05:23 | _44535463686f646 | but gitbash (mingw) works pretty good for me |
00:05:41 | * | datanoise joined #nim |
00:05:42 | _44535463686f646 | my makfiles all work on windows and linux |
00:05:45 | toadest | Im using a cc |
00:05:54 | toadest | A cross compiler for mips and x11 software |
00:05:59 | toadest | I cannot use windows long term |
00:06:06 | toadest | Because of that I |
00:06:10 | _44535463686f646 | then use linux |
00:06:12 | toadest | 'm keeping my linux stuff |
00:06:15 | toadest | I CANT |
00:06:20 | toadest | MY laptop BROKE |
00:06:26 | _44535463686f646 | vm |
00:06:37 | toadest | Too slow on this |
00:06:51 | fowl | Can you take this discussion to #nim-offtopic |
00:07:05 | fowl | I can't even find the last nim related thing said in here |
00:07:13 | _44535463686f646 | any linux server vm will work under 512m but whatver. |
00:08:24 | toadest | Sure fowl, I'm sorry |
00:08:37 | toadest | This actually started as running nim in a vm |
00:08:42 | toadest | *in cygwin |
00:09:01 | ozra | dom96: Araq: Anyone of you there and got a minute? Regarding tests/testament/... feels a tad urgent to get in order. |
00:14:45 | fowl | ozra: about it running nim from $PATH instead of local? |
00:16:20 | ozra | Yeah. I've edited it a bit, but I guess I'd need some input since it's central to deving. Though, it basically is broken now, unless you have your dev-repo as global path.. I have stable install as global. Which seems to me the "proper setup" of a system... |
00:16:36 | ozra | fowl: Got any opinions/ tips.. |
00:17:28 | ozra | Atm. I made "koch" compile the compiler first (to make sure you don't run all tests realizing you forgot to compile the piler), and then defaults to "./compiler/nim --lib:./lib c ..." |
00:18:06 | ozra | Ah, yeah, the compiler is ofc compiled with 'global nim' and also with '--lib:./lib', as expected, ofc.. |
00:18:20 | fowl | ozra: it should run the local version, nobody keeps stale nims around |
00:18:46 | vikaton | r we cald nimmers? o,0 |
00:19:44 | fowl | ozra: HEAD is usually stable and new releases are obsolete really quickly |
00:20:00 | ozra | The "idiomatic" setup would be stable as central, so regardless, it would break in the future when getting more widespread, even if most are running their local repo as pathed. I have two local repos for various reasons also. |
00:20:06 | * | vikaton quit () |
00:21:44 | ozra | This way I can very simply run './koch tests' in one repo (devel pure) and also in a feature/bugix-branch repo. Compare outputs. Anything diffs? Run tests-individually under microscope in devel repo and in my branch repo and compare. |
00:22:13 | fowl | ozra: Im not sure koch calls nim from $path, you can use it to bootstrap before you modify $path |
00:22:20 | ozra | Otherwise: checkout devel.. re compile the whole shit. copy out things to compare. checkout feature.. recompile the kahuna... dadada |
00:23:21 | ozra | fowl: Ehmm.. right now it just execs "nim ..." which becomes the pathed one.. Or what do you mean? |
00:23:27 | fowl | ozra: yea I'm just trying to explain how the oversight was made :p |
00:24:12 | ozra | Haha, ah, yeah. I figured it was like that, just, feeling that explicitly running the current dir's is the 'right way' to never cause confusion :-) |
00:24:38 | flaviu | fowl: devel, HEAD is ambiguous. |
00:24:53 | fowl | ozra: BTW the boss way to install nim on *nix is to symlink it into $path |
00:25:12 | * | gsingh93 joined #nim |
00:25:50 | ozra | yeah, I often go with that method. This time around, it's added to path though (the "stable" one..) |
00:25:57 | ozra | I'll change that.. |
00:27:03 | ozra | fowl: Anyways, waddyathing - seems reasonable enough to re-compile the compiler immediately before running tests - no big loss in time compared to running all tests with wrong piler, right? |
00:37:55 | * | TEttinger joined #nim |
00:40:31 | fowl | ozra: it only takes me 6 seconds for the compiler to recompile itself 3 times |
00:40:41 | fowl | Takes my computer* |
00:41:14 | ozra | fowl: Yes, then I add it to the "init" of koch tests.. |
00:41:40 | ozra | The tests on the other hand.. takes quite a while on my machine. hence I want the two repos. Hence I need the local execution... :-/ |
00:42:20 | fowl | You want to add bootstrapping to test init? Or just one compile |
00:45:23 | fowl | ozra: I don't see how bootstrapping helps you use the local version, just call the local version |
00:46:08 | ozra | Just making double sure compiler/nim is compiled before using it for the tests. |
00:48:34 | * | BitPuffin|osx joined #nim |
00:48:51 | ozra | so, kinda bootstrap, but ensuring the local libs are actually used also |
00:58:27 | * | boop is now known as boopisaway |
01:17:48 | * | gyeates joined #nim |
01:19:33 | ozra | Anyone here on windows? |
01:24:32 | * | gokr quit (Quit: Leaving.) |
01:24:40 | toadest | ozra Me :p |
01:25:07 | ozra | Haha, got a Nim win install now? |
01:26:13 | ozra | (Needed to see if some paths work in win) |
01:29:07 | toadest | No but Ican |
01:31:52 | ozra | Cool. Does win nim shell (as I said, don't know how the win-side works) accept this?: "./compiler/nim c --lib:./lib --hints:on tests/testament/tester.nim" |
01:32:32 | ozra | toadest: ^ |
01:33:03 | toadest | Testing |
01:33:39 | toadest | It should just be nim, due to Path vars, no? |
01:33:57 | toadest | Or is this from the nim master directory |
01:34:17 | ozra | No - that's the point - it should be in the nim git dir, and _not_ use path :) |
01:34:29 | toadest | Ok |
01:34:48 | toadest | On Windows (cmd) you have to use \\ |
01:35:04 | toadest | So that wont work |
01:35:23 | ozra | Ah, suspected that. Just hoped the shell could handle it. ok. back to the drawing board ;-) Thanks for the help |
01:37:26 | * | InteractOSDev joined #nim |
01:39:13 | * | toadest quit (Ping timeout: 246 seconds) |
01:40:57 | * | drewsrem quit (Quit: Leaving) |
01:45:58 | * | gyeates quit (Ping timeout: 256 seconds) |
01:47:26 | * | InteractOSDev quit (Remote host closed the connection) |
01:56:01 | * | InteractOSDev joined #nim |
01:56:20 | InteractOSDev | Ozra sorry |
01:56:26 | InteractOSDev | Can't do it right now |
01:56:38 | InteractOSDev | Sister stole my laptop |
02:03:31 | * | InteractOSDev is now known as toadest |
02:09:12 | * | gsingh93 quit (Ping timeout: 276 seconds) |
02:10:03 | toadest | Just wrote my first nim program :D |
02:15:25 | toadest | What's up with nim and mips? I heard it didnt compile. Could I still use it in my os? |
02:15:57 | toadest | Or will the cross compiler throw an error due to nim? Up to me to find out? |
02:18:20 | * | vendethiel joined #nim |
02:25:57 | * | BitPuffin|osx quit (Ping timeout: 258 seconds) |
02:27:04 | * | InteractOSDev joined #nim |
02:27:59 | * | toadest quit (Remote host closed the connection) |
02:28:15 | * | InteractOSDev left #nim (#nim) |
02:39:57 | * | gsingh93 joined #nim |
02:42:11 | * | vendethiel quit (Ping timeout: 264 seconds) |
02:44:55 | * | darkf joined #nim |
02:48:21 | * | InteractOSDev joined #nim |
02:49:07 | * | toadest joined #nim |
02:50:04 | * | InteractOSDev quit (Remote host closed the connection) |
02:50:18 | toadest | How do I specify a c compiler? |
02:52:04 | toadest | (To be used 24/7 or temporarily.... I'm willing to build nim from source) |
02:52:54 | _44535463686f646 | ozra: it doesnt work for me with ./lib nor .\lib |
02:54:22 | _44535463686f646 | because xxx/y/.lib/xx is not something supported |
02:54:22 | _44535463686f646 | Error: cannot open 'c:\nim\.lib\system.nim' |
02:54:22 | toadest | On windows \\ is needed |
02:54:22 | _44535463686f646 | the problem is the . not the slashes |
02:54:23 | toadest | \ itself is an escape char |
02:54:23 | _44535463686f646 | thats not the problem, i use mingw |
02:54:23 | toadest | Ok |
02:54:23 | _44535463686f646 | its the .lib |
02:57:16 | * | ozra quit (Ping timeout: 246 seconds) |
02:59:12 | dhasenan | Anyone have a protocol buffer wrapper or library handy? |
02:59:15 | _44535463686f646 | toadest: do you even know windows? |
02:59:24 | _44535463686f646 | im sorry but \ is not an escape caracter |
02:59:52 | toadest | Yes |
02:59:57 | toadest | Yes it is |
03:00:14 | _44535463686f646 | ^ is the cmd escape caracter |
03:00:14 | toadest | C++ stdout uses \ as an escape char |
03:00:21 | toadest | Yes |
03:00:24 | _44535463686f646 | can you do c:\ |
03:00:29 | _44535463686f646 | cd c:\ |
03:00:32 | _44535463686f646 | yes so its not. |
03:00:35 | toadest | Different programs may accept something else |
03:00:45 | * | Siecje left #nim (#nim) |
03:00:54 | toadest | But at the root it uses \\ |
03:01:05 | toadest | I'm not arguing.... |
03:02:42 | * | BitR quit (Ping timeout: 246 seconds) |
03:03:42 | * | BitR joined #nim |
03:03:51 | _44535463686f646 | ozra: .\compiler\nim c --lib:.\lib --hints:on tests\testament\tester.nim |
03:04:01 | _44535463686f646 | this works in cmd |
03:04:11 | _44535463686f646 | in mingw there is just no way to get it to work |
03:04:21 | toadest | Anyone have an ubuntu binary? I can't compile, vps kills it due to too much ram usage |
03:11:35 | _44535463686f646 | toadest: the \\ your talking about is UNC path |
03:11:35 | _44535463686f646 | nothing to do with escaping |
03:11:35 | _44535463686f646 | https://msdn.microsoft.com/en-us/library/gg465305.aspx |
03:11:36 | toadest | Not arguing...... |
03:11:36 | toadest | Please stop retorting before I ignore you |
03:11:36 | _44535463686f646 | you can ignore me, im just explain to you how it works |
03:11:36 | toadest | You do know ozra left |
03:11:37 | toadest | Right? |
03:11:37 | _44535463686f646 | you can leave too |
03:11:37 | _44535463686f646 | its ok |
03:11:37 | _44535463686f646 | i dont mind |
03:11:37 | toadest | I'm not going to and I don't need your permission |
03:11:37 | toadest | You keep messaging him but he left |
03:11:37 | toadest | I was trying to inform you |
03:11:37 | toadest | I'm sorry. I'll stop trying to help |
03:11:37 | _44535463686f646 | ok son |
03:11:37 | _44535463686f646 | bbl |
03:40:57 | * | InteractOSDev joined #nim |
03:41:19 | * | toadest quit (Remote host closed the connection) |
03:42:16 | * | InteractOSDev is now known as toadest |
03:55:44 | * | yglukhov___ joined #nim |
04:00:25 | * | yglukhov___ quit (Ping timeout: 264 seconds) |
04:13:09 | * | kumul quit (Quit: Leaving) |
04:15:52 | Varriount | _44535463686f646: Do you need help? |
04:19:50 | _44535463686f646 | Varriount: no i do not, ozra wanted something tested. |
04:21:35 | toadest | _numbers please don't ever call me son. |
04:22:55 | _44535463686f646 | toadest: sorry for mixing your gender |
04:23:18 | filwit | _numbers, you need to be a bit more respectful of others, please |
04:23:50 | filwit | i don't think I've ever seen anyone banned before, but if it happens it will surely be due to insults like that |
04:24:17 | toadest | Thanks filwit |
04:39:05 | * | toadest is now known as dtscodeJR |
04:43:49 | * | Varriount quit (Quit: Leaving) |
04:44:29 | * | Varriount joined #nim |
04:44:53 | * | Varriount quit (Client Quit) |
04:45:14 | * | Varriount joined #nim |
05:01:27 | * | fowl quit (Excess Flood) |
05:02:05 | * | notfowl joined #nim |
05:06:44 | * | toadest joined #nim |
05:06:44 | * | toadest quit (Changing host) |
05:06:44 | * | toadest joined #nim |
05:07:43 | * | dtscodeJR quit (Remote host closed the connection) |
05:07:48 | * | dtscode is now known as notdtscode |
05:15:16 | * | toadest quit (Remote host closed the connection) |
05:15:24 | * | toadest joined #nim |
05:16:13 | * | Jesin quit (Quit: Leaving) |
05:17:06 | * | dalarmmst joined #nim |
05:20:10 | * | gsingh93 quit (Ping timeout: 256 seconds) |
05:21:11 | * | datanoise quit (Ping timeout: 264 seconds) |
05:27:49 | * | toadest quit (Remote host closed the connection) |
05:28:06 | * | toadest joined #nim |
05:28:06 | * | toadest quit (Changing host) |
05:28:06 | * | toadest joined #nim |
05:33:05 | * | notdtscode is now known as charmander |
05:33:27 | * | toadest is now known as dtscodeJR |
05:37:46 | * | yglukhov___ joined #nim |
05:38:59 | * | yglukhov___ quit (Client Quit) |
05:39:59 | * | yglukhov___ joined #nim |
05:48:42 | Guest2367 | is it possible to use testability 'tests' macro outside the compiler? https://github.com/Araq/Nim/blob/devel/compiler/testability.nim |
05:50:34 | filwit | Guest2367: you could always import that module directly, or recreate it |
05:50:42 | * | Guest2367 is now known as avsej |
05:51:02 | * | avsej quit (Changing host) |
05:51:02 | * | avsej joined #nim |
05:52:03 | avsej | ok |
06:01:01 | * | toadest joined #nim |
06:01:32 | * | dtscodeJR quit (Ping timeout: 256 seconds) |
06:04:58 | * | yglukhov___ quit (Quit: Be back later ...) |
06:05:41 | * | skyfex joined #nim |
06:17:29 | * | datanoise joined #nim |
06:26:51 | * | _44535463686f646 left #nim (#nim) |
06:32:40 | * | toadest quit (Remote host closed the connection) |
06:33:06 | * | toadest joined #nim |
06:33:06 | * | toadest quit (Changing host) |
06:33:06 | * | toadest joined #nim |
06:33:17 | * | toadest is now known as dtscodeJR |
06:39:52 | * | sepisoad joined #nim |
06:47:21 | avsej | so if I'm dealing with byte arrays in network application, 'string' is the best choice? |
06:47:50 | charmander | sure |
06:48:44 | notfowl | string for TCP, byte* for UDP |
06:49:13 | filwit | strings are unicode in Nim |
06:50:17 | filwit | er.. what fowl said |
06:50:59 | charmander | uhhh filwit ... fowls not in here |
06:51:09 | filwit | he's 'notfowl' |
06:51:14 | charmander | wait |
06:51:16 | charmander | what? |
06:51:18 | charmander | no. |
06:51:24 | charmander | that doesn't make any sense |
06:51:24 | * | gokr joined #nim |
06:51:30 | filwit | lol, idk |
06:51:52 | filwit | he may not be, i just assumed that was him at the office or something |
06:52:07 | * | charmander is now known as notdtscode |
06:52:18 | filwit | ^ see it's a fad |
06:52:28 | notdtscode | I'm not dtscode |
06:52:30 | * | BlaXpirit joined #nim |
06:52:36 | filwit | well shit, lol |
06:52:51 | dtscodeJR | I'm dtscodeJR |
06:53:11 | notdtscode | Maybe he knows where dtscode is |
06:53:39 | notfowl | fowl is at the office (a tree outside a building with open wifi) |
06:53:49 | notdtscode | fowl went outside? |
06:53:54 | notdtscode | who authorized that? |
06:54:19 | avsej | filwit, does nim perform automagic like validation or normalization on strings or string literals? I'm going to construct a protocol packet, this is why I need just sequence of bytes |
06:54:55 | filwit | avsej: not that I'm aware of, but I'm not the best person to ask about Nim's string handling |
06:57:01 | notdtscode | :L I wish I had known about the posix module earlier |
07:02:58 | * | wb joined #nim |
07:04:00 | notfowl | avsej: I believe \L is CR LF on windows |
07:04:11 | notfowl | In a string literal |
07:04:39 | avsej | \n is magic literal, afair. others go verbatim |
07:05:40 | notfowl | Other than those escaped chars no there's no interpolation |
07:06:22 | notfowl | Interpolation is a fun exercise to do with macros |
07:06:57 | * | datanoise quit (Quit: WeeChat 1.2) |
07:07:16 | * | datanoise joined #nim |
07:07:44 | * | datanoise quit (Client Quit) |
07:08:31 | * | toadest joined #nim |
07:09:09 | * | dtscodeJR quit (Remote host closed the connection) |
07:19:36 | Varriount | notfowl: *gasp* It's you again! What have you done with fowl! |
07:20:51 | notdtscode | idk what he did but its spreading |
07:24:04 | * | Demon_Fox quit (Quit: Leaving) |
07:24:53 | * | Ven joined #nim |
07:26:47 | * | yglukhov___ joined #nim |
07:28:55 | toadest | May I please have help? |
07:28:58 | toadest | http://pastebin.com/BAwvJPx7 |
07:29:11 | toadest | I'm not sure if my error is nim or ubuntu |
07:29:18 | toadest | Those files exist |
07:32:37 | * | avsej quit (Ping timeout: 258 seconds) |
07:33:46 | Varriount | toadest: I'm on Windows, so I can't test this out, but it looks like 'mips-sde-elf-as' and friends can't be found. |
07:34:07 | * | Tennis quit (Ping timeout: 272 seconds) |
07:34:11 | toadest | Yeah |
07:34:36 | Varriount | I don't see any actual error output associated with the Nim compiler. |
07:35:02 | toadest | Ok |
07:35:03 | toadest | Nvm |
07:35:12 | toadest | I didn't know if the -e was |
07:35:14 | toadest | Thanks! |
07:35:59 | Varriount | toadest: Well, there is no '-e' on the line invoking the Nim compiler. |
07:36:11 | toadest | There's no -e anywhere |
07:36:12 | Varriount | toadest: Have you tried running each command manually, in your terminal? |
07:36:18 | toadest | Yes |
07:37:21 | notfowl | whats the error from nim? |
07:37:30 | Varriount | toadest: Wait, I was wrong. |
07:37:40 | * | OnO joined #nim |
07:37:42 | Varriount | toadest: What is the '-ffreestanding' supposed to do? |
07:37:59 | toadest | Make it independent |
07:38:17 | Varriount | toadest: Using 'nim c -d:release -ffreestanding test.nim' on a test file results in 'Error: invalid command line option: '-e'' |
07:38:28 | Varriount | toadest: Is that documented anywhere? |
07:38:39 | notfowl | toadest, you want to pass that to c compiler, --passc:".." |
07:38:51 | toadest | Ok |
07:38:53 | toadest | Thanks |
07:41:25 | toadest | I'll try a different tool chain |
07:41:39 | Varriount | toadest: Huh? |
07:42:16 | notfowl | toadest, you cant just leave us hanging like that |
07:42:26 | Varriount | :< |
07:42:39 | toadest | One sec |
07:42:41 | toadest | Downloading |
07:43:14 | notfowl | toadest, hey add --parallelbuild:1 so you can see any errors that come up |
07:43:24 | toadest | Ok |
07:44:23 | * | xificurC joined #nim |
07:46:01 | toadest | Crap |
07:46:11 | toadest | Downloaded the os instead of the tool chain |
07:46:16 | * | toadest is hopeless |
07:46:20 | * | dbohdan left #nim (#nim) |
07:47:34 | toadest | One sec |
07:47:41 | toadest | Changing paths |
07:48:19 | * | coffeepot joined #nim |
07:49:12 | toadest | Building |
07:50:36 | toadest | Error cannot open panic override .nim |
07:51:13 | toadest | How can I set it to ignore default lib? |
07:51:27 | notfowl | you have to provide one https://www.google.com/search?q=panicoverride.nim |
07:51:56 | toadest | Thanks |
07:51:59 | toadest | Just saw that |
07:52:34 | notfowl | its mentioned here too http://nim-lang.org/docs/nimc.html#nim-for-embedded-systems |
07:52:38 | toadest | Not fowl thanks for helping |
07:52:46 | toadest | That's where I saw it |
07:57:16 | toadest | Arguments can only be given with -r |
07:57:39 | toadest | I removed nolinking |
07:57:41 | Varriount | Hm? |
07:57:45 | toadest | Same error |
07:57:52 | toadest | (--run) |
07:58:21 | Varriount | toadest: Options need to be given before the source file, not after. |
07:58:34 | Varriount | nim <options> <source file> |
07:58:37 | toadest | Did that |
07:58:49 | Varriount | Can you past eyou compile invokation? |
08:00:00 | toadest | Pastebin.com/NgHvr2ju |
08:00:46 | Varriount | toadest: Uh, why the '../source/*.nim'? |
08:00:58 | Varriount | That will expand to every .nim file in the directory. |
08:01:04 | toadest | Yeah |
08:01:09 | toadest | I have 2 |
08:01:15 | toadest | Panic override and main |
08:01:25 | * | Trustable joined #nim |
08:01:35 | notfowl | just pass main |
08:01:36 | toadest | I need panic override there |
08:01:42 | toadest | Ok |
08:02:09 | notfowl | if it complains about not finding panicoverride add --path:"../source" |
08:02:56 | Varriount | toadest: Just for future reference, you can't pass more than one compilation file to the compiler at a time. It's not really needed. |
08:04:45 | toadest | Ok |
08:06:46 | toadest | Nim compiled! |
08:06:57 | toadest | But what do I do with the c files in the cache? |
08:07:23 | Varriount | toadest: Nothing normally. The Nim compiler will invoke the C compiler for you. |
08:07:33 | toadest | There's no nim output |
08:07:52 | toadest | I have an asm output and 3 c files |
08:07:55 | Varriount | That's because you're passing --compile-only |
08:08:03 | toadest | Asm output is a bin |
08:08:34 | Varriount | You need an executable file, right? |
08:09:44 | Varriount | Remove the --compile-only and the Nim compiler will invoke the C compiler for you, and compile the target file (and it's dependancies) into an executable. |
08:10:47 | toadest | Did that |
08:11:03 | toadest | Gcc not found |
08:11:13 | toadest | I specified in nim mipsel-gcc |
08:11:29 | Varriount | Where did you specify it? |
08:12:05 | toadest | I think it was trying to link |
08:12:10 | toadest | One second |
08:16:17 | toadest | Guys |
08:16:31 | toadest | One more error |
08:16:50 | toadest | After that, we'll have compiled nim for mips for the first time |
08:17:02 | toadest | It's a linker seg fault |
08:17:35 | Varriount | toadest: What commands would you normally use to compile a C file for MIPS? |
08:19:26 | toadest | Same as here |
08:19:46 | Varriount | And what linker commands? |
08:20:06 | toadest | Exact same linker |
08:20:16 | toadest | The only thing different here is there is no c |
08:20:19 | toadest | I'm using nim |
08:20:33 | toadest | But im passing the same flags |
08:21:04 | Varriount | So, when compiling/linking a C file for mips, you don't use any extra options other than -ffreestanding? |
08:21:42 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:21:49 | toadest | No |
08:22:14 | * | jh32 quit (Remote host closed the connection) |
08:22:20 | Varriount | Hm. |
08:24:48 | Varriount | toadest: Unfortunately, this is a bit outside my experience. The other channel regulars should be on soon (araq, dom96, gokr, Jehan, etc) |
08:25:32 | toadest | Ok |
08:26:46 | gokr | sorry no idea |
08:27:24 | toadest | It's an error of pic vs non pic |
08:27:45 | toadest | --passc wouldn't make it pic |
08:27:51 | toadest | "Unrecognized" |
08:28:09 | Varriount | --passc:"-fpic" ? |
08:28:50 | Varriount | I mean, you could manually compile the C files. It shouldn't take any special magic... |
08:30:14 | toadest | Trying |
08:30:33 | toadest | I couldn't manually compile the c |
08:33:03 | Varriount | What error did you get? |
08:33:57 | toadest | A bunch |
08:34:42 | toadest | Well still not working |
08:35:19 | toadest | Linker seg fault |
08:35:28 | toadest | Is using nim worth that much..... |
08:36:47 | toadest | I don't think it is |
08:36:51 | toadest | To much trouble |
08:37:46 | Varriount | toadest: Well, it would help if you gave us more information. But if you fell that way... *shrug* |
08:37:50 | Varriount | *feel |
08:41:29 | Varriount | toadest: Have you been able to successfully compile a regular C program to MIPS before? |
08:43:54 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
08:46:02 | toadest | Yes |
08:47:34 | Varriount | Darn, I have to go. See you later toadest |
08:47:43 | toadest | Bye |
08:47:47 | toadest | Thanks for helping |
08:50:10 | * | Ven joined #nim |
08:54:04 | * | sepisoad_ joined #nim |
08:55:25 | * | sepisoad__ joined #nim |
08:56:49 | * | sepisoad quit (Ping timeout: 264 seconds) |
08:58:52 | * | sepisoad_ quit (Ping timeout: 258 seconds) |
09:02:47 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:11:14 | * | toadest left #nim ("See") |
09:25:34 | * | filwit quit (Quit: Leaving) |
09:34:28 | * | milosn quit (Quit: leaving) |
09:50:17 | * | askatasuna joined #nim |
09:59:09 | * | boopisaway is now known as boop |
10:04:24 | * | toadest joined #nim |
10:04:29 | * | toadest left #nim (#nim) |
10:08:31 | * | Ven joined #nim |
10:28:19 | * | dddddd joined #nim |
10:29:57 | * | JinShil joined #nim |
10:30:35 | * | ozra joined #nim |
10:46:00 | * | sepisoad__ quit (Ping timeout: 256 seconds) |
10:59:37 | * | Tennis joined #nim |
11:01:58 | * | toadest joined #nim |
11:03:50 | * | ingsoc joined #nim |
11:04:55 | ozra | toadest: Morning (or what you've get where you live). How did things go? |
11:15:32 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:16:52 | dom96 | Not sure if spammer or real user http://forum.nim-lang.org/t/1238 |
11:18:22 | pigmej | dom96: my vote goes for spammer |
11:18:30 | dom96 | yeah |
11:19:06 | pigmej | still better to read something about RPM than viagra though :) |
11:19:31 | pigmej | spammer version 2.0 |
11:22:57 | * | askatasuna quit (Ping timeout: 240 seconds) |
11:27:14 | ozra | dom96: pigmej: Wot? |
11:27:53 | dom96 | ozra: I removed it |
11:28:03 | ozra | The post? |
11:28:15 | ozra | Aha. Before I saw it... |
11:29:05 | ozra | dom96: How does the dev cycle for Nim look like. Regarding PR's and merges to main devel branch? |
11:30:17 | dom96 | We review it when we have time and if it's acceptable we merge it. |
11:30:44 | ozra | dom96: Is there some common time frame, or varies a lot? |
11:30:54 | dom96 | varies |
11:31:16 | ozra | between thumb and index? days, weeks, months? :-P |
11:31:53 | gokr | Ok, so published my .. feeble language hacking attempt: https://github.com/gokr/ni |
11:32:18 | ozra | Monty attacks again, haha |
11:32:34 | gokr | Wrote about it on the ml - since its so low traffic, had to give it some :) |
11:32:37 | * | avsej joined #nim |
11:33:01 | * | avsej is now known as Guest76997 |
11:33:19 | ozra | Ni, Ni, Ni! |
11:33:43 | gokr | The version 2 will have a much longer name ;) |
11:33:50 | * | Guest76997 is now known as avsej_ |
11:34:10 | * | avsej_ quit (Changing host) |
11:34:10 | * | avsej_ joined #nim |
11:35:48 | avsej_ | dom96, what is correct way to setup timeouts while working with futures. I have a function which returns future. and I want call 'waitFor' but with some timeout |
11:36:34 | ozra | gokr: Renim? |
11:36:42 | dom96 | avsej_: You should use sleepAsync. waitFor func() or sleepAsync(1000) |
11:37:03 | dom96 | But then you should really save your futures from `func` and `sleepAsync` so you know which completed. |
11:37:09 | * | TEttinger quit (Ping timeout: 256 seconds) |
11:37:30 | dom96 | to determine whether your function did or the timeout was reached. |
11:37:53 | dom96 | Btw, are you sure waitFor is what you want? |
11:37:56 | gokr | ozra: For v2? I was more thinking... https://www.youtube.com/watch?v=zJBzJF_-cBA |
11:37:59 | dom96 | it will block your thread |
11:38:32 | dom96 | gokr: haha |
11:38:34 | ozra | dom96: Any idea about this? (test output): {"name":"stdlib/C/tmitems.nim",[...snip...],"result":"reOutputsDiffer","expected":"","given":""}, |
11:39:02 | ozra | gokr: Hahaha, that was my second guess! |
11:39:31 | dom96 | ozra: not sure, stdout vs. stderr perhaps |
11:39:51 | ozra | Right. I'll run in isolation. There's a bunch like that.. |
11:40:22 | dom96 | gokr: Here is my little language that I wrote a long time ago if you want to compare :) https://github.com/dom96/nael |
11:41:54 | gokr | Ha, that's funny - so similar code. |
11:42:30 | ozra | coding twin sould |
11:42:31 | avsej_ | dom96, i'm not sure. I just want to set timeouts for network operations |
11:42:34 | BlaXpirit | do these languages compile to nim or what |
11:42:50 | gokr | No, both parse to AST and then interpret the AST |
11:43:11 | dom96 | avsej_: can I see your code? |
11:43:23 | gokr | But an idea is to be able to partly compile functions to Nim when they are "settled" so to speak. |
11:43:50 | gokr | dom96: Is factor hard to parse? Your lexer seems fairly complicated. |
11:44:06 | gokr | Or well, perhaps not. |
11:44:15 | avsej_ | dom96, https://gist.github.com/avsej/37b9c85391cdca576835 |
11:44:28 | dom96 | gokr: not really. My language misses a lot of Factor's features IIRC. |
11:44:41 | dom96 | Factor is likely harder to parse. |
11:44:59 | gokr | Nael seems pretty advanced, you put in a lot of work there |
11:45:03 | gokr | Abandoned? |
11:45:54 | dom96 | pretty much |
11:46:10 | gokr | Ah, you implemented prims using manual stack ops, mm. |
11:46:24 | dom96 | It was too esoteric to be practical :) |
11:46:35 | dom96 | avsej_: Have you seen Nim's support for async await? |
11:46:52 | gokr | My prims are just "normal" procs operating on varargs[Node] returning a ... you guessed it - Node. |
11:46:58 | avsej_ | not really. does it support timeouts? |
11:48:50 | avsej_ | what await does? it waits for future result or yields control? |
11:49:43 | dom96 | avsej_: https://gist.github.com/dom96/47274a04e794c72c7966 |
11:49:57 | dom96 | that should work |
11:50:03 | dom96 | (haven't tested it) |
11:50:44 | avsej_ | thanks, i will check |
11:51:16 | dom96 | gokr: Yeah, everything is based around the stack in nael. I did actually get quite far, got modules, functions and variables. |
11:51:27 | gokr | Yes, I have skimmed it |
11:51:31 | dom96 | I remember that I implemented variables a bit differently than Factor. |
11:51:39 | dom96 | because I didn't like the way Factor did it |
11:51:50 | gokr | I will look closer to see if there is stuff I can steal |
11:52:00 | dom96 | IIRC it's that you can push a reference to a variable on the stack |
11:52:12 | dom96 | in order to get the value you must call 'get' |
11:52:26 | gokr | right, a binding |
11:52:45 | dom96 | In Factor it gets the value of the variable immediately |
11:52:56 | gokr | Ok, so it always looks things up? |
11:53:14 | dom96 | yeah, from what I can remember. |
11:53:32 | gokr | Ni is ... trivial to parse but IMHO easier to read than Forth/Factor code. |
11:53:37 | dom96 | ooh. Github's Nim syntax highlighter highlights discard """...""" as a comment. |
11:54:44 | dom96 | gokr: yeah. In order to read Forth/Factor code you kind of have to keep a stack in your head at all times. |
11:54:47 | gokr | Anyway, Ni is not at a usable state - its rather at a ... hey-look-at-this-silly-code-dump-state. |
11:54:58 | gokr | dom96: Yup. |
11:55:16 | gokr | So basically, I like both Lisp and Forth *in theory* but I can't stand reading it. |
11:55:17 | dom96 | Which makes writing code in it rather challenging :) |
11:55:26 | avsej_ | my type has enum field. is there way to assign default value to it? |
11:55:37 | gokr | Lisp is just ())()((() - too little structure. And Forth ... well, yeah. |
11:55:40 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:55:57 | gokr | Ni (Rebol that is) hits a nice sweet spot I think, and still being homoiconic. |
11:56:45 | dom96 | avsej_: not in the type, only in a proc. |
11:57:58 | dom96 | huh rebol's function definition syntax looks strangely similar to Nim's |
11:58:39 | gokr | I haven't decided yet how much of that part I am going to steal. |
12:00:06 | * | Siecje joined #nim |
12:00:41 | * | JinShil quit (Quit: Konversation terminated!) |
12:07:21 | * | Siecje left #nim (#nim) |
12:11:11 | avsej_ | dom96, with such external timeout 'open' future will be in some undefined behaviour and the 'open()' proc cannot handle timeout. right? |
12:11:45 | dom96 | avsej_: what do you mean? |
12:13:21 | avsej_ | for example it takes 5 seconds to connect to remote host, I set sleepAsync(4000). when waitFor returns control, open future still have chance to connect. |
12:14:38 | avsej_ | ideally it would be nice if open() could fail the future after some specified timeout |
12:14:54 | avsej_ | so that socket error and timeouts could be handled in one place |
12:16:05 | Varriount | Arrgh. I just ran 'cl /P' on windows.h (/P dumps preprocessor output) |
12:20:07 | ozra | Yo Varriount: I PR'ed a "compile" of syntax to XML, which fixes the call-syntax. Also added more specific classes to some parts of syntax (to be able to make 'public' asterisk and 'of' and values of 'of' in different colors.. (standard color schemes look the same, it's just possible to highlight more specifically at will) |
12:22:22 | Varriount | ozra: Just the XML? I'd prefer both the XML and YAML |
12:22:46 | ozra | Ah, ofcourse the YAML is there :-) I just forgot to "compile" the last time.. XML sucks, haha |
12:23:29 | avsej_ | "When a procedure is "awaited", the asynchronous procedure it is awaited in will suspend its execution until the awaited procedure's Future completes" dom96 I'd like to tell await to wake up the function on some timer |
12:23:45 | Varriount | ozra: Funny thing, the AAAPackageDev plugin doesn't actually use a strict "YAML" parser. It's more of a "good enough YAML" parser |
12:24:30 | dom96 | avsej_: You can again do that with sleepAsync. |
12:24:31 | ozra | Varriount: well... good wnough for me then ;-) Have noticed some quirks regarding RE's though, but their easily fixable buy adding parens, might be part of that 'good enough'? |
12:24:52 | dom96 | avsej_: Are you saying that you're worried about the open() function still running? |
12:24:55 | avsej_ | can I await on group of futures? |
12:25:01 | avsej_ | http://stackoverflow.com/a/11191070/98509 |
12:25:01 | Varriount | ozra: Probably. You could bring it up with the maker of the AAAPackageDev plugin |
12:25:09 | dom96 | avsej_: yes, with 'or' or 'and'. |
12:25:47 | * | OnO joined #nim |
12:26:14 | ozra | Varriount: I was actually thinking of breaking up the parser to classify each keyword etc. as now + 'kw-theword' later on - that way it all looks the same, but the user has the power to highlight even specific keywords differently. Like perhaps you want break, continue and return to screeeeam of pink, etc. Any objections? |
12:26:17 | dom96 | avsej_: You cannot cancel open() once it has begun execution. |
12:26:43 | avsej_ | https://gist.github.com/avsej/7617e390d49f82c9683c#file-connection-nim-L39 this does not work |
12:27:09 | * | kokozedman joined #nim |
12:28:30 | kokozedman | dom96, what's the stability and security toughness of jester? I'm planning to put a kind of mini HTTP server in a router with an app that I built using Nim for OpenWrt |
12:31:33 | avsej_ | dom96, i still cannot understand how I can compose futures for await |
12:32:06 | dom96 | avsej_: that should work, looks like a bug :( |
12:32:29 | avsej_ | okay. I'm using devel branch, so it probably my fault |
12:32:35 | avsej_ | i will check on stable |
12:32:38 | avsej_ | thanks |
12:33:01 | dom96 | avsej_: Can you report it on github? |
12:33:28 | avsej_ | yes, but first I want to see how it works |
12:33:31 | dom96 | kokozedman: It still has some stability issues. If you don't mind restarting the Jester app every so often it works fine though. |
12:34:36 | kokozedman | dom96, :-) I see, not exactly a good thing because it's kind of streaming info to the clients... might there be things that I can help with? |
12:35:23 | dom96 | kokozedman: Test it, run it, log the crashes, see if you can find out the cause :) |
12:35:33 | kokozedman | I mean, I'm already on the way to have that webserver any how, might as well fix what's broken to help everyone along the way (suppose I can attain the level of technicalities involved) |
12:36:05 | kokozedman | dom96, oh, so it actually crashes? that's a good thing... the worst bugs for me is those that don't cause a crash |
12:36:12 | Varriount | ozra: No objections at all. |
12:36:24 | dom96 | kokozedman: Yeah. The forum seems to be running solidly. |
12:36:32 | ozra | Cool. |
12:36:51 | dom96 | kokozedman: It crashes after running for a couple of days though. |
12:37:00 | dom96 | No silent bugs though as far as I can see. |
12:37:14 | kokozedman | dom96, vaguely, do you think it might be related to the still experimental async? |
12:37:38 | dom96 | yeah. I think there may be some GC issues, or code gen issues with the first class iterators. |
12:37:52 | dom96 | Which async makes heavy use of. |
12:38:04 | dom96 | But it's just as likely that my wrapping of epoll is simply wrong heh |
12:38:45 | dom96 | I need to finally look at the logs that nimforum produces and see about diagnosing these bugs. |
12:46:15 | kokozedman | dom96, async does epoll wrapping? |
12:46:23 | dom96 | yes |
12:46:24 | Varriount | (Not to mention update the VPS) |
12:47:52 | kokozedman | dom96, oh, I see... so, that implies that you are the one who created the async part, yes? |
12:49:42 | kokozedman | dom96, I'm a bit thoughtful though... In the past (not sure how long ago)... Jester was way below most native web frameworks in terms of performance |
12:49:55 | kokozedman | might indicate something isn't quite there yet |
12:53:28 | * | Trustable_2 joined #nim |
12:53:32 | * | synthmeat quit (Quit: WeeChat 1.3-dev) |
12:54:52 | * | Trustable quit (Ping timeout: 244 seconds) |
12:55:39 | kokozedman | dom96, also, with that said, jester is only compatible with Linux then?! because Linux is the only one with epoll |
12:56:48 | * | synthmeat joined #nim |
12:58:56 | * | Pisuke joined #nim |
13:00:34 | dom96 | kokozedman: it supports IOCP on windows |
13:00:41 | dom96 | also, performance should be better now |
13:00:47 | dom96 | but again, something we can still improve |
13:00:52 | * | MyMind quit (Ping timeout: 255 seconds) |
13:02:09 | * | johnsoft quit (Ping timeout: 256 seconds) |
13:02:37 | * | johnsoft joined #nim |
13:04:00 | * | skyfex quit (Quit: (null)) |
13:04:33 | * | skyfex joined #nim |
13:09:22 | * | skyfex quit (Ping timeout: 256 seconds) |
13:10:31 | Varriount | dom96: Have you seen the new registered IO APIs for Windows 8? |
13:16:13 | avsej_ | dom96 0.11.2 also does not work. fails with ne same issue |
13:22:16 | kokozedman | dom96, "should be better now"?, which part, the async or the selectors? |
13:27:27 | * | avsej joined #nim |
13:27:50 | * | avsej is now known as Guest73470 |
13:29:07 | dom96 | kokozedman: Jester's performance |
13:29:10 | dom96 | Varriount: nope |
13:29:16 | dom96 | Guest73470: please report it on github |
13:29:40 | * | avsej_ quit (Quit: avsej_) |
13:32:43 | Guest73470 | dom96, https://github.com/Araq/Nim/issues/2864 |
13:32:57 | * | Guest73470 is now known as avsej_ |
13:33:06 | * | avsej_ quit (Changing host) |
13:33:06 | * | avsej_ joined #nim |
13:33:24 | dom96 | Guest95994: thanks |
13:33:32 | dom96 | er avsej_ |
13:33:36 | dom96 | sorry Guest95994 |
13:33:38 | dom96 | bbl |
13:38:04 | * | BlaXpirit_ joined #nim |
13:38:05 | * | BlaXpirit quit (Killed (orwell.freenode.net (Nickname regained by services))) |
13:38:05 | * | BlaXpirit_ is now known as BlaXpirit |
13:38:09 | * | johnsoft quit (Ping timeout: 245 seconds) |
13:38:29 | * | johnsoft joined #nim |
13:41:36 | * | goldhammer joined #nim |
13:43:44 | * | goldhammer quit (Client Quit) |
13:47:37 | * | toadest left #nim ("See") |
13:50:49 | * | johnsoft quit (Ping timeout: 255 seconds) |
13:51:58 | * | dtscodeJR joined #nim |
13:52:02 | * | dtscodeJR is now known as toadytoad |
13:52:08 | * | toadytoad left #nim (#nim) |
13:52:59 | * | askatasuna joined #nim |
13:59:17 | * | synthmeat quit (Quit: WeeChat 1.3-dev) |
14:00:42 | * | johnsoft joined #nim |
14:03:42 | * | vikaton joined #nim |
14:08:51 | * | milosn joined #nim |
14:13:10 | * | UberLambda joined #nim |
14:18:48 | * | pregressive joined #nim |
14:19:41 | * | Arrrr joined #nim |
14:22:30 | * | synthmeat joined #nim |
14:22:39 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:24:02 | * | dt___ joined #nim |
14:24:10 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
14:24:22 | dt___ | hello |
14:25:47 | def- | hi dt___ |
14:25:52 | dt___ | how do I get the typedesc of a variable? (e.g. like __class__ attribute in Python) |
14:25:59 | ozra | Anyone know how to prevent styledEcho from producing a newline? |
14:26:32 | def- | dt___: import typetraits; echo 12.type.name |
14:26:35 | def- | dt___: something like this? |
14:26:42 | * | shiyaz joined #nim |
14:27:45 | def- | ozra: looking at the implementation, i doN't see a way to not add the \n: https://github.com/Araq/Nim/blob/master/lib/pure/terminal.nim#L356 |
14:27:57 | dt___ | thanks! |
14:28:03 | def- | ozra: you could implement your own alternative I guess |
14:28:18 | ozra | def-: Ok, thanks |
14:34:04 | * | askatasuna quit (Ping timeout: 244 seconds) |
14:35:23 | * | vendethiel joined #nim |
14:52:33 | * | xificurC quit (Ping timeout: 240 seconds) |
14:57:06 | * | brson joined #nim |
14:58:05 | * | vendethiel quit (Ping timeout: 272 seconds) |
15:04:54 | * | gsingh93 joined #nim |
15:05:38 | avsej_ | dom96, how this 'await foo() or bar()' evaluated? like 'await(foo() or bar())'? |
15:05:49 | dom96 | yes |
15:12:27 | * | yglukhov___ quit (Ping timeout: 276 seconds) |
15:20:55 | avsej_ | dom96, what does these lines mean? https://github.com/Araq/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1360-L1366 |
15:22:03 | dom96 | The try transformation is a bit complex at the minute. I have attempted to simplify it but hit a compiler bug. |
15:22:04 | avsej_ | processed after line 1363 is |
15:22:04 | avsej_ | nnkYieldStmt |
15:22:04 | avsej_ | yield conn.sock.connect(conn.address, Port(conn.port)) or sleepAsync(timeout) |
15:22:21 | dom96 | It's in this branch: https://github.com/Araq/Nim/tree/async-try-fixes |
15:22:23 | avsej_ | this is not what the code expects |
15:23:18 | dom96 | Easiest way is to work around this bug by not using the try statement |
15:23:59 | avsej_ | how it can handle errors with await then? |
15:24:01 | dom96 | you can still check for exceptions by looking at whether the future failed. |
15:24:32 | avsej_ | so construction, should be `var fut = await foo() or bar()`? |
15:24:38 | avsej_ | and then check on fut |
15:24:38 | dom96 | let connectFut = connect() |
15:24:41 | dom96 | await connectFut |
15:24:44 | dom96 | if connectFut.failed: ... |
15:24:46 | dom96 | should work |
15:24:52 | avsej_ | okay |
15:26:36 | * | gokr quit (Quit: Leaving.) |
15:29:30 | * | vendethiel joined #nim |
15:29:59 | * | dt___ quit (Quit: Page closed) |
15:32:57 | avsej_ | dom96, so 'await a() or b()', means continue if either 'a()' or 'b()' completed? |
15:33:22 | dom96 | yes |
15:36:27 | ozra | dom96: I'm going over the tester fixing some more bugs. Stumbled upon a test that could easily be fixed too: "tmitems". Expected is: `{"key1": 11, "key2": 12, "key3": 13}`, gotten is: `{"key1":11,"key2":12,"key3":13}` - should the to-str be fixed, or should I adjust the test-case expectation? |
15:36:43 | ozra | If you have any idea? |
15:37:07 | def- | ozra: that changed again recently |
15:37:16 | def- | ozra: in the PR to improve json performance, but not sure why |
15:37:47 | ozra | def-: ok, arrays still have space after ',', but objs are non spaced after ':' atm... So adjust test-case? |
15:37:58 | dom96 | just add replace(" ", "") to the output and change the expected. |
15:38:09 | dom96 | but actually |
15:38:14 | dom96 | I would adjust the json module |
15:38:18 | def- | ozra: personally I preferred the old json printing |
15:38:31 | dom96 | This is just bad style. |
15:38:44 | dom96 | although you could argue that it saves a couple of bytes |
15:38:46 | ozra | def-: dom96: is it possible to do "nice-json" and "compact-json" ? |
15:38:56 | dom96 | it's possible to do pretty json |
15:39:11 | dom96 | and "ugly" json |
15:39:15 | dom96 | which $ uses |
15:39:16 | ozra | dom96: Yeah, well I think it should be ugly-compact, for nice view, se pretty.. |
15:39:26 | ozra | *use* |
15:39:47 | avsej_ | dom96, does this look sane? https://gist.github.com/941df9b545618f966431 |
15:40:12 | ozra | I'll simply adjust the test-case to match for now.. one thing at the time. |
15:41:33 | dom96 | avsej_: yep |
15:41:39 | * | synthmeat quit (Changing host) |
15:41:39 | * | synthmeat joined #nim |
15:42:07 | * | InteractOSDev joined #nim |
15:42:32 | * | InteractOSDev is now known as dtscodeJR |
15:43:47 | * | gsingh93 quit (Ping timeout: 265 seconds) |
15:50:13 | * | wb quit (Ping timeout: 264 seconds) |
15:51:14 | * | wb joined #nim |
16:00:06 | avsej_ | dom96, is it okay to use 'await' to name procs? http://nim-lang.org/docs/threadpool.html#await,FlowVarBase |
16:00:30 | dom96 | huh? You mean to have 'await' in the name of a proc? |
16:02:24 | * | gokr joined #nim |
16:03:16 | * | dtscodeJR left #nim ("See") |
16:11:17 | * | nande joined #nim |
16:13:52 | * | ozra quit (Ping timeout: 246 seconds) |
16:19:16 | avsej_ | yes |
16:19:41 | avsej_ | how compiler will make difference? |
16:19:52 | * | gsingh93 joined #nim |
16:20:43 | * | ChrisMAN quit (Remote host closed the connection) |
16:21:53 | * | ChrisMAN joined #nim |
16:22:41 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:27:21 | * | OnO joined #nim |
16:28:29 | * | dtscodeJR joined #nim |
16:28:58 | dom96 | avsej_: Probably not a good idea to name your proc 'await' |
16:31:41 | dtscodeJR | Dom96 sorry... |
16:31:56 | dtscodeJR | Non pic code vs pic code |
16:32:09 | dom96 | dtscodeJR: you can PM me if it's not Nim related, or something that you want to keep private. |
16:32:25 | dtscodeJR | Ok |
16:32:28 | dom96 | It might be easier if you just start with my nimkernel |
16:32:32 | dtscodeJR | Yeah |
16:32:33 | dom96 | it's built to be a starting point |
16:32:45 | dtscodeJR | Mhm |
16:35:06 | * | jaco60 joined #nim |
16:37:11 | * | dtscodeJR quit (Quit: See my work at lukethetechman.wordpress.com) |
16:39:03 | * | yglukhov___ joined #nim |
16:44:12 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
16:49:22 | * | Varriount_ joined #nim |
16:50:20 | * | darkf quit (Quit: Leaving) |
16:52:19 | * | Varriount quit (Ping timeout: 245 seconds) |
16:52:35 | UberLambda | Hello again... any idea why this is overflowing the stack? http://pastebin.com/C5cjKwLt |
16:52:52 | UberLambda | It seems like it keeps adding parenthesis to an empty string... |
16:55:24 | UberLambda | *separators |
16:58:39 | Arrrr | result = join(argsWithSeps) |
16:59:05 | Arrrr | if im not wrong, you got an infinite recursive proc |
16:59:24 | UberLambda | Arrr: oh, why? isn't argsWithSeps a simple array? |
16:59:45 | Arrrr | Yes, and i suppose it matches your join signature |
17:00:03 | UberLambda | But how is it infinitely recursive then? |
17:00:09 | Arrrr | usually varargs is just a plain array |
17:01:03 | * | gokr quit (Quit: Leaving.) |
17:01:11 | Arrrr | use your second join with the full name (module.proc) |
17:01:24 | Arrrr | i suppose it is strutils.join maybe ? |
17:02:27 | * | yglukhov___ quit (Quit: Be back later ...) |
17:04:36 | UberLambda | Arrrr: oh, I wanted to use the strutils one but I imported the sequtils one?? |
17:04:42 | UberLambda | Arrrr: it seems like so |
17:04:59 | UberLambda | Arrrr: also, yeah, I'm calling the proc myself. I'm an idiot... |
17:05:30 | UberLambda | I'll qualify all system procs from now on |
17:05:51 | Arrrr | What i mean is (i suppose) your join accepts both join "path", "to", "somewhere" and join ["path", "to", "somewhere"] |
17:06:12 | Arrrr | that's why is recursive |
17:06:41 | * | InteractOSDev joined #nim |
17:06:59 | UberLambda | Arrrr: yeah, it seems like that was the culprit. Thanks for the help! |
17:07:05 | * | InteractOSDev left #nim (#nim) |
17:28:35 | * | vikaton quit () |
17:31:12 | * | shiyaz quit (Ping timeout: 272 seconds) |
17:31:44 | * | shiyaz joined #nim |
17:43:50 | * | skyfex joined #nim |
17:44:50 | * | filcuc joined #nim |
17:45:57 | avsej_ | how I could check type of object with hierarchy? |
17:46:09 | avsej_ | like instanceof in other languages |
17:47:06 | * | yglukhov___ joined #nim |
17:49:01 | Arrrr | i believe it is: variable is type |
17:52:10 | Arrrr | http://pastebin.com/TCZT6eE8 |
17:52:21 | * | gsingh93 quit (Ping timeout: 276 seconds) |
17:54:36 | * | nande quit (Remote host closed the connection) |
17:55:03 | * | vendethiel quit (Ping timeout: 244 seconds) |
17:56:35 | * | vendethiel joined #nim |
18:08:17 | avsej_ | ok, thanks |
18:11:04 | * | kumul joined #nim |
18:18:56 | * | vikaton joined #nim |
18:19:37 | vikaton | Is there a better way of saving each keystroke here? https://github.com/Vikaton/nim-keylogger/blob/master/src/main.nim |
18:20:14 | vikaton | that method right there isnt very memory efficient |
18:20:32 | avsej_ | https://github.com/Araq/Nim/search?utf8=%E2%9C%93&q=TimeoutError there are two TimeoutError in the stdlib, may I consider them as the same type? dom96? |
18:21:23 | avsej_ | I wan't to rise such error in my code, and would like the clients catch it when they deal with network timeouts |
18:21:34 | Arrrr | since every keystroke is an int, create a big array and store everything there. |
18:22:00 | Arrrr | like "array[pos] = i; inc pos" |
18:23:40 | avsej_ | Araq, could you answer regarding TimeoutError? |
18:27:40 | * | Arrrr quit (Quit: WeeChat 1.2) |
18:28:40 | * | Arrrr joined #nim |
18:31:34 | * | xificurC joined #nim |
18:35:40 | * | Arrrr quit (Quit: WeeChat 1.2) |
18:36:00 | * | Arrrr joined #nim |
18:36:28 | reactormonk | avsej_, nope, they're different. Should be the same imo. |
18:36:46 | reactormonk | one is net.timeoutError, one is sockets.TimeoutError |
18:36:54 | avsej_ | yes, this is what I though |
18:37:21 | avsej_ | and mine also would be in the separate namespace, although serve the same role |
18:38:08 | avsej_ | reactormonk, does it look sane if library, built on asyncnet will import net just for using this exception type? |
18:38:15 | avsej_ | or better define my own? |
18:40:08 | reactormonk | avsej_, might be reasonable to import it. |
18:40:19 | avsej_ | okay. thanks |
18:40:26 | reactormonk | or you could move TimeoutError to something up the import chain |
18:41:13 | reactormonk | avsej_, just move TimeoutError to os.nim and make sure to export it |
18:41:18 | dom96 | avsej_: sockets module is deprecated |
18:41:39 | dom96 | so don't worry about what's in it |
18:41:43 | dom96 | just import net if you have to |
18:41:49 | reactormonk | ok |
18:42:03 | avsej_ | okay. this is what I will do |
18:48:41 | * | Jehan` joined #nim |
18:53:30 | avsej_ | dom96, how I should properly work with result in this proc: https://gist.github.com/avsej/9d4e4a1f7fac4b7c4d99. in one branch I want to fail the future, but it seems like because of async pragma, it does it magically |
18:54:29 | avsej_ | raise like in line 8 does not work either, macro does not pack it into future automatically |
18:54:55 | avsej_ | line 11 gives this error |
18:54:55 | avsej_ | connection.nim(53, 11) Error: type mismatch: got (OperationResult, typedesc[TimeoutError]) |
18:54:56 | avsej_ | but expected one of: |
18:54:56 | avsej_ | asyncdispatch.fail(future: Future[fail.T], error: ref Exception) |
18:55:33 | dom96 | in async procs, result is of type T in Future[T] |
18:55:44 | avsej_ | that's make sense |
18:55:55 | avsej_ | how async procs deal with errors? |
18:56:25 | avsej_ | I wan't to fill 'future.error' property for caller |
19:02:10 | dom96 | use raise |
19:03:55 | avsej_ | but raise propagates the exception outside |
19:04:07 | avsej_ | and does not fill error field |
19:04:43 | vikaton | I dont think strongSpaces is a good idea imo |
19:04:58 | vikaton | to make it default anyway |
19:05:40 | avsej_ | dom96, is it possible to make async procs to put exceptions into error field of future? |
19:06:29 | * | fizzbooze joined #nim |
19:09:48 | reactormonk | dom96, make Future a coproduct ;-) |
19:10:06 | reactormonk | ehh wait. a cosum. |
19:16:13 | dom96 | avsej_: it does fill the error field |
19:17:45 | * | toadest joined #nim |
19:19:17 | UberLambda | How can I return a variant from a proc? when setting `result = MyVariant(kind: something, otherfield: data)` in a `proc myProc(): MyVariant = `, the compiler tells me `()` must have an object or tuple type |
19:20:35 | BlaXpirit | UberLambda, doint something wrong :| |
19:20:37 | BlaXpirit | g |
19:20:39 | BlaXpirit | post code |
19:20:48 | UberLambda | BlaXpirit: kk |
19:20:50 | * | toadest left #nim (#nim) |
19:21:02 | * | jubalh joined #nim |
19:22:56 | avsej_ | dom96, no, it does not. or I'm doing something wrong |
19:22:57 | avsej_ | https://gist.github.com/avsej/8b93b74ab7f5407dbee3 |
19:23:08 | avsej_ | this is executable sample, without dependencies |
19:23:08 | UberLambda | https://gist.github.com/UberLambda/2b36fefd48e298b81568 |
19:23:15 | UberLambda | @BlaXpirit |
19:23:21 | * | kumul quit (Ping timeout: 240 seconds) |
19:23:42 | BlaXpirit | UberLambda, uhh it works? |
19:23:50 | avsej_ | and btw how to determine type of exception? |
19:23:52 | UberLambda | BlaXpirit: not on my machine... |
19:24:02 | UberLambda | maybe it's the doc comments' fault |
19:24:06 | UberLambda | I have some inlined in the code |
19:24:49 | UberLambda | Seriously, one time the compiler was screwed by a doc comment and I have no idea why |
19:25:16 | Arrrr | what's the error |
19:26:08 | UberLambda | Arrrr: Error: () must have an object or tuple type |
19:26:19 | avsej_ | how to determine exception type in this simple example: https://gist.github.com/avsej/609f5dde654d911fd67f |
19:26:31 | Arrrr | which line |
19:26:44 | UberLambda | Arrrr: the line where I instantiate the MyVariant |
19:26:53 | UberLambda | e.g. 17 |
19:27:02 | UberLambda | the error is on kind |
19:27:16 | avsej_ | dom96, did you take a look at my example with raising exceptions from async proc? |
19:27:24 | Arrrr | use new |
19:27:30 | Arrrr | or not |
19:27:35 | UberLambda | Arrrr: new? |
19:27:42 | Arrrr | no, is not necessary. My mistake |
19:28:23 | dom96 | avsej_: what is the problem? |
19:28:34 | dom96 | you're catching the error in the end |
19:28:38 | dom96 | the stack traces are just debugging info |
19:28:49 | Arrrr | UberLambda: , try removing that white line between the proc definition and the result line |
19:28:57 | Arrrr | and add a new one after the result |
19:29:13 | UberLambda | Arrrr: ok |
19:29:58 | UberLambda | Arrrr: no change. I also tried removing most doc comments I had in the code |
19:30:19 | Arrrr | Well, let me try |
19:30:27 | UberLambda | because the compiler seems to treat them as a token of sorts? I once got an error due to that |
19:30:45 | avsej_ | dom96, it is saying "Unhandled exception:" |
19:30:55 | avsej_ | but you say it is catched |
19:31:16 | dom96 | avsej_: yeah, it's a bit incorrect. |
19:31:22 | Arrrr | It compiles without a problem in my computer UberLambda, which compiler version do you have |
19:31:28 | dom96 | it just calls echoStackTrace or whatever the proc is called |
19:31:45 | UberLambda | Arrrr: Nim Compiler Version 0.11.2 (2015-05-05) [Linux: amd64] |
19:31:48 | dom96 | it doesn't crash your program though |
19:31:54 | Arrrr | mmm, i do have 11.3 |
19:32:37 | avsej_ | dom96, but test unit says [FAILED] |
19:32:37 | UberLambda | I added the "real" code to the Gist BTW |
19:33:03 | UberLambda | most of it is still to do |
19:34:30 | Arrrr | i tried to compile it, but i dont have the definition of texture. Try git pull from devel UberLambda. |
19:34:35 | Arrrr | Now i have to dinner, good luck |
19:35:04 | UberLambda | Arrrr: thanks, texture was simply another variant... really similiar to the Font one |
19:35:04 | avsej_ | dom96, even like this: https://gist.github.com/39f987ea5980766dcf3f |
19:35:15 | avsej_ | there no SUCCESS1 or SUCCESS2 in the output |
19:35:34 | UberLambda | Arrrr: enjoy your meal |
19:35:43 | * | Arrrr quit (Quit: WeeChat 1.2) |
19:38:44 | * | vikaton quit () |
19:39:06 | dom96 | avsej_: oh, that's because waitFor calls 'read' on the future. |
19:40:49 | * | filwit joined #nim |
19:41:04 | dom96 | avsej_: https://github.com/Araq/Nim/blob/master/lib/pure/asyncdispatch.nim#L1542 |
19:41:29 | dom96 | avsej_: You can write your own waitFor which doesn't read the future if you want. |
19:43:04 | * | elbow_jason joined #nim |
19:43:05 | avsej_ | thanks. I think poll() plus assert fut.finished will be enough for me, as far as I expect it to complete quicly |
19:44:52 | avsej_ | dom96, what about other question: https://gist.github.com/avsej/609f5dde654d911fd67f how can i determine what type does 'e' have |
19:46:07 | dom96 | Not sure if you can, this might be the way to do it: http://nim-lang.org/docs/typeinfo.html |
19:47:30 | * | datanoise joined #nim |
19:49:39 | avsej_ | but it is an exception right? |
19:50:25 | Jehan` | Exception is just an object type. |
19:50:43 | Jehan` | That said, I'm not sure that it's easy to extract the actual type. |
19:52:07 | reactormonk | avsej_, the idea would be to use except SomeOtherException |
19:52:12 | * | nande joined #nim |
19:53:13 | * | xificurC quit (Ping timeout: 272 seconds) |
19:54:20 | * | fizzbooze quit (Ping timeout: 272 seconds) |
19:54:25 | * | gsingh93 joined #nim |
19:56:07 | Jehan` | The question is really what you want to do with the type representation? |
19:58:25 | avsej_ | I need type to except it properly and handle |
19:59:04 | reactormonk | avsej_, what do you want do to exactly' |
20:00:12 | Jehan` | Then use except with specific exceptions: http://nim-lang.org/docs/manual.html#exception-handling-except-clauses |
20:00:19 | * | OnO joined #nim |
20:00:20 | avsej_ | in this particular case, I'd like to write unit test which make sure that errors from asyncnet propagated to my future as well as my custom exceptions |
20:00:54 | avsej_ | yes, but if I don't know what the type, how I can write specific exception? |
20:02:06 | UberLambda | Is it normal for a let -> const change to cause syntax errors in other parts of the code? |
20:02:20 | UberLambda | I have an error that gets triggered when I set a variable as const instead of let |
20:02:38 | UberLambda | and it does not relate to the inability to import C code |
20:03:00 | Jehan` | UberLambda: Can't say much without context. |
20:03:38 | Jehan` | avsej_: If you don't know the type, you can't handle them anyway? |
20:03:54 | UberLambda | Jehan`:https://gist.github.com/UberLambda/2b36fefd48e298b81568 |
20:04:47 | UberLambda | ^ If I compile the second snippet, uncommenting line 20, it tells me that at line 17 () must have an object or tuple type |
20:04:47 | avsej_ | Jehan`, you mean the types intentionally hidden so that people will not be able to handle them? |
20:05:14 | avsej_ | in the example I know precisely how to cause this exception (invalid host name), but how I can handle it? |
20:05:23 | * | Jesin joined #nim |
20:05:27 | Jehan` | UberLambda: Yeah, and that's because what can be on the rhs of a const declaration is very restricted. |
20:05:42 | Jehan` | It can literally only be a constant. |
20:06:11 | UberLambda | Jehan`: but it seems a constant to me |
20:06:20 | UberLambda | Jehan`: it does not depend on any external state |
20:06:39 | Jehan` | UberLambda: It's the result of a proc call. That this proc call is *currently* constant does not matter. |
20:06:55 | Jehan` | The body may change later, and at that point, it isn't constant anymore. |
20:06:59 | UberLambda | Jehan`: any way to mark a proc as const in some way? |
20:07:05 | UberLambda | Or do I have to use macros? |
20:08:07 | Jehan` | avsej_: It's an OSError. |
20:08:25 | Jehan` | UberLambda: You may be able to use a template there. |
20:08:55 | UberLambda | hm... but I would lose compile-time code execution |
20:09:01 | Jehan` | Huh? |
20:09:20 | Jehan` | A template is something that is literally done at compile-time. |
20:09:25 | UberLambda | don't templates basically generate parts of the AST? |
20:09:38 | UberLambda | I mean, if I had a staticRead() wouldn't that get executed at runtime? |
20:09:43 | Jehan` | A const *must* be something that you can evaluate at compile time. |
20:09:55 | UberLambda | hm |
20:09:55 | Jehan` | No, staticRead is evaluated at compile time. |
20:09:56 | reactormonk | UberLambda, nope. staticRead() is done by the compiler. |
20:10:46 | UberLambda | now I'm confused... first the template generates a segment of the AST, then the compiler tries to execute it at compile time? |
20:10:56 | Jehan` | That said, I don't even know if const works with templates off the top of my head. |
20:10:56 | UberLambda | Otherwise how does it know that there's a staticRead() in there? |
20:11:39 | Jehan` | templates substitute their body at compile time to transform the AST. |
20:11:44 | Jehan` | The AST is then compiled. |
20:11:45 | * | Kingsquee joined #nim |
20:12:07 | avsej_ | Jehan`, https://gist.github.com/67a482d9e3c32dc95071 do you know why testunit cannot assert that the exception is really OSError? |
20:12:13 | UberLambda | oh, right. |
20:12:24 | Jehan` | As part of the compilation process, staticRead is being executed. |
20:12:35 | UberLambda | I'm thinking too much in a lispy-eval fashion... |
20:12:48 | UberLambda | Right, there's the compiler step... not interpretation |
20:15:02 | * | matkuki joined #nim |
20:15:04 | Jehan` | avsej_: No, I don't. I have not even looked at the future stuff to see what it does. |
20:15:47 | * | jh32 joined #nim |
20:16:26 | Jehan` | avsej_: You'll have to bug dom96 about that. :) |
20:16:29 | * | nande quit (Remote host closed the connection) |
20:17:40 | dom96 | avsej_: How do you the future has finished? |
20:17:44 | dom96 | one poll might not be enough |
20:18:37 | dom96 | *do you know |
20:19:04 | * | gokr_ joined #nim |
20:20:01 | * | vikaton joined #nim |
20:21:43 | avsej_ | dom96, https://gist.github.com/8affbdc1c836b424f9dc fails in the same way |
20:22:10 | avsej_ | how to assert the contents of .error field? |
20:22:19 | * | jubalh quit (Ping timeout: 245 seconds) |
20:23:03 | dom96 | yeah, maybe the check fails because it's not finished? |
20:23:06 | * | jubalh joined #nim |
20:23:15 | dom96 | I would suggest you use asserts instead |
20:23:22 | vikaton | dom96, Is there a better way of saving each keystroke here? https://github.com/Vikaton/nim-keylogger/blob/master/src/main.nim |
20:23:38 | vikaton | that program eats alot of cpu |
20:23:45 | * | pregressive quit (Remote host closed the connection) |
20:24:07 | avsej_ | dom96, in last link I assert .finished and it is okay |
20:24:36 | dom96 | Where? |
20:24:43 | dom96 | all I see is check() |
20:25:00 | avsej_ | https://gist.github.com/avsej/8affbdc1c836b424f9dc#file-exc-nim-L52 |
20:25:17 | avsej_ | it checks that finished is true, no? |
20:25:18 | dom96 | vikaton: use getKeyState not getAsyncKeyState. |
20:25:29 | vikaton | Oh? |
20:25:34 | dom96 | avsej_: yes, but either of those checks can fail |
20:25:37 | dom96 | and you won't know which |
20:25:56 | dom96 | or does it give you the line number? |
20:26:03 | avsej_ | i didn't get you |
20:26:16 | avsej_ | exc.nim(54,20): Check failed: fut.error is ref OSError |
20:26:16 | avsej_ | [FAILED] connection: bad address |
20:26:16 | avsej_ | exc.nim(62,20): Check failed: fut.error is ref TimeoutError |
20:26:16 | avsej_ | [FAILED] connection: open timeouts |
20:26:19 | avsej_ | this is output |
20:26:32 | avsej_ | to says that error contains something else |
20:26:58 | dom96 | oh |
20:27:00 | dom96 | remove the 'ref' |
20:27:05 | dom96 | in line 54 and 62 |
20:27:22 | avsej_ | does not help |
20:27:31 | avsej_ | same output |
20:28:00 | matkuki | Anyone know how to declare and use a function pointer from a C dynamic library in Nim ? Example: "int (*PyOS_InputHook)(void)" |
20:28:01 | avsej_ | example is executable without dependencies, you can try it |
20:28:30 | * | dtscodeJR joined #nim |
20:28:33 | * | kokozedman quit (Ping timeout: 240 seconds) |
20:28:40 | dtscodeJR | I'm looking for a nim project to do.... |
20:28:43 | dtscodeJR | Suggestions? |
20:28:51 | dtscodeJR | I'm thinking maybe a nim IRC client |
20:29:17 | def- | dtscodeJR: something from this list? https://github.com/Araq/Nim/wiki/GSoC-2015-Ideas |
20:29:26 | avsej_ | dtscodeJR, https://github.com/nim-lang/irc |
20:30:10 | dom96 | avsej_: change 'is' to 'of' |
20:30:18 | dom96 | that's a bad gotcha. |
20:30:40 | avsej_ | wow |
20:30:42 | avsej_ | works |
20:31:03 | dtscodeJR | dom96: Why have you done all the cool Nim things already? |
20:31:14 | dtscodeJR | avsej_: Thats a lib |
20:31:19 | dom96 | dtscodeJR: because I am the almighty dom |
20:31:21 | dtscodeJR | I'm talking afull on client |
20:31:25 | avsej_ | where I can read about of? |
20:31:29 | dtscodeJR | You are, you are |
20:31:36 | vikaton | dom96, I need GetAsyncKeyState, and I think the solution is to figure out a better way to save the chars |
20:31:53 | avsej_ | found |
20:31:56 | dom96 | vikaton: why do you need it? |
20:32:20 | dtscodeJR | I mean GUI, nim eval,.... |
20:32:25 | dom96 | vikaton: it returns immediately so your loop keeps looping and burning your CPU |
20:32:26 | vikaton | dom96: I wont be able to log the keys that way with GetKeyState |
20:32:28 | dtscodeJR | .(for a client) |
20:32:43 | dtscodeJR | dom96: Have any good project ideas you havent done yet? |
20:33:02 | vikaton | dom96: I tried it and no LOG.txt showed up and it still ate up the same amount of CPU |
20:34:32 | dtscodeJR | What would you guys like more: another nim IDE, a nim IRC client, or nim web browser? |
20:34:50 | dom96 | dtscodeJR: why another Nim IDE? |
20:34:55 | dom96 | dtscodeJR: You could create a Minecraft clone |
20:35:01 | dom96 | or and IRC server |
20:35:03 | dom96 | *an |
20:35:06 | dom96 | or an IRC bouncer |
20:35:16 | Jehan` | I don't think a Nim web browser is a realistic option, unless you're talking about a terminal-based one. |
20:35:25 | dtscodeJR | Jehan`: Why? |
20:35:28 | dtscodeJR | We have SDL |
20:35:36 | dtscodeJR | Use that for a few buttons, |
20:35:42 | dtscodeJR | custom window |
20:35:51 | Jehan` | Well, if you have a couple of developer centuries lying around ... |
20:36:03 | dtscodeJR | dom96 eNIMcraft! |
20:36:03 | dom96 | dtscodeJR: A web rendering engine is not a trivial piece of software to write. |
20:36:08 | dtscodeJR | True |
20:36:15 | dtscodeJR | I'll do a basic minecraft clone |
20:36:18 | Jehan` | dom96: understatement of the year. :) |
20:36:20 | vikaton | besides |
20:36:22 | Xe | irc client might be useful |
20:36:29 | Xe | i'd like something to replace weechat with |
20:36:31 | reactormonk | Xe, we already have a good one ^^ |
20:36:33 | vikaton | why make a web browser when we have Servo in our future ! |
20:36:36 | reactormonk | ah, client. hm. |
20:36:44 | Xe | weechat for me can use up to 4 GB of ram |
20:36:55 | reactormonk | Xe, how many tabs? |
20:37:01 | Xe | 4 windows used (1 vertically / 3 horizontally split). 248 (of which 0 merged) buffers open: 1 core, 1 lua, 13 irc servers, 19 irc queries, 2 perl, 212 irc channels |
20:37:02 | dom96 | Xe: wow, really? How is that possible? |
20:37:14 | * | avsej_ quit (Ping timeout: 265 seconds) |
20:37:20 | Xe | I also have like 9001 scripts loaded |
20:37:23 | dom96 | Xe: why do you need to be in so many channels? :P |
20:37:33 | Xe | dom96: I have 3 O:Lines |
20:37:36 | Xe | and develop irc daemons |
20:38:08 | reactormonk | dtscodeJR, you running on linux? |
20:38:20 | dom96 | Xe: cool |
20:38:26 | Xe | I have looked at making ircd modules in nim |
20:38:37 | Xe | but I can't figure out how to pass a c struct to a nim proc |
20:39:09 | dtscodeJR | reactormonk: Generally, but windows atm |
20:39:17 | Varriount_ | Xe: You need to use an FFI pragma to give the exported procedure a sensible name. |
20:39:20 | reactormonk | dtscodeJR, or one project I had in the back of my mind would be a pdf presenter with notes (two windows, one for presenting, one for the notes, like a cockpit view) that works well with latex-beamer |
20:39:37 | Xe | Varriount_: yeah but I mean at the type level how to say "this shit is a C struct" |
20:39:57 | Xe | I'm probably missing it pretty hardcore |
20:40:03 | vikaton | is there a file.flush() method |
20:40:22 | Varriount_ | Xe: Nim type definitions match pretty directly with C structs |
20:40:24 | dom96 | Xe: An object in nim is basically a C struct. |
20:40:26 | * | avsej joined #nim |
20:40:39 | Xe | yeah I was missing it lol |
20:40:49 | * | avsej is now known as Guest46758 |
20:40:58 | dom96 | just need to use the {.exportc.} pragma to disable nim's name mangling and you're good to go |
20:41:04 | Varriount_ | Although an 'int' type in Nim isn't the same as an 'int' in C |
20:41:12 | Xe | not to mention c2nim is unable to parse parts of ircd's source code :/ |
20:41:23 | reactormonk | Xe, gotta improve ircd ;-) |
20:41:29 | Xe | reactormonk: patches welcome |
20:41:32 | Varriount_ | Xe: c2nim is meant more for headers, not complete source. |
20:41:36 | reactormonk | Xe, ehh c2nim |
20:41:37 | Xe | this code is a schizophrenic nightmare |
20:41:43 | Xe | Varriount_: I was using the headers |
20:41:49 | Jehan` | "cint" is Nim's type to match C's int. |
20:41:58 | Varriount_ | Xe: Oh, I was confused then. |
20:42:02 | * | Varriount_ is now known as Varriount |
20:42:24 | dom96 | Xe: what ircd do you work on? |
20:42:37 | dom96 | I would really love to see an ircd written using Nim. |
20:42:37 | Xe | dom96: https://github.com/elemental-ircd/elemental-ircd |
20:42:43 | Xe | However |
20:42:48 | * | dtscodeJR left #nim (#nim) |
20:42:53 | dom96 | My async await feature would be perfect :) |
20:43:14 | Xe | making an ircd in nim would just repeat the mistakes of the past unless you are careful |
20:44:10 | dom96 | Xe: That's why we need to convince experienced ircd devs to assist me :P |
20:44:34 | Xe | dom96: i've been looking at making a competitor to skype |
20:44:37 | vikaton | flushing the file doesnt help |
20:44:40 | dom96 | (in all seriousness I doubt I have the time for that) |
20:44:43 | vikaton | I'm sad :( |
20:44:53 | dom96 | But it would be fun to write even a toy one |
20:45:03 | dom96 | vikaton: output to console? |
20:45:17 | dom96 | Xe: isn't there already a ton of those? |
20:45:22 | vikaton | dom96, no echoing |
20:45:40 | dom96 | vikaton: is this running as a service? |
20:45:50 | Xe | dom96: I'm tired of losing users to skype |
20:45:50 | vikaton | No |
20:46:11 | notdtscode | Oh I'm sorry about that. I tell people not to use software made by xe |
20:46:18 | vikaton | its a background process |
20:46:33 | Xe | :P |
20:46:35 | notdtscode | dom96: I would write one in nim if I knew how to use async* modules ;-; |
20:47:01 | Xe | dom96: i've been drafting out something that separates policy from state and mechanism |
20:47:18 | vikaton | dom96, you wanna try for yourself? |
20:47:22 | * | ozra joined #nim |
20:47:55 | dom96 | vikaton: i'm not sure, it's a keylogger right? :P |
20:48:07 | dom96 | notdtscode: I can help :) |
20:48:18 | notdtscode | :D |
20:48:22 | dom96 | Xe: not really sure what you mean by that heh |
20:48:43 | dom96 | Xe: Does Skype really work as a replacement for IRC? |
20:48:46 | Xe | dom96: state = network state, policy = "can x do y", mechanism is TCP sockets |
20:48:59 | Xe | dom96: ask the idiots that switch to it because of scrollback being server side |
20:49:06 | Varriount | Xe: If it makes you feel any better, people at my work wish there was a better alternative to Skype. |
20:49:13 | vikaton | dom86, I commented out Stealth :P |
20:49:18 | vikaton | https://www.irccloud.com/pastebin/4G6fE1W3/ |
20:49:19 | dom96 | Xe: I think Slack should be your biggest worry |
20:49:25 | Xe | dom96: indeed |
20:49:25 | vikaton | dom96 * ^ |
20:49:47 | dom96 | vikaton: Can't you get it running in the console? |
20:49:55 | Xe | is that the first nim keylogger? |
20:50:04 | Varriount | vikaton: What's wrong with it? |
20:50:10 | vikaton | dom96, it runs, but it eats my cpu |
20:50:27 | vikaton | it runs around 30% |
20:50:33 | vikaton | I want it at 9=10% |
20:50:39 | vikaton | 9-10% * |
20:50:46 | Varriount | vikaton: Uh, that's because you're using a polling mechanism. |
20:50:57 | Xe | dom96: so far I'm looking at having a daemon that handles user connections communicate with a Source of Truth that sends information to the mechanism |
20:51:11 | Xe | separating state, policy and the mechanism to allow for arbitrary transports |
20:51:13 | Varriount | vikaton: You can slow the loop down, however you then risk losing key presses. |
20:51:15 | * | wuehlmaus quit (Ping timeout: 265 seconds) |
20:51:36 | vikaton | Varriount: leave no key press behind! |
20:51:37 | dom96 | Varriount: He needs to use something which blocks, which is what GetKeyState is. |
20:51:56 | Varriount | Xe: Before you make any grand designs, make sure those designs fit with Nim's threading model. |
20:51:57 | vikaton | dom96, GetKeyState does not log any keys :( |
20:52:47 | dom96 | vikaton: Research it :) |
20:53:05 | dom96 | Xe: sounds complex |
20:53:07 | * | gokr joined #nim |
20:53:09 | Xe | Varriount: i've been prototyping in Go |
20:53:19 | dom96 | Xe: I would need to see how it works in practice to understand it better. |
20:53:22 | * | gokr quit (Read error: Connection reset by peer) |
20:53:25 | Xe | the hard part always boils down to state |
20:53:29 | * | wuehlmaus joined #nim |
20:53:53 | * | gokr joined #nim |
20:53:53 | * | wuehlmaus is now known as Guest87260 |
20:53:55 | * | filcuc quit (Quit: Konversation terminated!) |
20:54:59 | dom96 | Xe: Time to switch your prototypes to Nim :P |
20:55:07 | Xe | dom96: I know Go better than nim |
20:55:11 | Xe | sorry |
20:55:13 | Xe | :P |
20:55:32 | Xe | and go autocomplete works in vim where nim does not |
20:55:38 | dom96 | Xe: Pity. |
20:55:40 | Xe | that is reason enough for most coding |
20:55:47 | vikaton | I'm gonna test my Rust version |
20:55:49 | dom96 | We really need to fix nimsuggest |
20:55:55 | dom96 | vikaton: I think I see the problem. |
20:56:02 | vikaton | ! |
20:56:19 | dom96 | vikaton: You can't use GetKeyState because you are checking literally every key separately. |
20:56:21 | Xe | dom96: and as far as something I'd like to push to users I have a rule against using pre-1.0 languages |
20:56:30 | vikaton | dom98, I am yes |
20:56:47 | Varriount | Xe: :< |
20:56:58 | Xe | not to mention nim's redis module doesn't support pub/sub |
20:57:06 | Xe | which means it is useless for this project :/ |
20:57:40 | dom96 | Xe: huh, could've sworn it supported that. |
20:57:59 | dom96 | vikaton: Is my name that hard to type? :P |
20:58:27 | dom96 | vikaton: There should be a function which gives you a list of keys which have been pressed since the last invocation of that function. |
20:58:33 | ozra | windom 98 |
20:58:48 | Xe | dom96: https://github.com/Araq/Nim/blob/devel/lib/pure/redis.nim#L842-L871 |
20:59:53 | ozra | vikaton: "do" + tab... |
21:00:48 | dom96 | Xe: :/ |
21:00:55 | dom96 | Xe: You could help us out ;) |
21:01:20 | dom96 | Always a good learning experience. |
21:01:28 | dom96 | Would teach you a lot about redis |
21:01:30 | notdtscode | I keep meaning to read the asyncdispatch module, and I keep getting distracted |
21:02:04 | * | notdtscode is now known as PaulMaudib |
21:04:43 | * | Xe quit (Ping timeout: 265 seconds) |
21:04:54 | * | UberLambda quit (Remote host closed the connection) |
21:05:42 | vikaton | ozra, it's a habit for shortnames |
21:05:54 | vikaton | its kinda funny |
21:05:58 | vikaton | dom98 lol |
21:06:03 | * | vikaton is now known as dom98 |
21:06:44 | * | jubalh quit (Remote host closed the connection) |
21:07:02 | PaulMaudib | Are you like 2 better better than dom96 ? |
21:07:41 | dom98 | mhm |
21:07:46 | dom98 | new and improved |
21:08:15 | PaulMaudib | Oh good. I've been waiting for the new domupdate |
21:08:27 | * | Kingsquee quit (Quit: Konversation terminated!) |
21:10:36 | * | dom98 is now known as vikaton |
21:12:47 | BitR | About nimsuggest and vim support. I've got a prototype up and running for YouCompleteMe + nimsuggest. |
21:12:56 | def- | BitR: great! |
21:13:21 | BitR | Will see if I can figure out how Github works in a short while ;) |
21:16:35 | * | Xe joined #nim |
21:16:55 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/20150513174244]) |
21:18:46 | ozra | Xe: You maybe missed it, but BitR is working on a vim autocompleter for Vim |
21:19:58 | Xe | yay |
21:20:12 | * | PaulMaudib is now known as squirtle |
21:20:54 | vikaton | What is nimsuggest |
21:21:18 | vikaton | an autocompleter? |
21:23:00 | * | squirtle is now known as dtscode |
21:23:52 | * | dtscodeJR joined #nim |
21:24:09 | * | dtscodeJR left #nim (#nim) |
21:24:35 | onionhammer | it's a tool IDEs can use to do definition lookups/autocomplete |
21:25:25 | jaco60 | for me, it's rather a white whale... like Moby Dick |
21:28:40 | gokr | vikaton: Its basically the compiler running in a service mode - so it can answer queries from an editor/IDE. |
21:28:58 | gokr | Araq's baby. |
21:29:00 | * | fffff joined #nim |
21:31:03 | fffff | is there any info on the new anonymous proc syntax? "(x: int) => x * 5" |
21:31:37 | dom96 | fffff: just what you see here: http://nim-lang.org/docs/future.html |
21:32:06 | fffff | thx, i just couldnt find it anywhere |
21:32:14 | fffff | searching for '=>' is quite hard lol |
21:36:19 | dom96 | fffff: This is useful for searching http://nim-lang.org/docs/theindex.html |
21:36:47 | fffff | dom96: this is going into my fav bar =) |
21:38:27 | * | elbow_jason quit (Ping timeout: 250 seconds) |
21:42:00 | * | ingsoc quit (Ping timeout: 246 seconds) |
21:43:22 | vikaton | gokr, what's Nim to Araq? |
21:43:46 | gokr | vikaton: Waf? |
21:44:37 | vikaton | Waf? |
21:45:55 | gokr | vikaton: I don't understand "what's Nim to Araq?" |
21:46:08 | gokr | Are you playing Jeopardy perhaps? |
21:46:19 | vikaton | gokr, you said nimsuggest is Araq's baby |
21:46:48 | vikaton | nvm lol |
21:47:01 | gokr | And yes, Nim is also his baby. I just... didn't hear the tone over IRC. |
21:47:05 | * | dtscodeJR joined #nim |
21:47:07 | * | dtscodeJR left #nim (#nim) |
21:49:51 | vikaton | God I hope strongSpace doesnt become a thing :( |
21:51:48 | Jehan` | vikaton: I don't think it'll be, except to disambiguate "echo $foo" (same what Ruby does, essentially). |
21:52:34 | vikaton | Ok good |
21:53:20 | * | banister joined #nim |
21:55:53 | * | gsingh93 quit (Ping timeout: 252 seconds) |
22:02:26 | BitR | Alright, so the first version of the prototype is up at https://github.com/BitR/ycm-nimsuggest |
22:03:02 | BitR | Currently you'll only get completion after having used ctrl-space at least once during a nim file edit... |
22:04:49 | dom96 | BitR: how well does it work? |
22:05:13 | dtscode | dom96: What is a dispatcher? |
22:07:06 | dom96 | dtscode: it's an object which stores a list of sockets (and other file descriptors) |
22:07:32 | dom96 | In poll(), it goes through that list and checks which sockets can be written to or read from |
22:07:37 | BitR | dom96: Well, as long as you use ctrl-space from time to time, it'll keep showing up with completions for ya (also during editing in insert mode) |
22:07:50 | BitR | I'm guessing the ctrl-space issue is due to either timeout or the YCM cache |
22:08:05 | dtscode | dom96: thanks |
22:08:10 | * | nande joined #nim |
22:10:11 | * | pregressive joined #nim |
22:10:59 | dom96 | dtscode: it's all done in the background though, you don't really need to know about it :P |
22:11:06 | dtscode | fair enough |
22:13:12 | * | yglukhov___ quit (Quit: Be back later ...) |
22:16:42 | * | dtscodeJR joined #nim |
22:16:58 | dtscodeJR | How do I start Aporia on windows? |
22:17:13 | * | BlaXpirit quit (Quit: Quit Konversation) |
22:17:31 | dtscodeJR | I used nimble install aporia@#head |
22:21:26 | ozra | Jehan`: vikaton: strongspace != juxtapoisition calls. strongspace is a cool idea, but horrible ;) juxtaposition calls are essential :) |
22:23:52 | * | dtscodeJR quit (Remote host closed the connection) |
22:25:37 | dom96 | dtscode: type aporia into the cmd line |
22:25:42 | dom96 | argh |
22:25:45 | dtscode | dom96: done. now what? |
22:25:57 | dom96 | dtscode: not you, senior. |
22:26:01 | dtscode | >:3 |
22:26:33 | dtscode | I think I understood the async chat server example |
22:30:24 | dom96 | awesome |
22:30:26 | * | kumul joined #nim |
22:32:00 | vikaton | I see |
22:36:40 | dtscode | Is there no split function with a maxsplit? |
22:40:42 | * | boop is now known as boopisaway |
22:45:58 | * | Trustable_2 quit (Remote host closed the connection) |
22:51:06 | flaviu | dtscode: nre! |
22:59:09 | * | pregressive quit (Remote host closed the connection) |
22:59:37 | * | Jesin quit (Read error: Connection reset by peer) |
22:59:44 | * | boopisaway is now known as boop |
23:00:45 | Xe | What is the syntax for passing a linker flag? |
23:00:55 | Xe | {.passL "-lcrypt".} |
23:01:00 | Xe | this seems to not work |
23:01:08 | dom96 | {.passL: "-lcrypt".} |
23:01:12 | Xe | oh |
23:02:03 | * | Jesin joined #nim |
23:02:18 | Xe | derp |
23:04:35 | BitR | dom96: I've sorted the inconsistency of ctrl-space by taking advantage of the cache, now I just need to sort the speed of the completer. That'll be a task for tomorrow. |
23:04:45 | dom96 | BitR: cool |
23:05:17 | dtscode | whoever thought it was a good idea to not give dtscode more monitors was sorely mistaken |
23:07:21 | * | brson quit (Quit: leaving) |
23:11:36 | * | TEttinger joined #nim |
23:32:00 | * | Jehan` quit (Quit: Leaving) |
23:49:58 | vikaton | dom97, how much closer are you do making jester run on multiple cores? |
23:50:01 | vikaton | dom96*** |
23:50:54 | ozra | why-key-ton |
23:52:37 | * | Senketsu quit (Quit: Leaving) |
23:55:32 | Xe | does nim's defer take any arbitrary block of nim or is it just function calls like Go? |
23:55:47 | * | Senketsu joined #nim |
23:55:54 | filwit | arbitrary block |
23:56:10 | Xe | sweet |
23:56:25 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |