00:00:00 | * | brson quit (Ping timeout: 272 seconds) |
00:00:23 | akiradeveloper | So we can segregate some kind of serious side-effects (like IO) by effect system like Haskell do it with type |
00:03:55 | Araq | exactly |
00:07:13 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
00:14:23 | * | gsingh93 quit (Quit: Connection closed for inactivity) |
00:17:49 | xAndy | do i need ptr/ref types for dynamic dispatch to work propperly? |
00:18:06 | flaviu | Nice, I was able to improve the performance of an allocation-heavy microbenchmark by 9% by just marking everything as inline! |
00:18:32 | Araq | xAndy: no, but if you have to ask this question, then yes. |
00:18:38 | Mat4 | ciao |
00:18:44 | Araq | byebye |
00:18:49 | * | Mat4 left #nim (#nim) |
00:19:41 | EXetoC | flaviu: lame optimizer :\ |
00:23:34 | flaviu | Why is markStackAndRegisters noinline? Getting rid of that increases performance by another percent or so |
00:24:11 | flaviu | But forcing inline makes it slower. |
00:24:44 | Araq | because the optimizer must not inline it? |
00:25:00 | Araq | stack marking is fragile |
00:30:18 | Araq | argh .... I hate it that you have to 'not' the assert condition when you expand assert |
00:30:46 | xAndy | ah so assigining an inherited object to a variable of the base class breaks dynimic dispatch. is this some kind of type slicing? |
00:31:52 | xAndy | or i am on the wrong track |
00:32:27 | * | fwef quit (Ping timeout: 264 seconds) |
00:33:30 | Araq | it slices and adapts the type tag appropriately |
00:33:56 | Araq | I think later versions will simply fail at runtime instead for slicing assignments |
00:33:57 | xAndy | i see |
00:34:27 | Araq | flaviu: can you elaborate on "LGPL and Nim"? |
00:35:27 | flaviu | If I have a library that is LGPL, usage of that library requires that the user has the ability to replace or modify the library. |
00:36:09 | flaviu | But various Nim features can result in inlining of library code in the non-free portion of the program. |
00:37:06 | Araq | by that logic LGPL'ed software cannot use C's #define |
00:38:07 | flaviu | Quoted from the LGPL: "data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length)," |
00:38:28 | flaviu | Err, forgot this important part: "then the use of the object file is unrestricted" |
00:42:23 | Araq | what if I compile things on an OS without dynamic linking support? |
00:42:59 | Araq | what if the programming language uses inlining for every function call? (yes, these do exist) |
00:43:40 | xAndy | the glory of "free software" and it's licenses |
00:43:58 | Araq | so LGPL is only valid for C code and even that has to be restricted. see "small inline functions"? |
00:44:06 | flaviu | I don't want this to turn into license bashing. |
00:44:28 | Araq | the license sounds unusable. |
00:44:45 | Araq | we don't need to bash it. it's surreal. |
00:44:55 | flaviu | Araq: Then reply to my post and say "the LGPL is unusable for Nim code". |
00:45:14 | Araq | no. it's unusable for pretty much everything. |
00:45:41 | Araq | what is a 'small' inline function? 3 lines or 5? |
00:45:52 | flaviu | Then reply and say "The LGPL is unusable for pretty much anything, and that includes Nim code" |
00:45:55 | * | barosl joined #nim |
00:46:16 | Araq | ok. |
00:52:12 | Araq | hrm ok, I got it. so the user of the program has to able to replace just the library by a different version of it, right? |
00:54:39 | * | threewood quit (Ping timeout: 246 seconds) |
00:55:57 | * | jefus_ is now known as jefus |
00:57:43 | flaviu | Yes, without having access to the program's source code. |
01:07:29 | Araq | well if you can check your #defines and inline functions are of a limited size, you can check your iterators, macros or templates or inline functions are of a limited size |
01:08:20 | Araq | and then you can produce LGPL'ed libraries |
01:10:24 | Araq | you can even grep easily for them. |
01:11:49 | Araq | but whatever, this argument against Nim is pure FUD |
01:13:36 | * | darkf joined #nim |
01:13:51 | * | darkf quit (Changing host) |
01:13:51 | * | darkf joined #nim |
01:24:34 | * | gmpreussner joined #nim |
01:26:51 | * | akiradeveloper quit () |
01:31:51 | * | sillesta quit (Ping timeout: 272 seconds) |
01:33:27 | * | BitPuffin quit (Ping timeout: 276 seconds) |
02:02:03 | * | barosl quit (Ping timeout: 245 seconds) |
02:03:49 | * | barosl joined #nim |
02:10:03 | * | saml_ joined #nim |
02:10:49 | * | sampwing quit (Ping timeout: 252 seconds) |
02:18:39 | * | barosl quit (Read error: Connection reset by peer) |
02:23:22 | * | fwef joined #nim |
02:33:34 | * | barosl joined #nim |
02:33:57 | * | vendethiel quit (Ping timeout: 244 seconds) |
02:35:06 | * | vendethiel joined #nim |
02:40:33 | * | Jesin quit (Quit: Leaving) |
02:50:00 | * | Jesin joined #nim |
02:56:47 | * | kapil__ joined #nim |
02:56:54 | * | vendethiel quit (Ping timeout: 265 seconds) |
02:57:26 | * | keyle joined #nim |
02:57:57 | keyle | hi |
03:00:43 | * | Trustable quit (Quit: Leaving) |
03:04:48 | gmpreussner | hi |
03:05:13 | * | VinceAddons quit (Read error: Connection reset by peer) |
03:06:30 | * | keyle quit (Read error: Connection reset by peer) |
03:17:22 | * | barosl_ joined #nim |
03:18:26 | * | barosl__ joined #nim |
03:20:23 | * | barosl quit (Ping timeout: 245 seconds) |
03:21:38 | * | barosl_ quit (Ping timeout: 245 seconds) |
03:34:02 | * | fwef left #nim ("Textual IRC Client: www.textualapp.com") |
03:41:11 | * | ctran joined #nim |
03:42:35 | reactormonk | how do I construct an array indexed by an enum? |
03:43:05 | * | ctran_ joined #nim |
03:43:23 | ctran_ | Hello all! |
03:44:01 | ctran_ | Any pointer to use nim as fastcgi? |
03:46:48 | * | ctran quit (Quit: Page closed) |
03:46:48 | * | ctran_ is now known as ctran |
03:50:57 | * | EXetoC quit (Ping timeout: 264 seconds) |
03:53:37 | reactormonk | ctran, I guess you could look up how to use C as fastcgi and go from there |
03:54:13 | ctran | I was hoping someone else had already done some work in this area |
03:54:35 | reactormonk | ctran, the nim forum runs on something, you could see how that one works |
03:54:45 | reactormonk | But I assume it runs more on the bare metal |
03:55:48 | ctran | where do I find its source? |
03:56:20 | ctran | Found it, thanks for the pointer |
03:56:42 | reactormonk | ctran, I haven't even looked at it, so I can't really help you with it. You might want to wait for dom96 for that |
03:57:52 | dom96 | ctran: The forum uses the asynchttpserver module, we have an scgi module but it hasn't been updated to work with the latest async dispatcher. |
03:57:58 | dom96 | good night |
03:58:54 | ctran | thanks |
04:04:39 | reactormonk | http://pastie.org/9856115 what's the correct way to do this? |
04:05:12 | reactormonk | dom96, welcome to the fucked-up rhythm club? |
04:10:55 | fowl | happy weekend all |
04:31:07 | * | johnsoft quit (Ping timeout: 245 seconds) |
04:31:49 | * | johnsoft joined #nim |
04:43:21 | * | Sergio965 quit (Remote host closed the connection) |
04:51:38 | * | barosl__ quit (Ping timeout: 245 seconds) |
05:07:41 | * | RayoGundead joined #nim |
05:11:37 | * | barosl joined #nim |
05:18:16 | * | nande joined #nim |
05:24:03 | reactormonk | didn't someone have an option implementation for nim? |
05:24:58 | * | Demon_Fox quit (Quit: Leaving) |
05:33:18 | * | barosl_ joined #nim |
05:34:24 | * | barosl quit (Ping timeout: 272 seconds) |
05:46:21 | * | saml_ quit (Ping timeout: 256 seconds) |
05:48:41 | * | nande quit (Remote host closed the connection) |
05:53:25 | * | nande joined #nim |
05:55:42 | reactormonk | Error: internal error: GetUniqueType |
05:55:44 | reactormonk | O.o |
05:56:08 | Triplefox | oh i've seen that one before...i forget what it was |
05:56:26 | * | barosl__ joined #nim |
05:56:46 | Triplefox | there's an issue for it |
05:58:46 | Triplefox | https://github.com/Araq/Nim/search?q=GetUniqueType&type=Issues&utf8=%E2%9C%93 |
05:58:50 | Triplefox | one of those i think |
06:00:03 | * | barosl_ quit (Ping timeout: 264 seconds) |
06:00:09 | * | RayoGundead quit (Quit: Page closed) |
06:01:05 | reactormonk | was https://github.com/Araq/Nim/issues/1131 |
06:02:13 | Triplefox | yeah, legit error but useless message |
06:08:23 | reactormonk | How do format floats? |
06:08:35 | reactormonk | oh wait, I wrote something in the compiler for that a while back |
06:09:24 | * | gmpreussner quit (Ping timeout: 244 seconds) |
06:09:39 | reactormonk | hm, can't really mess with that |
06:11:45 | reactormonk | hm, subexes don't seem to have that option |
06:21:25 | reactormonk | "why is nim so slow? oh, I forgot -d:release" |
06:24:37 | Triplefox | oh, i didn't know that existed |
06:25:22 | Triplefox | wow my sprite packer algorithm got 5 times faster |
06:26:46 | Triplefox | fast enough for a (relatively undemanding) real-time situation |
06:29:48 | reactormonk | Triplefox, yeah, we really need to highlight that |
06:30:27 | reactormonk | Triplefox, https://github.com/Araq/Nim/issues/1868 <- comment here |
06:35:59 | Triplefox | i commented |
06:42:03 | * | adam_s joined #nim |
06:42:04 | adam_s | #phaserio |
06:42:41 | adam_s | whoops, wrong chat |
06:45:22 | * | ctran quit (Quit: ctran) |
07:22:08 | * | Boscop joined #nim |
07:31:35 | * | d3m1gd joined #nim |
07:35:54 | * | gunn_ joined #nim |
07:37:22 | * | gunn quit (Ping timeout: 245 seconds) |
07:42:17 | reactormonk | ok, wtf. According to valgrind, split() makes up 50% of my code runtime. |
07:42:44 | reactormonk | 60% to be correct. |
07:58:27 | reactormonk | re.split is even slower. |
08:01:06 | * | vendethiel joined #nim |
08:01:58 | * | BlaXpirit joined #nim |
08:07:53 | reactormonk | How do I fix "Error: no generic parameters allowed for <array>"? |
08:09:41 | reactormonk | ah, darn : vs. = in array again |
08:10:01 | * | adam_s quit (Quit: Leaving) |
08:23:59 | * | vendethiel quit (Ping timeout: 245 seconds) |
08:41:03 | * | FusionGaming quit (Read error: Connection reset by peer) |
08:41:26 | * | FusionGaming joined #nim |
08:42:28 | * | SplinterOfChaos quit (Ping timeout: 245 seconds) |
08:52:04 | * | barosl_ joined #nim |
08:55:12 | * | barosl__ quit (Ping timeout: 246 seconds) |
09:04:33 | * | barosl__ joined #nim |
09:07:53 | * | barosl_ quit (Ping timeout: 245 seconds) |
09:13:54 | * | kniteli quit (Ping timeout: 265 seconds) |
09:23:05 | dtscode | can someone explain the pegs replace function to me? |
09:23:15 | dtscode | because im having a hard time understanding it |
09:29:35 | * | gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:52:11 | reactormonk | Triplefox, I got a 10x increase btw ;-) |
09:53:06 | * | noam joined #nim |
10:00:50 | * | nande quit (Read error: Connection reset by peer) |
10:10:29 | * | Trustable joined #nim |
10:14:22 | * | xAndy quit (Excess Flood) |
10:15:27 | * | xAndy joined #nim |
10:40:08 | * | jefus_ joined #nim |
10:44:02 | * | jefus quit (Ping timeout: 245 seconds) |
10:46:04 | gokr | LGPL and GPL too are indeed problematic when you step outside the classic structures of compiled C. |
10:46:50 | * | gunn joined #nim |
10:47:33 | * | vendethiel joined #nim |
10:48:25 | gokr | Smalltalk - given its image model - is also quite undefined for these licenses. On a direct discussion with Stallman he said so himself, which is one reason Smalltalkers tend to be MIT/BSD-people. |
10:51:52 | * | barosl__ is now known as barosl |
10:56:06 | gokr | 23 subscribers to the ml now. |
10:56:22 | * | Sphax joined #nim |
11:24:37 | * | woadwarrior joined #nim |
11:25:26 | * | Matthias247 joined #nim |
11:34:10 | * | VinceAddons joined #nim |
11:42:59 | * | Boscop_ joined #nim |
11:45:53 | * | Boscop quit (Ping timeout: 240 seconds) |
11:48:40 | * | Boscop__ joined #nim |
11:52:15 | * | Boscop_ quit (Ping timeout: 276 seconds) |
11:59:27 | * | woadwarrior quit (Quit: quit) |
12:13:18 | Araq | gokr: I disagree with the underlying assumptions that if it's "impossible to avoid this and that feature in **practice**" |
12:13:31 | * | EXetoC joined #nim |
12:13:33 | Araq | *that it is |
12:14:10 | Araq | when you have an environment where every single submitted line of code goes through code review, this is just an absurd claim to make |
12:15:02 | Araq | it's still not really cost effective to rely on human grunt work when you could automate it, but it's "impossible" at all |
12:15:11 | Araq | *it's not |
12:21:44 | Araq | the same argument is used to argue that our --gc:none switch is useless since the stdlib uses the GC. |
12:22:00 | Araq | ok, so use C instead, every library in C doesn't use a GC |
12:22:18 | Araq | oh wait, you can use the very same libraries in Nim too ... |
12:29:22 | * | rkj-b joined #nim |
12:30:34 | Araq | hi rkj-b welcome |
12:33:52 | rkj-b | Thanks. I learned Pascal in school, and read a book about C, but need a fast language for my math experiment. So I'm just a n00b. Trying to pick up clues about using Nim here. Just a minor pest, probably. |
12:38:25 | * | ctran joined #nim |
12:38:29 | Araq | n00bs are welcome here too :-) |
12:38:33 | Araq | hi ctran welcome |
12:39:14 | ctran | hi |
12:45:17 | * | silven quit (Ping timeout: 245 seconds) |
12:48:30 | * | silven joined #nim |
12:52:00 | * | gokr_ joined #nim |
12:52:23 | def- | Hm, that's an old bug: https://stackoverflow.com/questions/28122276/ |
12:53:31 | * | BlaXpirit_ joined #nim |
12:56:13 | * | BlaXpirit quit (Ping timeout: 245 seconds) |
13:15:46 | * | rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0/20150108202552]) |
13:17:13 | * | EXetoC quit (Quit: WeeChat 1.0.1) |
13:30:23 | xAndy | whats the best way to cast a (ref) pointer of a base class to a derived one? |
13:30:48 | xAndy | simply an assert(obj of derivedclass) and a cast afterwards? |
13:34:39 | Araq | use object conversions instead of 'cast' |
13:34:55 | Araq | DerivedClass(obj) # performs a runtime check for you |
13:35:00 | flaviu | I wouldn't use assert here either, passing the wrong subclass is probably not an programmer error. |
13:35:15 | Araq | unless you use -d:release and don't enable --objChecks:on |
13:35:49 | flaviu | Araq: Can you review https://github.com/flaviut/Nim/compare/fastergc ? |
13:37:43 | Araq | well it's correct |
13:37:58 | Araq | how it affects code size, no idea |
13:38:35 | Araq | use 'nim c --compileOnly compiler/nim' as a real world benchmark |
13:38:47 | Araq | compare the nim.exe sizes |
13:39:50 | Araq | and please do it for both gcc and clang |
13:44:47 | * | UberLambda joined #nim |
13:45:24 | * | davidhq joined #nim |
13:46:39 | * | davidhq quit (Read error: Connection reset by peer) |
13:46:46 | xAndy | thanks, will use that |
13:46:49 | * | davidhq joined #nim |
13:52:11 | flaviu | Ok, it looks like it makes a negligible difference on non-microbenchmarks. |
13:53:23 | flaviu | Less than a percent or so. I could set up a proper test harness and get a more accurate number, but it's probably not worth it. |
13:53:34 | Araq | well microbenchmarks are important, so if code size is hardly affected I will accept it |
13:54:27 | Araq | note that the compiler iself is allocation heavy and according to Boehm himself is a compiler the best benchmark one can come up with |
13:58:35 | * | BitPuffin joined #nim |
14:06:36 | * | Pisuke joined #nim |
14:06:53 | * | d3m1gd quit (Ping timeout: 240 seconds) |
14:08:09 | * | MyMind quit (Ping timeout: 245 seconds) |
14:08:34 | * | Pisuke quit (Client Quit) |
14:09:37 | * | Sembei joined #nim |
14:20:09 | * | d3m1gd joined #nim |
14:23:02 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:23:51 | * | Fusion_Gaming joined #nim |
14:27:03 | * | FusionGaming quit (Ping timeout: 264 seconds) |
14:30:23 | * | sillesta joined #nim |
14:45:08 | gokr | Araq: You replied to me about something, but I admit I am at a loss to what it was. |
14:45:29 | gokr | At 01:13:20. |
14:47:29 | sillesta | gokr: http://irclogs.nim-lang.org/ ? |
14:47:33 | * | Fusion_Gaming is now known as FusionGaming |
14:48:04 | gokr | No, I mean - I can see what he wrote, but I have no idea ... what he means :) |
14:49:12 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:49:38 | sillesta | oh |
14:49:41 | sillesta | :p |
14:59:20 | * | davidhq joined #nim |
15:00:08 | * | ctran quit (Quit: ctran) |
15:03:34 | ekarlso | flaviu: you got a clue on something to use for tags ? |
15:04:50 | flaviu | Sure, https://twitter.github.io/typeahead.js/ |
15:05:37 | flaviu | Just add a gettagsuggesion api endpoint and feed it into typeahead.js |
15:14:33 | ekarlso | flaviu: but hmmms, isn't the point to be able to select multiple tags ? ^ |
15:18:05 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
15:18:45 | * | BlaXpirit joined #nim |
15:19:02 | flaviu | I guess you can copy stackoverflow? |
15:19:43 | flaviu | You could just ask the user to paste or upload their .nimble file. |
15:21:16 | * | irrequietus joined #nim |
15:26:18 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:26:36 | ekarlso | flaviu: :p |
15:26:40 | ekarlso | that's an option too ! |
15:31:31 | * | kapil__ quit (Quit: Connection closed for inactivity) |
15:34:12 | * | darkf quit (Quit: Leaving) |
15:45:30 | * | EXetoC joined #nim |
15:58:38 | * | sdw joined #nim |
16:01:09 | * | JinShil quit (Quit: Konversation terminated!) |
16:10:23 | * | gokr_ quit (Ping timeout: 245 seconds) |
16:15:45 | * | Sphax quit (Quit: ZZZZZzzzzz) |
16:27:45 | * | nande joined #nim |
16:30:05 | * | nande quit (Read error: Connection reset by peer) |
16:34:46 | * | nande joined #nim |
16:45:06 | * | BlaXpirit quit (Quit: Quit Konversation) |
16:45:40 | * | BlaXpirit joined #nim |
16:46:47 | * | gmpreussner joined #nim |
16:55:41 | * | NimBot joined #nim |
16:57:28 | * | Trustable quit (Remote host closed the connection) |
16:58:50 | * | threewood joined #nim |
16:58:53 | * | Sphax joined #nim |
16:59:59 | * | Sphax quit (Client Quit) |
17:10:45 | * | daniel_cp joined #nim |
17:11:01 | * | UberLambda quit (Quit: Leaving the Matrix) |
17:23:54 | ekarlso | is there anything to parse a .nimble file ? |
17:25:26 | dom96 | ekarlso: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/packageinfo.nim |
17:25:42 | dom96 | import nimblepkg/packageinfo |
17:27:54 | * | SplinterOfChaos joined #nim |
17:37:23 | * | johnsoft quit (Ping timeout: 276 seconds) |
17:38:36 | * | johnsoft joined #nim |
17:56:09 | ekarlso | awesome dom96 ! |
18:00:20 | * | gmpreussner quit (Ping timeout: 244 seconds) |
18:00:20 | * | gmpreussner_ joined #nim |
18:04:34 | * | Demos joined #nim |
18:04:47 | * | reem joined #nim |
18:04:53 | * | threewood quit (Ping timeout: 252 seconds) |
18:05:00 | reem | What's the best way to get started with nim? |
18:05:21 | def- | reem: http://nim-lang.org/learn.html |
18:05:28 | reem | Thank you. |
18:05:28 | def- | I liked the regular tutorial |
18:07:20 | * | ARCADIVS joined #nim |
18:10:01 | Demos | I just read the manual. But I am a massive nerd |
18:10:20 | reem | Me too :) |
18:11:14 | daniel_cp | Hey all - I’m just getting myself familiar with Nim today. Haven’t written anything yet, but am impressed. I had recently started a web crawling/scraping project and think Nim may work well… and am considering writing a little library with a suitable DSL to help. Are there any existing projects that may come in useful? |
18:11:53 | reem | Are there any specific resources or things I should look at given that I'm coming at this from the perspective of Rust, which is the language I've used the most recently. |
18:12:06 | daniel_cp | The URL patterns in jester and nawak look like things worth ripping off |
18:12:28 | def- | daniel_cp: there's the httpclient module, but note that it's broken in 0.10.2 release (works in devel branch) |
18:12:57 | daniel_cp | def-*: ty… that’s good to know |
18:13:18 | def- | reem: https://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html |
18:13:43 | reem | Ah yes, I've seen that. |
18:13:45 | daniel_cp | def-: what’s broken? is basic functionality working |
18:13:55 | reem | Anything more.. tutorial-like? |
18:13:58 | def- | daniel_cp: more complex urls don't work |
18:14:58 | def- | reem: don't know anything like that |
18:15:30 | reem | That's alright, just curious. Nim looks very interesting. |
18:15:45 | reem | Where's the best place to chat with the community and such, is this channel pretty active? |
18:16:04 | def- | http://nim-lang.org/community.html |
18:16:14 | def- | yeah, this channel is pretty active |
18:17:29 | reem | Awesome. |
18:18:39 | reem | So how does the ecosystem deal with versioning as related to the language? Do people mostly track the latest development build or stick to versions? |
18:21:26 | def- | some use 0.10.2, others the devel branch, I guess |
18:23:04 | * | jefus_ quit (Ping timeout: 244 seconds) |
18:23:10 | * | BitPuffin quit (Quit: See you on the dark side of the moon!) |
18:23:53 | * | BitPuffin joined #nim |
18:26:51 | * | UberLambda joined #nim |
18:28:24 | EXetoC | flaviu: does validcodehashes.txt need to be distributed? |
18:35:19 | flaviu | EXetoC: Yes. |
18:35:55 | flaviu | Each time you modify code, you should run the program and make sure that the code compiles. If it does, it gets added to that file. |
18:36:20 | BlaXpirit | huh... what is this? |
18:36:58 | flaviu | https://github.com/flaviut/nim-by-example/blob/master/validcodehashes.txt |
18:37:05 | * | brson joined #nim |
18:37:42 | flaviu | It contains the hashes of all the code snippets that are valid. |
18:45:57 | * | perturbation joined #nim |
18:47:32 | vendethiel | mmmh, seems surprising to have "import x except y" for exclusion, but the other way around for inclusion (from x import y) |
18:47:47 | vendethiel | in one case, it's import MODULE_NAME, in the other, it's import VARIABLES, ... |
18:50:48 | * | gmpreussner__ joined #nim |
18:50:58 | * | gmpreussner_ quit (Ping timeout: 244 seconds) |
18:54:38 | EXetoC | flaviu: nanoc is so slow :p |
18:56:35 | * | reem quit (Remote host closed the connection) |
18:57:27 | * | reem joined #nim |
18:58:33 | flaviu | EXetoC: nanoc is fine, but each code snippet requires a python invocation for syntax highlighting. That's slow. |
19:04:17 | daniel_cp | If I understand, nimble doesn’t support versioning, per-project install locations, nor manifests… is that correct? I know the ecosystem is small currently, but are there best practices on how to deal with those things? |
19:05:39 | BlaXpirit | daniel_cp, supports versioning for sure |
19:05:41 | EXetoC | packages are versioned and versions can be specified for dependencies |
19:06:15 | BlaXpirit | per-project - i'm not sure, but you can always just copy the folders, no problem |
19:06:22 | daniel_cp | oh, sorry… I didn’t see any in https://github.com/nim-lang/packages/blob/master/packages.json |
19:06:26 | BlaXpirit | and what are manifests? |
19:06:41 | BlaXpirit | daniel_cp, well people aren't gonna update that thing with each version release :p |
19:06:49 | BlaXpirit | versions are in packages themselves |
19:06:54 | BlaXpirit | .nimble and whatnot |
19:07:01 | daniel_cp | manifest = list of project dependencies |
19:07:07 | BlaXpirit | .nimble again |
19:07:15 | BlaXpirit | look at any project .nimble file |
19:07:16 | flaviu | https://github.com/flaviut/nre/blob/master/nre.nimble |
19:07:18 | daniel_cp | blaxpirit: great, I see.. thanks |
19:07:26 | EXetoC | example: Requires: "nimrod >= 0.9.2, gtk2#head" |
19:09:23 | daniel_cp | EXetoC: great, I was worried for a brief moment :) |
19:10:24 | daniel_cp | An idea…. instead of looking for nimble.ini in ~./config, use a search order that starts in the current directory and walks the tree up until one is found. then, fallback to ~/config. Projects could specify their own (relative) path in their own nimble.ini |
19:13:14 | EXetoC | I don't think a recursive search should be performed |
19:13:22 | EXetoC | anyway, feel free to submit feature requests here: https://github.com/nim-lang/nimble/issues/new |
19:14:14 | daniel_cp | EXetoC: is there another way nim or nimble deals with conflicting versions of the same packages installed? |
19:14:21 | * | TheJacob joined #nim |
19:15:02 | BlaXpirit | daniel_cp, I can only guess, because i've never run into this |
19:15:11 | BlaXpirit | but i think it can keep multiple versions of packages installed |
19:15:16 | TheJacob | what do I have to do if I want a property of an object i make to be settable? I keep getting "Error: [object name] cannot be assigned to" |
19:15:27 | EXetoC | BlaXpirit: correct |
19:15:34 | BlaXpirit | and it might give different packages different packages, if u know what im sayin |
19:15:42 | TheJacob | (this is my first systems programming language) |
19:15:43 | daniel_cp | how does “import” know which one to include? |
19:15:46 | BlaXpirit | TheJacob, define a proc `settername=` |
19:15:52 | TheJacob | I did that |
19:15:56 | EXetoC | TheJacob: are you using 'let' instead of 'var'? |
19:15:58 | BlaXpirit | daniel_cp, it's in path |
19:16:03 | TheJacob | nope |
19:16:15 | TheJacob | its in a for loop over a seq of the objects |
19:16:20 | EXetoC | is it defined before the first usage? |
19:16:37 | TheJacob | EXetoC: I don't think so? |
19:16:41 | BlaXpirit | just give code and save us the guessing |
19:16:46 | TheJacob | okay |
19:17:10 | TheJacob | https://www.irccloud.com/pastebin/yPpbiVOF |
19:17:14 | TheJacob | there you go |
19:17:36 | dom96 | daniel_cp: https://github.com/nim-lang/nimble/blob/master/developers.markdown |
19:17:49 | EXetoC | TheJacob: it doesn't return a 'var' |
19:17:53 | dom96 | Everything is explained there. |
19:18:00 | TheJacob | EXetoC: what doesn't? |
19:18:34 | flaviu | TheJacob: The for loop iterates over immutable values. |
19:18:36 | BlaXpirit | nodes.items, i suppose. i don't quite understand |
19:19:02 | EXetoC | TheJacob: that for loop invokes the 'items' iterator, which doesn't yield 'var' objects, and so you either have to loop over the indices instead, or assign to a temporary 'var' |
19:19:13 | EXetoC | BlaXpirit: items is invoked implicitly in this case |
19:19:20 | BlaXpirit | of course |
19:19:47 | EXetoC | TheJacob: we'll get iterators for this purpose, but there's that in the meantime |
19:19:54 | TheJacob | EXetoC: thanks! |
19:20:24 | ekarlso | what are you guys making in nim ? ^^ |
19:20:56 | EXetoC | 'for i, x in foo' would be expanded to 'for i, x in foo.pairs' |
19:21:06 | * | reem quit (Remote host closed the connection) |
19:22:40 | EXetoC | ekarlso: some kind of audio production tool |
19:23:04 | ekarlso | EXetoC: hmms, just playing around u too or ? |
19:23:08 | BlaXpirit | dom96, hm this might be a problem |
19:23:20 | BlaXpirit | I've installed a package that requires nre < 0.2 |
19:23:29 | BlaXpirit | and i have nre 0.3 or something installed as well |
19:23:45 | BlaXpirit | but when I use that package that requires < 0.2, it imports 0.3 anyway |
19:23:46 | daniel_cp | dom96, EXetoC: thanks, that clarifies things. so my concern is (as stated here: https://github.com/nim-lang/nimble/blob/master/developers.markdown#nimrod-compiler) “This means that it cannot resolve dependencies, and it can only use the latest version of a package when compiling.” so if I have one project requiring foobar@1 and another foobar@2, it sounds like nim will always use foodbar@2 |
19:24:20 | BlaXpirit | starts to seem so to me as well |
19:24:20 | EXetoC | oh well |
19:24:33 | daniel_cp | dom96, EXetoC: a lookup path order for nimble.ini would allow per-project dependencies.. but maybe not the best way |
19:24:49 | * | delian66 quit (Ping timeout: 265 seconds) |
19:24:55 | EXetoC | ekarlso: I'll try to create something practical |
19:26:04 | TheJacob | I'm making neural networks |
19:26:06 | gmpreussner__ | in the code documentation, do we already support something like @see or @seealso? |
19:26:28 | BlaXpirit | gmpreussner__, i'm pretty sure you just get bare restructuredtext |
19:26:57 | BlaXpirit | but i'm not sure at all |
19:26:58 | gmpreussner__ | so there's currently no way to link to other types/procs? |
19:27:15 | BlaXpirit | lol i said "pretty sure" than "not sure" |
19:27:19 | BlaXpirit | that's how sure i am |
19:27:23 | gmpreussner__ | ok :) |
19:27:52 | * | delian66 joined #nim |
19:28:05 | BlaXpirit | hey, there are some links in system.html |
19:28:11 | BlaXpirit | may be worth investigating |
19:28:20 | BlaXpirit | there are definitely links |
19:28:30 | BlaXpirit | `echo <#echo>`_ |
19:28:32 | BlaXpirit | right... |
19:29:01 | gmpreussner__ | ok, i'll take a look |
19:29:20 | BlaXpirit | it's just a normal rST hyperlink |
19:31:11 | EXetoC | oh |
19:31:39 | BlaXpirit | [:23:39] <EXetoC> oh well [:30:30] <EXetoC> oh |
19:31:59 | Araq | BlaXpirit: the links the docgen generates are canonicalized, so you can refer to system.+ for (int, int) via 'system.html#+,int,int' |
19:32:08 | BlaXpirit | oh that's cool |
19:32:17 | BlaXpirit | no, wait... |
19:32:38 | BlaXpirit | i mean, sure, these things are quite predictable |
19:32:43 | * | Araq ignores BlaXpirit |
19:32:55 | EXetoC | BlaXpirit: whatever |
19:32:58 | BlaXpirit | but would be nice to link to `+` alone (and that may even be present) |
19:34:29 | BlaXpirit | interesting. there are multiple things with id="+" |
19:34:52 | BlaXpirit | which indeed makes it work, but makes html invalid |
19:44:38 | reactormonk | Araq, btw, split() from strutils is rather slow |
19:47:23 | def- | reactormonk: compared to what? |
19:47:43 | def- | and do you have a nice benchmark for a realistic use case? |
19:49:48 | BlaXpirit | def-, you think split doesn't have a use case? :p |
19:50:13 | BlaXpirit | doesnt need to be realistic for an example |
19:50:40 | reactormonk | def-, lemme make two examples |
19:50:49 | def- | BlaXpirit: sure it has use cases. i thought reactormonk discovered it in a specific application |
19:51:01 | reactormonk | def-, yeah, that too |
19:51:14 | BlaXpirit | reactormonk, but then again, if you need high performance, requiring a seq of strings may not be preferred |
19:51:30 | reactormonk | BlaXpirit, yup, I went for an array of strings ;-) |
19:51:32 | BlaXpirit | instead you can search and work with substrings manually |
19:51:35 | reactormonk | anyway, numbers incoming |
19:52:05 | * | davidhq joined #nim |
19:57:26 | * | UberLambda quit (Quit: Leaving the Matrix) |
19:58:45 | reactormonk | BlaXpirit, https://gist.github.com/reactormonk/5c6f2fbbba8eceec9d57 |
19:59:05 | BlaXpirit | interesting, let's see |
19:59:24 | BlaXpirit | .nim gives syntax highlighting btw |
19:59:51 | reactormonk | I selected nimrod in the dropdown :-/ |
19:59:59 | reactormonk | test is 120k lines btw |
20:02:25 | * | perturbation quit (Quit: Leaving) |
20:02:31 | * | d3m1gd quit (Ping timeout: 255 seconds) |
20:02:46 | * | Varriount|Laptop joined #nim |
20:03:42 | BlaXpirit | very strange. well, the standard split has a strange additional behavior, too |
20:04:36 | BlaXpirit | nvm |
20:05:53 | dom96 | BlaXpirit: daniel_cp: the compiler will. You should use nimble build which will use the correct package based on the dependencies listed. |
20:07:05 | Varriount|Laptop | reactormonk: The problem with strutils.split is that it makes several calls to substr, which provides a copied string. |
20:07:23 | reactormonk | Varriount|Laptop, so do I |
20:07:40 | Varriount|Laptop | Huh? |
20:07:45 | reactormonk | still doesn't explain why it's slow as fuck |
20:07:53 | reactormonk | well, kinda. |
20:08:14 | reactormonk | I might have a branching optimization because of the hardcoded marker... |
20:08:18 | reactormonk | let's test without it |
20:09:09 | reactormonk | nope, same runtime |
20:09:39 | BlaXpirit | u could try to slowly converge to that code until you see |
20:09:51 | BlaXpirit | it's kinda hard to understand why it has inner loop |
20:10:59 | reactormonk | BlaXpirit, where is the split code btw? |
20:11:12 | BlaXpirit | https://github.com/Araq/Nim/blob/devel/lib/pure/strutils.nim#L253 |
20:11:39 | BlaXpirit | u can find it by pressing Source http://nim-lang.org/strutils.html#split,string,char |
20:11:43 | reactormonk | hm. |
20:12:23 | flaviu | I see the problem. |
20:12:39 | daniel_cp | dom96: thank you for clarifying that for me. from reading the docs, nimble seemed primarily for modules published to the package index, but i take it people are using it for project management as well? if so I definitely agree with https://github.com/nim-lang/nimble/issues/80, nimble should be more tightly coupled with nim |
20:12:51 | flaviu | Instead of substr(prev, current), it searches for the next delimiter. |
20:13:22 | * | Trustable joined #nim |
20:13:32 | BlaXpirit | oh yeah |
20:13:49 | BlaXpirit | that explains everything |
20:14:00 | reactormonk | so it's slower algorithmically? |
20:14:00 | BlaXpirit | reactormonk, welp, that calls for a pull request |
20:14:04 | BlaXpirit | yeah, reactormonk |
20:14:43 | EXetoC | daniel_cp: for that you have compiler config files, and if that's not enough then you have things like https://github.com/fowlmouth/nake |
20:14:58 | BlaXpirit | waaait a second |
20:15:01 | BlaXpirit | this is not so clear anymore |
20:15:15 | BlaXpirit | it searches for next separator, but it doesn't search for it twice, flaviu |
20:15:16 | Varriount|Laptop | reactormonk: See if you can't remove some of the other substr calls too. |
20:15:56 | reactormonk | BlaXpirit, yeah, it's actually not a double loop |
20:18:03 | reactormonk | lemme converge my code to an iterator |
20:18:57 | BlaXpirit | it may be a lot of little things |
20:18:57 | EXetoC | daniel_cp: adding a package to the index is the best way to distribute it. it was probably done that way for ease of implementation. more sophisticated systems have been discussed, but it's probably of low priority |
20:19:04 | BlaXpirit | len can be quite costly |
20:19:14 | BlaXpirit | (i think) |
20:19:20 | dom96 | daniel_cp: What kind of project management do you mean? |
20:19:52 | fowl | strutils.split should use strutils.continuesWith instead of substr to check len |
20:20:44 | daniel_cp | exetoc: i’ll have to read up on compiler config files |
20:21:05 | reactormonk | fowl, we're talking about the sep: char version at line 253 |
20:21:16 | daniel_cp | dom96: i just mean managing the dependencies of an application, not necessarily one that will be published anywhere |
20:21:21 | Varriount|Laptop | You know... It would be really nice to be able to take slices of sequences and strings that weren't copies. |
20:21:51 | EXetoC | daniel_cp: : see config/nim.cfg for an example. there's also the project-local projectname.nim.cfg file, and I think it looks in $HOME too. it's documented somewhere |
20:21:51 | reactormonk | still 0.8s approx |
20:22:04 | reactormonk | I'll valgrind the strutils version |
20:22:21 | dom96 | daniel_cp: If you want to share packages across different applications then I suppose you could use Nimble. |
20:22:22 | flaviu | reactormonk: have you seen linux perf? It's excellent. |
20:22:36 | reactormonk | flaviu, valgrind makes a good job too. Link? |
20:23:42 | EXetoC | BlaXpirit: it should be O(1) for all random-access types |
20:23:53 | reactormonk | flaviu, https://perf.wiki.kernel.org/index.php/Main_Page ? |
20:24:03 | BlaXpirit | EXetoC, yes, but it's additional function call and whatnot |
20:24:26 | flaviu | That's one option, I like http://www.brendangregg.com/perf.html too. |
20:25:24 | EXetoC | BlaXpirit: seems like an easy case for an optimizer |
20:25:40 | * | TheJacob quit () |
20:26:45 | reactormonk | flaviu, but but but fancy https://i.imgur.com/BDNngnz.png |
20:27:52 | flaviu | reactormonk: Also fancy: http://www.brendangregg.com/perf.html#FlameGraphs :P |
20:28:00 | BlaXpirit | looks cool |
20:28:06 | reactormonk | flaviu, nice |
20:28:37 | flaviu | Main advantage of perf over valgrind it that it runs at native speed. |
20:29:10 | reactormonk | that sounds like a good advantage, valgrind is slow as fuck |
20:29:32 | reactormonk | took 180s to analyse a 2s program |
20:32:41 | reactormonk | flaviu, now how do I profile cpu time with perf? |
20:34:08 | reactormonk | let's see if cycles does what I Want |
20:35:40 | reactormonk | ah, perf stat. |
20:36:48 | reactormonk | so the strutils split seems to stall a bit more (23% vs. 30%)... |
20:39:53 | reactormonk | yeah, the len() hugs about all of the difference |
20:41:25 | reactormonk | somehow the compiler doesn't cache it. |
20:45:05 | reactormonk | nope, it's not the len() call. |
20:45:29 | reactormonk | are there any tests for strutils and how can I run them? |
20:53:17 | * | superfunc[mobile joined #nim |
20:53:54 | * | threewood joined #nim |
20:59:10 | * | Varriount|Laptop quit (Ping timeout: 246 seconds) |
21:01:15 | * | Mimbus quit (Ping timeout: 264 seconds) |
21:01:36 | * | flaviu quit (Ping timeout: 272 seconds) |
21:05:29 | * | Sphax_ joined #nim |
21:20:58 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:21:10 | threewood | What is the technology underlying the parallel statement? |
21:22:38 | * | davidhq joined #nim |
21:24:10 | * | davidhq quit (Client Quit) |
21:27:29 | * | davidhq joined #nim |
21:29:11 | * | Sphax_ quit (Quit: ZZZZZzzzzz) |
21:29:20 | * | davidhq quit (Client Quit) |
21:31:14 | * | davidhq joined #nim |
21:35:35 | Araq | threewood: some homegrown proof checker plus some runtime stuff that's in threadpool.nim. the checker uses as much information as can be extracted from the context. the checker mostly uses algebraic simplifications and the transitivity rules of inequalities |
21:36:33 | threewood | Araq: OK, so first it inlines as much as possible and then it uses those methods? |
21:37:24 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:37:41 | Araq | hrm, yeah, you can put it that way. but it doesn't inline anything that's not inlined already by the language's semantics (templates/iterators) |
21:39:21 | Araq | note that it does use 'range[0..N]' typing annotations, so these can make a difference. |
21:39:50 | threewood | How many lines of source is the nim compler codebase right now? |
21:40:01 | Araq | 80K lines of code |
21:40:18 | threewood | That's not too bad... it's all freely available isn't it? |
21:40:21 | * | davidhq joined #nim |
21:40:29 | Araq | yes, MIT license |
21:40:46 | threewood | cool, thanks. I'm gonna go look it over |
21:59:01 | * | Sphax_ joined #nim |
22:08:41 | * | sdw quit (Ping timeout: 265 seconds) |
22:12:56 | reactormonk | Araq, any documentation on the compiler tester? I still haven't figured it out |
22:13:49 | Araq | maybe there is some readme.txt that you ignore like you ignore the fact that it can output its usage |
22:14:01 | ekarlso | stupid ass ui-select from angularjs |
22:28:26 | * | brson quit (Quit: leaving) |
22:50:50 | daniel_cp | What options are there for event-driven coding styles with Nim? does the standard lib work well with an evented style? |
22:51:41 | * | irrequietus quit () |
22:53:02 | daniel_cp | ran across node.nim (https://github.com/DAddYE/node.nim). looks ambitious but unmaintained |
22:55:34 | * | reem joined #nim |
22:59:35 | reem | What's the status of jester? Is it actively maintained/growing new features? |
23:00:26 | Araq | daniel_cp: async is built via macros, but part of the stdlib |
23:00:51 | Araq | reem: it's maintained, dunno about growing features |
23:01:52 | reem | Araq: Can you say more about how async works under the hood? Is there an event loop? Bindings to epoll/kqueue? |
23:02:12 | def- | reem: epoll is used in there |
23:02:32 | * | superfunc[mobile quit (Quit: Connection closed for inactivity) |
23:02:45 | * | ctran joined #nim |
23:02:55 | * | ctran quit (Client Quit) |
23:03:23 | * | ctran joined #nim |
23:07:24 | reactormonk | does nim expect the nodejs binary to be `node` or `nodejs`? |
23:13:13 | * | Mat4 joined #nim |
23:13:31 | Mat4 | hi all |
23:13:33 | reactormonk | node seems to work. |
23:13:39 | reactormonk | But then why doesn't the tester find it? |
23:14:26 | reactormonk | because it's looking for nodejs binary... |
23:17:34 | * | xAndy quit (Ping timeout: 244 seconds) |
23:19:13 | * | xAndy joined #nim |
23:19:21 | reactormonk | where does the compiler find node for nim -r -d:nodejs js <file> ? |
23:19:34 | reactormonk | I can't find it with git grep nodejs |
23:20:29 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:20:33 | wtw | arg, the FreeBSD parallel build problem is really strange somehow |
23:20:49 | wtw | when I increase the busy waiting time in osproc.nim it works flawlessly |
23:21:16 | reactormonk | ah, found it |
23:21:18 | wtw | also when removing the WNOHANG flag in waitpid() it works |
23:22:24 | reactormonk | Araq, the tester expects `nodejs` as the node binary, while the compiler expects `node` - which one is correct? |
23:23:32 | def- | reactormonk: when you get it from nodejs.org it's called node |
23:23:44 | reactormonk | def-, or the one in arch |
23:23:56 | reactormonk | def-, I assume it's debian that goes nodejs? |
23:24:17 | Araq | wtw: nice that you look into it! thanks a lot! |
23:24:39 | Araq | reactormonk: at some point I patched one thing but not the other, or something like that. |
23:24:41 | * | Jesin quit (Quit: Leaving) |
23:25:30 | reactormonk | Araq, the default distribution of nodejs has a `node` binary. Up to you to speak a word of power. On the other hand, we could also make the code more complex and check for `nodejs` first, then for `node`. |
23:25:39 | def- | reactormonk: correct |
23:25:45 | def- | https://groups.google.com/forum/#!topic/nodejs/Z8F8uDXY8XE |
23:26:33 | wtw | Araq: np, but don't be too hopeful I'll find something soon :) Currently it looks like a strange timing issue that should not happen |
23:27:04 | Araq | reactormonk: I don't care. make some PR so it works again. |
23:27:06 | def- | reactormonk: so i guess you have to look for both binaries if you want it to work everywhere =/ |
23:27:13 | * | Jesin joined #nim |
23:27:27 | reactormonk | Araq, if the tester runs on debian, hell's gonna break loose. |
23:27:39 | reactormonk | def-, yup, pretty much |
23:28:40 | def- | look for nodejs first, then node |
23:28:57 | reactormonk | well, if we get the ax25 binary called `node`, what happens? |
23:28:58 | def- | but can still fail if you have AX25 installed, which provides the node binary, and don't have nodejs |
23:29:26 | reactormonk | I guess tough luck. |
23:29:41 | def- | Yeah, I think it would be too much to determine whether it's actually nodejs |
23:29:58 | def- | node -h|grep nodejs would work |
23:30:12 | reactormonk | no thanks |
23:30:22 | reactormonk | pretty sure there's a system that doesn't have grep |
23:31:31 | reactormonk | where do I put code I want to use in both the compiler and the tester? |
23:31:47 | Araq | reactormonk: in some stdlib module. |
23:31:54 | reactormonk | Araq, good enough for me. |
23:34:22 | fowl | reactormonk, would this be better for split()? it at at least can avoid allocations https://gist.github.com/fowlmouth/a58cb7580adab0022fb6 |
23:36:30 | reactormonk | fowl, lemme bench it after this |
23:39:54 | fowl | i didnt test it btw |
23:40:38 | reactormonk | fowl, gistfile1.nim(16, 38) Error: expression has no address |
23:40:39 | reactormonk | I see |
23:41:22 | reactormonk | The one I provided in my gist (ownSplit) is still fast and about half the LoC |
23:41:50 | fowl | what that should work lol |
23:42:00 | reactormonk | not sure how well it handles the edgecases though |
23:42:05 | reactormonk | that's why I was asking for tests |
23:43:52 | reactormonk | a lot of the tests seem to fail :-/ |
23:52:37 | def- | reactormonk: they worked before? |
23:57:37 | * | BlaXpirit quit (Quit: Quit Konversation) |
23:57:38 | Araq | I'm cleaning them up, slowly category after category |
23:58:16 | * | davidhq joined #nim |