00:07:01 | * | kuzy000_ quit (Ping timeout: 264 seconds) |
00:10:55 | * | elbow_jason quit (Remote host closed the connection) |
00:13:48 | BlaXpirit | I have an idea |
00:14:05 | BlaXpirit | it may be planned to allow overloads on var, yes |
00:14:16 | BlaXpirit | but there are other cases where overloads are problematic |
00:14:21 | BlaXpirit | due to ambiguity |
00:14:50 | BlaXpirit | make a pragma that says: in case of ambiguity, use this particular overload instead of giving an error |
00:14:58 | * | vendethiel quit (Ping timeout: 255 seconds) |
00:16:00 | fowl | Araq, how do you invoke getType? |
00:16:02 | shalabh | what's overloads on var? |
00:16:33 | Araq | fowl: like you did? |
00:16:39 | BlaXpirit | shalabh, proc f(x: T) proc f(x: var T) |
00:16:57 | fowl | Araq, i'm lost then |
00:17:40 | shalabh | BlaXpirit:thx |
00:19:07 | * | vendethiel joined #nim |
00:26:06 | BlaXpirit | Decided to scan through IRC logs and collect some of the answers to interesting questions I had. http://blaxpirit.com/blog/tag/nim.html More to come later. |
00:26:49 | Araq | fowl: for your example replace 'expr' with 'stmt' |
00:26:56 | Araq | and it prints: |
00:26:59 | Araq | Sym "x" |
00:27:02 | Araq | ntyInt |
00:27:09 | Araq | which is x's type |
00:28:37 | * | sillesta quit (Ping timeout: 250 seconds) |
00:35:16 | fowl | Araq, oh |
00:35:37 | fowl | this is awesome |
00:37:30 | fowl | Araq, calling gettype for proc():void segfaults |
00:39:19 | * | saml_ joined #nim |
00:43:32 | Araq | fowl: thanks, let me fix it |
00:44:07 | fowl | is that going to return nnkProcTy |
00:45:26 | Araq | nah, lol |
00:46:02 | Araq | nnkBracket("proc", <return type>, <param 1 type>) |
00:46:18 | Araq | but yeah I guess it should be nnkProcTy ? |
00:48:32 | fowl | i think so |
00:49:10 | fowl | how about object type fields :) |
00:50:03 | Araq | but nah |
00:50:11 | Araq | nnkBracketExpr is better |
00:50:22 | Araq | only 'enum' and 'object' are special |
00:50:32 | Araq | the rest is structually typed anyway |
00:50:48 | Araq | uniform access is more important |
00:51:24 | * | reem quit (Remote host closed the connection) |
00:51:32 | Araq | nnkRefTy is not used either |
00:51:40 | * | Trustable quit (Remote host closed the connection) |
00:51:45 | Araq | it's nnkBracket("ref", int) |
00:53:36 | fowl | ok |
00:55:25 | * | reem joined #nim |
00:59:03 | Araq | fowl: fixed |
01:02:02 | * | vendethiel quit (Ping timeout: 256 seconds) |
01:03:33 | * | vendethiel joined #nim |
01:04:30 | * | BlaXpirit quit (Quit: Quit Konversation) |
01:09:05 | * | filwit joined #nim |
01:11:28 | filwit | dom96: do you have time to dup+pull my PR to Aporia and discuss it with me? |
01:11:51 | dom96 | filwit: Not right now. Need to sleep, sorry. |
01:12:04 | filwit | dom96: no problem... one thing before you go: |
01:12:06 | dom96 | I'll comment on it at Github when I get time. |
01:12:36 | filwit | I left your colors mostly alone, but some minor things changed.. i can revert them (for your colors), but wanted to know if you liked them in there. |
01:12:59 | filwit | okay, looking forward to your response |
01:15:08 | dom96 | i'll review it later |
01:15:09 | dom96 | 'night |
01:15:49 | * | infinity0_ joined #nim |
01:15:49 | * | infinity0_ quit (Changing host) |
01:15:49 | * | infinity0_ joined #nim |
01:15:49 | * | infinity0 is now known as Guest33423 |
01:15:49 | * | Guest33423 quit (Killed (sendak.freenode.net (Nickname regained by services))) |
01:15:49 | * | infinity0_ is now known as infinity0 |
01:31:15 | * | Demos joined #nim |
01:32:02 | * | filwit quit (Quit: Leaving) |
01:32:30 | * | fizzbooze quit (Ping timeout: 265 seconds) |
01:32:31 | * | darkf joined #nim |
01:35:03 | * | kjo2 left #nim (#nim) |
01:51:40 | * | janprill joined #nim |
01:56:11 | * | janprill quit (Ping timeout: 265 seconds) |
01:56:41 | * | shevy joined #nim |
02:08:05 | * | chemist69_ joined #nim |
02:11:13 | * | chemist69 quit (Ping timeout: 264 seconds) |
02:15:30 | * | flaviu quit (Read error: Connection reset by peer) |
02:15:44 | * | flaviu joined #nim |
02:33:05 | * | shalabh_ joined #nim |
02:43:38 | * | fizzbooze joined #nim |
02:44:17 | shalabh_ | is there a description of the mulimethod dispatch implementation used by nim? |
02:45:05 | * | pregressive quit (Remote host closed the connection) |
02:45:30 | * | pregressive joined #nim |
02:54:37 | * | elbow_jason joined #nim |
03:01:14 | * | yibter quit (Quit: Textual IRC Client: www.textualapp.com) |
03:21:41 | * | pregressive quit (Remote host closed the connection) |
03:25:28 | * | koz joined #nim |
03:28:29 | elbow_jason | TaintedString? What is it? |
03:35:12 | * | saml_ quit (Quit: Leaving) |
03:35:24 | reactormonk | elbow_jason, strings from inputs, e.g. stdin |
03:36:00 | onionhammer | as opposed to strings you execute against a database |
03:36:10 | def- | http://nim-lang.org/manual.html#taint-mode |
03:36:12 | onionhammer | forces the programmer to deal with input |
03:36:52 | elbow_jason | def-, onionhammer, thanks |
03:37:31 | elbow_jason | haha, I'm actually reading the manual and I just havent made it that far yet :P |
03:55:57 | * | nande quit (Remote host closed the connection) |
03:57:47 | * | dts_ joined #nim |
04:02:57 | * | reem quit (Remote host closed the connection) |
04:06:30 | * | Menche joined #nim |
04:07:59 | * | dts_ quit (Ping timeout: 244 seconds) |
04:11:33 | Menche | how does koch boot differ from koch csources? |
04:19:59 | * | reem joined #nim |
04:29:50 | * | dts|pokeball joined #nim |
04:31:25 | * | reem quit (Remote host closed the connection) |
04:32:20 | reactormonk | Menche, it gives you the same result in the end. |
04:32:27 | reactormonk | It's jus that you can ship the csources around. |
04:33:27 | Menche | one compiles the generated C code and the other doesn't? |
04:35:32 | reactormonk | exactly |
04:36:59 | Menche | can it be told what CFLAGS to give the C compiler, or should I just generate C code and compile it in a separate command? |
04:44:52 | * | dts|pokeball quit (Ping timeout: 240 seconds) |
04:47:45 | * | reem joined #nim |
05:31:06 | * | shalabh_ quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
05:35:46 | * | Demos quit (Read error: Connection reset by peer) |
05:56:42 | * | reem quit (Remote host closed the connection) |
06:02:12 | * | mrfunyon joined #nim |
06:06:45 | mrfunyon | Is there any time a variable is global? |
06:10:01 | * | Menche quit (Ping timeout: 255 seconds) |
06:10:29 | * | reem joined #nim |
06:15:30 | * | reem quit (Remote host closed the connection) |
06:15:40 | * | mrfunyon quit (Remote host closed the connection) |
06:20:55 | * | johnsoft joined #nim |
06:21:05 | * | bjz joined #nim |
06:22:22 | * | pregressive joined #nim |
06:22:38 | * | reem joined #nim |
06:23:29 | * | reem quit (Remote host closed the connection) |
06:25:45 | * | reem joined #nim |
06:26:29 | * | pregressive quit (Ping timeout: 245 seconds) |
06:28:14 | * | bjz quit (Ping timeout: 246 seconds) |
06:29:18 | * | fizzbooze quit (Ping timeout: 252 seconds) |
06:37:58 | * | Menche joined #nim |
06:39:02 | * | reem quit (Remote host closed the connection) |
06:49:11 | * | johnsoft quit (Ping timeout: 246 seconds) |
06:49:49 | * | reem joined #nim |
06:49:58 | * | johnsoft joined #nim |
06:50:34 | * | bjz joined #nim |
06:51:54 | * | elbow_jason quit (Ping timeout: 245 seconds) |
07:07:50 | * | elbow_jason joined #nim |
07:14:18 | * | shalabh_ joined #nim |
07:17:24 | * | shalabh_ quit (Client Quit) |
07:19:30 | * | Demon_Fox quit (Quit: Leaving) |
07:22:11 | * | sillesta joined #nim |
07:24:09 | * | elbow_jason quit (Ping timeout: 252 seconds) |
07:24:14 | * | Outlander quit (Ping timeout: 246 seconds) |
07:47:28 | * | Iniglo joined #nim |
07:51:02 | * | Iniglo quit (Remote host closed the connection) |
08:05:16 | * | dumdum joined #nim |
08:05:36 | * | reem quit (Remote host closed the connection) |
08:10:15 | * | reem joined #nim |
08:12:41 | * | tmku joined #nim |
08:12:47 | tmku | hey |
08:27:15 | * | chemist69_ quit (Quit: WeeChat 1.1.1) |
08:27:25 | * | chemist69 joined #nim |
08:29:59 | TEttinger | tmku: are you tomku on other networks? |
08:33:21 | tmku | oh hey! small world. |
08:33:31 | tmku | tomku is actually taken by someone else on freenode |
08:37:10 | * | Menche quit (Ping timeout: 244 seconds) |
08:43:01 | * | janprill joined #nim |
08:43:09 | TEttinger | heh |
08:43:38 | TEttinger | Nim looks nice, not sure if I'll use it yet or just stay learning for 2 years like I did for clojure |
08:52:34 | * | janprill_ joined #nim |
08:55:36 | tmku | yeah, I'm trying to wrap my head around it since yesterday |
08:55:53 | tmku | but the name change made it more difficult to google around for stuff, that's for sure! |
08:56:14 | * | janprill quit (Ping timeout: 246 seconds) |
09:00:08 | aidanh | Hello, quick question; is there a way to preallocate storage space for a string? |
09:08:42 | Triplefox | setLen can do it, I think there might be a way to do it at construction time also |
09:09:34 | Triplefox | ah, newString(len) |
09:12:30 | * | kapil___ quit (Quit: Connection closed for inactivity) |
09:13:01 | * | BlaXpirit joined #nim |
09:14:16 | aidanh | Triplefox: Ah great, thank you |
09:23:10 | * | janprill_ quit (Remote host closed the connection) |
09:23:38 | * | janprill joined #nim |
09:33:53 | * | dumdum quit (Ping timeout: 256 seconds) |
09:48:53 | * | reem quit (Remote host closed the connection) |
09:57:07 | * | wb_ quit (Ping timeout: 256 seconds) |
09:59:15 | * | janprill_ joined #nim |
10:03:23 | * | janprill quit (Ping timeout: 265 seconds) |
10:13:57 | novist | does nim have something like python's if __name__ == '__main__'? |
10:17:07 | * | dumdum joined #nim |
10:30:41 | * | matkuki joined #nim |
10:33:02 | dv- | when isMainModule: ... |
10:33:30 | * | MajorWork quit (Changing host) |
10:33:30 | * | MajorWork joined #nim |
10:34:45 | * | kuzy000_ joined #nim |
10:45:43 | novist | indeed, thank you dv- |
10:46:16 | novist | another question.. seq[uint8] is correct way to store binary data of unknown length? |
10:48:28 | matkuki | Hi. I'm playing around with strutils module's "find" and the returned index is different from "find" functions in other languages: https://bpaste.net/show/bd997c0eea07 |
10:48:29 | matkuki | Was this intentional? |
10:52:34 | * | Outlander joined #nim |
10:52:58 | * | janprill_ quit (Remote host closed the connection) |
10:53:24 | * | janprill joined #nim |
10:53:43 | novist | matkuki: are you sure its index which is different? maybe range produced by .. is inclusive (if thats the right wording)? |
10:56:24 | matkuki | novist: let me see... |
10:57:49 | BlaXpirit | novist, string is another option |
10:57:57 | BlaXpirit | seq[uint8] is good |
10:58:14 | BlaXpirit | it slightly depends on the nature of the data |
10:58:25 | novist | well it can be either string or binary data |
10:58:58 | BlaXpirit | matkuki, yes, Nim uses weird inclusive indices... you'll have to live with it |
10:59:21 | matkuki | novist: You're right, the index is the same, range is inclusive. My mistake. |
10:59:33 | BlaXpirit | it's not find that gives different results, it's the inclusive slice |
10:59:39 | novist | inclusive.. what a bummer |
10:59:51 | novist | well i guess we can make ... operator to be non-inclusive |
10:59:51 | BlaXpirit | also, don't slice strings with .. , use substr |
10:59:56 | matkuki | BlaXpirit: Thanks. Another thing to watch out for. |
11:00:03 | novist | but then it would be weird cause its counter-intuitive |
11:00:13 | BlaXpirit | novist, you can't just make a non-inclusive operator |
11:00:20 | novist | why not? |
11:00:21 | BlaXpirit | you'd need a different type of slice |
11:00:33 | BlaXpirit | and add support for it to every function that uses slices |
11:01:15 | novist | heh.. nim being able to do all kinds of acrobatics thought it would be easy |
11:01:46 | novist | also.. what is BiggestInt? just alias for largest int type available? |
11:01:52 | BlaXpirit | yes |
11:02:44 | BlaXpirit | matkuki, you can fix the original code by adding - 1 |
11:02:58 | BlaXpirit | except then it will be broken in corner cases |
11:03:40 | BlaXpirit | because https://github.com/Araq/Nim/issues/1979 substr avoids this problem |
11:04:06 | matkuki | BlaXpirit: Exactly what I was doing, but when slicing a string into multiple parts, I can't keep up with the -1/+1's! Will use substr as you suggested. |
11:04:08 | novist | i wonder why ranges are inclusive... use zero-indexed arrays is primarily to avoid lots of -1. there it should also apply |
11:04:22 | BlaXpirit | matkuki, you still need - 1 with substr |
11:04:32 | BlaXpirit | the difference is it doesn't allow negative indices |
11:04:51 | matkuki | Oh |
11:05:00 | BlaXpirit | novist, sure, many people will agree that this is a plain bad decision |
11:05:17 | BlaXpirit | this has been brought up many times, sometimes leading to heated arguments |
11:05:43 | novist | is there any will to change it? cause if it doesnt happen before 1.0 later it will be hard |
11:06:09 | BlaXpirit | there are no real arguments for it |
11:06:21 | BlaXpirit | the only one is how to make slices for ordinal types |
11:06:30 | BlaXpirit | 'a'..'z' and whatnot |
11:07:01 | BlaXpirit | inclusive ranges make sense in laguages that this part of Nim was inspired by |
11:07:26 | novist | ones that are indexed from 1? |
11:07:38 | novist | although.. maybe it doesnt matter |
11:07:39 | BlaXpirit | mainly |
11:07:55 | matkuki | So there is no escaping the -1/+1 stuff? Oh well, so be it. |
11:08:00 | thilp | perl6's ".." operator is inclusive too, but you can say 0..^2 to produce [0, 1] |
11:08:06 | BlaXpirit | that's good |
11:08:12 | novist | Araq did not respond to your github issue too. i wonder whats his position |
11:08:34 | BlaXpirit | uhh I think he agreed to do something about it but then kinda left it alone |
11:08:48 | novist | thilp: thing is most of the time people do not want inclusiveness |
11:09:20 | novist | i think 'a'..>'z' might be better. though in this case it looks bit ugly |
11:09:30 | novist | but most of the time people would get what they expect |
11:09:41 | BlaXpirit | you mean 'a'..<'z' for non-inclusive |
11:09:47 | novist | and 'a'..'z' kind of thing isnt used that often |
11:10:06 | novist | nah i actually meant if .. was non-inclusive then ..> would be inclusive |
11:10:15 | thilp | that's true, but in perl6 you use it a lot for character ranges in regexes too |
11:10:28 | thilp | so that's quite natural |
11:10:37 | matkuki | Were inclusive ranges taken from another language? |
11:10:38 | BlaXpirit | a big problem is the standard library already is filled with functions that imply inclusive ranges even if they don't use .. |
11:10:40 | novist | not really if you work with data |
11:10:46 | novist | and system programming works mostly with data and not text |
11:11:05 | BlaXpirit | matkuki, well sure, arrays and slices and related stuff feel completely like Pascal's |
11:11:32 | BlaXpirit | and the notion of ordinal types |
11:11:40 | * | shalabh quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
11:12:02 | BlaXpirit | except pascal never used 0-indexing and never used negative indices to count from the end of a sequence |
11:12:41 | * | shalabh joined #nim |
11:12:42 | matkuki | Ok, so it's a bastardized mix of Pascal and Python. |
11:12:50 | BlaXpirit | pretty much |
11:13:13 | novist | well.. for what its worth its still pretty amazing even if some rough edges exist |
11:13:25 | BlaXpirit | the worst possible mix, in my personal opinion. causes that bug I keep nagging about, too. but people gotta know, not to fall for it |
11:13:39 | novist | as long as Araq is willing to do some hard decisions and fix biggest issues even if they break compatibility |
11:13:48 | matkuki | BlaXpirit: What bug? |
11:13:56 | BlaXpirit | i linked above |
11:14:13 | matkuki | Ah, Ok |
11:14:14 | BlaXpirit | it's not a bug per se, but it's something that people will write consistently causing bugs in their code |
11:14:46 | novist | regarding stdlib.. suppose there was inclusive ..> cant we just do inteligent replace in stdlib .. -> ..> ? |
11:14:55 | BlaXpirit | umm |
11:15:02 | novist | after all it would keep behavior and not need lots of manual work |
11:15:06 | BlaXpirit | this is not a good idea for many reasons |
11:15:17 | BlaXpirit | .. is not even an intuitive syntax for non-inclusive |
11:15:29 | novist | thats true.. |
11:15:31 | BlaXpirit | and why break everything that uses .. |
11:15:56 | novist | i still type : for that stuff anyway so.. yeah heh |
11:15:58 | novist | py background |
11:17:00 | thilp | or (dreaming here) maybe there should be a "type offset = distinct int" |
11:17:08 | thilp | and overloaded ".." |
11:17:22 | thilp | could become quite a maintenance nightmare though |
11:17:25 | novist | would be very counter-intuitive |
11:17:45 | novist | same operator cant do two things in two places or people will get confused a lot |
11:19:06 | thilp | yeah, i don't think it would blend well in Nim |
11:21:16 | thilp | would need to much context-sensitive stuff to make the "for i in 0..len(mylist)" work |
11:23:08 | novist | me personally i dont mind making range() proc for that, but array slicing is a real bummer |
11:23:51 | thilp | (still dreaming) we could use the "math" notation for ranges actually |
11:24:07 | thilp | you know, inclusive [x..y], exclusive [x..y[ |
11:24:15 | thilp | would break all IDEs for sure |
11:24:23 | flaviu | Or [x..y) |
11:24:26 | thilp | yeah |
11:24:47 | TEttinger | or just make another operator for noninclusive |
11:25:07 | TEttinger | ,.. noninclusive left, .., noninclusive right or something |
11:25:21 | novist | never seen [x..y[, just [x..y). it seems logical but not intuitive |
11:25:24 | TEttinger | not sure how many glyphs are available for operators <.< |
11:25:44 | TEttinger | oh yes, x >.> y |
11:25:48 | novist | well atm there is .. < for non inclusive |
11:25:58 | novist | problem is people dont expect that |
11:26:00 | flaviu | .eval import macros; dumpTree:; 1..,2 |
11:26:03 | Mimbus | flaviu: eval.nim(5, 5) Error: expression expected, but found ',' |
11:28:01 | * | Outlander quit (Ping timeout: 264 seconds) |
11:31:51 | novist | speaking of weird things string concatenation operator threw me off too |
11:32:26 | novist | but its nothing that cant be solved with some code |
11:35:33 | * | Trustable joined #nim |
11:51:25 | * | pafmaf joined #nim |
11:55:58 | * | infinity0 quit (Ping timeout: 256 seconds) |
11:58:56 | * | infinity0 joined #nim |
12:03:20 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]) |
12:09:30 | novist | overloading of = is not allowed? |
12:11:27 | BlaXpirit | is not allowed |
12:11:38 | BlaXpirit | for now |
12:12:05 | novist | oh thats good at least. for all thats possible its weirdest impossible thing hehe |
12:22:06 | * | emilsp joined #nim |
12:24:38 | novist | whats correct way for object to reference itself? w/ ref i guess? |
12:31:04 | * | pafmaf quit (Quit: This computer has gone to sleep) |
12:33:45 | BlaXpirit | why |
12:35:05 | novist | im making bencoding lib. so value can be either int, string, list or table. lists and tables contain similar values like that |
12:35:15 | novist | and i put all of it into one Bval object |
12:35:28 | novist | so it needs reference to itself in lists and tables |
12:36:45 | * | saml_ joined #nim |
12:39:06 | BlaXpirit | look at json, really |
12:39:29 | novist | good point, thanks ;) |
12:39:32 | BlaXpirit | it basically should just be ref object |
12:49:27 | * | reem joined #nim |
12:52:00 | * | kapil___ joined #nim |
12:54:20 | * | reem quit (Ping timeout: 256 seconds) |
13:27:10 | * | BitPuffin joined #nim |
13:32:40 | * | BitPuffin quit (Ping timeout: 265 seconds) |
13:34:56 | * | Matthias247 joined #nim |
13:37:17 | * | 5EXAAK15T joined #nim |
13:39:24 | * | BitPuffin joined #nim |
13:44:03 | * | emilsp quit (Remote host closed the connection) |
13:52:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:00:22 | * | mpthrapp joined #nim |
14:00:34 | * | akiradeveloper joined #nim |
14:01:23 | * | gokr joined #nim |
14:03:59 | * | saml_ quit (Ping timeout: 245 seconds) |
14:07:33 | * | johnsoft quit (Read error: Connection reset by peer) |
14:08:30 | * | johnsoft joined #nim |
14:25:11 | * | NimBot joined #nim |
14:27:06 | ekarlso | can't nim be installed in a global manner? |
14:32:36 | * | koz quit (Ping timeout: 265 seconds) |
14:35:05 | def- | ekarlso: ./koch install? |
14:35:22 | ekarlso | def-: hmmms |
14:35:36 | ekarlso | that places the bin where ? |
14:36:21 | * | awesomo4000 joined #nim |
14:36:31 | def- | you have to specify a directory I think |
14:36:47 | def- | like /usr/bin, /usr/local/bin or /opt |
14:37:03 | ekarlso | I tried doing like sh build.sh |
14:37:10 | ekarlso | then linking nim bin to /usr/bin |
14:37:14 | ekarlso | didn't work too well :D |
14:38:55 | ekarlso | Error: cannot open 'lib/system.nim' |
14:38:56 | ekarlso | doh |
14:41:53 | awesomo4000 | i did a basic test with “time <cmd>” to test speed of “/usr/bin/find /“ vs for file in walkDirRec “/“ and the nim code took 60 seconds while find took 10.34 seconds. Any idea how to speed up walkDirRec |
14:48:43 | def- | awesomo4000: let me test |
14:48:44 | * | darkf quit (Quit: Leaving) |
14:49:30 | * | BlaXpirit_ joined #nim |
14:50:08 | def- | awesomo4000: for me it's 0.7s with find, 0.9 with walkDirRec |
14:50:26 | awesomo4000 | ok. what os |
14:50:35 | def- | awesomo4000: maybe it's some cache, did you try running walkDirRec after find? |
14:50:37 | awesomo4000 | (i’m on mac / mavericks ) |
14:50:40 | def- | also, -d:release enabled? |
14:50:41 | def- | linux here |
14:52:25 | * | BlaXpirit quit (Ping timeout: 265 seconds) |
14:55:26 | def- | Strange, with / find is much faster indeed |
14:56:22 | ekarlso | does the compiler look for it's .nim files like .. relative to itself ? |
15:03:16 | def- | awesomo4000: in my case only NFS filesystems scan slowly, really strange |
15:03:52 | * | akiradeveloper quit () |
15:11:36 | def- | awesomo4000: i think the main difference is that walkDirRec calls lstat() on each file it finds while "find" doesn't |
15:13:22 | awesomo4000 | here’s the log of this by the way http://pastebin.com/vhC7MDHc |
15:16:43 | def- | I used strace to figure out what syscalls are made |
15:16:54 | def- | I can optimize it for Linux to be faster, but no idea how to do it on Mac |
15:20:55 | def- | but the general idea would probably be to get rid of the lstat calls and instead use a system-specific readdir() version that includes filetype already |
15:22:30 | * | kapil___ quit (Quit: Connection closed for inactivity) |
15:23:20 | ekarlso | what does install do vs just build ? |
15:25:41 | * | n0x0ff joined #nim |
15:26:45 | def- | ekarlso: i think it creates a .deb file and installs it |
15:27:03 | awesomo4000 | great. thanks. ls -laR has simliar timing as walkDirRec by the way, as does find -exec stat |
15:27:26 | ekarlso | sucks then def- if one is on fedora :P |
15:27:57 | awesomo4000 | readdir will not show exactly the same info as a full stat call, but it would provide quite a bit of info faster than an exec per file |
15:29:25 | awesomo4000 | (stat per file rather) |
15:30:30 | def- | awesomo4000: i have a version without stat now, works fine here and is just as fast as find |
15:30:49 | def- | awesomo4000: any idea how to find out where readdir() returns enough information? |
15:31:04 | def- | we only need the info whether it's a directory or symbolic link |
15:33:27 | awesomo4000 | so readdir gets you a dirent struct |
15:33:59 | def- | and on linux and mac at least that contains d_type |
15:34:02 | awesomo4000 | that gives you inode, type, namelen, name |
15:34:11 | def- | but that's not in the posix standard |
15:34:36 | awesomo4000 | yeah d_type can be unknown, fifo, chr, dir, blk, reg, lnk, sock, wht |
15:35:07 | * | awesomo4000 regurgitates manpage |
15:35:30 | awesomo4000 | that’s darwin’s version of it |
15:35:36 | def- | same on linux |
15:36:34 | def- | give me a moment to make a PR |
15:36:42 | awesomo4000 | yeah. looks like the same but wht ? |
15:38:45 | awesomo4000 | looks like a bit of history lurking there. “BSD whiteout” |
15:39:15 | awesomo4000 | something from the Coda filesystem . learn something new every day. |
15:39:37 | def- | awesomo4000: You can try this?: https://github.com/Araq/Nim/pull/2208 |
15:39:45 | awesomo4000 | http://sourceware-org.1504.n7.nabble.com/BZ-6895-Describe-DT-LNK-td5495.html |
15:41:11 | def- | for me it's even a bit faster than find now :P |
15:42:28 | awesomo4000 | being a complete newb at nim . ( treat me like i’m 5 ). i need to checkout the main source at https://github.com/Araq/Nim , then update from your pull ? |
15:42:42 | def- | ah, you're using 0.10.2? |
15:43:51 | def- | i would just download the 2 changed files into your copy of devel, no need to recompile anything |
15:44:03 | def- | except your test program of course |
15:45:24 | awesomo4000 | i’m on 0.10.3 |
15:45:42 | awesomo4000 | 2015-02-19 MacOSX: amd64 |
15:45:59 | def- | just download the 2 changed files then, should be easiest |
15:46:18 | * | pregressive joined #nim |
15:46:25 | def- | you could probably use git to get my PR somehow, but I don't know |
15:48:18 | Araq | BlaXpirit_: it would be nice if you could repeat the arguments properly |
15:48:34 | BlaXpirit_ | for what |
15:48:44 | Araq | there is no known way to iterate over low(enum) to high(enum) with *exclusive* ranges |
15:49:06 | Araq | you keep pretending that this argument doesn't exist |
15:49:07 | dom96 | hello |
15:49:10 | BlaXpirit_ | who says exclusive ranges need to be .... exclusive |
15:49:19 | * | MajorWork quit (Quit: Leaving) |
15:49:50 | BlaXpirit_ | Araq, no, I didn't ignore, i actually mentioned [:06:29] <BlaXpirit> 'a'..'z' and whatnot well it's kinda different, i agree |
15:50:03 | * | MajorWork joined #nim |
15:50:53 | Araq | BlaXpirit [11:06:09] there are no real arguments for it |
15:51:25 | * | MajorWork quit (Changing host) |
15:51:25 | * | MajorWork joined #nim |
15:52:06 | * | enquora joined #nim |
15:53:18 | * | brson joined #nim |
15:57:40 | Araq | and the issue can easily be resolved by removing negative indexing ... which doesn't make much sense anyway and doesn't work in a[i] for performance reasons |
15:59:22 | Araq | I'm thinking about introducing something like a[^4] instead to mean "4th last item" |
15:59:57 | Araq | btw note that finally the counting starts with 1 for a[-1] as -0 is the same as 0 |
16:00:08 | Araq | s/finally/suddenly |
16:00:35 | Araq | so it's not like Python's way is completely orthogonal either |
16:02:46 | BlaXpirit_ | Araq, yes, explicit syntax is what I suggested. You might remember this https://gist.github.com/BlaXpirit/f063fe6706201504580d |
16:08:15 | * | huodon joined #nim |
16:08:27 | huodon | Hello |
16:12:18 | def- | hi huodon |
16:13:13 | huodon | I need help :) |
16:15:00 | def- | huodon: with what? |
16:15:32 | huodon | From C generate nim code, how to read ptr ptr T |
16:16:04 | huodon | T in c is a buffer pointer |
16:16:29 | def- | you can dereference twice with x[][] |
16:18:48 | huodon | x is ptr to array, in C |
16:20:15 | huodon | x[][] only take head object |
16:20:37 | def- | then [0] would be the first element in that array |
16:20:38 | Araq | so declare a ptr to an array, if you have a ptr to an array |
16:21:32 | Araq | I'm beginning to think that C's type system causes brain damage |
16:24:59 | Araq | hrm ... bootstrapping in C++ now works again but takes minutes ... |
16:27:36 | * | wb_ joined #nim |
16:36:38 | dumdum | Is there any Priority queue implementation which supports change in element's priorities? |
16:40:04 | def- | dumdum: don't think so, but should be fun to write |
16:43:32 | * | 5EXAAK15T quit (Quit: This computer has gone to sleep) |
17:02:45 | * | banister joined #nim |
17:02:50 | * | banister quit (Max SendQ exceeded) |
17:05:25 | ekarlso | .eval let letters = @["f"]; @["foo", "bar"].filter(proc (s: string): bool = string(s[0]) in letters) |
17:05:28 | Mimbus | ekarlso: eval.nim(4, 54) Error: conversion from char to string is invalid |
17:05:36 | ekarlso | what was the fix for that again ? :D |
17:06:23 | BlaXpirit_ | $s[0] |
17:06:24 | BlaXpirit_ | not string |
17:14:34 | shalabh | hello |
17:14:56 | shalabh | is there a way to tell nim to pack object fields more aggressively. i.e. reduce sizeof() |
17:16:30 | shalabh | or to byte-align a certain field (array[6, char]) |
17:24:03 | BlaXpirit_ | shalabh, last time people asked about this, I heard the answer is no |
17:24:21 | BlaXpirit_ | currently the only way to do this is define the struct in C and import it from header |
17:26:02 | shalabh | I see |
17:28:17 | gmpreussner|work | yeah, definitely something we need |
17:28:32 | gmpreussner|work | some of the libraries i'm writing wrappers for require certain packing |
17:28:44 | huodon | I find raw pointer offset function in Rust used deal with T** , http://doc.rust-lang.org/0.11.0/std/ptr/trait.RawPtr.html#tymethod.offset; |
17:29:09 | gmpreussner|work | i'd like to see something like {.pack: 4.} |
17:29:27 | BlaXpirit_ | it will be added some day |
17:30:56 | reactormonk | gmpreussner|work, what's packing? |
17:31:17 | shalabh | I have an object variant. When I put in either one of the two kinds, the size is 8, but if I put in both the size is 12. |
17:31:29 | shalabh | not sure why alignment of one case should affect the other case. |
17:32:04 | BlaXpirit_ | shalabh, give code |
17:32:20 | shalabh | https://gist.github.com/anonymous/03afa1931aeb2a4e9e6a |
17:32:30 | reactormonk | huodon, if it's an array, make it an array in nim. |
17:32:55 | shalabh | also, if I change int32 to array[4, char], size reduces to 8. |
17:36:00 | * | elbow joined #nim |
17:36:10 | BlaXpirit_ | shalabh, C does this |
17:36:23 | BlaXpirit_ | I detected nothing wrong with code generated by Nim. |
17:37:28 | * | sepisoad joined #nim |
17:38:35 | shalabh | BlaXpirit_:ok thanks |
17:38:55 | sepisoad | i need to read about nake files, would someone give me some links |
17:38:56 | shalabh | BlaXpirit_: do you know how I can fit the kind and the 32 bit int in 8 bytes, then? |
17:39:09 | shalabh | cos together they only take 5 bytes |
17:39:19 | BlaXpirit_ | sepisoad, why do you think you need |
17:39:19 | * | Matthias247 joined #nim |
17:39:35 | shalabh | also, are you saying the issue is with the C union? |
17:39:55 | BlaXpirit_ | shalabh, nim just generates a union of two structs |
17:40:02 | BlaXpirit_ | everything exactly as here |
17:40:42 | shalabh | right |
17:41:02 | shalabh | but do you know why sizeof is 12? int32 should just be 32-bit aligned |
17:42:48 | BlaXpirit_ | no idea |
17:43:12 | * | kniteli quit (Quit: Leaving) |
17:45:49 | dom96 | sepisoad: There isn't really that much docs about nake files. |
17:46:05 | gmpreussner|work | reactormonk: packing determines how struct (object) members are aligned in memory |
17:46:39 | gmpreussner|work | for example, a packing of 4 bytes would add padding to members smaller than 4 bytes so that the next field starts at a 4 byte boundary |
17:47:17 | * | MajorWork quit (Quit: Leaving) |
17:47:31 | gmpreussner|work | some C libraries assume certain alignments/packings. it can also be important for cache performance. |
17:49:28 | * | xet7 quit (Quit: Leaving) |
17:50:12 | * | mpthrapp quit (Remote host closed the connection) |
17:50:44 | * | mpthrapp joined #nim |
17:57:02 | shalabh | I can use array[4, int8] and then cast it to int32, but seems ugly |
17:57:55 | reactormonk | shalabh, so it should be possible via macro? |
17:58:04 | shalabh | maybe, but isn't it a hack? |
17:58:14 | shalabh | I'd rather do it right. |
17:58:32 | reactormonk | shalabh, how would you do it right in C? |
17:58:43 | shalabh | reactormonk:don't know :) |
17:58:44 | shalabh | let me try |
17:59:21 | shalabh | what's confusing is that the union of two structs, each of which is 4 bytes, becomes bigger than 4 bytes |
18:01:27 | shalabh | btw, castsing one struct to another should be free, right? |
18:01:31 | shalabh | i.e. no runtime cost? |
18:04:40 | * | EXetoC joined #nim |
18:05:16 | dumdum | Writing a priority queue has bubbled up in my list of priorities :D |
18:06:22 | BlaXpirit_ | :D |
18:08:38 | * | kniteli joined #nim |
18:09:51 | reactormonk | shalabh, I'd say the array idea isn't too bad imo |
18:12:35 | shalabh | reactormonk:ok |
18:13:01 | reactormonk | shalabh, I'd say think up a good syntax, put it into dumpTree and see if it's valid |
18:13:33 | * | UberLambda joined #nim |
18:15:50 | shalabh | huh? syntax? |
18:15:55 | shalabh | you mean for a macro? |
18:18:57 | shalabh | I was just going to use cast() |
18:20:58 | reactormonk | shalabh, yeah, macro. You said you wanted to do it right ;-) |
18:21:45 | shalabh | well yeah I guess it's an option |
18:22:04 | * | huodon quit (Ping timeout: 246 seconds) |
18:22:09 | shalabh | btw, can I have macros that are invoked at the top level? e.g. where I would write 'proc' |
18:22:17 | reactormonk | sure |
18:22:23 | shalabh | cool |
18:22:27 | reactormonk | you can also have them as pragmas |
18:22:36 | shalabh | right that's the other thing I was thinking of. |
18:22:45 | reactormonk | so type object =\n something: int {.align: 4.} |
18:22:54 | shalabh | so where would I say 'give me all procs with this pragma' so that I can do something with them |
18:23:07 | reactormonk | nope, they're local. |
18:23:23 | shalabh | local to the module? |
18:23:25 | shalabh | that's fine too |
18:23:40 | reactormonk | nope, local to the invocation |
18:23:58 | shalabh | basically if I want to define a bunch of procs, then use a macro to combine them into one mega-proc (giant case statement). |
18:24:16 | reactormonk | not sure if that's possible |
18:24:34 | shalabh | ok |
18:25:05 | reactormonk | IIRC you don't know when it's the last proc, so if you can build something that works without any finishing up code, might work. |
18:25:37 | reactormonk | But since you want memory alignment I'd go with the syntax above with type ... = object\n something: int {.align: 4.} or similar |
18:26:32 | reactormonk | or ... = object {.align.} something: int {.align: 4.} and then remove the second align statement and mess with the object... if that's possible. |
18:26:58 | shalabh | so I attach a pragma to the field? |
18:27:06 | reactormonk | yeah, basically. |
18:27:08 | shalabh | where do I access it and how? |
18:27:33 | reactormonk | first, think up a syntax how you would want it to look like. Then import macros and dumpTree: <your syntax> and see if it compiles. |
18:27:51 | shalabh | ok i need to think about this |
18:30:39 | shalabh | templates might be sufficient for what I want |
18:31:31 | reactormonk | the complicated part to me is how you can access the fields, it looks like you want a projection, which is kinda hard in nim |
18:35:50 | shalabh | cast? |
18:36:05 | shalabh | couldn't I just cast the 4-byte array to in32? |
18:36:17 | shalabh | C should optimize that away |
18:36:49 | reactormonk | yes, but then you can't use the object without casting in your code. |
18:37:04 | reactormonk | I would say abstracting the aligning would be perfect |
18:37:25 | shalabh | not sure how that would work - C doesn't align the way I want. |
18:37:35 | reactormonk | huh? |
18:37:56 | shalabh | see https://gist.github.com/anonymous/03afa1931aeb2a4e9e6a |
18:38:12 | shalabh | 'kind' is 1 byte |
18:38:27 | shalabh | so that with the 32-bit int should only take 1 + pad(3) + 4 = 8 bytes |
18:38:31 | shalabh | but it ends up at 12 bytes |
18:38:33 | shalabh | not sure why |
18:38:41 | Araq | shalabh: there is a .packed pragma to get what C's #pragma packed offers |
18:38:42 | shalabh | if I remove the A case, then it's 8 bytes |
18:39:46 | shalabh | Araq: that's nice |
18:40:02 | shalabh | I don't need to eliminate padding though. I dont mind 4-byte alignment for my 32 bit ints. |
18:40:28 | shalabh | but I dont get why one case of the variant affects alignment for the other cases |
18:42:56 | Araq | I don't get it either but the generated C code is correct |
18:43:06 | Araq | the C compiler does weird things here |
18:43:59 | shalabh | https://gist.github.com/anonymous/adfddb363e57282b9ae2 |
18:44:00 | shalabh | ok |
18:44:23 | shalabh | so the solution is just to use array[4, char] and then cast it to int32 |
18:44:30 | shalabh | since casting will be free, I hope |
18:44:43 | shalabh | and I can possibly hide it behind some nice template or macro API |
18:45:33 | shalabh | I dont want {.packed.} because it would misalign stuff |
18:45:43 | shalabh | anyways, at least Nim is doing fine here. |
18:47:41 | Araq | er but your array[6, char] means the compiler decided to align it on a 4 byte boundary |
18:48:04 | Araq | so ... it takes up 8 bytes and you need another 4 bytes for the 'kind' field |
18:48:12 | Araq | and so it requires 12 bytes |
18:48:21 | shalabh | look at the new gist |
18:48:21 | shalabh | https://gist.github.com/anonymous/adfddb363e57282b9ae2 |
18:48:50 | shalabh | explain why each Obj1 and Obj2 take 8 bytes but Obj3 takes 12 |
18:48:59 | shalabh | Obj3 takes one case from Obj1 and one case from Obj2 |
18:49:08 | shalabh | so technically they can all fit in 8 bytes, aligned. |
18:49:41 | Araq | yeah you're right |
18:49:46 | Araq | it makes no sense :P |
18:50:03 | Araq | I wonder what Visual C++ does |
18:51:12 | Araq | same behaviour with Visual c++ |
18:51:33 | Araq | oh well |
18:51:58 | shalabh | right, didn't expect different. |
18:52:02 | Araq | that explains why I never got compile-time 'sizeof' to work properly though |
18:52:27 | shalabh | so I think instead of a variant, I'll use an object with (kind: Kind, val: array[7, char]) and then typecast the array as necessary |
19:00:13 | shalabh | interestingly if I combine int32 with array[4, char] instead of array[7, char] it fits in 8 bytes again |
19:00:30 | shalabh | so it's trying to align the first field of each case in the union or something |
19:01:11 | * | jodelith joined #nim |
19:05:15 | ekarlso | Araq: does nim look for any paths or smth in env variables ? |
19:07:34 | * | jodelith quit (Ping timeout: 246 seconds) |
19:08:02 | Araq | ekarlso: Nim doesn't care about environment vars |
19:11:43 | * | janprill_ joined #nim |
19:14:41 | * | janprill quit (Ping timeout: 246 seconds) |
19:16:41 | * | janprill_ quit (Ping timeout: 264 seconds) |
19:17:01 | * | sepisoad quit (Quit: Leaving) |
19:18:14 | ekarlso | Araq: how does the nim binary compute where the lib/system.nim etc is then relative to itself ? |
19:18:55 | reactormonk | ekarlso, that's in nimcfg IIRC |
19:19:00 | * | bpr joined #nim |
19:22:46 | bpr | There is a discussion about Nim on the Rust subreddit I chanced on in which inquiries were made about the status of a native backend. I recall that such a thing was mentioned before. What's going on with that? |
19:23:00 | * | kernasi joined #nim |
19:23:01 | kernasi | hi |
19:23:06 | reactormonk | bpr, native backend? Nim compiles to C |
19:23:07 | reactormonk | kernasi, o/ |
19:23:24 | kernasi | hey reactormonk |
19:23:35 | ekarlso | EastByte: I got a funny thing where nim installed globally kinda works but not in a chroot |
19:23:46 | ekarlso | Error: cannot open 'lib/system.nim' |
19:24:36 | reactormonk | ekarlso, huh. check the nimcfg, I assume the path in there is absolute |
19:25:39 | bpr | <reactormonk> Yes, I know that. But a native backend has been discussed. An LLVM one was discussed and mentioned in the docs at some point, but I think it has been abandoned. |
19:26:05 | reactormonk | bpr, what's more native than machine code? |
19:26:41 | ekarlso | which part of the path reactormonk ? |
19:26:51 | bpr | <reactormonk> What we have here is a failure to communicate. :-( |
19:27:33 | bpr | <reactormonk> Please read the relevant thread here http://www.reddit.com/r/rust/comments/2wy4q3/jason_livesays_answer_to_of_the_emerging_systems/ |
19:27:58 | * | kernasi is totally fine with nim generating c code, hopes it will never change :) |
19:29:32 | bpr | kernasi Once again, a native code IN ADDITION TO. I assume you hope that generating JS never works either ;-) |
19:29:52 | kernasi | I don't care about nim -> js :) |
19:29:59 | kernasi | that would be fun, too, I guess :) |
19:30:48 | * | brson quit (Quit: leaving) |
19:32:03 | kernasi | I learned pascal "several" years ago so I'm just happy nim exists :) |
19:33:53 | * | UberLambda quit (Ping timeout: 240 seconds) |
19:34:54 | kernasi | that must sound extremely stupid |
19:35:14 | kernasi | well, go on with your discussion :) |
19:35:19 | * | brson joined #nim |
19:37:58 | * | fizzbooze joined #nim |
19:44:15 | reactormonk | bpr, I see. Admittedly I've never worked with threads in nim. And on the GC side, there's a GSoC project around. I'm not qualified an opinion here ;-) |
19:44:46 | reactormonk | bpr, on the other side, I'm currently using nim macros to generate ragel code. So the gen to C has its advantages ;-) |
19:45:02 | reactormonk | ... which is ugly as fuck, but I can't be bothered to write C for ragel. |
19:45:24 | bpr | <reactormonk> I did some poking on the forum and found that Araq had mentioned something about this on 6-22-14 |
19:45:34 | reactormonk | bpr, link plz |
19:45:47 | bpr | I think compiling to C has many advantages. But it has disadvantages too. |
19:45:48 | * | gokr1 joined #nim |
19:46:00 | reactormonk | bpr, sure, like incorrect C code ^^ |
19:47:56 | bpr | <reactormonk> http://forum.nim-lang.org/t/480 |
19:48:06 | reactormonk | Araq, I hope this wins the contest for the ugliest nim code ever ;-) |
19:49:20 | reactormonk | bpr, ok, I can't give you a good statement on that. |
19:49:56 | kernasi | btw. is there a plan to move to c++? (I hope not) |
19:51:04 | bpr | <reactormonk> In the reddit/r/rust thread, pcwalton mentions some other problems with C compilation, in additon to ones that Araq mentions. I still think Nim -> C has many advantages, but I wonder about another backend. |
19:51:05 | * | reem joined #nim |
19:51:25 | reactormonk | bpr, like C semantics fucking with GC? |
19:52:36 | bpr | <kernasi> I hope not, but that could have advantages too. 'I hope not' because that would divide the effort of people working on the compiler for IMO not as much gain as a native backend. |
19:52:50 | kernasi | k |
19:53:46 | reactormonk | bpr, I'd take a look at it because I have a bit more clue about JS than about LLVM. |
19:54:53 | * | BitPuffin quit (Ping timeout: 240 seconds) |
19:57:52 | bpr | <reactormonk> Yes, C makes some things very difficult. There are a lot of posts on funny C from John Regehr, like this http://blog.regehr.org/archives/1180 but working with C/Nim is straightforward, an undeniable advantage. |
19:58:31 | bpr | I still think C is crapulent, but the rest of the world doesn't care :-) |
19:59:12 | EXetoC | generating it is very different though |
20:01:10 | * | janprill joined #nim |
20:03:45 | * | xet7 joined #nim |
20:04:02 | * | koz joined #nim |
20:04:27 | reactormonk | for event, suffix in @[(enter, "_e"), (exit, "_s")] <- any way to get this to work? event is currently the index. |
20:08:34 | EXetoC | this will look for 'pairs'. perhaps you can provide a specialization that is better matched |
20:09:11 | reactormonk | Araq, https://gist.github.com/reactormonk/2f41b0e12e8d4c7f1aa8 create issue? |
20:15:26 | * | koz is now known as koz_ |
20:15:55 | * | dumdum quit (Ping timeout: 256 seconds) |
20:17:37 | * | pafmaf joined #nim |
20:20:25 | * | pafmaf quit (Client Quit) |
20:22:06 | * | gokr quit (Quit: IRC for Sailfish 0.9) |
20:23:18 | fowl | reactormonk, invoke items |
20:23:36 | fowl | explicitly |
20:23:41 | reactormonk | fowl, hm= |
20:24:15 | reactormonk | fowl, hm= |
20:24:17 | reactormonk | oops |
20:24:52 | * | gokr1 quit (Ping timeout: 245 seconds) |
20:24:55 | fowl | the compiler uses pairs() automatically when you use a,b like that |
20:25:05 | fowl | so invoke items explicitly |
20:25:38 | reactormonk | did |
20:25:45 | reactormonk | doesn't help, same error |
20:26:20 | def- | reactormonk: did you try (event, suffix)? |
20:26:44 | reactormonk | def-, invalid syntax |
20:26:54 | Varriount | meep |
20:27:06 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:27:38 | fowl | reactormonk, it works for me |
20:27:52 | reactormonk | fowl, where do I put it? |
20:27:54 | fowl | .eval |
20:27:54 | fowl | for a,b in items(@[(1,2), (3,4)]): echo a,"::",b |
20:27:57 | Mimbus | fowl: <no output> |
20:28:22 | fowl | thanks for making look like a fool Mimbus |
20:28:58 | fowl | that does work though |
20:29:00 | reactormonk | ah, yup, works with items. |
20:29:26 | fowl | reactormonk, thats how you explicitly invoke something, rather than letting the compiler insert it for you |
20:29:48 | * | EXetoC quit (Quit: WeeChat 1.1.1) |
20:32:08 | * | janprill_ joined #nim |
20:35:02 | * | janprill quit (Ping timeout: 256 seconds) |
20:37:31 | ekarlso | dtscode: around ? |
20:40:48 | * | Menche joined #nim |
20:50:12 | * | koz_ left #nim ("Leaving") |
21:05:38 | * | dumdum joined #nim |
21:07:09 | * | bpr quit (Quit: Page closed) |
21:10:34 | * | irrequietus joined #nim |
21:13:22 | * | reem quit (Remote host closed the connection) |
21:13:24 | * | BitPuffin joined #nim |
21:16:11 | * | pafmaf joined #nim |
21:17:47 | * | reem joined #nim |
21:18:12 | * | BitPuffin quit (Ping timeout: 245 seconds) |
21:24:25 | * | kuzy000_ quit (Ping timeout: 244 seconds) |
21:24:33 | * | pafmaf quit (Quit: This computer has gone to sleep) |
21:31:48 | * | polde quit (Quit: q) |
21:34:21 | * | polde joined #nim |
21:41:57 | * | koz_desktop left #nim ("Leaving") |
21:42:30 | * | nande joined #nim |
21:47:44 | * | enquora quit (Quit: enquora) |
21:52:26 | * | janprill_ quit (Remote host closed the connection) |
21:53:09 | fowl | Araq, you here? |
21:54:44 | fowl | void and empty return type is not handled correctly for getType |
21:55:20 | * | Menche quit (Ping timeout: 265 seconds) |
22:01:05 | * | brson quit (Ping timeout: 250 seconds) |
22:03:12 | * | NimBot joined #nim |
22:19:17 | ekarlso | dom96: did you get to look at my nimble stuff ? |
22:19:41 | * | fizzbooze quit (Ping timeout: 264 seconds) |
22:24:58 | * | mpthrapp quit (Remote host closed the connection) |
22:33:03 | * | dumdum quit (Ping timeout: 256 seconds) |
22:38:24 | * | reem quit (Remote host closed the connection) |
22:41:49 | * | key_ joined #nim |
22:43:16 | * | pregressive quit (Remote host closed the connection) |
22:44:53 | key_ | hi there. any advice on 2D game dev using nim? i see there is a graphics lib directly in stdlib, which relies on SDL out of the box. i've looked around and haven't turned up much yet, would i basically be building everything else i need from scratch? |
22:45:47 | def- | key_: sdl2 and csfml might be nice too. csfml has some nice example games in the repo: https://github.com/blaxpirit/nim-csfml |
22:45:59 | key_ | excellent |
22:46:33 | def- | key_: but i don't think there is an up-to-date high-level 2d gaming library for Nim right now |
22:46:46 | def- | (that's not a wrapper) |
22:46:56 | key_ | do you think think there is/would be demand for such a thing? |
22:47:04 | def- | very much so |
22:47:32 | key_ | the only higher level library i have worked extensively with is kivy in python |
22:47:33 | def- | Nim would be excellent for writing 2D games, I even made a GSoC idea for this: https://github.com/Araq/Nim/wiki/GSoC-2015-Ideas#high-level-game-library |
22:47:49 | key_ | which does like templates for ui, and provides a bunch of compilation stuff for cross platform |
22:48:02 | key_ | yeah nim seems like a great choice for game development |
22:48:10 | key_ | oh cool |
22:48:55 | * | reem joined #nim |
22:50:57 | BlaXpirit_ | def-, really? |
22:51:23 | def- | BlaXpirit_: really what? |
22:53:36 | BlaXpirit_ | idea seems weird |
22:55:27 | key_ | for a higher level library? |
22:56:18 | BlaXpirit_ | it's not worth writing in nim if there are already good libraries |
22:57:42 | key_ | the wrapper of C/C++ libs are sufficient then you mean? |
23:00:33 | BlaXpirit_ | at least they will be if proper destructors are implemented |
23:00:59 | key_ | i would say that gaming is a goal which draws in a lot of... newer programmers. having a higher level library that can abstract away some of the pain of a thinly wrapped c library and tie together stuff such as audio, graphics, networking, etc has proven to be popular in other languages |
23:01:17 | BlaXpirit_ | https://github.com/blaxpirit/nim-csfml |
23:01:34 | BlaXpirit_ | it's almost literally what you just said |
23:02:09 | key_ | yeah, def- linked this it looks great! i see it is your project so thanks... im definitely going to take a look at this |
23:02:27 | BlaXpirit_ | and if we are talking about a 3D engine like in that idea |
23:02:43 | BlaXpirit_ | well that's not something a few students can design out of nothing |
23:02:49 | key_ | im not personally interested in 3D but there is demand for it yeah |
23:03:01 | * | fizzbooze joined #nim |
23:03:07 | * | Outlander joined #nim |
23:04:04 | * | n0x0ff quit (Ping timeout: 256 seconds) |
23:08:24 | * | girvo joined #nim |
23:08:30 | * | girvo left #nim (#nim) |
23:08:33 | * | girvo joined #nim |
23:24:17 | * | sillesta quit (Ping timeout: 244 seconds) |
23:33:33 | * | irrequietus quit () |
23:34:26 | * | brson joined #nim |
23:38:39 | * | Menche joined #nim |
23:53:43 | * | filwit joined #nim |
23:54:41 | filwit | dom96: hey, can't stay long.. just wanted to drop by and say don't try that Aporia PR yet.. I found a couple of bugs in it, and I'd rather not leave you with a bad first impression due to a couple of regex errors |
23:56:18 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
23:56:26 | * | elbow quit (Read error: Connection reset by peer) |
23:56:52 | filwit | dom96: but I am pretty busy this week, so it might take me a couple of days to work all of them out. Just wanted to let you know what's going on and that I can fix all of them, but won't actually have them fixed for a bit due to time. |
23:59:32 | * | Matthias247 quit (Read error: Connection reset by peer) |