00:01:44 | * | gsingh93 joined #nim |
00:09:43 | filwit | wouldn't it be rather easy to make the parser handle calls by indentation like this: |
00:09:48 | filwit | foo.add |
00:09:51 | filwit | 123 |
00:10:06 | * | drewsrem quit (Ping timeout: 272 seconds) |
00:10:07 | filwit | is there some reason that doesn't work, or is considered bad? |
00:11:53 | filwit | err.. brb |
00:15:36 | renesac | as far as I can see it could be make to work w/o breaking backwards compatibility... |
00:15:51 | renesac | and would be consistent with what is done for operators |
00:16:27 | * | drewsrem joined #nim |
00:16:55 | renesac | but would be adding even more uses for indentation and even more legal syntaxes |
00:17:00 | renesac | error messages quality may suffer |
00:17:31 | renesac | and you can use parenthesis anyway |
00:19:35 | * | Pisuke quit (Read error: Connection reset by peer) |
00:20:41 | * | Pisuke joined #nim |
00:21:04 | * | Siecje1 joined #nim |
00:21:46 | * | Siecje quit (Ping timeout: 264 seconds) |
00:25:16 | filwit | renesac: could you elaborate on how it would effect error message quality? |
00:25:59 | filwit | the only reason I would find it useful is to remove the often long list of trailing ) chars after newNimNode.add(..) blocks |
00:27:34 | filwit | i've played with the parser enough to know it should probably be easy to add (i could do it), but wasn't sure if there was good reason not too. |
00:32:40 | * | solidsnack joined #nim |
00:41:26 | fowl | filwit: use newtree() will save some typing |
00:41:48 | filwit | fowl: haven't heard of that one yet, thanks for the tip |
00:41:57 | fowl | Newtree(nnk, children...) |
00:42:21 | filwit | well it's usually that the children have children.. and grandchildren, etc |
00:42:45 | fowl | Aye I'm trying to use quote more |
00:43:07 | filwit | same, but i still have places 3-4 levels deep |
00:43:25 | * | gyeates joined #nim |
00:44:03 | filwit | not a huge deal by any measure, just led me to question why calling conversion didn't support bracketless multi-line calls is all |
00:48:43 | Araq | well it's rather consistent |
00:49:03 | Araq | ( and , and operators have implicit line continuations |
00:49:06 | Araq | so |
00:49:10 | Araq | foo + |
00:49:12 | Araq | 3 |
00:49:14 | Araq | works but also |
00:49:18 | Araq | foo.add bar, |
00:49:20 | Araq | baz |
00:51:27 | * | elfMobile joined #nim |
00:51:29 | filwit | yeah, exactly.. didn't think about how you can do that already after commas |
00:52:37 | elfMobile | I installed Nim and wanted to play with it. I tried using the Atom text editor but it doesn't have Nim Syntax support. I went to install Aporia but I'm getting this: |
00:52:39 | elfMobile | home/eric/dev/Aporia/aporia.nim(11, 8) Error: cannot open 'glib2' |
00:53:29 | fowl | elfMobile: install with nimble install |
00:53:42 | * | saml_ joined #nim |
00:53:46 | fowl | It will get the dependencies |
00:57:45 | * | johnsoft quit (Ping timeout: 240 seconds) |
00:59:18 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:59:30 | elfMobile | so does nim always compile to C? |
00:59:46 | * | drewsrem quit (Quit: Leaving) |
01:00:24 | * | solidsnack joined #nim |
01:00:54 | filwit | yes, ATM.. though there's a Javascript backend too (it's still a bit rough around the corners, but works pretty well), and I think someone was toying with a ASM output, but that was probably just a hobby project. |
01:01:37 | filwit | ATM == foreseeable future, but nothing is really preventing Nim from eventually getting different backends |
01:01:39 | * | johnsoft joined #nim |
01:04:02 | renesac | it also compiles to C++ |
01:04:08 | renesac | :P |
01:09:02 | * | elfMobile quit (Quit: Leaving) |
01:11:53 | filwit | oh yeah |
01:12:04 | * | posix4e left #nim (#nim) |
01:12:06 | filwit | and Objective-C.. but I've never tested that |
01:13:42 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:13:59 | k1i | ive used obj-c FFI from nim, works :) |
01:16:32 | * | Siecje1 quit (Ping timeout: 265 seconds) |
01:17:41 | * | gyeates quit (Ping timeout: 276 seconds) |
01:19:50 | * | Siecje joined #nim |
01:23:18 | * | ddl_smurf joined #nim |
01:26:50 | * | dashed joined #nim |
01:39:07 | * | darkf joined #nim |
01:42:52 | * | kapil___ quit (Quit: Connection closed for inactivity) |
01:44:49 | * | pipeep quit (Quit: Bye!) |
01:52:45 | * | pipeep joined #nim |
01:54:58 | * | solidsnack joined #nim |
02:10:37 | * | BitPuffin|osx quit (Ping timeout: 255 seconds) |
02:13:41 | Xe | I don't know if it's intentional or not, but the chat server example in http://nim-lang.org/docs/asyncnet.html#examples dies after the last client disconnects |
02:17:54 | fowl | not intentional |
02:18:46 | * | zzach quit (Ping timeout: 264 seconds) |
02:19:28 | Xe | ah |
02:19:30 | * | zzach joined #nim |
02:19:37 | Xe | also is it possible to do asyncio with domain sockets? |
02:27:46 | fowl | Xe, you mean the way you would do it in c? |
02:28:19 | fowl | IPC sockets |
02:28:34 | Xe | yeah |
02:28:38 | Xe | in the filesystem |
02:28:56 | Xe | so I can connect to /run/servicename/sock |
02:33:27 | * | Beluki quit (Quit: Beluki) |
02:38:29 | fowl | Xe, i imagine whatever you could do from c you could do from nim, maybe with the posix module |
02:47:04 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
02:47:18 | * | EXetoC quit (Ping timeout: 272 seconds) |
02:47:31 | * | Siecje left #nim (#nim) |
03:22:28 | * | vikaton joined #nim |
03:24:32 | * | vikaton quit (Client Quit) |
03:30:21 | * | saml_ quit (Ping timeout: 256 seconds) |
03:46:22 | * | filwit quit (Ping timeout: 265 seconds) |
03:46:52 | * | filwit joined #nim |
03:53:24 | * | HakanD___ joined #nim |
03:53:50 | * | HakanD___ quit (Client Quit) |
03:54:25 | * | HakanD___ joined #nim |
03:54:43 | * | gsingh93 quit (Ping timeout: 256 seconds) |
03:58:03 | * | Fingel joined #nim |
03:58:08 | * | Fingel left #nim (#nim) |
03:58:32 | * | filwit quit (Ping timeout: 256 seconds) |
04:02:16 | * | filwit joined #nim |
04:07:34 | * | vendethiel joined #nim |
04:12:29 | * | k1i quit (Ping timeout: 248 seconds) |
04:13:44 | * | k1i joined #nim |
04:18:22 | * | filwit quit (Ping timeout: 256 seconds) |
04:19:35 | * | awesomo4000 left #nim (#nim) |
04:27:14 | * | filwit joined #nim |
04:30:53 | * | vendethiel quit (Ping timeout: 246 seconds) |
04:32:05 | * | gyeates joined #nim |
04:46:10 | * | endragor joined #nim |
04:48:14 | * | filwit quit (Ping timeout: 265 seconds) |
04:49:38 | * | vendethiel joined #nim |
04:49:42 | * | rgv151 joined #nim |
04:54:33 | * | filwit joined #nim |
05:03:17 | * | ldlework_ joined #nim |
05:03:35 | * | ldlework_ quit (Client Quit) |
05:11:42 | * | gyeates quit (Remote host closed the connection) |
05:12:21 | * | vendethiel quit (Ping timeout: 256 seconds) |
05:20:59 | * | rgv151 quit (Read error: Connection timed out) |
05:23:34 | * | rgv151 joined #nim |
05:25:20 | * | JinShil joined #nim |
05:26:13 | * | havenn joined #nim |
05:28:04 | * | filwit quit (Ping timeout: 256 seconds) |
05:28:34 | * | filwit joined #nim |
05:29:21 | * | havenwood quit (Ping timeout: 256 seconds) |
05:37:08 | * | filwit quit (Ping timeout: 256 seconds) |
05:38:58 | * | n0x0ff quit (Ping timeout: 255 seconds) |
05:48:45 | * | filwit joined #nim |
05:48:50 | * | endragor quit (Read error: Connection reset by peer) |
05:48:58 | * | endragor_ joined #nim |
05:50:41 | * | adam12 left #nim ("Leaving...") |
05:51:55 | * | endragor_ quit (Read error: Connection reset by peer) |
05:52:01 | * | endragor joined #nim |
05:52:15 | * | mal`` quit (Ping timeout: 248 seconds) |
05:54:14 | * | solidsnack joined #nim |
06:00:22 | * | JinShil quit (Remote host closed the connection) |
06:00:49 | * | mal`` joined #nim |
06:01:43 | * | JinShil joined #nim |
06:04:22 | * | shodan45_ joined #nim |
06:04:32 | * | ErikBjare_ joined #nim |
06:05:10 | * | shodan45 quit (Read error: Connection reset by peer) |
06:09:43 | * | vendethiel joined #nim |
06:12:36 | * | JinShil quit (Quit: Konversation terminated!) |
06:19:10 | * | loz1 joined #nim |
06:25:48 | * | loz1 quit (Ping timeout: 272 seconds) |
06:27:05 | * | johnsoft quit (Ping timeout: 246 seconds) |
06:27:53 | * | johnsoft joined #nim |
06:30:11 | * | iamd3vil joined #nim |
06:30:39 | * | onionhammer quit (Ping timeout: 245 seconds) |
06:30:55 | * | onionhammer joined #nim |
06:31:44 | * | vendethiel quit (Ping timeout: 252 seconds) |
06:35:22 | * | havenn quit () |
06:38:09 | dalarmmst | How do I terminate an application the correct way? |
06:39:36 | fowl | quit 0 ? |
06:39:58 | dalarmmst | Thanks |
06:40:20 | * | gokr_ joined #nim |
06:43:28 | * | solidsnack quit (Ping timeout: 252 seconds) |
06:52:54 | * | yglukhov joined #nim |
06:54:56 | * | yglukhov quit (Read error: Connection reset by peer) |
06:55:14 | * | gokr_ quit (Ping timeout: 245 seconds) |
06:55:24 | * | gokr_ joined #nim |
07:03:48 | * | vendethiel joined #nim |
07:04:55 | * | Ven joined #nim |
07:05:18 | * | HakanD___ quit (Quit: Be back later ...) |
07:05:33 | * | Ven quit (Read error: Connection reset by peer) |
07:10:13 | gokr | filwit: Ok, now I read the super stuff from fowl - yeah, neat! |
07:10:54 | * | endragor_ joined #nim |
07:13:08 | * | bjz joined #nim |
07:14:49 | * | endragor quit (Ping timeout: 255 seconds) |
07:22:31 | * | OnO joined #nim |
07:24:36 | gokr | fowl: Just modified my fruit example for my article using your super() - works fine |
07:25:53 | gokr | But of course, you still need the procCall to make an actual super call to a method, but its neat to be able to do "super(self)" instead of "Fruit(self)" |
07:26:53 | gokr | Is the plan to make some kind of oop module in stdlib? I think that would be very nice and this one should be there IMHO. |
07:26:54 | * | vendethiel quit (Ping timeout: 245 seconds) |
07:27:25 | fowl | super works on types too |
07:27:35 | fowl | type X = object of RootObj; super(X) is RootObj |
07:27:49 | gokr | Yeah, saw your comment there |
07:28:01 | gokr | Not exactly sure when to use it though |
07:28:13 | fowl | me either :p |
07:28:15 | ldlework | are you guys talking about the readme articles on bitbucket? |
07:28:21 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:28:31 | gokr | ldlework: No, we are talking about fowls super() macro |
07:28:39 | gokr | https://gist.github.com/fowlmouth/dbb43f560cdc67cc3601 |
07:29:16 | gokr | fowl: But hey... as a Smalltalker I like meta ;) |
07:29:17 | * | HakanD___ joined #nim |
07:30:02 | dalarmmst | How can I print values in hexadecimal? |
07:30:43 | fowl | strutils.toHex |
07:30:55 | gokr | dalarmmst: or how to fish - search for "hex" here: http://nim-lang.org/docs/theindex.html |
07:32:39 | dalarmmst | gokr: Thanks, that's a document I haven't seen before |
07:33:12 | gokr | dalarmmst: It is actually linked at the bottom here, but people often miss it: http://nim-lang.org/documentation.html |
07:35:15 | gokr | fowl: I am peeking at the 176 senders of #superclass in Pharo 3.0 to see when it can be used ;) |
07:39:32 | * | clone1018 quit (Ping timeout: 256 seconds) |
07:39:53 | * | clone1018 joined #nim |
07:40:40 | gokr | fowl: A few ideas so far: Lint rules, xUnit code to traverse inheritance chain and find all testXXX methods, the whole refactoring stuff of course, tons of browsing and meta stuff. |
07:42:37 | * | Varriount joined #nim |
07:44:17 | * | Varriount quit (Client Quit) |
07:45:28 | * | bjz joined #nim |
07:46:11 | * | Varriount joined #nim |
07:46:52 | * | bjz quit (Client Quit) |
07:55:45 | * | iamd3vil quit (Ping timeout: 265 seconds) |
07:58:42 | OnO | hi, is there an option to display stack trace for localError in compiler? |
08:04:05 | fowl | OnO: build the compiler with --stacktrace:on --linetrace:on |
08:04:46 | OnO | how to do it via koch? |
08:04:59 | fowl | Yea add those options to kpch |
08:06:37 | * | coffeepot joined #nim |
08:08:00 | OnO | hmmm.... to bad I can inject options to temp, I guess it is easier to nim c --opts compiler/nim |
08:09:07 | fowl | gokr: I was thinking about writing a smalltalk like tim budds little smalltalk but we have llvm binding now that I want to play with:p |
08:09:18 | * | iamd3vil joined #nim |
08:09:29 | gokr | Hey, cool! There are many small Smalltalks one can look at. |
08:09:44 | fowl | OnO: did you try koch temp --opts file (opts before the file name) |
08:10:26 | fowl | gokr: I'll never understand how the top objects are intertwined |
08:10:51 | fowl | Object is a class but class is an object wtf |
08:11:15 | gokr | Ehm, "class is an object"? |
08:11:43 | gokr | I guess you mean classes are objects, yes. |
08:12:01 | gokr | Even Alan Kay was unhappy with the meta classes in Smalltalk. |
08:12:11 | * | Ven joined #nim |
08:13:03 | OnO | fowl: koch temp opts <- these are passed to temporary compiler itself not to nim building this temp compiler |
08:13:37 | fowl | gokr, class is an instance of metaclass, metaclass is an instance of class; https://github.com/crcx/littlesmalltalk/blob/master/lst5/bin/imageSource#L48 |
08:13:54 | gokr | Yes |
08:14:35 | * | Ven quit (Client Quit) |
08:14:48 | * | gokr moving to nim-offtopic |
08:15:04 | * | vendethiel joined #nim |
08:17:50 | * | yglukhov joined #nim |
08:18:54 | * | Ven joined #nim |
08:19:19 | OnO | Araq: efWantIterator <- what a kind of black magic is that ;) |
08:22:49 | fowl | OnO, compiler crash == you found an unhandled edge case, please report |
08:24:03 | OnO | nah, I was struggling with macro generating iterator call for 2 days, and it seems there is some magic efWantIterator flag that compiler adds to the identifier "it" when compiling: for i in it |
08:24:22 | OnO | while making sema from macro I don't have this flag set |
08:24:26 | OnO | wrr |
08:29:25 | * | Demon_Fox quit (Quit: Leaving) |
08:30:22 | * | endragor_ quit (Remote host closed the connection) |
08:30:54 | * | endragor joined #nim |
08:34:08 | filwit | gokr: I was once working on a OOP lib for the stdlibs, but ran into a few limitation at the time. Some of which are still there. Namely, you cannot forward-declare types, so any "class" macro is significantly limited right now, ie, no two 'classes' can reference each other like two types declared inside a type section can. |
08:34:13 | * | Trustable joined #nim |
08:34:35 | ldlework | that's a rough limitation in general |
08:35:10 | filwit | i used to think this was a significant wart on Nim's type system, and still think's it's over limiting, but now I use type-sections + 'impl' macro afterwards and so far it's been working well (better than what I was going for originally). |
08:36:40 | ldlework | I just like to break up my code into files |
08:36:48 | filwit | I still think this issue needs to be resolved in the future, Araq has commented on it saying eventually types should get forward-declaration.. but I don't know his recent thoughts on the subject. |
08:37:46 | filwit | ldlework: i agree. and I don't like the common "make a 'types' module" solution to this, but there is actually some benefits to doing that too (eg, when you want to compare type structures, they're all right there) |
08:38:33 | * | vendethiel quit (Ping timeout: 240 seconds) |
08:40:11 | filwit | plus, separating the procedural implementation from the type section actually gives you some rather clean code in some ways (nothing you couldn't also do within a 'class' macro, but still clean) |
08:40:14 | filwit | like: |
08:40:26 | filwit | impl Foo: ... |
08:40:36 | filwit | impl Foo as GameObject in TitleScreen: ... |
08:41:05 | Araq | that's actually hard to implement and the implementation ends up doing: type Forwarded = RootRef ... RealType(Forwarded).foo = ... |
08:41:09 | filwit | where each 'impl' block fulfills a specific interface and wires it's events up accordingly |
08:42:27 | Araq | which is the workaround that you can use today. |
08:42:43 | filwit | interesting |
08:43:30 | Araq | and yes, using subtyping for the lack of cyclic types accross module boundaries is hackish |
08:43:50 | Araq | but it's workable |
08:44:24 | filwit | i suppose there might be some macro trickery to hide the hackish nature and you could end up with some pretty clean result with that |
08:44:39 | filwit | but i'd have to give it more thought to know for sure |
08:45:08 | filwit | and I'm pretty happy with type-sections + impl now, so I doubt i'll be spending much time doing that |
08:46:02 | ldlework | Araq: lol .. |
08:46:11 | ldlework | good night guys |
08:46:17 | fowl | gn |
08:47:22 | * | milosn quit (Quit: leaving) |
08:48:20 | OnO | Araq: it turned out that is was not a compiler bug, but a misleading error, I dug to efWantsIterator and realized my macro returns "stmt" not "expr" :))) |
08:48:45 | OnO | therefore it looses efWantsIterator since it is not expr anymore |
08:51:44 | Araq | well I had a similar bug and knew what I was doing though ;-) |
08:52:00 | OnO | semOverloadedCallAnalyseEffects efWantIterator is kind of magic |
08:52:47 | OnO | but I understands it prevents normal procs to be passed to as iterator |
08:53:12 | * | n0x0ff joined #nim |
08:55:01 | OnO | I think the problem is that if statement lands in the place where expression is expected, weird things are happening |
08:56:59 | Araq | OnO: also good news. I think we figured out how to make async multi-threaded |
08:57:29 | OnO | wow... that's really good news |
08:57:42 | OnO | will is apply to whole asyncdispatch module? |
08:57:55 | OnO | is->this |
08:57:56 | Araq | kind of |
08:58:04 | * | endragor quit (*.net *.split) |
08:58:04 | * | jefus quit (*.net *.split) |
08:58:04 | * | gokr quit (*.net *.split) |
08:58:04 | * | zulmin quit (*.net *.split) |
08:58:08 | Araq | bbl |
08:58:41 | * | vendethiel joined #nim |
09:00:09 | * | endragor joined #nim |
09:00:09 | * | jefus joined #nim |
09:00:09 | * | gokr joined #nim |
09:00:09 | * | zulmin joined #nim |
09:00:48 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
09:08:52 | * | skyfex__ quit (Quit: (null)) |
09:10:51 | * | ddl_smurf quit (Quit: ddl_smurf) |
09:10:57 | pleiosaur | does nim have compile-time regex support? |
09:11:02 | pleiosaur | something that compiles into a state machine |
09:11:13 | pleiosaur | is this possible with nim macros? |
09:11:39 | gokr | pleiosaur: That sounds like something.... Araq has been messing with |
09:11:57 | * | ingsoc joined #nim |
09:12:12 | * | BlaXpirit joined #nim |
09:12:19 | * | dalarmmst quit (Ping timeout: 245 seconds) |
09:12:35 | pleiosaur | Araq: how would I make a syntax extension to generate compile-time automata from regex? |
09:14:08 | repax | Not sure you need a syntax extension per se. Perhaps just macros or compile-time execution |
09:14:10 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:16:52 | dom96 | pleiosaur: It's definitely possible but nobody has done it yet. |
09:17:23 | * | bjz joined #nim |
09:17:37 | * | antranigv1 left #nim (#nim) |
09:17:56 | fowl | dom96, araqs latest project does that |
09:18:10 | fowl | github.com/araq/lexim |
09:18:15 | * | skyfex joined #nim |
09:18:40 | dom96 | at compile-time? |
09:18:54 | pleiosaur | dom96: yes, like D |
09:19:45 | * | vendethiel quit (Ping timeout: 240 seconds) |
09:27:26 | * | Kingsquee quit (Quit: Konversation terminated!) |
09:30:43 | * | Jehan_ joined #nim |
09:44:02 | def- | Araq: great news about async multi-threaded |
09:44:26 | dom96 | what's the good news? |
09:44:59 | Jehan_ | def-: I put up ntags, in case you're interested. |
09:45:12 | Jehan_ | ... in playing guinea pig. :) |
09:45:18 | def- | 10:56 < Araq> OnO: also good news. I think we figured out how to make async multi-threaded |
09:46:17 | dom96 | oh, I thought you had some good news. |
09:47:20 | def- | Jehan_: sure, I'll give it a try |
09:51:12 | OnO | I have a: proc takeType(T: typedesc[SomeType]), |
09:51:12 | OnO | and: macro makeTakeTypeCall(T: typedesc[SomeType]) |
09:51:36 | OnO | in macro, trying to do newCall("takeType", <<T>>) |
09:51:48 | OnO | no idea how to turn T into some symbol node |
09:52:11 | OnO | or maybe it is a variable, I dunno |
09:52:43 | OnO | tried to do to newIdent(T.repr), but weird things happen -> Error: internal error: getUniqueType |
09:55:10 | def- | Jehan_: when I do ntags -R src ~/.nimble/pkgs/ on my NimES project it segfaults with -d:release, but works without |
09:55:39 | * | vendethiel joined #nim |
09:56:10 | * | filwit quit (Remote host closed the connection) |
09:57:13 | Jehan_ | def-: Hmm. I'll have a look at that. That's odd. |
09:57:47 | def- | first I had "out of memory" which was even weirder |
09:58:50 | fowl | whats your name on github Jehan_ |
09:59:12 | def- | https://bitbucket.org/behrends/profile/repositories?language=nimrod |
09:59:16 | Jehan_ | fowl: Why? I rarely use github? |
09:59:28 | fowl | thanks def- |
09:59:57 | fowl | Jehan_, i didnt know where the project is |
10:00:25 | Jehan_ | fowl: Oh, I posted it on the forum. |
10:01:09 | Jehan_ | def-: I'm suspecting it may be a recursive link. |
10:04:10 | * | johnsoft quit (Ping timeout: 272 seconds) |
10:04:18 | * | johnsoft joined #nim |
10:06:10 | def- | Hm, if I could just reproduce it on another machine |
10:07:15 | def- | I'd say it's a Nim compiler bug, but I can only reproduce on 1 machine: https://gist.github.com/anonymous/55a3d48adf9b5ac0d88b |
10:10:24 | def- | only happens with the default GC, not with markandsweep |
10:10:51 | def- | Jehan_: but ntags will be useful for me, thanks. |
10:11:00 | * | filwit joined #nim |
10:11:53 | Jehan_ | def-: Okies. Still wondering what is causing the bug. |
10:13:12 | def- | Oh, I can reproduce it after all |
10:15:49 | def- | I can send you my ~/.nimble/pkgs directory, then you should get it too |
10:16:17 | Jehan_ | def-: That would help! |
10:18:16 | * | skyfex_ joined #nim |
10:18:57 | * | vendethiel quit (Ping timeout: 240 seconds) |
10:19:02 | Jehan_ | def-: Hmm, doesn't crash on OS X for me, I'll have to hop over to Linux to see if that changes anything. |
10:19:20 | def- | I have it crashing on 2 linux systems, only with the default GC |
10:19:50 | * | ddl_smurf joined #nim |
10:19:57 | def- | So it's probably a combination of Linux + GC that triggers the bug |
10:20:07 | Jehan_ | 64-bit or 32-bit Linux? |
10:21:09 | def- | 64 |
10:21:40 | def- | 32bit runs just fine |
10:21:44 | * | skyfex quit (Ping timeout: 265 seconds) |
10:23:07 | Jehan_ | Hmm, I wonder if it has anything to do with copying semantics for seq[string]. |
10:26:15 | RegisterOn | when will I see latest Nim version in brew? |
10:26:27 | Jehan_ | Hmm, works on Linux for me, too. |
10:26:45 | Jehan_ | Eh, nevermind. |
10:26:50 | Jehan_ | Didn't unpack yet. |
10:27:10 | def- | RegisterOn: when this PR is accepted: https://github.com/Homebrew/homebrew/pull/39272 |
10:27:34 | RegisterOn | okay, thanks |
10:28:56 | Jehan_ | def-: Still can't reproduce it. Which Nim version are you running? |
10:29:28 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
10:31:36 | def- | Jehan_: current devel branch. now suddenly i can only reproduce on 1 machine, not the other |
10:32:15 | Jehan_ | def-: Hmm, I'm starting to wonder if it's a compiler/runtime issue. |
10:32:57 | def- | I'll try to reduce it to something smaller later |
10:34:29 | * | dashed quit (Quit: Connection closed for inactivity) |
10:34:34 | Jehan_ | def-: It crashes in add() for seq[string]. |
10:37:30 | Jehan_ | Hmm, interesting, it may at least in theory be a runtime bug. |
10:42:54 | * | bluenote joined #nim |
10:44:16 | iamd3vil | when I am trying to update nimble it's giving me a 404 error. Why is that? Do I have to change the packages.json url? |
10:46:13 | iamd3vil | When I am trying to do "nimble install imghdr" it's giving me this error. "Error: unhandled exception: /home/iamd3vil/.nimble/packages.json(1, 0) Error: { expected [JsonParsingError]" |
10:47:08 | * | Ven_ joined #nim |
10:49:49 | def- | iamd3vil: install nimble again, then it should be fixed |
10:50:02 | iamd3vil | Ok will do. |
10:50:03 | def- | At least I had the same problem and did that |
10:50:20 | def- | Probably broken http client from Nim 0.10.2 |
10:50:59 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:55:20 | * | banister joined #nim |
10:56:25 | * | UUUUUUUUU quit (Ping timeout: 246 seconds) |
11:02:10 | yglukhov | Hello. is there a macro to test if given string is a Nim keyword? |
11:03:06 | yglukhov | in other words, if a given string may be a valid identifier |
11:06:15 | * | EXetoC joined #nim |
11:12:10 | * | BitPuffin|osx joined #nim |
11:15:37 | someplace | when I run "nimble update"... |
11:15:38 | someplace | http://sprunge.us/JaKg |
11:16:30 | iamd3vil | someplace: I got the same problem. I reinstalled it and its working fine now. |
11:17:50 | someplace | hmm |
11:17:52 | someplace | no dice |
11:18:14 | def- | someplace: I think it's caused by a bug in Nim 0.10.2. You should recompile nimble with a newer version |
11:18:36 | * | gokr_ quit (Ping timeout: 240 seconds) |
11:18:54 | someplace | hmm :| |
11:18:57 | someplace | using the arch package |
11:28:17 | * | drewsrem joined #nim |
11:30:29 | RegisterOn | the pain when github is down... |
11:32:43 | Jehan_ | def-: I think the ntags crash may be due to conservative stack scanning in the GC. |
11:33:06 | thotypous | is github off for you guys? https://github.com |
11:34:05 | someplace | tes |
11:34:07 | someplace | yes. |
11:34:09 | Jehan_ | The implementation off add[T](y: var seq[T], x: seq[T]) can potentially generate assembly code that makes the only stack reference point just past the end of the memory area. |
11:34:14 | Jehan_ | thotypous: Yes. |
11:34:20 | thotypous | thanks |
11:35:17 | thotypous | i found it strange because status.github.com was showing it as ok, but now it is already showing "We're seeing high error rates" |
11:35:36 | someplace | status.github is human updated it seems |
11:44:03 | * | JinShil joined #nim |
11:52:28 | * | dddddd joined #nim |
11:52:45 | * | yglukhov quit (Read error: Connection reset by peer) |
11:53:35 | * | yglukhov joined #nim |
12:09:47 | * | coffeepot joined #nim |
12:25:55 | * | vendethiel joined #nim |
12:30:50 | synthmeat | eh, nim could use some os x love |
12:31:36 | synthmeat | def-: reading up on the issues on github, i'm not sure what's the conclusion on nimble packed for homebrew on osx? will it be with nim, independent, ever? |
12:33:18 | * | zulmin_ joined #nim |
12:33:47 | * | zulmin quit (Ping timeout: 256 seconds) |
12:43:43 | * | HakanD____ joined #nim |
12:44:43 | Jehan_ | def-: Would it be possible for you to put up a disassembly dump of the add() code from ntags somewhere? |
12:44:50 | synthmeat | meh. who cares. living' on the edge and building from master sources :) |
12:47:24 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:47:29 | * | HakanD___ quit (Ping timeout: 244 seconds) |
12:50:32 | * | iamd3vil quit (Remote host closed the connection) |
12:53:03 | * | vendethiel quit (Ping timeout: 256 seconds) |
12:53:45 | * | yglukhov_ joined #nim |
12:53:46 | * | Ven_ joined #nim |
12:55:35 | * | Trustable quit (Remote host closed the connection) |
12:56:30 | * | yglukhov quit (Read error: Connection reset by peer) |
12:56:30 | * | skroll1 quit (Ping timeout: 240 seconds) |
12:57:02 | * | OnO joined #nim |
12:57:50 | * | TEttinger quit (Ping timeout: 252 seconds) |
12:57:57 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:58:42 | * | filwit quit (Quit: Leaving) |
12:59:42 | * | Ven_ quit (Ping timeout: 276 seconds) |
13:00:49 | * | HakanD____ quit (Read error: Connection reset by peer) |
13:07:27 | * | mpthrapp joined #nim |
13:07:48 | * | zahary joined #nim |
13:08:04 | * | milosn joined #nim |
13:11:41 | * | mpthrapp left #nim (#nim) |
13:22:58 | * | skroll1 joined #nim |
13:24:31 | * | Jehan_ quit (Quit: Leaving) |
13:25:53 | * | gyeates joined #nim |
13:39:07 | OnO | another internal error on interators taking typedesc as argument :( https://github.com/Araq/Nim/issues/2662 |
13:40:40 | synthmeat | can i somehow see what exact C build command line nim used when building something? |
13:48:52 | def- | synthmeat: nim --parallelBuild:1 --verbosity:3 |
13:49:17 | def- | synthmeat: or check the nimcache/*.c |
13:50:43 | * | Jehan_ joined #nim |
13:51:24 | * | JinShil quit (Quit: Konversation terminated!) |
13:51:43 | synthmeat | def-: well, there's nothing in nimcache besides C files, so i don't know what's the command to replicate the build with gcc or something |
13:51:51 | synthmeat | will try that parallelBuild thing, thanks |
13:52:04 | def- | synthmeat: the info is inside the C files |
13:52:29 | synthmeat | def-: should it use clang? :/ |
13:52:32 | * | EulersBackup joined #nim |
13:52:41 | synthmeat | (verbosity is awesome, thanks) |
13:52:53 | def- | synthmeat: depends on your system, on some it's clang by default |
13:53:02 | def- | but you can edit the config/nim.cfg and change the default |
13:54:44 | synthmeat | def-: says gcc in nim.cfg but builds with clang still |
13:54:46 | synthmeat | :/ |
13:55:16 | def- | with verbosity that high the compiler should say which configs it uses, so you should be able to find where gcc is set |
13:55:19 | def- | clang* |
13:57:00 | synthmeat | yeah, it says the exact location of the nim.cfg config it uses, and in that config it's "cc = gcc" but ends up doing clang in the end |
13:57:24 | def- | even if you set --cc:gcc on the command line? |
13:57:41 | synthmeat | will try that one, sure |
13:57:56 | bluenote | is there actually a Nim specific recommendation regarding the gcc vs clang question? |
13:58:18 | synthmeat | def-: yup, that worked |
13:58:34 | synthmeat | but still, funky |
13:58:45 | synthmeat | doesn't resolve my apparently unrelated issue though. eh. |
13:58:57 | def- | bluenote: clang compiles faster. sometimes gcc is faster, sometimes clang |
14:00:29 | * | Trustable joined #nim |
14:00:41 | * | Trustable quit (Remote host closed the connection) |
14:00:45 | bluenote | def-: thanks, good to know, pretty much what I expected |
14:02:34 | * | Trustable joined #nim |
14:02:38 | * | Trustable quit (Client Quit) |
14:14:07 | Jehan_ | def-: I can reproduce the bug now with gcc. |
14:14:14 | def- | Jehan_: oh, great |
14:14:26 | def- | I can only reproduce it sometimes, it's really weird |
14:14:50 | Jehan_ | I get various results. Sometimes it crashes, sometimes it reports OOM, sometimes it works normally. |
14:14:55 | def- | exactly |
14:15:08 | Jehan_ | It's with gcc-4.9. Which version do you have? |
14:15:14 | def- | also gcc-4.9 |
14:15:32 | def- | with gcc-5.1 it works with the devel branch but not with my new noreturn PR |
14:16:13 | Jehan_ | def-: Hmm, this is interesting. |
14:16:31 | def- | But I wasn't sure if that's just coincidence |
14:16:41 | Jehan_ | Especially since everything is plain Nim, no tricks with ptrs, addr, importc, or other potential sources of instability. |
14:17:04 | Jehan_ | I had to run it over the pkgs directory a lot, then it became sort of reproducible. |
14:18:22 | * | Arrrrrrr joined #nim |
14:22:49 | Jehan_ | And, hmm, if I use --opt:size, it becomes even more reproducible. Nice. |
14:26:14 | def- | Since I can't reproduce it in GCC 5.1 I'd think it may just be a bug in GCC 4.9, but then why does it return in GCC 5.1 by adding __attribute__((noreturn)) to procs that just throw exceptions? |
14:27:21 | Jehan_ | def-: No idea. |
14:28:07 | def- | with clang it's fine even with the noreturn |
14:32:57 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
14:37:46 | bluenote | hm, I'm puzzled by this statement in the manual: "Ordinary procs are often preferred over type conversions in Nim" mentioning the procs toFloat and toInt as examples |
14:38:19 | bluenote | what exactly is wrong with 42.float ? |
14:38:30 | * | OnO joined #nim |
14:38:30 | def- | bluenote: no idea, I always used that |
14:38:45 | bluenote | the generated code is almost identical as well |
14:39:20 | bluenote | with toFloat: x_109002 = ((double) (LOC1)); |
14:39:29 | * | mband joined #nim |
14:39:42 | bluenote | with .float: x_109002 = ((NF) (LOC1)); and I guess this is just a typedef? |
14:39:47 | * | perturbation joined #nim |
14:40:27 | bluenote | so I shouldn't put too much into that "procs preferred over type conversion"? |
14:41:44 | def- | I don't think so, but maybe someone else knows why it's there |
14:41:44 | * | darkf quit (Quit: Leaving) |
14:41:56 | Jehan_ | def-: Can get reproducible out of memory with gcc-5.1, too. |
14:43:10 | def- | Jehan_: strange, without any changes? |
14:43:17 | * | vendethiel joined #nim |
14:43:19 | Jehan_ | def-: No changes. |
14:43:27 | Jehan_ | Well, I'm on 0.2 of ntags now. |
14:43:48 | Jehan_ | I'm suspecting a weird GC bug at the moment. |
14:43:59 | def- | I think you're right |
14:44:01 | Jehan_ | One that is triggered by gcc's code generation somehow. |
14:44:44 | Jehan_ | I can reproduce it like clockwork now, but I can't yet tell where memory is being corrupted. |
14:44:48 | * | Jehan_ quit (Read error: Connection reset by peer) |
14:45:21 | * | Jehan_ joined #nim |
14:45:56 | Jehan_ | Okay, I now can reproduce it with a single file. :) |
14:46:32 | def- | Jehan_: -d:useSysAssert -d:useGcAssert might help |
14:46:58 | Jehan_ | Yeah, that's going to be my next step, now that I've got it down to a reasonable size. |
14:47:08 | Jehan_ | But I fear the bug will just disappear then. :) |
14:47:43 | Jehan_ | Oha! |
14:47:56 | Jehan_ | [SYSASSERT] growObj: 1 |
14:47:57 | def- | It disappeared for me. What did you get? |
14:48:53 | Jehan_ | The file that I'm using for testing is pkgs/x11-1.0/x.nim |
14:49:35 | * | mband quit (Quit: leaving) |
14:49:45 | Jehan_ | With -d:release --opt:size, I get reproducible segfaults. |
14:49:58 | Jehan_ | Unfortunately, the sysassert is not being helpful. |
14:50:16 | Jehan_ | It basically tells me that memory is corrupted. :) |
14:50:25 | def- | no crash for me with that file |
14:51:03 | * | perturba_ joined #nim |
14:51:07 | * | endragor_ joined #nim |
14:52:16 | Jehan_ | Hmm. May be architecture-dependent. |
14:53:34 | def- | None of the GC issues seem really related, maybe this one: https://github.com/Araq/Nim/issues/2507 |
14:54:19 | * | perturbation quit (Ping timeout: 256 seconds) |
14:54:19 | * | endragor quit (Ping timeout: 256 seconds) |
14:55:47 | * | endragor_ quit (Ping timeout: 265 seconds) |
14:56:51 | Jehan_ | Doesn't seem to be the case, that one's dealing with cycles, and I don't have any. |
14:58:48 | Xe | https://github.com/Xe/nim-shared-object-example |
14:58:57 | Xe | I like nim |
14:59:26 | Arrrrrrr | "but ..." |
15:00:36 | Xe | I haven't used it for anything nontrivial yet, but so far being able to write things I can bind to lua calls via the luajit ffi is a huge plus |
15:01:11 | mischanix | Xe: yay luajit |
15:01:22 | Xe | mischanix: yep! |
15:01:29 | Xe | it was faster than writing C! |
15:05:25 | mischanix | Xe: more importantly, faster than compiling C :P |
15:08:02 | * | Sembei joined #nim |
15:08:11 | * | banister joined #nim |
15:08:15 | * | banister quit (Max SendQ exceeded) |
15:08:36 | * | banister joined #nim |
15:11:35 | * | shodan45_ quit (Quit: Konversation terminated!) |
15:14:32 | Arrrrrrr | Furthemore, cleaner than c. |
15:22:09 | Jehan_ | Arrrrrrr: Well, that's a bit of a low bar. :) |
15:25:41 | Xe | what is the C function prototype for NimMain? |
15:25:46 | Arrrrrrr | Well, it makes other advantages more enjoyable. |
15:25:56 | * | endragor joined #nim |
15:26:14 | * | perturba_ quit (Remote host closed the connection) |
15:27:35 | * | perturbation joined #nim |
15:29:08 | * | vendethiel quit (Ping timeout: 265 seconds) |
15:30:37 | * | Sembei quit (Ping timeout: 250 seconds) |
15:30:49 | * | vendethiel joined #nim |
15:32:27 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:35:05 | Jehan_ | Xe: void NimMain(void); |
15:35:21 | Xe | ah |
15:35:23 | Xe | thanks |
15:37:55 | * | brson joined #nim |
15:39:19 | * | Sembei joined #nim |
15:41:26 | * | gokr_ joined #nim |
15:42:20 | * | perturbation quit (Remote host closed the connection) |
15:42:48 | * | perturbation joined #nim |
15:44:19 | * | endragor quit (Remote host closed the connection) |
15:50:58 | Arrrrrrr | def-: what does the packet pragma do here? https://github.com/def-/nimes/blob/master/src/nes/cartridge.nim#L7-L10 |
15:52:35 | BlaXpirit | Arrrrrrr, google "c packed struct" |
15:52:37 | bluenote | Arrrrrr: http://nim-lang.org/manual.html#packed-pragma |
15:54:22 | Arrrrrrr | I read the description from the manual, but i dont understand why it is useful (for example, in the given case) |
15:55:02 | * | arnetheduck quit (Ping timeout: 272 seconds) |
15:55:29 | BlaXpirit | well i assume NES images have a particular memory layout |
15:56:32 | * | endragor joined #nim |
15:59:34 | * | endragor quit (Remote host closed the connection) |
16:01:16 | * | bluenote quit (Ping timeout: 246 seconds) |
16:04:37 | * | n0x0ff quit (Quit: leaving) |
16:07:34 | * | perturbation quit (Remote host closed the connection) |
16:08:02 | * | perturbation joined #nim |
16:11:47 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:15:14 | * | solidsnack joined #nim |
16:15:56 | * | vendethiel quit (Ping timeout: 272 seconds) |
16:16:38 | * | seymour_ quit (Ping timeout: 276 seconds) |
16:24:25 | * | BitPuffin|osx quit (Ping timeout: 256 seconds) |
16:25:36 | * | gsingh93 joined #nim |
16:30:36 | Arrrrrrr | Ok, i had no idea on this, https://www.wikiwand.com/en/Data_structure_alignment so readBuffer reads as many bytes as iNesHeader size without padding. |
16:31:26 | * | perturba_ joined #nim |
16:31:28 | yglukhov_ | Can we refer function arguments by index from within the function? |
16:31:51 | * | banister joined #nim |
16:32:09 | * | ddl_smurf quit (Quit: ddl_smurf) |
16:34:50 | * | perturbation quit (Ping timeout: 276 seconds) |
16:36:44 | * | perturba_ quit (Remote host closed the connection) |
16:38:38 | * | vendethiel joined #nim |
16:40:34 | Jehan_ | yglukhov_: What do you mean? |
16:40:55 | * | dalarmmst joined #nim |
16:41:13 | * | johnsoft quit (Ping timeout: 264 seconds) |
16:41:37 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:42:03 | yglukhov_ | proc myFunc(a: int, b: float) = assert(type(ARG[0]).name == "int" and type(ARG[1]).name == "float") |
16:42:06 | * | perturbation joined #nim |
16:42:23 | * | johnsoft joined #nim |
16:42:27 | yglukhov_ | i'm looking for ARG analogue |
16:42:41 | Jehan_ | yglukhov_: No, that's not possible, unless you use varargs. |
16:42:48 | * | solidsnack joined #nim |
16:43:06 | Jehan_ | Well, or if you pass a single argument as a tuple. |
16:43:31 | Jehan_ | proc myFunc(args: (int, float)) = ... |
16:43:50 | Jehan_ | Of course, that means it also has to be called with tuple syntax. |
16:43:58 | Jehan_ | Probably not what you're looking for. |
16:44:04 | yglukhov_ | yeah, but that's not magic, which is what i want =) |
16:48:21 | * | perturbation quit (Remote host closed the connection) |
16:49:11 | * | perturbation joined #nim |
16:51:54 | * | perturbation quit (Remote host closed the connection) |
16:52:12 | Xe | what does the !& and !$ do in the hash function example here: http://nim-lang.org/docs/tables.html ? |
16:53:53 | def- | Xe: http://nim-lang.org/docs/hashes.html#!&,THash,int |
16:54:31 | Xe | ah |
17:00:05 | * | perturbation joined #nim |
17:02:14 | * | zulmin joined #nim |
17:02:15 | * | zulmin_ quit (Read error: Connection reset by peer) |
17:04:21 | * | loz1 joined #nim |
17:05:26 | * | yglukhov_ quit (Quit: Be back later ...) |
17:05:32 | * | Sembei quit (Read error: Connection reset by peer) |
17:06:17 | * | perturbation quit (Remote host closed the connection) |
17:06:37 | * | Sembei joined #nim |
17:10:32 | * | perturbation joined #nim |
17:16:45 | * | aboisvert joined #nim |
17:20:27 | * | perturbation quit (Remote host closed the connection) |
17:21:04 | * | Arrrrrrr quit (Ping timeout: 246 seconds) |
17:21:43 | * | perturbation joined #nim |
17:25:38 | * | aboisvert quit (Quit: aboisvert) |
17:26:09 | * | Jesin quit (Read error: Connection reset by peer) |
17:30:03 | * | milosn_ joined #nim |
17:30:50 | * | milosn quit (Read error: Connection reset by peer) |
17:31:04 | * | Jesin joined #nim |
17:32:44 | * | Matthias247 joined #nim |
17:34:38 | * | perturbation quit (Remote host closed the connection) |
17:37:54 | * | gyeates quit (Ping timeout: 276 seconds) |
17:38:09 | * | gokr_ quit (Ping timeout: 245 seconds) |
17:38:58 | * | gokr_ joined #nim |
17:42:03 | * | perturbation joined #nim |
17:43:16 | * | gokr_ quit (Ping timeout: 240 seconds) |
17:47:15 | * | milosn_ is now known as milosn |
17:53:58 | * | yglukhov_ joined #nim |
17:58:54 | * | brson quit (Ping timeout: 256 seconds) |
18:00:23 | * | brson joined #nim |
18:02:54 | * | perturba_ joined #nim |
18:05:31 | * | perturbation quit (Ping timeout: 255 seconds) |
18:14:29 | * | HakanD joined #nim |
18:18:00 | * | perturba_ quit () |
18:28:41 | * | jholland joined #nim |
18:37:03 | * | fizzbooze joined #nim |
18:40:16 | * | silven quit (Ping timeout: 256 seconds) |
18:40:41 | * | silven joined #nim |
18:43:38 | * | Jehan_ quit (Quit: Leaving) |
18:43:38 | loz1 | hi, what should i pass to c-binding where c uses NULL? |
18:43:42 | loz1 | 0.cint? |
18:46:20 | EXetoC | nil |
18:47:12 | loz1 | EXetoC: ok, ty |
18:47:22 | EXetoC | and C's int might or might not have the same size as a pointer. Nim's int will though |
18:47:57 | * | brson quit (*.net *.split) |
18:47:57 | * | ingsoc quit (*.net *.split) |
18:47:57 | * | jefus quit (*.net *.split) |
18:47:57 | * | gokr quit (*.net *.split) |
18:47:57 | * | Matthias247 quit (*.net *.split) |
18:47:57 | * | OnO quit (*.net *.split) |
18:47:57 | * | OnwardEuler quit (*.net *.split) |
18:47:57 | * | ChrisMAN quit (*.net *.split) |
18:47:57 | * | federico3 quit (*.net *.split) |
18:47:57 | * | heinrich5991 quit (*.net *.split) |
18:47:57 | * | k1i quit (*.net *.split) |
18:47:57 | * | pipeep quit (*.net *.split) |
18:49:22 | * | Matthias247 joined #nim |
18:49:22 | * | OnO joined #nim |
18:49:22 | * | k1i joined #nim |
18:49:22 | * | pipeep joined #nim |
18:49:22 | * | OnwardEuler joined #nim |
18:49:22 | * | ChrisMAN joined #nim |
18:49:22 | * | heinrich5991 joined #nim |
18:49:22 | * | federico3 joined #nim |
18:49:37 | * | jefus joined #nim |
18:49:37 | * | brson joined #nim |
18:49:37 | * | ingsoc joined #nim |
18:49:37 | * | gokr joined #nim |
18:53:19 | * | Xe quit (Remote host closed the connection) |
18:53:39 | * | iamd3vil joined #nim |
18:54:35 | * | brson quit (Ping timeout: 256 seconds) |
18:56:08 | iamd3vil | When I am trying to compile a simple line count program on Windows, I am getting an error that "unhandled exception: The system cannot find the file specified . [OSError] |
18:56:35 | * | HakanD quit (Quit: Be back later ...) |
19:00:28 | * | TEttinger joined #nim |
19:01:16 | * | Xe joined #nim |
19:03:15 | * | aboisvert joined #nim |
19:04:16 | * | aboisvert quit (Client Quit) |
19:05:29 | loz1 | hm, what if binding function requires argument: pixels: ptr pointer, but i only have pixels*: pointer field in the structure? |
19:05:47 | * | drewsrem quit (Quit: Leaving) |
19:05:49 | loz1 | how do i pass it? |
19:06:43 | fowl | Do you know what the pointer is (does it really point to some pixels) |
19:07:04 | fowl | iamd3vil: how do you have nimrod installed |
19:07:10 | fowl | Nim* |
19:07:37 | iamd3vil | I have downloaded the binary from nim-lang.org |
19:08:03 | * | ingsoc quit (Quit: Leaving.) |
19:08:16 | loz1 | fowl: yep, it is a field in a structure this binding creates |
19:09:05 | * | aboisvert joined #nim |
19:09:07 | loz1 | all c++ examples just pass surface->pixels to the function |
19:10:48 | fowl | loz1: the field should probably be ptr pointer, otherwise you'll need to cast to pass it |
19:12:05 | loz1 | fowl: i can try, how do i cast pointer to ptr pointer? |
19:12:34 | fowl | Cast[ptr pointer](surf.pixels) |
19:12:51 | fowl | What are you working on btw :) |
19:13:59 | loz1 | trying to optimize my life game to use more hardware resources |
19:14:16 | loz1 | this one, if you are interested https://github.com/maximvl/nim-lab/blob/master/life.nim |
19:17:14 | fowl | loz1: cool use of parallel/spawn |
19:18:09 | * | Sembei quit (Ping timeout: 245 seconds) |
19:18:26 | loz1 | fowl: thanks, it improved performance a bit, but sdl textures should make it much better) |
19:18:48 | * | Matthias247 quit (*.net *.split) |
19:18:48 | * | OnO quit (*.net *.split) |
19:18:48 | * | OnwardEuler quit (*.net *.split) |
19:18:48 | * | ChrisMAN quit (*.net *.split) |
19:18:48 | * | federico3 quit (*.net *.split) |
19:18:48 | * | heinrich5991 quit (*.net *.split) |
19:19:21 | * | Matthias247 joined #nim |
19:19:21 | * | OnO joined #nim |
19:19:21 | * | OnwardEuler joined #nim |
19:19:21 | * | ChrisMAN joined #nim |
19:19:21 | * | heinrich5991 joined #nim |
19:19:21 | * | federico3 joined #nim |
19:20:18 | fowl | loz1: do you know your field is 101x101 |
19:20:59 | loz1 | hm, this doesn't matter actually |
19:21:09 | loz1 | as long as everything computed |
19:22:16 | fowl | Yea because the bounding function is correct |
19:22:25 | * | ingsoc joined #nim |
19:23:29 | * | gyeates joined #nim |
19:23:44 | * | solidsnack quit (Ping timeout: 246 seconds) |
19:24:28 | * | Sembei joined #nim |
19:25:00 | * | pregressive joined #nim |
19:28:27 | OnO | FYI lots of new changes coming to TextMate's Nim support https://github.com/textmate/nim.tmbundle/commits/master |
19:29:21 | loz1 | fowl: how can i make "ptr rect" from "rect" type? |
19:29:38 | loz1 | this is not casting as i understand |
19:29:43 | * | aboisvert quit (Quit: aboisvert) |
19:30:33 | fowl | loz1: for sdls copy func usually I'll keep a tuple with a rect and texture, the rect has the texture width and height |
19:32:05 | fowl | loz1: then when you go to blit it, var dst = src.rect; DST.x = ..; DST.y = ..; copy(renderer, DST.addr, SRC.rect.addr, SRC.tex) |
19:32:49 | loz1 | fowl: oh, my problem is with fillRect, which requires ptr Rect |
19:33:12 | fowl | Same thing put the rect on the stack. And pass addr rect |
19:33:57 | loz1 | fowl: addr, thats it, thank you) |
19:36:04 | fowl | Hmm I could actually remove the ptr from passing rect and mark it byref |
19:37:20 | dom96 | wow https://github.com/jangko/nimpdf |
19:37:42 | loz1 | fowl: i haven't realize you are original author) |
19:38:36 | loz1 | dom96: nim becomes popular, isn't it? |
19:38:41 | * | d33tah joined #nim |
19:38:43 | d33tah | hello |
19:39:06 | d33tah | i recently found out about the 144-line Nim kernel... i read the code, saw the properties of the language and i like it |
19:39:21 | d33tah | now the question - is it mature enough to actually code in it? |
19:39:41 | loz1 | i'm actually coding in nim right now |
19:39:46 | * | fizzbooze quit (Ping timeout: 256 seconds) |
19:40:09 | d33tah | okay, put differently - what's the biggest thing written in it so far? |
19:41:10 | * | MyMind joined #nim |
19:41:14 | loz1 | i think its a great compiler called nim, but i'm not sure |
19:41:32 | d33tah | nim is self-hosted? o.o |
19:41:56 | loz1 | looks like you came here and didn't even tried it |
19:42:05 | EXetoC | yes, see the compiler dir |
19:42:22 | d33tah | loz1: tbh, didn't try it yet |
19:42:52 | loz1 | case if you try, you'll see the bootstrapping |
19:43:10 | * | johnsoft quit (Ping timeout: 272 seconds) |
19:43:13 | loz1 | cause* |
19:43:22 | * | Sembei quit (Ping timeout: 252 seconds) |
19:43:54 | * | johnsoft joined #nim |
19:45:38 | loz1 | fowl: i actually can't find the way to convert Color to uint32, is there standard one? |
19:48:17 | fowl | loz1: from the colors module |
19:48:26 | fowl | ? |
19:48:35 | fowl | Ohh |
19:48:41 | loz1 | fowl: no, sdl Color |
19:48:46 | fowl | Fourcc() I think |
19:49:47 | * | aboisvert joined #nim |
19:49:55 | fowl | No use SDL_definepixel_fourcc |
19:52:08 | loz1 | fowl: it returns cint, not uint32 |
19:53:43 | * | iamd3vil quit () |
19:55:21 | * | grncdr joined #nim |
19:58:35 | fowl | loz1, https://gist.github.com/fowlmouth/51ed23f75b9c3d37e8e9 |
19:59:11 | * | Sembei joined #nim |
19:59:56 | * | MyMind quit (Ping timeout: 244 seconds) |
20:00:19 | * | ingsoc quit (Quit: Leaving.) |
20:01:39 | * | gokr_ joined #nim |
20:01:39 | loz1 | fowl: i compiled it finally, but it crashes on surface.pixels casting =( |
20:01:43 | * | brson joined #nim |
20:02:00 | * | rgv151 quit (Ping timeout: 244 seconds) |
20:02:03 | loz1 | texture.lockTexture(nil, cast[ptr pointer](surface.pixels), pitch) |
20:03:38 | loz1 | i'm not sure if this cast is correct |
20:03:57 | fowl | looks like surface.pixels is uint32* |
20:04:15 | fowl | im trying to find an example before i tell you to pass surface.pixels.addr |
20:04:26 | fowl | i think thats what you need to do though |
20:04:55 | RegisterOn | damn, brew patch still not applied? |
20:08:03 | fowl | no.. ok i got it let me make a small example to test |
20:09:13 | * | Kingsquee joined #nim |
20:10:55 | loz1 | it still falls with addr( |
20:15:56 | * | MyMind joined #nim |
20:17:22 | * | Sembei quit (Ping timeout: 272 seconds) |
20:17:32 | * | grncdr quit (Quit: Leaving.) |
20:20:03 | fowl | loz1, ok got it, the pixels you pass in is your own pointer that is filled with the pixel data |
20:20:03 | * | aboisvert quit (Quit: aboisvert) |
20:20:30 | fowl | loz1, https://gist.github.com/fowlmouth/f4605cc136e50b1af109#file-gistfile1-nim-L13-L24 |
20:21:57 | * | HakanD joined #nim |
20:26:17 | * | aboisvert joined #nim |
20:26:28 | loz1 | fowl: what is difference between addr(pixels) and pixels.addr? i though they are the same |
20:26:54 | * | gokr_ quit (Ping timeout: 245 seconds) |
20:27:36 | * | aboisvert quit (Client Quit) |
20:27:52 | * | gokr_ joined #nim |
20:27:52 | fowl | loz1, they are |
20:29:59 | * | flaviu joined #nim |
20:32:40 | * | Sembei joined #nim |
20:34:19 | * | MyMind quit (Ping timeout: 256 seconds) |
20:37:43 | * | gyeates quit (Ping timeout: 256 seconds) |
20:38:09 | * | aboisvert joined #nim |
20:38:43 | gokr | d33tah: The forum on nim-lang is all in Nim. The compiler and the stdlibs are all Nim. There are... about 150 packages in nimble, and there are at least 2 companies using Nim for real stuff (one is us). |
20:39:22 | fowl | Add fowlsoft to that list |
20:39:40 | fowl | My multinational conglomerate ;) |
20:40:13 | gokr | dom96: Yeah, wow. Love it when stuff comes from left field like that, out of the blue. |
20:41:01 | EXetoC | fowl: seems legit |
20:41:02 | gokr | d33tah: Also, very easy to wrap C/C++ stuff so your eco system is quite large. |
20:46:29 | d33tah | C++ as well? can i conveniently use the C++ classes? |
20:50:08 | gokr | dom96: This looks odd: http://nim-lang.org/docs/documentation.html |
20:50:12 | gokr | d33tah: yes |
20:50:40 | gokr | d33tah: See http://github.com/3dicc/Urhonimo for an example |
20:50:58 | dom96 | gokr: That's not a page you should be looking at. |
20:51:14 | gokr | dom96: Sure, sorry :) |
20:51:29 | dom96 | Araq should just delete it really. |
20:51:51 | flaviu | dom96: What about moving /0.11.0/ to /docs/0.11.0/? |
20:52:26 | dom96 | that should be removed too |
20:52:35 | * | BitPuffin|osx joined #nim |
20:52:38 | flaviu | But I like /0.11.0/ :/ |
20:55:39 | * | solidsnack joined #nim |
20:56:01 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
20:57:46 | * | Sembei quit (Ping timeout: 272 seconds) |
21:07:24 | * | BlaXpirit quit (Quit: Quit Konversation) |
21:09:47 | gokr | dom96: Hmmm, if you click on "filterit is not lazy" (the 4th from the top, not the latest) on the forum right now - you end up... somewhere else. |
21:10:52 | dom96 | gokr: it looks like the title of the post is simply different |
21:12:47 | gokr | dom96: I don't understand what you are saying. |
21:12:48 | * | HakanD quit (Quit: Be back later ...) |
21:13:13 | dom96 | gokr: what makes you think you end up in a different place? |
21:13:40 | gokr | So I click on "filterIt is not lazy" and I end up on a thread with a different subject, is that normal? |
21:14:03 | dom96 | the user can edit the subject |
21:14:04 | gokr | I end up here, "Re: Cannot compile on windows": http://forum.nim-lang.org/t/1199 |
21:14:16 | dom96 | It doesn't seem like a bug to me. |
21:14:27 | dom96 | Dunno why willyh would edit it though |
21:14:49 | gokr | I am fairly sure this is a big - its not even the same user |
21:14:52 | gokr | bug |
21:15:16 | gokr | "mora" writes (the later thread about filterIt) that he had some issue with the forum |
21:16:23 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:17:23 | RegisterOn | the fun of lombok screwing up a project and delombok not working properly |
21:17:24 | RegisterOn | sigh |
21:17:43 | dom96 | hmm |
21:17:57 | RegisterOn | uh, wrong channel, sorry :) |
21:17:59 | dom96 | that's an odd bug. |
21:20:38 | * | gsingh93 quit (Ping timeout: 256 seconds) |
21:23:47 | * | TEttinger quit (Ping timeout: 250 seconds) |
21:26:17 | gokr | dom96: Looks like a disturbing session mixup or? |
21:27:37 | dom96 | In all honest I have no idea. |
21:30:25 | * | nande joined #nim |
21:33:36 | dom96 | *honesty |
21:40:22 | * | aboisvert quit (Quit: aboisvert) |
21:58:01 | * | gyeates joined #nim |
21:58:17 | * | gsingh93 joined #nim |
22:00:44 | gyeates | what is infinity in nim? |
22:04:53 | * | yglukhov__ joined #nim |
22:05:38 | * | yglukhov_ quit (Read error: Connection reset by peer) |
22:07:31 | * | pregressive quit () |
22:17:14 | * | Demon_Fox joined #nim |
22:19:57 | * | gsingh93 quit (Ping timeout: 244 seconds) |
22:26:43 | fowl | either inf or Inf |
22:27:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:32:41 | * | dalarmmst quit (Ping timeout: 250 seconds) |
22:33:08 | * | brson quit (Quit: leaving) |
22:45:39 | * | dalarmmst joined #nim |
22:49:02 | * | gsingh93 joined #nim |
22:51:40 | * | mid joined #nim |
22:54:33 | * | EXetoC quit (Ping timeout: 240 seconds) |
22:58:55 | gyeates | how do you do a modifiable param with a default val (proc f*[T](x: var int = 1): int = ...) |
22:59:55 | * | saml_ joined #nim |
23:00:13 | gyeates | nvm got it |
23:00:27 | * | vendethiel quit (Ping timeout: 264 seconds) |
23:04:32 | * | mid quit (Quit: Page closed) |
23:09:23 | * | Jesin quit (Remote host closed the connection) |
23:09:41 | * | Kingsquee quit (Quit: Konversation terminated!) |
23:09:53 | * | EXetoC joined #nim |
23:09:56 | * | EXetoC quit (Client Quit) |
23:11:08 | * | loz1 quit (Ping timeout: 256 seconds) |
23:11:55 | * | vendethiel joined #nim |
23:16:50 | * | Jesin joined #nim |
23:28:35 | * | yglukhov__ quit (Quit: Be back later ...) |
23:33:25 | * | vendethiel quit (Ping timeout: 265 seconds) |
23:55:01 | * | gyeates quit (Ping timeout: 264 seconds) |