00:08:24 | * | thaless quit (Quit: Leaving) |
00:08:39 | * | apense quit (Ping timeout: 255 seconds) |
00:10:53 | * | apense joined #nim |
00:23:42 | * | saml_ joined #nim |
00:25:18 | dgellow | how can I do a binary AND operation ? the ampersand (&) doesn't seem to be used for something other than string concatenation. |
00:25:47 | dgellow | and push to array |
00:25:49 | EXetoC | 'and' |
00:26:54 | * | mal`` quit (Ping timeout: 248 seconds) |
00:27:11 | dgellow | `and` converts to `&&`, no ? |
00:27:25 | dtscode | in the compiler? |
00:28:03 | dgellow | yes, in the compiler |
00:28:19 | dtscode | sure, at some point I would assume it would be converted |
00:28:49 | * | vasher_ quit (Quit: Connection closed for inactivity) |
00:30:41 | dgellow | I want the C `&` operator |
00:31:07 | dtscode | you mean like int a = 4 & 5? |
00:31:11 | dgellow | yep |
00:31:12 | dgellow | http://www.xcprod.com/titan/XCSB-DOC/binary_and.html |
00:31:23 | dgellow | bitwise AND |
00:31:47 | dtscode | then use it |
00:31:53 | dtscode | if it doesn't exist you can make an operator for it |
00:32:11 | EXetoC | it does exist, and it won't be && for integers |
00:32:50 | dgellow | okay, so xint and ynt => xint & yint ? |
00:33:09 | * | shevy left #nim ("I'll be back ... maybe") |
00:33:56 | dtscode | no |
00:34:14 | EXetoC | ? |
00:34:33 | dtscode | I thought and was for short circuit conditions |
00:35:12 | EXetoC | it's for that too. there are separate overloads for ints and booleans |
00:35:20 | dtscode | ah TIL |
00:35:34 | dtscode | nmd, yes dgellow your last statement is correct |
00:36:02 | EXetoC | and these things are exposed as procs and have doc comments. see the documentation for the system module |
00:37:18 | * | gokr quit (Quit: Leaving.) |
00:38:33 | dgellow | okay, thank you both. |
00:51:13 | * | EXetoC quit (Ping timeout: 244 seconds) |
00:57:04 | * | vendethiel quit (Ping timeout: 256 seconds) |
01:03:04 | dgellow | hmm … there is no proc `and`(x, y: uint): uint in system module |
01:03:39 | def- | dgellow: import unsigned |
01:03:56 | * | vendethiel joined #nim |
01:04:25 | dgellow | def-: exactly what I was looking for! thank you |
01:04:41 | def- | will land in system module soon I Hope |
01:05:50 | * | BitPuffin|osx joined #nim |
01:09:10 | * | elbow_jason quit (Remote host closed the connection) |
01:24:41 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:24:52 | * | dpzmick joined #nim |
01:27:28 | * | johnsoft quit (Read error: Connection reset by peer) |
01:38:35 | * | dpzmick quit () |
01:46:07 | * | vendethiel quit (Ping timeout: 246 seconds) |
01:49:13 | * | vasher_ joined #nim |
01:52:12 | apense | is the an ability (or plans to have one) to assign operator precedence? like infixr and similar do for Haskell? |
01:52:20 | * | vendethiel joined #nim |
01:52:27 | * | drewsrem quit (Quit: Leaving) |
01:53:53 | apense | I know you can control it by the first character. I guess that's all you really need. |
01:56:34 | apense | n/m |
02:07:13 | Varriount | apense: The strongspaces feature can make operator precedence better. |
02:09:08 | * | brson quit (Quit: leaving) |
02:15:31 | * | vendethiel quit (Ping timeout: 246 seconds) |
02:17:09 | * | ozra quit (Ping timeout: 246 seconds) |
03:09:40 | * | strcmp1 quit (Quit: Leaving) |
03:13:17 | * | saml_ quit (Ping timeout: 240 seconds) |
03:24:27 | * | apense quit (Read error: Connection reset by peer) |
03:24:52 | * | apense joined #nim |
03:29:30 | * | darkf joined #nim |
03:31:40 | * | dtscode is now known as Antium |
03:34:28 | * | darkf_ joined #nim |
03:36:46 | * | darkf quit (Ping timeout: 248 seconds) |
03:36:49 | * | darkf_ is now known as darkf |
03:42:01 | * | mal`` joined #nim |
03:45:22 | * | vendethiel joined #nim |
03:53:56 | * | Antium is now known as dtscode |
04:07:53 | * | vendethiel quit (Ping timeout: 256 seconds) |
04:18:49 | * | vasher_ quit (Quit: Connection closed for inactivity) |
04:25:05 | * | vendethiel joined #nim |
04:40:24 | * | darkf_ joined #nim |
04:43:26 | * | darkf quit (Ping timeout: 248 seconds) |
04:48:50 | * | vendethiel quit (Ping timeout: 250 seconds) |
04:50:15 | * | ChrisMAN quit (Ping timeout: 252 seconds) |
04:56:14 | * | vendethiel joined #nim |
04:59:33 | * | darkf_ is now known as darkf |
05:25:34 | * | FedeOmoto quit (Ping timeout: 246 seconds) |
05:36:44 | * | dgellow left #nim (#nim) |
05:40:17 | * | vendethiel quit (Ping timeout: 240 seconds) |
05:45:25 | * | vendethiel joined #nim |
06:03:41 | * | Miko_ joined #nim |
06:07:15 | * | vendethiel quit (Ping timeout: 252 seconds) |
06:12:19 | * | vendethiel joined #nim |
06:25:40 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
06:33:31 | * | vendethiel quit (Ping timeout: 246 seconds) |
06:35:28 | * | Demon_Fox quit (Quit: Leaving) |
06:35:56 | * | vendethiel joined #nim |
06:54:02 | * | dalarmmst quit (Quit: Leaving) |
06:55:48 | * | dalarmmst joined #nim |
06:56:38 | * | jszymanski joined #nim |
07:00:59 | * | dalarmmst quit (Ping timeout: 256 seconds) |
07:19:14 | * | vendethiel quit (Ping timeout: 244 seconds) |
07:22:03 | * | Miko_ quit (Ping timeout: 252 seconds) |
07:29:34 | * | Miko_ joined #nim |
07:35:42 | * | dddddd joined #nim |
07:40:32 | * | vendethiel joined #nim |
08:02:17 | * | vendethiel quit (Ping timeout: 240 seconds) |
08:03:27 | * | Trustable joined #nim |
08:05:52 | * | dddddd quit (Ping timeout: 246 seconds) |
08:06:03 | * | vendethiel joined #nim |
08:09:43 | * | coffeepot joined #nim |
08:12:51 | * | Miko_ quit (Ping timeout: 255 seconds) |
08:20:30 | * | Miko_ joined #nim |
08:32:07 | * | yglukhov_ joined #nim |
08:47:18 | * | gokr joined #nim |
08:49:28 | * | jaco60 joined #nim |
08:51:43 | * | vendethiel quit (Ping timeout: 246 seconds) |
08:52:41 | * | BitR quit (Ping timeout: 264 seconds) |
08:55:00 | * | foochain joined #nim |
08:55:40 | * | aziz joined #nim |
08:55:47 | * | foochain left #nim (#nim) |
08:57:57 | * | vendethiel joined #nim |
09:02:06 | Varriount | Araq: Do you want me to change the style guide so that the recommended seperator for parameters of disparate types is ';'? |
09:03:30 | Varriount | Since I noticed you prefer to use a comma for seperating parameter groups (eg 'a, b: string') and a semicolon for parameters of different types ('a: string; b: int') |
09:13:33 | * | Miko_ quit (Ping timeout: 265 seconds) |
09:24:05 | Araq | Varriount: ok. that's also what "nim doc2" generates. |
09:25:55 | Araq | def-: you haven't answered yet. Otherwise I would have pulled it already. |
09:46:20 | * | ozra joined #nim |
10:06:15 | * | aziz quit (Remote host closed the connection) |
10:09:21 | coffeepot | so proc stuff(a: int, b: string, c: float) will be less preferred than stuff(a: int; b: string; c: float) ? |
10:09:22 | * | yglukhov__ joined #nim |
10:09:56 | * | yglukhov__ quit (Remote host closed the connection) |
10:10:22 | * | yglukhov_ quit (Read error: Connection reset by peer) |
10:10:31 | * | yglukhov__ joined #nim |
10:10:49 | Araq | yeah |
10:10:52 | * | xificurC_ joined #nim |
10:13:36 | * | xificurC quit (Ping timeout: 264 seconds) |
10:13:55 | coffeepot | :( personally I liked commas over semi colons after working in pascal, which uses semis like this. Is there a parsing reason, or just preference? |
10:14:24 | Araq | just continue to use what you like better. |
10:15:36 | * | Xe quit (Remote host closed the connection) |
10:15:48 | Araq | it's more effort to enforce 100% consistency than just to allow for slight variations in coding styles |
10:15:57 | Araq | much more effort. |
10:16:25 | Araq | I wonder when programmers will learn this. :P |
10:17:14 | coffeepot | well it's a testament to Nim's adaptability that you consider this a slight coding style difference :) |
10:20:08 | Araq | when I was in the army we all had to roll up our sleeves at the same time (!) for consistency. |
10:20:41 | Araq | It wasn't for consistency. It was bullying. |
10:22:22 | Varriount | :< |
10:24:20 | Araq | Varriount: the style guide is a very valuable as a *guide* so people can stop thinking about irrelevant details and focus on the code's purpose. But it's not a law. |
10:25:36 | * | vasher_ joined #nim |
10:27:10 | coffeepot | I actually really like the way Nim is pretty style insensitive. I'm happy we get more options, taking options away is what would have made me sad. |
10:28:17 | * | xificurC_ quit (Quit: WeeChat 1.2) |
10:28:37 | * | xificurC joined #nim |
10:28:46 | Varriount | coffeepot: I agree with you. I only use semicolons when there are 'parameter groups', eg, 'b, c: string' |
10:29:07 | Varriount | Araq: I'll see what I can do to make the style guide more... guide-ish |
10:36:08 | Araq | Varriount: no worries. It's acceptable to be more picky than Araq. :P |
10:38:17 | Araq | hrm I think this should be "pickier". lol |
10:38:32 | coffeepot | more pickier? :) |
10:39:01 | Varriount | Araq: On another topic, I have a walkTree implementation nearly done (Improved walkDirRec) |
10:40:10 | Varriount | Also, the expandSymlinkProc is giving me trouble. One of the core data structures used by a Windows API seems to be padded incorrectly (Possibly by GCC?) |
10:41:36 | Araq | that's bad. how is the new windows API coming along? |
10:42:36 | Varriount | Araq: I keep running into things that make me have to re-run it. |
10:43:19 | Varriount | This time, it was the fact that I had (mistakenly) presumed that the library I'm using would filter out duplicate urls |
10:43:37 | Varriount | Which it didn't, and so my ram was nearly eaten up. |
10:44:25 | Varriount | Araq: In the meantime, I'm working on macros to make interfacing a bit easier. |
10:44:33 | Araq | did you check out whether something like "Google cache" can give you a .zip or something? |
10:45:09 | Varriount | Of an entire website? Not likely. |
10:45:56 | Varriount | Araq: With regards to speed, I'm actually limiting it right not to 1 request every 2 seconds. I'd rather not get blocked from msdn. |
10:46:02 | Varriount | *right now |
10:46:27 | Araq | that's a very reasonable thing |
10:50:40 | Araq | you could also read the full list of exported functions from user32.dll and kernel32.dll and use the function names for Google site:microsoft searches |
10:51:07 | Araq | instead of crawling microsoft |
10:51:28 | Varriount | Araq: Actually, the functions get scraped rather quickly. It's the structures that take a while. |
10:51:46 | Araq | ah ok |
10:55:26 | Varriount | Oh, and before the most recent restart, it was because I ran out of handles. I had used a scheme which kept the handles of all the output files open. |
10:55:46 | Varriount | :| |
11:00:35 | * | arnetheduck joined #nim |
11:05:57 | * | EXetoC joined #nim |
11:06:17 | Araq | do you use c2nim for this? |
11:13:00 | * | cocasman1r is now known as seumiremorque |
11:14:30 | * | zahary__ joined #nim |
11:17:16 | * | zahary_ quit (Ping timeout: 252 seconds) |
11:54:01 | * | raza joined #nim |
11:59:30 | * | arnetheduck quit (Read error: Connection reset by peer) |
12:10:01 | * | xcombelle joined #nim |
12:37:54 | * | vendethiel quit (Ping timeout: 255 seconds) |
12:42:14 | * | drewsrem joined #nim |
12:46:26 | * | vendethiel joined #nim |
12:48:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
12:50:21 | drewsrem | Whenever I call a macro with a set of parameters that get rejected by the macro, causing it to call "error(some_message)", the StackTrace never starts at the place where I call the macro from, but rather inside the macro itself. - Any pointers? |
12:51:00 | * | FedeOmoto joined #nim |
12:54:15 | * | xcombelle quit (Ping timeout: 252 seconds) |
12:54:22 | Araq | I think you get 2 stack traces, one from the compiler with "instantiation from here", the other from the VM |
12:56:55 | Araq | if not, we can make it so |
12:58:15 | Araq | hrm, drewsrem |
12:58:34 | Araq | in compiler/vm.nim there is this snippet |
12:58:38 | Araq | # XXX test if we want 'globalError' for every mode |
12:58:40 | Araq | if c.mode == emRepl: globalError(c.debug[pc], msg, arg) |
12:58:41 | Araq | else: localError(c.debug[pc], msg, arg) |
12:59:02 | Araq | make it always call globalError please and see what happens |
12:59:10 | Araq | if it works, make a PR |
13:01:08 | drewsrem | I'll try |
13:08:17 | * | vendethiel quit (Ping timeout: 240 seconds) |
13:08:56 | drewsrem | Araq, didn't change it, I may have said it wrong tho, when I said "whenever" I meant, with the macros I wrote, I may just write them wrong? :| |
13:09:03 | * | vendethiel joined #nim |
13:10:34 | Araq | drewsrem: just tested it, works for me without compiler patch: |
13:11:07 | Araq | macro m(n: expr): expr = |
13:11:08 | Araq | error "foo bar a" |
13:11:10 | Araq | m 30 |
13:11:27 | Araq | I get "instantiation from here" |
13:11:29 | drewsrem | Then I'm sorry, I'm just doing it wrong then: http://ix.io/jDC |
13:12:03 | drewsrem | Ahhhhhhhh "Instantiation from here" |
13:12:20 | drewsrem | Sorry wasting your time, didn't see it |
13:13:25 | Araq | good |
13:16:00 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:16:49 | * | raza joined #nim |
13:20:01 | drewsrem | It just seems that IDE support for it is lacking, neither Aporia nor the vim-plugin I'm using make use of the "Instantiation from here" line |
13:20:34 | drewsrem | that is, they don't highlight it and Aporia doesn't show it in its "Error list" |
13:21:56 | drewsrem | Probably because nim doesn't flag the "instantiation from here" line as an error? |
13:23:27 | Varriount | drewsrem: Most likely. |
13:23:54 | Varriount | I don't think I've special cased it in the NimLime plugin for Sublime Text either. |
13:26:12 | drewsrem | Would be great to have it, makes templates/macros feel second-class citizens in your editor :) |
13:49:33 | * | wu-lee quit (Ping timeout: 256 seconds) |
13:56:05 | * | BitPuffin joined #nim |
13:59:21 | * | BitR joined #nim |
14:03:40 | * | MatrixBridge quit (Read error: Connection reset by peer) |
14:03:48 | * | MatrixBridge joined #nim |
14:18:14 | * | dgellow joined #nim |
14:23:43 | * | Xe joined #nim |
14:23:54 | coffeepot | r-ku was just having a gander at your coroutines stuff. What's the basic mechanism it uses, just out of interest? I see c_setjmp along with getframe/setframe, is it timeslicing or something? |
14:24:34 | coffeepot | or does it depend on the coroutine returning control? |
14:28:04 | coffeepot | I may not understand what a coroutine is :3 |
14:29:05 | * | Ven joined #nim |
14:29:11 | coffeepot | i think i'm confusing them with goroutines actually... |
14:33:41 | drewsrem | Are sequences always allocated on the heap? |
14:35:20 | * | FedeOmoto quit (Ping timeout: 256 seconds) |
14:47:58 | * | Miko_ joined #nim |
14:48:44 | Miko_ | How can this line of code: " result=int8(s.data[2])" get me a runtime error "unhandled exception: value out of range: 128 [RangeError]" ? |
14:49:21 | Miko_ | Espcially since is is 0..129 so 128 should be inside the range |
14:49:34 | Miko_ | ^ s |
14:52:46 | drewsrem | Miko_, 128 is out of valid range |
14:53:08 | Miko_ | ah |
14:53:27 | Miko_ | As in "too big for int8," not as in "array out of bounce" |
14:53:30 | Miko_ | ouch |
14:54:03 | drewsrem | indeed, int8 is [-127, 127] |
14:54:05 | * | onionhammer1 is now known as onionhammer |
14:55:35 | drewsrem | I think lib/pure/endians is broken: http://ix.io/jEG |
14:57:10 | EXetoC | Miko_: what was that you said about "string" and "cstring"? just wondering because nim's string is just a cstring prefixed by a length and a capacity |
14:58:58 | Miko_ | EXetoC, I don't know how Nim handles string. I meant "Sequence of Bytes" (as strings in C) as opposed to "Valid UTF-8 Squence of Bytes", as most other languages handle their regular strings. I thought Nim did the later. |
15:02:35 | EXetoC | no it's not checked, so string streams might indeed be useful to you |
15:02:49 | EXetoC | if indeed you want to do things like fetching integers from a byte buffer |
15:03:20 | * | FedeOmoto joined #nim |
15:05:44 | Miko_ | Yes, exactly. Mostly variable lenght encoded integers. |
15:06:40 | fowl | drewsrem you have the order wrong |
15:08:01 | drewsrem | fowl, wow you're right, guess because the comment starts with "inp" I assumed the parameters did too, I'm not very sharp today |
15:09:54 | EXetoC | I'm used to having the source parameter first |
15:10:16 | EXetoC | I dunno if it's more common or if it's just the libs I've been using |
15:10:30 | EXetoC | but this is another use case for specifying parameters by name |
15:11:39 | EXetoC | we could enforce that for particular procs :p |
15:13:29 | * | ChrisMAN joined #nim |
15:15:01 | * | xet7 quit (Quit: Leaving) |
15:15:28 | * | vasher_ joined #nim |
15:16:49 | * | Miko_ quit (Ping timeout: 256 seconds) |
15:17:37 | drewsrem | copyMem also has destination first, I think it's convention and I'm just not used to it |
15:18:37 | EXetoC | "in -> out" feels more natural to me, but convention is what matters |
15:18:58 | drewsrem | I agree |
15:22:26 | * | Miko_ joined #nim |
15:23:38 | * | darkf quit (Quit: gn) |
15:25:41 | EXetoC | Miko_: ok well as long as the integer bits appear in sequence, which is usually the case I guess |
15:26:05 | EXetoC | I don't see anything about endians though, but it's just a matter of providing a custom callback I think |
15:26:06 | * | fdsggghh quit (Quit: Page closed) |
15:26:59 | r-ku | Araq: turns out fasm can indeed make .o that gcc eats (along with .obj for msvc). i suppose we can totally use that, even bundle it in repo since its just some kb. i already started porting setjmp/longjmp from musl. i think with this we can totally cover majority of compilers. i can do asm for x86/x64 archs and sysv/ms ABIs but someone will have to do ARM. :p |
15:27:32 | Araq | why? |
15:27:48 | Araq | muslimC doesn't support ARM? |
15:27:59 | r-ku | oh well yeah it does |
15:28:02 | r-ku | lol muslimc :D |
15:28:39 | r-ku | well i might manage adapting it to w/e arm assembler we would use |
15:28:49 | r-ku | and write 5 more instructions for switching stack pointer |
15:28:51 | Miko_ | EXetoC: Well, I think I'll write a few tests and see what's happening |
15:29:07 | Araq | what's fasm's license? |
15:29:21 | r-ku | BSD-something, very permissive |
15:29:24 | Miko_ | I don't think endianess will be a huge deal |
15:29:36 | fowl | EXetoC destination-first mirrors assignment |
15:29:56 | Araq | at one point even copyFile used destination first |
15:31:42 | Araq | speaking of which, assignment is backwards, x = y is "evaluate y and store it into x" |
15:31:58 | Araq | and so should be written as y -> x |
15:32:09 | fowl | Meh |
15:32:15 | Araq | but there is only so much you can fix in a new programming language |
15:32:25 | fowl | There is a language that does this and it makes the code completely unreadable |
15:32:30 | r-ku | Araq: to simplify things i think we can even put assembling part to compiler build process. now i just made lib/arch folder with asm files and build object files to there. coro.nim having {.passL: "path_to_obj".}. so not even any compiler modification to support external assembler needed. just some mod to koch |
15:32:58 | Araq | r-ku: but I like compiler support for it |
15:33:41 | fowl | You could also say x=y means "set x to the result of y" |
15:33:58 | r-ku | didnt get last msg. weechat crashed again. this gay shit.. |
15:35:10 | Araq | fowl: evaluation order is pretty obvious though |
15:35:39 | Araq | but from that perspective g(f(x)) doesn't make sense either so *shrug* |
15:36:59 | Varriount | So what standard are we following? |
15:37:07 | Araq | x -> g -> f is cool though. somebody should write a macro for it |
15:37:21 | EXetoC | isn't LGPL fine? but I try to avoid it in any case, because of the negative connotation |
15:37:42 | Araq | F# uses |> iirc |
15:37:45 | fowl | x | f | g |
15:38:31 | fowl | Like our beloved unix pipes :D |
15:39:04 | Araq | Unix copied that from F# though and threw away the type system |
15:39:22 | EXetoC | seems legit |
15:39:30 | fowl | Isnt f# fairly new |
15:39:36 | EXetoC | details |
15:40:00 | Araq | fowl: I'm kidding |
15:40:34 | Miko_ | One use =: and :=, too |
15:40:49 | Miko_ | x := y or y =: x |
15:41:15 | Miko_ | Unless you use J |
15:41:28 | Araq | Miko_: but but but Pascal! |
15:41:44 | * | gyeates joined #nim |
15:41:51 | Miko_ | J uses =: but the semantic of that is right to left, unlike all other languages |
15:44:25 | Araq | can you program in J? |
15:45:14 | Miko_ | No, and IMO the verb rank is a bad idea |
15:45:34 | Miko_ | K OTOH is quite nice |
15:45:50 | Miko_ | But both suffer from wirte only code, IMHO |
15:48:19 | Miko_ | Ah, my internet is very unstable |
15:54:31 | EXetoC | you have your own internet? |
15:54:38 | EXetoC | jk |
16:03:35 | * | yglukhov___ joined #nim |
16:05:12 | federico3 | dom96: |
16:06:42 | dgellow | A small sh function to find every proc in a file with a given type as first parameter: https://gist.github.com/dgellow/cfaa2106f6ffee46e3a8 |
16:06:42 | dgellow | Use case is "I want to see what procs are available for the array type" |
16:07:05 | * | yglukhov__ quit (Ping timeout: 264 seconds) |
16:08:16 | * | yglukhov___ quit (Ping timeout: 256 seconds) |
16:08:21 | EXetoC | dgellow: neat. how fast is it? |
16:08:31 | EXetoC | fast enough probably |
16:12:45 | Araq | dgellow: that is a planned feature for "nim doc2" too |
16:15:14 | EXetoC | only one lookbehind after all |
16:16:15 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:23:03 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:27:24 | * | unclechu joined #nim |
16:29:39 | * | jszymanski quit (Quit: computer sleeps...) |
16:29:51 | * | zach__ joined #nim |
16:31:15 | zach__ | Is there string interpolation (like ruby's "name: #{firstname} #{lastname}") in nim? |
16:33:00 | * | Miko_ quit (Ping timeout: 250 seconds) |
16:34:06 | EXetoC | not that I know of, but see this http://gradha.github.io/articles/2014/11/swift-string-interpolation-with-nimrod-macros.html |
16:35:01 | EXetoC | it would be a good addition to strfmt |
16:36:05 | EXetoC | there is such a feature already http://lyro.bitbucket.org/strfmt/#string-interpolation-interp |
16:37:26 | zach__ | Interesting |
16:37:28 | zach__ | Thank you! |
16:40:04 | zach__ | Strange, I can't seem to import strfmt. Gives the following error: main.nim(1, 8) Error: cannot open 'strfmt' |
16:43:49 | EXetoC | it's not in the path then. did you install it with nimble? |
16:46:04 | zach__ | got it fixed |
16:46:12 | zach__ | Thanks for your help |
16:46:33 | zach__ | (I'm on day 3 of using nim, hadn't come across nimble yet) |
17:00:36 | * | Demon_Fox joined #nim |
17:01:39 | * | zach__ quit (Ping timeout: 256 seconds) |
17:03:42 | dgellow | Araq: (my response is a bit late) That's cool, maybe I can help make it happen. Is there a docgen roadmap somewhere (or just some thoughts in a github issue) ? |
17:04:35 | Araq | no, and the Nim roadmap doesn't reflect reality either :P |
17:10:33 | * | BitPuffin quit (Ping timeout: 252 seconds) |
17:11:55 | * | Matthias247 joined #nim |
17:12:22 | dgellow | Araq: haha, okay :) |
17:15:11 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:15:51 | dgellow | I will give it a try |
17:16:13 | * | Matthias247 joined #nim |
17:17:07 | dgellow | but don't expect anything out of it, I'm still in my first week with nim |
17:18:10 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
17:22:04 | * | gmpreussner|work joined #nim |
17:32:37 | * | pregressive joined #nim |
17:33:55 | * | vendethiel quit (Ping timeout: 246 seconds) |
17:37:05 | * | jszymanski joined #nim |
17:37:38 | * | vendethiel joined #nim |
17:42:47 | * | Miko_ joined #nim |
17:48:33 | * | ChrisMAN quit (Remote host closed the connection) |
17:50:19 | * | ChrisMAN joined #nim |
18:01:47 | * | vendethiel quit (Ping timeout: 240 seconds) |
18:02:44 | * | Miko___ joined #nim |
18:03:46 | * | vendethiel joined #nim |
18:05:57 | reactormonk | pigmej, I'm gonna be out for the next few days (+/-), so feel free to accept PRs |
18:06:10 | * | Miko_ quit (Ping timeout: 250 seconds) |
18:38:50 | * | vasher_ quit (Quit: Connection closed for inactivity) |
18:42:03 | * | yglukhov___ joined #nim |
18:43:01 | * | ChrisMAN quit (Quit: Leaving) |
18:43:18 | * | ChrisMAN joined #nim |
19:03:13 | Miko___ | Bit Operations on signed integers are a way more compilicated |
19:05:02 | dtscode | bit operations are a bit complicated |
19:05:02 | dtscode | :D |
19:05:25 | EXetoC | it is? either way, use unsigned integers if it makes more sense |
19:08:36 | EXetoC | it's just that you don't need them for things like lengths and so on, except in rare situations |
19:10:59 | * | zach__ joined #nim |
19:11:37 | EXetoC | also, foo.int8 is the same as int8(foo) |
19:12:53 | * | Pisuke quit (Ping timeout: 265 seconds) |
19:26:24 | Araq | Miko___: agreed, but Nim supports unsigned |
19:52:17 | * | vendethiel quit (Ping timeout: 240 seconds) |
19:57:23 | * | vendethiel joined #nim |
20:14:29 | * | Strikecarl joined #nim |
20:14:49 | Strikecarl | How do i make a raw string? i'm trying to make a string with \ and " but it really doesnt like it if i do r"shit\"here" |
20:16:17 | EXetoC | you need to to "" rather than \": http://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals |
20:16:48 | Strikecarl | ty |
20:17:34 | Strikecarl | "invalid character constant" |
20:17:35 | Strikecarl | wut |
20:19:23 | * | vendethiel quit (Ping timeout: 252 seconds) |
20:20:46 | dtscode | Strikecarl: You can't escape any character in nim |
20:20:51 | dtscode | only certain ones |
20:20:55 | apense | anyone know of a websocket implementation in Nim out there? nothing on Nimble |
20:20:55 | Strikecarl | I did """ shit here """ |
20:20:58 | Strikecarl | and it seemed to work |
20:21:17 | dtscode | apense: you mean like sockets or asyncnet? |
20:21:39 | apense | specifically for the websocket protocol (ws:// wss://) |
20:21:55 | dtscode | ah ok. Sorry I don't know of any |
20:22:01 | apense | dtscode, no problem :) |
20:22:59 | * | yglukhov___ quit (Quit: Be back later ...) |
20:24:14 | * | zach__ quit (Ping timeout: 248 seconds) |
20:25:48 | EXetoC | there's only this I think https://github.com/onionhammer/onion-nimrod/blob/master/websockets/websockets.nim |
20:26:03 | * | X67r joined #nim |
20:26:14 | * | dalarmmst joined #nim |
20:31:08 | Miko___ | The first regression test are passing in both the js and the native build |
20:31:12 | Miko___ | Fantastic |
20:32:51 | def- | apense: or https://github.com/joewalnes/websocketd which is of course not ideal |
20:32:54 | * | vendethiel joined #nim |
20:35:16 | Strikecarl | Guys, tryign to make an auto update system, that automaticly downloads an exe if bla is true ballbalabl u get the point, but it seems to freeze after it has downlaoded and executed the file |
20:35:18 | Strikecarl | source: |
20:35:31 | Strikecarl | lemme pastebin |
20:35:54 | * | gokr quit (Quit: Leaving.) |
20:36:38 | Strikecarl | nvm saw the problem |
20:43:44 | * | Salewski joined #nim |
20:46:16 | * | jszymanski quit (Quit: computer sleeps...) |
20:47:46 | apense | thanks EXetoC and def- |
20:47:56 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:47:58 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:49:34 | * | gokr joined #nim |
20:49:54 | Salewski | Do we have something as un-named structs in Nim for type composition as mentioned in an GO-Lang OOP post: http://www.goinggo.net/2013/07/object-oriented-programming-in-go.html "The Dog struct is using an un-named struct (embedding) for the Animal type." |
20:54:44 | * | vendethiel quit (Ping timeout: 250 seconds) |
20:55:01 | Salewski | \quit |
20:55:29 | EXetoC | wrong slash :p |
20:56:08 | * | Miko___ quit (Ping timeout: 256 seconds) |
20:56:26 | * | Salewski quit (Quit: Page closed) |
20:57:38 | * | FedeOmoto quit (Ping timeout: 244 seconds) |
20:59:05 | * | tinAndi joined #nim |
21:05:08 | * | Salewski joined #nim |
21:06:51 | * | vendethiel joined #nim |
21:06:59 | Salewski | I asked because for object composition instead of inheritance long identifiers may occur as for Aporia win.globalSettings.keyCompileRunCurrent.keyval |
21:07:25 | * | Salewski quit (Client Quit) |
21:08:21 | * | Miko___ joined #nim |
21:10:52 | * | FedeOmoto joined #nim |
21:21:46 | * | yglukhov___ joined #nim |
21:26:17 | * | yglukhov___ quit (Ping timeout: 265 seconds) |
21:29:21 | * | vendethiel quit (Ping timeout: 255 seconds) |
21:29:40 | * | Miko___ quit (Ping timeout: 265 seconds) |
21:39:27 | * | tinAndi quit (Quit: ChatZilla 0.9.91.1 [Firefox 39.0/20150630154324]) |
21:42:34 | * | vendethiel joined #nim |
21:42:45 | * | saml quit (Quit: Leaving) |
21:48:49 | Araq | OnO: awaiting your patch that gets rid of --verbosity |
21:53:16 | Araq | fowl: http://forum.nim-lang.org/t/1440 |
21:55:30 | federico3 | any way to generate bash/zsh completions for nim and nimble? |
21:56:57 | Araq | sure but no idea how to do that |
21:59:01 | federico3 | hm, they both are not using docopt |
22:07:05 | * | vasher_ joined #nim |
22:07:39 | * | vendethiel quit (Ping timeout: 256 seconds) |
22:14:30 | drewsrem | How do I deal with wrapping c opaque structs? |
22:14:43 | drewsrem | c2nim seems to ignore them |
22:15:15 | Araq | typedef opa opa; // forward decl, c2nim ignores it |
22:15:34 | Araq | typedef opa {} opa; // c2nim produces an object |
22:15:51 | Araq | but +1000 for asking c2nim :-) |
22:16:13 | drewsrem | c2nim <3 |
22:17:01 | Araq | I just wrapped wxWidgets with c2nim :-) |
22:17:44 | Araq | for the first time in c2nim's history it's good enough that *no* manual tweaking of the generated Nim code is necessary |
22:18:53 | EXetoC | great |
22:18:56 | EXetoC | does it handle ## yet? |
22:19:01 | Araq | yes |
22:24:34 | drewsrem | Really looking forward to wxnim |
22:24:56 | fowl | Araq ill reply in a min |
22:25:49 | Araq | drewsrem: https://github.com/Araq/wxnim |
22:28:23 | drewsrem | I'm on Linux and both examples don't compile, for example2 "private/image" is missing, for example1 I get: "fatal error: wx/wxprec.h: No such file or directory" |
22:33:23 | Araq | well you need to compile wxWidgets |
22:33:32 | Araq | so that you have wx/wxprec.h |
22:34:16 | drewsrem | ahhh this is statically linked? |
22:34:33 | Araq | aye |
22:34:40 | drewsrem | right right right |
22:34:44 | Araq | and yeah, I only made it work with windows |
22:34:58 | drewsrem | :'( |
22:35:05 | Araq | you need to at least adapt the config to link with unix's lib*.a names |
22:35:50 | drewsrem | private/image is missing on GH tho |
22:35:56 | Araq | good catch |
22:36:03 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:37:41 | EXetoC | so you're going with static linking? |
22:42:56 | Araq | EXetoC: it's a direct C++ wrapper, no C layer in between so DLLs don't work well, if at all |
22:46:20 | * | gokr quit (Quit: Leaving.) |
22:46:32 | * | gokr joined #nim |
22:52:52 | * | seumiremorque quit (Ping timeout: 256 seconds) |
22:52:58 | * | seumiremorque joined #nim |
22:53:54 | * | gyeates quit (Ping timeout: 264 seconds) |
22:54:22 | * | gyeates joined #nim |
22:55:00 | * | skroll2 quit (Ping timeout: 264 seconds) |
22:57:19 | * | skroll2 joined #nim |
22:57:36 | * | unclechu quit (Quit: Leaving.) |
23:00:15 | * | drewsrem quit (Quit: Leaving) |
23:09:12 | * | gokr quit (Quit: Leaving.) |
23:10:37 | * | vendethiel joined #nim |
23:30:26 | onionhammer | hola |
23:30:44 | onionhammer | apense the websocket implementation works with ws:// only, not secure websockets |
23:31:12 | onionhammer | apense also it works fine, its just that there may or may not be a memory leak... depending on nim's GC |
23:33:43 | * | vendethiel quit (Ping timeout: 246 seconds) |
23:35:41 | Araq | onionhammer: there is no leak iirc |
23:39:19 | EXetoC | what would we lose by defining the seq interface for example in userland? |
23:39:57 | apense | onionhammer, thanks! |
23:43:38 | Araq | EXetoC: interaction of seq with the GC is non-trivial |
23:43:51 | Araq | it would require more pragmas :P |
23:44:09 | Araq | quite some work. what's the gain? |
23:47:25 | EXetoC | no idea |
23:47:48 | EXetoC | seqs is an odd abbreviation :p |
23:55:14 | * | vendethiel joined #nim |
23:56:36 | * | X67r quit (Quit: leaving) |