00:01:52 | * | gokr quit (Quit: Leaving.) |
00:15:07 | * | boop is now known as boopisaway |
00:21:50 | * | bulbasaur quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
00:23:12 | * | Kingsqueee joined #nim |
00:23:45 | * | Kingsquee quit (Ping timeout: 244 seconds) |
00:25:23 | * | elbow_jason joined #nim |
01:02:40 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:07:19 | * | tennix joined #nim |
01:13:58 | Varriount | reactormonk: Two binaries? |
01:22:26 | reactormonk | Varriount, yeah, compiling two binaries |
01:24:08 | Varriount | reactormonk: Can't you use '--out:' to override the filename? |
01:24:38 | reactormonk | Varriount, hm, yup, but you can't compile two binaries with a single command |
01:24:57 | Varriount | reactormonk: Why would you want to? |
01:25:23 | reactormonk | Varriount, http://blog.silentsignal.eu/2015/06/10/poisonous-md5-wolves-among-the-sheep/ |
01:27:58 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
01:55:38 | Varriount | ozra: Compared to the current syntax scheme, do your changes fix highlighting of procedures with generics? |
02:05:48 | ozra | Varriount: Damn, I haven't even looked at that. Are there any specifically generic heavy modules I can look at? |
02:11:09 | ozra | I'll look through a bunch of files in lib and look around for goofy highlighting... |
02:13:51 | * | wepy joined #nim |
02:13:53 | wepy | hey |
02:14:26 | wepy | any good arg parsing that can handle: -a -b foo --bar baz |
02:15:06 | wepy | i think i tried parseopt2 and it was kinda lame.. but not much documentation |
02:20:38 | * | brson quit (Quit: leaving) |
02:32:59 | reactormonk | wepy, try parseopt and parseopt2 |
02:34:18 | reactormonk | dom96_, what to do with https://github.com/Araq/Nim/issues/2341 ? |
02:43:50 | jackv | wepy, you might also want to look at docopt |
02:44:14 | reactormonk | oh yeah, docopt is awesome |
02:45:11 | jackv | docopt is, I think, the easiest way to do arg parsing |
02:47:39 | * | yglukhov________ joined #nim |
02:52:08 | * | yglukhov________ quit (Ping timeout: 265 seconds) |
02:53:29 | Varriount | wepy: Or you could just parse the command line. |
02:55:23 | * | Kingsqueee quit (Quit: Konversation terminated!) |
03:00:49 | * | Kingsquee joined #nim |
03:24:10 | * | darkf joined #nim |
03:27:44 | * | mleise joined #nim |
03:28:31 | mleise | Is this true? http://slashdot.org/comments.pl?sid=6771453&cid=48860921 |
03:30:09 | jackv | mleise, well to start, Nim does have a wiki page, that seems to be fairly well sourced at this point |
03:30:43 | mleise | I mean, the insults and sarcasm stuff |
03:31:16 | mleise | If you settled on reasoning and fairness I'm out. I only joined for the fun. |
03:32:33 | jackv | mleise, I've seen no problems recently, but I mostly lurk |
03:33:04 | mleise | :( gonna watch cute cat videos then |
03:34:58 | * | ddl_smurf quit (Quit: ddl_smurf) |
03:36:21 | * | mleise left #nim (#nim) |
03:38:05 | Varriount | jackv: The internet is a remarkable place, isn't it? |
03:38:59 | * | dddddd quit (Ping timeout: 245 seconds) |
03:40:22 | jackv | Varriount, indeed |
03:41:00 | Varriount | To be fair, that slashdot commenter just had the misfortune of joining the channel at a bad time. |
03:42:47 | onionhammer | Varriount: How are we doing? |
03:42:52 | * | wepy quit (Ping timeout: 255 seconds) |
03:42:54 | jackv | I find it hard to believe that that sort of thing NEVER happens anywhere else |
03:43:12 | jackv | like #nim is supposed to be some sort of model community |
03:43:26 | reactormonk | jackv, I hope not, I wanna try my banhammer at some point |
03:43:48 | Varriount | onionhammer: Well, I haven't found any bugs running things on ST2. What about you and ST3? |
03:47:16 | onionhammer | You still aren't able to get go to def working though? |
03:47:27 | dddddd_ | lol sladhdot |
03:47:29 | dddddd_ | garbage website |
03:47:31 | onionhammer | I need to test more thoroughly |
03:47:37 | dddddd_ | slash* |
03:48:27 | Varriount | onionhammer: I'm pushing out a new version tomorrow. Go-to-definition working or not. |
03:48:30 | dddddd_ | they censor all discussion about their malware spread on sourceforge |
03:48:43 | Varriount | dddddd_: Huh? |
03:49:24 | dddddd_ | sourceforge owns slashdot |
03:49:27 | dddddd_ | http://www.reddit.com/r/technology/comments/38dnue/sourceforge_has_begun_hijacking_popular_accounts/ |
03:49:58 | dddddd_ | everyone is leaving sourceforge |
03:50:10 | Varriount | dddddd_: Yes, I know about the account-hijacking. I was unaware that slashdot was censoring information though. |
03:50:19 | jackv | dddddd_, agreed, slashdot is garbage |
03:50:27 | jackv | especially after the sourceforge thing |
03:51:15 | dddddd_ | http://www.reddit.com/r/technology/comments/37zz9m/slashdot_burying_stories_about_slashdotmedia/ |
03:52:03 | Varriount | dddddd_: I would really like to know who is ignorant enough to think that censoring information will cause good PR. |
03:52:19 | Varriount | It's like burying your head in the sand on a battlefield. |
03:52:48 | dddddd_ | The Streisand effect lol |
03:55:05 | Varriount | dddddd_: This is interesting... http://www.google.com/trends/explore#q=reddit%2C%20digg%2C%20slashdot%2C%20fark%2C%20metafilter&date=1%2F2004%20129m&cmpt=q&tz= |
03:55:27 | Varriount | dddddd_: Under regional interest, click 'fark'. |
03:55:44 | Varriount | Apparently they have a good userbase in Turkey? |
03:55:58 | dddddd_ | lolol |
03:56:20 | Varriount | Oh, here's a more specific view - http://www.google.com/trends/explore#q=reddit,+digg,+slashdot,+fark,+metafilter&cmpt=q&date=1/2004+129m&geo=TR |
03:56:25 | * | dom96_ quit (Quit: Page closed) |
03:58:13 | onionhammer | OK. It would be nice if you could test it though Varriount |
03:58:27 | onionhammer | I think your refactors broke it :p |
04:01:14 | dddddd_ | wow insane http://www.google.com/safebrowsing/diagnostic?site=sourceforge.net |
04:01:37 | dddddd_ | Malicious software includes 5680 virus, 3541 trojan(s), 1074 exploit(s). |
04:01:41 | dddddd_ | ahaha |
04:05:47 | Varriount | dddddd_: http://www.google.com/safebrowsing/diagnostic?site=github.com |
04:10:12 | * | squirtle joined #nim |
04:10:45 | Varriount | Hello squirtle |
04:10:53 | squirtle | hello Varriount |
04:12:44 | Varriount | Hm. It just ocurred to me that the reasoning for using the regex-as-highlighter scheme for an IDE is rather flawed. As long as you have an AST with line numbers, you can invalidate and re-parse sections of it as the user edits the source. |
04:17:55 | * | wb quit (Read error: Connection reset by peer) |
04:18:31 | reactormonk | Varriount, sure, if nimsuggest would be so kind ;-) |
04:20:31 | dddddd_ | lol use regexp, now you got 2 problems |
04:29:56 | * | kumul quit (Quit: Leaving) |
04:44:11 | * | ChrisMAN quit (Ping timeout: 252 seconds) |
04:53:35 | * | tennix quit (Remote host closed the connection) |
05:06:36 | * | tennix joined #nim |
05:08:20 | * | dddddd_ left #nim (#nim) |
05:24:40 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:40:27 | * | Jesin quit (Quit: Leaving) |
05:43:00 | * | kas joined #nim |
06:46:38 | * | gokr joined #nim |
06:55:08 | * | aziz joined #nim |
07:01:09 | * | Ven joined #nim |
07:01:38 | * | Ven quit (Client Quit) |
07:13:17 | * | tennix quit (Remote host closed the connection) |
07:13:35 | * | kas quit (Ping timeout: 264 seconds) |
07:14:02 | * | tennix joined #nim |
07:33:41 | * | afiskon joined #nim |
07:34:55 | * | Trustable joined #nim |
07:36:37 | * | woadwarrior joined #nim |
07:48:51 | * | Ven joined #nim |
07:54:28 | * | sepisoad joined #nim |
07:59:07 | * | gokr quit (Quit: Leaving.) |
08:00:10 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:00:41 | * | bjz joined #nim |
08:04:26 | * | Ven quit (Read error: Connection reset by peer) |
08:08:47 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:13:35 | * | dalarmmst quit (Ping timeout: 264 seconds) |
08:16:08 | * | yglukhov________ joined #nim |
08:16:39 | * | Sembei joined #nim |
08:35:21 | * | coffeepot joined #nim |
08:36:56 | * | Ven joined #nim |
08:42:21 | * | bjz joined #nim |
08:57:57 | * | zikolach joined #nim |
09:00:19 | * | zikolach quit (Client Quit) |
09:06:27 | * | zikolach joined #nim |
09:22:32 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:23:06 | * | Trustable quit (Remote host closed the connection) |
09:25:48 | * | tennix quit (Remote host closed the connection) |
09:29:09 | * | Trustable joined #nim |
09:33:24 | * | Trustable quit (Remote host closed the connection) |
09:34:34 | * | Trustable joined #nim |
09:42:48 | * | Trustable quit (Remote host closed the connection) |
09:45:34 | * | jaco60 joined #nim |
09:46:41 | * | Trustable joined #nim |
09:52:36 | * | sepisoad quit (Ping timeout: 244 seconds) |
09:58:28 | * | kashyap_ joined #nim |
09:58:36 | * | Ven joined #nim |
10:00:20 | * | ddl_smurf joined #nim |
10:00:21 | kashyap_ | I've been using RegEx for HTML scraping and have had no issues with it so far .... But after hearing Araq mentioned "using Re to parse is misguided" I'd like to know what is a better way to parse and extract information from scraped documents |
10:12:45 | * | woadwarrior joined #nim |
10:19:18 | * | davidhq joined #nim |
10:20:57 | coffeepot | I don't have an answer for you kashyap_ but why parsing html with regex is bad is explained comedically here https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 |
10:22:36 | coffeepot | using the term "explained" loosely ;) |
10:25:11 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
10:25:12 | coffeepot | for a more helpful response, have you looked at the parseutils module? |
10:28:19 | TEttinger | kashyap_: "\"</body>\"" |
10:29:16 | * | woadwarrior joined #nim |
10:31:23 | kashyap_ | thanks coffeepot .. I am looking at parseutils ... also thanks for the link |
10:32:43 | TEttinger | regexes are ok for very very simple cases of HTML handling |
10:33:02 | TEttinger | if that's all you need, you're fine with regexes |
10:33:27 | TEttinger | stuff like following redirects gets complex fast :) |
10:34:50 | squirtle | I would use it to lex html |
10:35:25 | kashyap_ | yeah .... while it gets the job done ... I am looking for getting started with the right way .. and practice it till it comes naturally |
10:39:32 | kashyap_ | looks like lexbase may be a good place to start |
10:40:51 | * | xcombelle joined #nim |
10:46:44 | * | boopisaway is now known as boop |
10:46:47 | * | gokr joined #nim |
10:49:47 | * | JinShil joined #nim |
10:54:04 | * | squirtle is now known as dtscoded |
10:56:58 | * | Arrrr joined #nim |
11:05:35 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
11:07:32 | * | boop is now known as boopisaway |
11:08:39 | * | boopisaway is now known as boop |
11:15:22 | * | Sentreen joined #nim |
11:17:55 | * | Senketsu joined #nim |
11:24:22 | * | Ven quit (Read error: Connection reset by peer) |
11:30:07 | * | Ven joined #nim |
11:30:21 | * | bluenote joined #nim |
11:32:35 | * | davidhq joined #nim |
11:38:52 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:40:27 | * | Ven quit (Read error: Connection reset by peer) |
11:40:32 | * | Ven_ joined #nim |
11:41:15 | * | woadwarrior joined #nim |
11:44:26 | * | strcmp1 quit (Quit: Leaving) |
11:46:13 | * | woadwarrior quit (Ping timeout: 265 seconds) |
11:47:13 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
11:52:32 | * | woadwarrior joined #nim |
11:59:42 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
12:01:07 | * | strcmp1 joined #nim |
12:02:40 | * | davidhq joined #nim |
12:03:04 | * | dddddd joined #nim |
12:05:31 | * | strcmp1 quit (Ping timeout: 255 seconds) |
12:05:55 | * | Ven joined #nim |
12:06:35 | * | davidhq quit (Client Quit) |
12:08:47 | * | Ven_ quit (Ping timeout: 250 seconds) |
12:09:24 | coffeepot | does anyone know of any projects that do interop with C functions, particularly buffers with strings in nim? |
12:14:56 | * | banister joined #nim |
12:15:47 | * | strcmp1 joined #nim |
12:16:08 | coffeepot | scratch that, finally solved my problem! XD Haappppyyyyy |
12:16:41 | * | Ven quit (Read error: Connection reset by peer) |
12:17:18 | Arrrr | coffeepot: how did you solve it? |
12:20:04 | coffeepot | well my problem was reading string data from odbc, and ofc that expects an untyped pointer to write the data to. Providing data to C is okay, using cast[ptr cstring](buffer)[] = dataItem.strVal |
12:20:10 | coffeepot | but reading i had garbage |
12:20:27 | coffeepot | so turns out all i had to do was use $cast[ptr cstring](buffer)[] |
12:21:00 | * | davidhq joined #nim |
12:21:00 | Arrrr | y-you have to convert cstring to string? |
12:21:14 | coffeepot | i was getting garbage out because i wasn't dereferencing the pointer properly, so essentially casting the address to a string :-| |
12:21:49 | Arrrr | Well, im happy as a pot you fixed it |
12:22:41 | coffeepot | lol me too, but the tldr is I didn't know wtf i was doing :D |
12:22:55 | coffeepot | you don't normally have to cast to get a string from a cstring btw, no |
12:23:23 | coffeepot | but it was an untyped pointer so I had to tell nim what it was pointing to |
12:24:23 | coffeepot | my main issue was that I thought it was a utf-8 problem (even though as most people know utf-8 is basically ascii in english) |
12:24:34 | coffeepot | derp |
12:26:11 | coffeepot | also I'm not used to garbage collection and interop with C so I was suspicious of the memory being swept up as I had to keep it around for several odbc calls |
12:26:33 | coffeepot | which meant alloc0 and dealloc etc, and i dunno, just got my panties in a twist really |
12:26:53 | * | woadwarrior joined #nim |
12:29:22 | coffeepot | hopefully i can start actually writing some nim code now instead of this interop stuff (I kid, of course I'm gonna have to do more C interop)! |
12:32:14 | * | Ven joined #nim |
12:33:01 | coffeepot | random aside, has anyone thought it might be nice to extend something like 'algorithms' with quad &/or octrees? |
13:04:25 | * | kashyap_ quit (Ping timeout: 246 seconds) |
13:11:10 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:16:12 | * | JinShil quit (Quit: Konversation terminated!) |
13:19:41 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:22:51 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:23:58 | * | xcombelle quit (Remote host closed the connection) |
13:26:26 | * | davidhq joined #nim |
13:32:56 | scoeri | Does anyone know how variable names are resolved when using macros? |
13:33:21 | scoeri | In the following code I get an "undeclared identifier: 'x'" error |
13:33:22 | scoeri | http://pastie.org/10235504 |
13:33:39 | scoeri | but I get it after macro expansion time |
13:34:00 | scoeri | echo(tree_repr(result)) |
13:34:08 | scoeri | prints out the correct AST |
13:35:32 | * | afiskon quit (Quit: Leaving) |
13:36:17 | * | Ven joined #nim |
13:38:18 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:39:24 | * | woadwarrior joined #nim |
13:42:39 | wuehlmaus | does someone know how the nim name came to exist and why? |
13:44:33 | wuehlmaus | why nimrod? |
13:45:36 | wuehlmaus | Araq: this one is for you, i guess :) |
13:49:23 | * | kumul joined #nim |
13:49:46 | Araq | scoeri: 'quote do' changed recently so even I'm not sure how it works :P that said, your example is strange. why not use 'x' in f's body? |
13:50:50 | Araq | wuehlmaus: Nimrod is an acient king that built the Tower of Babel. but nobody understood this reference, so we renamed it to Nim. Which sounds "cooler" for Americans anyway ... I've been told. |
13:51:41 | scoeri | Araq: it's just an example, I'm writing some macros that manipulate ASTs |
13:51:50 | scoeri | and I got a similar error |
13:52:03 | scoeri | I just wanted to boil the error down to its essence |
13:53:23 | scoeri | is there any other way to generate quoted expressions? |
13:53:26 | wuehlmaus | Araq: yes, i saw that entry in wikipedia :) |
13:53:42 | Araq | I use templates and getAst for AST constructions. 'quote do' is translated into that anyway |
13:55:53 | wuehlmaus | Araq: is it called niem or nimm ? :) |
13:56:03 | Araq | Nimm |
13:56:15 | wuehlmaus | ah, thanks, i did it correctly then |
13:57:48 | Araq | "error: Source/Engine/Engine/Engine.cpp: does not exist in index" |
13:58:14 | Araq | but the file does exist and it clearly is in the index cause 'git status' doesn't complain it's new |
13:58:21 | Araq | any ideas? |
14:00:30 | Araq | flaviu: any experience with "git am"? |
14:04:19 | * | wuehlmaus quit (Remote host closed the connection) |
14:12:34 | ddl_smurf | git status might not complain if there's another .git folder further down, if the file is ignored by gitignore, info/exclude or attributes |
14:13:05 | * | saml quit (Read error: Connection reset by peer) |
14:14:37 | ddl_smurf | git am will also not work well if that file has changed names between the parent you're comparing to and where you are |
14:15:03 | Araq | ddl_smurf: gave up on "git am". now searching for a smart version of "patch" |
14:15:31 | ddl_smurf | i think git *is* the smart version of patch =) |
14:15:44 | Araq | maybe something interactive where I can tell the program where to find the file and stuff |
14:15:48 | * | saml joined #nim |
14:15:49 | * | Araq is dreaming |
14:16:09 | ddl_smurf | you just need to set the start and end points right |
14:16:16 | Araq | ddl_smurf: git cannot even give me error messages that make any sense |
14:16:34 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:16:39 | ddl_smurf | it might be easier for you to just copy the whole thing, git rebase -i the commits into one that represents your patch, then git show that |
14:17:14 | ddl_smurf | well you know it is, its saying as much as it can, it makes sense if you're comfortable with gits data model |
14:17:41 | ddl_smurf | *how it is |
14:18:55 | ddl_smurf | the git message translated is : "That file that is changed in the patch, does not exist in whatever you're basing the am on" |
14:19:01 | * | dtscoded quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
14:19:10 | ddl_smurf | so probably git diff start..stop |
14:19:15 | Araq | yeah but the file exists and is in the index |
14:19:19 | Araq | so it makes no sense |
14:19:38 | * | davidhq joined #nim |
14:19:52 | ddl_smurf | you're asking it for a delta that can apply on a non existent file, am is just preventing you from exporting an incomplete patch |
14:19:56 | Araq | and http://blog.siphos.be/2012/09/git-patch-apply/ suggests that I'm not alone with this problem |
14:20:22 | ddl_smurf | no git is indeed very misunderstood |
14:21:01 | Araq | well I have 14 patches and I can apply them by hand |
14:21:08 | ddl_smurf | you have a base commit and a commit with the results, and you want the patches between into one file ? |
14:21:57 | Araq | no, I have these 14 patches and want them applied |
14:22:03 | ddl_smurf | i think you're missing a patch |
14:22:32 | ddl_smurf | one of those patches is trying to edit a file that doesn't exist at the point its being applied |
14:22:41 | Araq | I can apply them without using my brain. but I prefer to use machines for tasks machines excel at. |
14:23:29 | Araq | it's not a hard AI problem, I don't care what git's data model has to do with this problem either. |
14:24:05 | ddl_smurf | youll probably have the same error trying to apply the patches manually |
14:24:41 | ddl_smurf | you're either basing of the wrong commit, or have an incomplete or mis-ordered set of patches |
14:26:00 | scoeri | Araq: I tried using templates but I get the same error |
14:26:01 | scoeri | http://pastie.org/10235585 |
14:26:32 | ddl_smurf | (btw, wtf with the patches ? the whole point of git was to avoid doing that) |
14:27:09 | * | wuehlmaus joined #nim |
14:27:46 | Araq | scoeri: yeah but that's hygiene in action |
14:28:02 | Araq | try a .dirty template |
14:28:59 | Araq | ddl_smurf: well I don't care, I'm writing my own non-bullshit program to apply these patches then |
14:29:02 | scoeri | yeah, that already explains a lot |
14:29:04 | scoeri | thanks |
14:31:28 | * | darkf quit (Quit: Leaving) |
14:31:43 | ddl_smurf | just beware that git is warning you that the result you'll get can be different from whoever exported those patches, "non-bullshit programs" non-withstanding |
14:31:47 | * | xcombelle joined #nim |
14:32:23 | Araq | ddl_smurf: jezz, I will look at "git diff"s results anyway and run this thing through a compiler |
14:33:23 | Araq | I don't further patronizing from a program that doesn't understand C++'s sematics anyway and treats it as a blob of random bytes |
14:33:57 | * | pregressive joined #nim |
14:34:54 | Araq | in a real reality these things would operate on a proper AST 3 decades ago anyway |
14:35:15 | ddl_smurf | (to be faire there is --function-context on git diff) |
14:35:44 | ddl_smurf | every projection based editor i've seen sucks ass so hard its not funny |
14:36:10 | Araq | but we're living in this pseudo-reality instead where trailing whitespace is the new Hitler |
14:36:28 | ddl_smurf | what ? |
14:36:45 | ddl_smurf | in c and posix trailing space always has been a hitler |
14:37:00 | ddl_smurf | all that shell "\\\n" type escapes |
14:37:11 | Araq | ok screw the 'new' then |
14:37:31 | ddl_smurf | if you don't care about it, tell your tools, git will hapily ignore all the whitespace bs |
14:37:54 | Araq | tried the option, made no difference |
14:38:11 | Araq | also the error suggests that "the file is not in the index" |
14:38:37 | Araq | not "cannot merge because spaces eat little children" |
14:39:08 | ddl_smurf | like i said, it wouldn't say that without a reason, and that message means that the patch is applied to non existing file, this should be a fatal error, that it is ignored by othertools is not necessarily desirable |
14:39:11 | scoeri | Araq: thanks a lot, it works now. Maybe you can answer an earlier question I had as well. macros using varargs are not working for me |
14:39:14 | scoeri | http://pastie.org/10235605 |
14:41:07 | Araq | scoeri: that's an unimplemented feature in the compiler. workaround: use .immediate and then callsite() to look at the arguments |
14:41:18 | ddl_smurf | i do agree with you about the ASTs, but the only tools that look like they have complete implementations are jetbrains MPS, emacs' paredit and maybe to some degree the smalltalk toys |
14:42:05 | ddl_smurf | if there is something out there doing that right i'd love to hear about it, but saving for that, you need some gofmt or astyle kind of thing, and that's as close as it gets while bearably fluid |
14:42:57 | Araq | ddl_smurf: iirc mathematica got that 90% right |
14:43:21 | ddl_smurf | ast editing ? |
14:43:24 | Araq | yes |
14:43:24 | ddl_smurf | in the notebooks ? |
14:43:29 | Araq | yes |
14:43:43 | ddl_smurf | i do not know about that ? |
14:44:29 | Araq | you type in crap with lots of square brackets and it renders a 2d formula on the fly |
14:44:32 | ddl_smurf | would be cool to have a nim syntax for mps though just for kicks |
14:44:47 | ddl_smurf | yeah but you can type invalid crap all the same |
14:46:21 | Araq | well of course, it's still keyboard based. not sure what you're saying |
14:46:25 | * | Ven quit (Read error: Connection reset by peer) |
14:46:36 | scoeri | Araq: thanks, I'll try that |
14:47:19 | ddl_smurf | https://youtu.be/iN2PflvXUqQ?t=2m54s |
14:48:00 | ddl_smurf | if we did code like that, most merge conflicts, api deprecations, styling/syntaxing problems would just disappear |
14:50:27 | * | Ven joined #nim |
14:53:17 | Araq | ddl_smurf: yeah, so it's unlikely to happen in our lifetimes |
14:54:33 | ddl_smurf | well i smoke a lot but maybe the younger folk will see it if we work on it |
14:56:12 | * | aziz quit (Remote host closed the connection) |
14:57:45 | ddl_smurf | in http://nim-lang.org/docs/manual.html#syntax-grammar what do you mean by ^+ ? literal '+' ? Is this a standard notation ? (don't recognize the &() either) |
14:58:16 | Araq | no, it's my personal extension to BNF, but it's explained in the manual |
14:59:09 | ddl_smurf | are the terminals of OP0 | OP1 | OP2 etc listed in there too ? |
14:59:36 | ddl_smurf | ok gotcha sorry |
14:59:46 | Araq | yeah, these are defined in the operator precedence table |
15:00:58 | ddl_smurf | jeez man, #!strongSpaces and you complain about git beeing anal about spaces |
15:01:24 | Araq | lol |
15:01:55 | Araq | different things. I never made my language trailing whitespace sensitive |
15:02:06 | ddl_smurf | thank god for that |
15:02:50 | ddl_smurf | i don't think anyone would argue that it ever had been a good idea - judging by the number of tools that warn/highlight/delete it, its been a problem |
15:03:12 | ddl_smurf | and for me #!strongSpaces <-- hell no |
15:03:34 | ddl_smurf | i'm barely convinced optional parentheses on functions was a tolerable idea |
15:04:47 | * | ChrisMAN joined #nim |
15:05:20 | ddl_smurf | also why make it look like a shebang ? |
15:05:54 | Araq | why? if 90% of your code consists of function calls the () are just noise anyway? it's not like they scream "side effect here!" or anything |
15:06:41 | Araq | ddl_smurf: never thought about the shebangs, was just natural for me. # comment, #! screaming comment aka parsing directive |
15:07:40 | ddl_smurf | you should make it #!/strongSpaces so we could put an interpreter there =) |
15:09:04 | ddl_smurf | i guess it doesn't matter much, could just trigger some magic number based things |
15:09:17 | Araq | there is a request to make it #@ instead |
15:09:22 | Araq | or whatever |
15:09:35 | ddl_smurf | i don't like important comments |
15:09:44 | ddl_smurf | (if its still on the table) |
15:09:49 | ggVGc | so, if I understand correctly, if A imports B and B imports C, then A does not get C imported? Why is that? |
15:10:15 | ddl_smurf | ggVGc: encapsulation, A should not need to know how B is doing its magic |
15:10:30 | ddl_smurf | (nor should it be affected by) |
15:11:45 | ggVGc | ddl_smurf: I am making some bindings for a C++ library using c2nim, and there are some inheritance hierarchies. The reason I stumbled upon it is that if A inherits B and B inherits C, then A does not get the methods from C if I don't import both B and C from A |
15:11:49 | ggVGc | if I make myself clear |
15:11:55 | ggVGc | maybe I am doing something wrong |
15:12:25 | ddl_smurf | no that makes sense, but technically A is using both in that case (via the inheritance mecanism) |
15:12:47 | Araq | ggVGc: you can mitigate the effect with 'export' forwardings |
15:12:52 | ggVGc | ddl_smurf: right, but in every other language with inheritance, you don't need to import all superclasses to use the methods |
15:12:54 | ddl_smurf | think of it this way: A needs to know about whatever B inherits from |
15:13:09 | ggVGc | ddl_smurf: right, which imo breaks encapsulation the other way instead |
15:13:27 | ggVGc | ddl_smurf: since if the inheritance hierarchy changes, then all of a sudden every subclass needs to change their imports |
15:13:35 | ddl_smurf | well you're talking c/c++, not nim at this point |
15:13:45 | ggVGc | ddl_smurf: not really? Nim has inheritance in itself |
15:13:51 | ggVGc | this is not C++ specific |
15:14:00 | ddl_smurf | yeah but there's a mismatch between the two models |
15:14:39 | ggVGc | ddl_smurf: wll, personally I don't use inheritance in code I wrote, but many people do, and Nim supports it. So I find this behaviour pretty strange when constructing object hierarchies |
15:15:07 | ggVGc | if I inherit from A, I shouldn't have to care from what superclasses A gets its methods |
15:15:08 | ddl_smurf | and it kind of is c++ specific: in c++ if you're using a specialised class, you've also imported all its visible generalisations |
15:15:10 | ggVGc | I reckon |
15:15:44 | Araq | "While Nim's support for object oriented programming (OOP) is minimalistic, powerful OOP techniques can be used. OOP is seen as one way to design a program, not the only way." |
15:16:37 | ggVGc | ddl_smurf: so, if I have a type IntPoint, and then make a type Vector = object of IntPoint, and then I use vector in 100 files, then one day I decide I want Vector to be float instead, so I make it inherit from FloatPoint. Now all of a sudden I have to change imports in 100 files. Is that good encapsulation? |
15:17:02 | ggVGc | Araq: anyway, how do I use export to mitigate this? |
15:17:06 | ddl_smurf | do you have a garantee that the change would affect none of those classes ? |
15:17:07 | ggVGc | i.e what do I export where |
15:18:45 | Araq | btw type Vector = object of IntPoint is not good design to begin with |
15:19:42 | ggVGc | ddl_smurf: not sure what you mean by that. The author of the Vector type is responsible for making the Vector type act as a vector. The users of Vector shouldn't be exposed to how the author of Vector decides to do that. If changing from IntPoint to FloatPoint breaks the semantics of vector, then that's a mistake of the author of Vector. Either way I don't see a reason to force the user to change the imports of every single file that uses Vector, to become awa |
15:19:45 | Araq | ggVGc: you export what you think is necessary |
15:20:28 | Araq | import A; export A |
15:20:38 | ddl_smurf | If the vector author can garantee that its parent class will affect none of its users, it should be using that as a parent class, there is no value to inheritance there, its use of float or int should be completely private |
15:20:56 | ddl_smurf | *should not be using that as a parent... |
15:21:37 | ddl_smurf | if its not completely private, that users of the vector class need be aware of its parent class, as any other exposing mecanism |
15:23:07 | * | sepisoad joined #nim |
15:23:15 | ggVGc | that makes no sense to me |
15:23:27 | ggVGc | you must be reasoning about a very narrow use case of inheritance |
15:24:05 | ddl_smurf | to use a class you need a complete definition of its public interface, correct ? |
15:24:06 | * | Joe-T quit (Ping timeout: 276 seconds) |
15:24:52 | ggVGc | ddl_smurf: sure, I guess the misunderstanding here is that I consider inheriting something the same as making that thing part of your public interface |
15:25:06 | ggVGc | as a user it doesn't matter where X gets it's implementation from |
15:25:18 | ggVGc | be it a private object or by inheritance |
15:25:23 | ddl_smurf | but it does matter, because suddenly you're exposing an external interface |
15:25:48 | ddl_smurf | if that parent interface doesn't matter, just dont expose, use it internally in your specialised class |
15:26:14 | ddl_smurf | if the base class has no value to users of your class why base yourself on it |
15:26:26 | ggVGc | well, that's not what I'm saying |
15:26:40 | ggVGc | of course it has value |
15:26:45 | ggVGc | gimme a sec |
15:26:50 | ddl_smurf | i'm not saying how narrow or not this model of inheritance is, i'm just saying how you should use it to achieve the effect you desire of altering only files affected by the public interface change |
15:26:56 | Araq | ggVGc: apart from 'export' you can also use 'include dependency' rather than 'import dependency' |
15:27:18 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:27:22 | ddl_smurf | and c/c++ does not do that, which is why this is a problem now, but its because of the mismatch, either model is fine |
15:27:26 | * | Joe-T joined #nim |
15:29:04 | ggVGc | ddl_smurf: If I create a type A that holds an instance of B, and then I give A a method foo, which in turn just calls B.foo, I have effectively transfered the public interface of B into A, and if I import A, I know have access to the method foo. |
15:29:18 | ggVGc | ddl_smurf: but if I instead inherit B, the user now has to import both A and B |
15:29:25 | ggVGc | now, what is the difference? |
15:29:31 | ddl_smurf | you haven't "transfered" you've abstracted |
15:29:35 | ggVGc | both are taking the public interface of B and putting it in A |
15:30:21 | ggVGc | Araq: yeah, I know that, but is this really the correct use case for that? |
15:30:56 | ddl_smurf | here's another way to see it: if a base class has value to users, users should import the base and something else that builds a specialised instance and returns it casted as a base, that's the raison-d'être of inheritance, not sharing code |
15:31:46 | ddl_smurf | if the base class has no added value to users, you shouldn't be specialising the base class, you should be exposing another interface, one with the value you want |
15:32:33 | ddl_smurf | and whatever that interface requires will of course be used by any user of your interface too, you may desire this behaviour be implicit, but that's opinion, there are good arguments for both |
15:32:57 | ggVGc | ddl_smurf: I just can't see a reason when I'd want to import a type and not get access to all the methods available for that type |
15:33:36 | ggVGc | just seems to add a whole lot of code maintenance overhead for no real benefit to me |
15:33:44 | ggVGc | what's the benefit? |
15:34:14 | Araq | it makes you use delegation instead of inheritance :P |
15:34:20 | ddl_smurf | well one reason is that it forces your use of classes to be explicit, any change to stuff you use would be silent, ensuring you maintain api correctness, implicit imports might not provide the same garantees with things like overflows |
15:34:53 | ggVGc | Araq: right, which is what I personally do since many many years back. But many people use inheritance, and if you do, then the way Nim works doesn't seem very friendly to me |
15:35:31 | ddl_smurf | take your example of vectors, if a user class is checking for overflow, with an implicit import of intvector you'd have an error you'd have to check, with an implicit import you'd have no compiler error but the using logic would be wrong |
15:36:23 | ddl_smurf | (i apologise for all the mistakes in a rush) |
15:38:35 | Araq | ggVGc: you're looking at this in a slightly odd way I think. It's not that Nim punishes you for OO designs. it's just that we really like to spend our complexity budget on other paradigms. |
15:38:39 | ggVGc | ddl_smurf: pretty sure in almost every real case, the developer would just change intvector to floatvector, and then find that bug at a later time anyway. For something like that, the real solution is for the compiler to not let you check for overflows in the same way for int and float |
15:39:01 | * | Noobulater joined #nim |
15:39:09 | ggVGc | Araq: sure, I am not attacking Nim. I think it's great, and I would prefer there to be no inheritance at all. I am justtrying to understand ddl_smurf |
15:39:23 | ddl_smurf | yeah i'm not arguing how it should be, i'm just saying this is how you use this model, its actually fine |
15:40:10 | ddl_smurf | if users of the vector class need to know whether its int or float, i'd personaly prefer an early error if vector were to change during development |
15:40:42 | ggVGc | ddl_smurf: but the problem is that you don't get the error where the overflow check happens anyway. You get it at your import site |
15:40:44 | ddl_smurf | if vector is written in such a way that users need not care whether its int or float, then vector has no business inheriting from something more specific than it is |
15:41:37 | ddl_smurf | because your import site is list of things that you depend on, if the base class matters to you as it should because its public interface, then you depend on it, and changes to it should make you re-think any uses |
15:41:42 | ggVGc | ddl_smurf: just to be clear, in your opinion inheritance should not mean that you also inherit the public interface of your supertype? |
15:42:10 | ddl_smurf | i'm not talking opinion, i'm describing a model, other models are just fine |
15:42:38 | ggVGc | well, you've expressed several opinions and used words such as "should" |
15:42:49 | ddl_smurf | in my opinion if you inherit from something, that something is probably what users should care about and the inheriting class is more likely to be the thing hidden from users |
15:43:06 | ddl_smurf | yes "in nim's inheritance model, should" |
15:43:32 | ddl_smurf | my opinion tends to IoC |
15:44:03 | ggVGc | alright, well, this is how it works. I don't really agree there's any benefit to forcing users to be aware of the entire inheritance chain of a type they want to use, but at the same time I don't really use inheritance so it's all good to me |
15:44:14 | ggVGc | another question |
15:44:23 | * | Sentreen quit () |
15:44:35 | ggVGc | Araq: is it possible to get c2nim to spit out the complete type in the header and not just a forward declaration? |
15:44:48 | ddl_smurf | ok my suggestion is not think of this in terms of "ought to" but in terms of "how do I use this" |
15:44:55 | ggVGc | sure |
15:45:16 | ggVGc | ddl_smurf: I'm gonna use include instead of import for my wrapped C++, and then not use inheritance because I see no personal value in it |
15:45:55 | Araq | ggVGc: struct { int foo; } x; produces an object with fields |
15:46:28 | ddl_smurf | indeed if that vector example is anything like your usecase, nim's inheritance is not the tool for that |
15:47:16 | ggVGc | ddl_smurf: well, it's a very standard C++ codebase, so yes, the use case is basically that type of thing. And yes, I agree it's not a nice way to write software, but I still need to map it to nim |
15:47:20 | ggVGc | thanks for a nice chat |
15:47:23 | ggVGc | all good though |
15:47:26 | ggVGc | Araq: thanks, will give it a try |
15:48:24 | ggVGc | Araq: wait, I asked the wrong question. What I wanted to know is if it's possible to get the nim compiler to spit out the complete type in the generated header |
15:48:27 | ggVGc | hah |
15:48:32 | ddl_smurf | its a lot of work exposing a code base across language barriers, these types of restructurings/abstractions are necessarily complicated |
15:48:48 | ggVGc | it's been surprisingly easy actually with c2nim, but yeah |
15:50:58 | Araq | ggVGc: you mean use --header? that does generate fields too iirc |
15:51:16 | ggVGc | Araq: not for me. maybe I am doing something wrong |
15:51:58 | ggVGc | Araq: this is my source, https://gist.github.com/8df0820e39d08e6d041a |
15:52:04 | ggVGc | it gives me a forward declaration in the header |
15:52:24 | ggVGc | and then the implementation in the c or cpp file |
15:52:33 | ggVGc | which makes it hard to use from C |
15:53:00 | Araq | hrm, create a bug report for that then please |
15:53:18 | ggVGc | Araq: okay, just gonna make sure I am running the latest trunj |
15:53:22 | ggVGc | trunk* |
15:55:46 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:57:43 | * | woadwarrior joined #nim |
15:58:30 | * | zikolach quit (Read error: Connection reset by peer) |
15:59:21 | ggVGc | Araq: hm, also noticed if there are no procs using the type, it's not even exported |
15:59:46 | ggVGc | ardid I put the {.exportc} in the wrong place? |
16:00:01 | Araq | ggVGc: well no --header is kinda too lazy |
16:00:31 | ggVGc | alright |
16:00:34 | Araq | also it can produce typefoobar_<changingid_here> |
16:01:28 | Araq | I hacked this feature into the compiler for gradha who later wrote the favourite "I'm leaving Nim for good, despite still using it for everything" article |
16:04:16 | ggVGc | Araq: maybe you can make Nim spit out c/cpp files compatible was input for makeheaders and leverage that for heade generation easier, http://www.hwaci.com/sw/mkhdr/ |
16:04:22 | ggVGc | I've used it a lot in the past and it's pretty good |
16:04:36 | ggVGc | can't spell today it seems |
16:04:54 | ggVGc | or maybe I can do that as a PR |
16:04:57 | ggVGc | would that be of interest? |
16:05:34 | * | pregressive quit (Remote host closed the connection) |
16:08:10 | Araq | ggVGc: be my guest, shouldn't be hard either |
16:11:50 | ggVGc | alright, will try to look at it in the coming days |
16:16:15 | ggVGc | Araq: why is system called system.c instead of something like nim_runtime.c? or is there any way to compile a file named system.nim? |
16:16:39 | ddl_smurf | relevant: https://www.youtube.com/watch?v=ND-TuW0KIgg |
16:18:19 | * | banister joined #nim |
16:21:33 | * | pregressive joined #nim |
16:21:42 | ggVGc | uhm, did import directive change recently? |
16:21:56 | ggVGc | I just pulled master and ran boostrap, and now I get compile errors on my imports |
16:22:38 | ggVGc | this is what I have, https://gist.github.com/50de5194cf1c5f307d55 |
16:23:02 | Noobulater | Does nim have a constant for the maximum and minimum value a float can be? Similiar to Float.maxValue in java? |
16:24:19 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:24:49 | ggVGc | Araq: is this a bug, or did imporing change? Looks like it's parsing that '2d' as a number? https://gist.github.com/50de5194cf1c5f307d55 |
16:25:06 | * | zikolach joined #nim |
16:25:37 | * | Sembei quit (Ping timeout: 255 seconds) |
16:26:24 | jackv | ggVGc, "2d" = "2.0 as a 64-bit float (double)"? |
16:26:34 | jackv | try changing the directory name |
16:27:26 | ggVGc | jackv: can't, since it's not my code base |
16:27:34 | ggVGc | but I added it as an include path to work around it |
16:27:37 | ggVGc | looks like a bug though |
16:27:40 | ggVGc | recently introduced |
16:27:42 | ggVGc | gonna report it |
16:29:14 | jackv | ggVGc, yeah, it does look like a bug |
16:29:24 | jackv | but more than that, it looks like a poor choice in directory name |
16:29:37 | jackv | on whoever's part it was |
16:32:52 | * | zikolach2 joined #nim |
16:33:19 | * | zikolach2 quit (Client Quit) |
16:33:51 | * | zikolach2 joined #nim |
16:34:09 | * | zikolach2 quit (Client Quit) |
16:34:34 | * | zikolach quit (Ping timeout: 244 seconds) |
16:35:02 | * | Matthias247 joined #nim |
16:35:39 | * | zikolach2 joined #nim |
16:37:07 | ggVGc | jackv: either way it worked with my nim build from last month, and didn't now |
16:37:23 | ggVGc | jackv: also, '2d' is definitely a valid directory name on all platforms I know |
16:37:36 | ggVGc | why is it poor choice? |
16:39:21 | jackv | well, only because it could lead to bugs like that :P |
16:43:09 | jackv | ggVGc, if one is naming a directory that will be used as a path in Nim imports, I'd think that it wouldn't be recommended to begin it with a number |
16:45:31 | * | Strikecarl joined #nim |
16:51:23 | * | kas joined #nim |
16:54:48 | * | zikolach2 quit (Remote host closed the connection) |
16:55:09 | * | zikolach2 joined #nim |
16:57:18 | * | yglukhov________ quit (Ping timeout: 244 seconds) |
16:58:06 | Strikecarl | Has anyone made a bitcoin miner in NIM? or is atleast planning to make one? |
16:59:49 | * | dalarmmst joined #nim |
17:02:33 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:03:35 | TEttinger | is bitcoin mining still cost-effective relative to power costs? |
17:05:32 | reactormonk | TEttinger, probably not |
17:14:03 | ggVGc | was it ever? |
17:14:24 | reactormonk | ggVGc, probably |
17:14:51 | ggVGc | strcmp1: the only way to to heavy computation work like that in a cost efficient manner is with GPU's, and as far as I know nim is not a shader language |
17:25:35 | * | shodan45 joined #nim |
17:27:06 | * | woadwarrior quit (Quit: Textual IRC Client: www.textualapp.com) |
17:27:21 | Araq | yeah unfortunately not |
17:27:41 | Araq | ggVGc: wow, interesting bug. I'm afraid you need to enclose it in "" for it to continue to work |
17:28:01 | ggVGc | Araq: actually, that didn't work either |
17:28:05 | ggVGc | I foled an issue |
17:28:14 | Araq | ddl_smurf: cannot watch it, too confusing when you understand the language and the subtitles too and they don't match |
17:28:43 | ggVGc | Araq: works with the audio turned off |
17:29:04 | Araq | good idea lol |
17:34:17 | * | yglukhov________ joined #nim |
17:37:04 | Araq | ggVGc: so import "scene/2d/sprite" doesn't work either? |
17:38:31 | ggVGc | Araq: nope |
17:38:43 | ggVGc | prety sure I tried and it didn't |
17:38:45 | ggVGc | will try agin |
17:38:58 | * | Senketsu quit (Quit: Leaving) |
17:39:31 | ggVGc | oh,.. it did |
17:39:33 | ggVGc | what the hell |
17:39:35 | ggVGc | I tried that |
17:41:40 | * | pragm joined #nim |
17:42:29 | pragm | Hi, could anyone answer this question? http://www.quora.com/Narrowing-down-to-a-language-to-learn-this-summer |
17:42:50 | Heartmender | pragm: why not both? |
17:42:53 | kas | I just wonder. If I disable GC then it is possible deallocating string instance like that? "dealloc addr myStringInstance" |
17:43:08 | pragm | Heartmender: I'd rather focus on one first |
17:43:17 | pragm | then move on to the next |
17:43:18 | Heartmender | pragm: flip a three sided coin |
17:43:44 | pragm | If only I had one, but this is more basded on what language could teach me the most |
17:44:01 | Heartmender | let me put it this way |
17:44:21 | Heartmender | I don't know you. I don't know what your programming experience is. I can't say what you will benefit from most. |
17:44:22 | ggVGc | I'm not letting you |
17:45:36 | pragm | Heartmender: those languages dont tell much? |
17:46:02 | Heartmender | not really |
17:47:36 | kas | pragm: "that will teach me more programming skills and concepts and also help me write better code" I would say Haskell :) But if you have on list only this 3 then I would choose Rust. But Rust have very long learning curve. |
17:47:47 | * | TEttinger quit (Ping timeout: 264 seconds) |
17:48:21 | pragm | Isn't Haskell strictly functional ? |
17:48:26 | kas | yep |
17:48:55 | kas | It is very different from all you listed. |
17:49:46 | Araq | ddl_smurf: https://www.youtube.com/watch?v=CDeG4S-mJts ;-) |
17:50:06 | ggVGc | probably look at Ocaml before diving into Haskell |
17:50:25 | ggVGc | it's a softer introduction to functional programming |
17:50:32 | ggVGc | and the concepts are transferable |
17:50:46 | ggVGc | to a certain degree |
17:51:21 | ggVGc | then go straight to APL |
17:51:25 | ggVGc | (joke) |
17:52:13 | cazov | ggVGc, well yeah. everyone uses K these days. |
17:52:17 | Araq | kas: it's not possible to dealloc a string like that |
17:52:53 | Araq | kas: but I can add support for that |
17:53:15 | reactormonk | pragm, people still use quora? O.o |
17:53:42 | pragm | I dont know the best place to ask :/ |
17:53:55 | ggVGc | cazov: yep, that was the joke |
17:54:18 | kas | Araq: I think this kind deallocation would be useful for any kind of objects, not only for strings. |
17:54:35 | * | Ven joined #nim |
17:54:44 | reactormonk | pragm, hm, you might be correct in that. stackoverflow would probably ban it as offtopic and reddit has recently gone down the drain. |
17:54:54 | pragm | yeha ;-; |
17:55:01 | kas | Araq: Is it feasible? |
17:55:13 | ggVGc | pragm: it's a weird question. Basically pick up what seems the most interesting for the moment, and what you can actually get something fun done in. The real answer is you should have a basic proficiency in all those languages, and more, to have a solid programming base |
17:55:17 | ggVGc | but that takes time |
17:55:20 | ggVGc | so start wherever you feel like |
17:55:22 | ggVGc | and keep working |
17:56:06 | Araq | kas: sure. that said, you still should learn to love the GC before you hack around it ;-) |
17:57:41 | ggVGc | personally I think every programmer currently should have at least basic proficiency in C,C++,Java/C#,javascript, Ocaml/F# and python |
17:58:01 | Arrrr | why python |
17:58:11 | kas | Araq: I also wonder, if it is possible to "plug-in" custom GC implementation. (if GC has some standard interface then it would be possible to "inject" own implementation of this) |
17:58:17 | ggVGc | Araq: because it has influenced so much of our conteporary programming world(i.e Nim) |
17:59:21 | kas | Araq: I think about inject own implementation of GC without modifing nim source. |
17:59:32 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:59:44 | ggVGc | Araq: the point of knowing how to work in various languages is not to be able to work in them specifically, but to be able to work in any situation that might pop up where influences from those languages exist |
17:59:58 | ggVGc | the point of knowing C++ is not to work in C++ for example |
18:00:01 | ggVGc | at least in myopinion |
18:00:11 | Araq | kas: currently not possible, but it's not hard and there is a PR that replaces Nim's GC with Go's. you can look at that to learn how it can be done |
18:00:36 | ggVGc | if you know javascript and python, you will easily also grok lua |
18:01:37 | Araq | pragm: IMHO everything that is statically typed and not C/C++/Java/Objective C makes a good first programming language. |
18:02:21 | ggVGc | damnit, there goes APL :( |
18:02:28 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:02:35 | Araq | :P |
18:07:24 | kas | I think that if you want make money from programming then easiest way is choose some popular programming language, because it has often lowest entry cost. But if you want learn something then choose some different, for example language from academia, or from other programming paradigm you don't know. |
18:08:02 | * | sepisoad quit (Ping timeout: 246 seconds) |
18:11:19 | * | zikolach2 quit (Ping timeout: 256 seconds) |
18:11:38 | * | Arrrr quit (Quit: WeeChat 1.2) |
18:13:37 | pragm | Araq, it isnt my first :P |
18:13:54 | Araq | pragm: then pick Nim. |
18:15:13 | * | sepisoad joined #nim |
18:15:57 | Araq | (IMO Nim also is a good first programming language but I don't think many agree with me) |
18:16:39 | Araq | (thinking about it ... not many agree with me, no matter the topic ...) |
18:16:52 | pragm | lol |
18:20:00 | reactormonk | Araq, would it be possible to adjust nimsuggest to support syntax highlighting? |
18:20:19 | reactormonk | ... would it be sensible? |
18:20:31 | Araq | reactormonk: meh that's weird, better hack it into the lexer |
18:20:56 | reactormonk | Araq, I assume the lexer is nim code not some parser generator? |
18:21:19 | Araq | yeah but you could also recreate a lexer from scratch with lexim |
18:21:53 | reactormonk | lexim? |
18:22:24 | Araq | Nim's upcoming lexer generator |
18:22:41 | Araq | it works quite well but I haven't tested it extensively |
18:23:04 | ozra | Araq: That sound like fucking awesome stuff! :) |
18:23:04 | * | brson joined #nim |
18:23:49 | kas | Araq: What do you think when will be first Nim 1.0 version? Are there any plans or road map? |
18:24:33 | Araq | kas: still planned for "this summer" |
18:25:00 | reactormonk | Araq, summer's soon over in germany. Might last a bit longer over here. |
18:25:27 | ozra | Araq: I looked at the roadmap, but it mostly listed post-1.0 things, are there a to-be-done-for-1.0 roadmap? |
18:25:45 | reactormonk | I'd like to add concepts to 1.0 roadmap :-) |
18:26:01 | reactormonk | or rather concepts for the stdlib |
18:26:21 | ozra | concepts is a killer feature. |
18:27:09 | Araq | concepts is for 1.0 yeah, but I dunno about the stdlib. I'd rather add TR macros to the stdlib |
18:27:25 | * | Arrrr joined #nim |
18:27:42 | reactormonk | term rewriting? |
18:28:10 | Araq | ozra: well the todo is pretty much in the bug tracker at this point |
18:28:24 | ozra | Araq: Ah, right. |
18:28:44 | Araq | speaking of which, can you look into this: https://github.com/Araq/Nim/issues/2672 ? |
18:29:09 | Araq | it's some limitation of dlopen with thread local storage but googling didn't show up much |
18:29:24 | pragm | I added haskell |
18:29:29 | pragm | im even more conflicted :(( |
18:29:36 | Araq | and Valgrind only says it crashes in "joinThread" |
18:30:11 | Araq | pragm: Haskell is cool but I prefer good old ML. ML is also way easier to learn. |
18:30:22 | * | Arrrrr joined #nim |
18:31:02 | reactormonk | lol @ https://github.com/Araq/Nim/issues/2904 |
18:31:54 | * | Arrrr quit (Ping timeout: 245 seconds) |
18:32:36 | ozra | Araq: I'll see if I can make the time, some pressing things has started to pile up a bit here while I've dived into Nim ;-) |
18:33:52 | ozra | reactormonk: Woops. That is newly introduced, but the problem is of course "bigger".. |
18:34:42 | reactormonk | Araq, and just transfer the repo. Worked flawless for nim-mode |
18:35:00 | Araq | reactormonk: I'm too scared. it's in the danger zone |
18:35:14 | reactormonk | Araq, https://github.com/reactormonk/nim-mode |
18:35:38 | Araq | "you bettter know what you're doing!!!" |
18:35:46 | Araq | - "yeah, I don't." |
18:35:47 | reactormonk | Araq, then go over into #github and ask for someone to hold your hand |
18:36:54 | reactormonk | ozra, I just find the bug hilarious |
18:37:07 | ozra | reactormonk: Haha, yeah, that's warped |
18:37:22 | Araq | I like how the compiler still remains helpful |
18:37:33 | Araq | and telling us immediately what the problem is |
18:38:24 | Araq | "Type the name of the repository to confirm" |
18:38:34 | Araq | Araq/Nim ? Nim? |
18:38:38 | reactormonk | Nim |
18:38:42 | reactormonk | I mean you get a few tries |
18:38:56 | Araq | "New owner's GitHub username"? |
18:39:01 | reactormonk | nim-lang |
18:39:13 | ggVGc | ozra: I forgot to say in the issue that itäs introduced between last month and now |
18:39:23 | ggVGc | becuase it was working for me exactrly 5 weeks ago |
18:39:26 | Araq | "I understand, transfer this repository" |
18:39:41 | reactormonk | Araq, and let's wait. |
18:40:03 | ozra | ggVGc: Yeah, like just a few days ago. But that is not a bug. The bug was before too, just didn't 'appear' until that specific combination ;) |
18:40:05 | reactormonk | it's probably gonna take a while given the size of the repo |
18:40:15 | Heartmender | not really |
18:40:17 | Heartmender | it's fairly instant |
18:40:30 | ozra | ggVGc: If you got what I mean. The bug is the lexer don't distinguish paths from anything else.. |
18:40:33 | Heartmender | it just does a mv and symlink on their gluster volume |
18:40:45 | Araq | ggVGc: we have "stable" releases so that we can tinker on devel |
18:40:51 | ggVGc | ozra: as a personal note I think the import directive should accept whatever the filesystem supports as directory names. and '2d' is a valid name |
18:41:03 | ggVGc | Araq: staying bleeding edge is fine with me :) |
18:41:14 | ggVGc | Araq: I intend to start taking part in development of NIm when I get more familiar with it |
18:41:16 | Araq | ggVGc: the import directive takes a string literal for this reason |
18:41:20 | ggVGc | right |
18:41:37 | Araq | reactormonk: well? |
18:41:41 | ggVGc | Araq: yeah, I was confused because my first attempt with a string literal also failed. But turns out I made a mistake there |
18:41:48 | ggVGc | should I remove the issue? |
18:41:52 | ozra | ggVGc: Pick some seemingly simple bug from the issues and hack away, I've started like this, and it's a great way to learn! :) |
18:41:52 | ggVGc | I mean, if it's not actually an issue |
18:41:57 | reactormonk | Araq, nothing happened so far |
18:42:18 | Araq | ggVGc: nevertheless it needs to be documented as a breaking change at least |
18:42:43 | * | vikaton joined #nim |
18:43:07 | Araq | you all read the list of breaking changes when we release a new version, RIGHT? |
18:43:16 | pragm | flipping a coin for HAskell or ML |
18:43:57 | ozra | pragm: Write a coin flipping program in both, then choose ;) |
18:44:09 | Araq | reactormonk: "This repository will be added to the Owners team. Please select any other teams you wish to have access to nim-lang/Nim. " |
18:44:13 | ozra | pragm: And in Nim of course! B-) |
18:44:22 | ggVGc | pragm: really, play a bit in ocaml first. Diving into haskell with little prior functional programming background will make you stop very quickly. |
18:44:33 | pragm | lol doing it in Nim is p ez |
18:44:39 | reactormonk | Araq, neat. We can always do that as needed. want to add anyone specific? |
18:44:51 | pragm | add me Araq ;) |
18:45:11 | Araq | in Nim you can do it at compiletime... |
18:45:14 | reactormonk | pragm, zero commits? |
18:45:30 | Araq | reactormonk: just tell me to click on "Transfer" |
18:45:39 | pragm | reactormonk: commits is just a number |
18:45:39 | reactormonk | Araq, sure, go ahead. |
18:45:48 | ggVGc | pragm: the thing is, Ocaml is primarily functional language with a pretty easy to grasp type system. Haskell is also a functional language, but more than that it also is a lazy language(which is very rare) and has a very advanced and unusual type system. So starting with haskell in order to do functional programming is just too much |
18:46:34 | ggVGc | pragm: the big thing in haskell is the type system, and if you are not already comfortable with functional programming, learning those two at the same time within haskell will just make you lose motivation hard |
18:46:41 | ggVGc | please trust me on that |
18:47:14 | Araq | ML is easier than Ocaml since it's Ocaml without the OO support |
18:47:55 | Araq | Ocaml is much more useful for real world projects though |
18:48:04 | * | brson quit (Remote host closed the connection) |
18:48:10 | Araq | but F# is the better Ocaml ;-) |
18:48:17 | Araq | so pick that |
18:48:17 | ozra | Araq: What do you feel about explicitly qualified globals, with some is-global-prefix? I think they are 'out there' in coding quality enough to warrant it.. |
18:48:27 | pragm | yes I know Nim has really cool features |
18:48:40 | pragm | but the goal is to increase my programming skillz |
18:49:20 | Heartmender | pragm: you could increase your "skillz" by using C or QBASIC |
18:50:05 | Araq | ozra: once upon a time I wanted to add 'submodule' to the language to let people have their doterities, but dom96 said he would leave Nim for good when I introduce this feature |
18:50:32 | Araq | submodule globals: |
18:50:45 | Araq | var foo: int # can only access via globals.foo |
18:50:48 | ggVGc | Araq: yeah, but ocaml is easier to get started with. well, depends I guess. On linux Ocaml is easier to get up and running, on windows I guess F# |
18:51:06 | Arrrrr | what's the problem with submodules |
18:51:39 | vikaton | why would dom96 leave Nim for good cuz of that? |
18:51:40 | ggVGc | Heartmender: hey a lot of appreciated software has been written in QBASIC |
18:52:23 | Araq | Arrrrr: they are unnimic |
18:52:35 | ozra | Araq: Just figuring local immutable vars are not dangerous, so implicit declaration of let's through assign would be very useful, make clear code. Globals on the other hand are dangerous and it would be good to see them clearly, also discouraging their use, and allowing former mentioned feature. I mean as a general part of the syntax, it would of course require a milestone release where some breaking changes are bundled up and fixable via |
18:53:14 | * | kumul quit (Ping timeout: 272 seconds) |
18:53:56 | Araq | ozra: actually I like globals quite a bit ;-) they suck cause they are so inflexible, but also so easy to reason about if you can get rid of the aliasing problems |
18:54:28 | Araq | which is dead simple to get rid of |
18:54:44 | Arrrrr | Why you said interfaces are hard to reason |
18:54:48 | ozra | Araq: Woa, then I'm barking up the wrong tree, haha. |
18:55:04 | pragm | ggVGc: what about SML ? |
18:55:30 | Araq | Arrrrr: because I know my shit about formal semantics :P |
18:55:34 | reactormonk | Araq, submodules? What would they be good for? |
18:56:27 | Araq | reactormonk: to turn '_' into '.'. Which is the ultimate goal for every modern programming language. |
18:56:54 | pragm | '_' is in Rust |
18:56:57 | Heartmender | \o/ https://github.com/nim-lang/Nim |
18:57:07 | kas | pragm: If you want learn some function language then indeed easiest is one from ML family. It will be good choice. OCaml is old good language for building real world software. F# is younger but also good; but I don't know how good is support on linux. |
18:57:31 | reactormonk | Araq, ah, namespacing. |
18:57:36 | vikaton | lel |
18:57:45 | vikaton | is anyone gonna post that on reddit xD |
18:57:54 | Arrrrr | what |
18:58:00 | reactormonk | vikaton, isn't reddit dead by now? |
18:58:12 | vikaton | /r/programming |
18:58:22 | Arrrrr | People in reddit is always complainning this community spams a lot |
18:58:29 | vikaton | ^ |
18:59:02 | reactormonk | Arrrrr, although I think atm reddit prefer spam over ham ^^ |
18:59:04 | pragm | kas, I just want to learn a programming language that would increase my skills |
18:59:40 | Arrrrr | learn lisp |
18:59:41 | pragm | and programming conceptual knowledge |
18:59:48 | ggVGc | pragm: sure, SML would also work but OCaml and F# have a much more active community and much more learning resources, and much more actual software being written in them |
19:00:28 | kas | pragm: If you never programming in functional language then OCaml, F# both are ok. I think it is not that important which, as long you just want learn for improving skills. |
19:00:33 | Araq | ozra: in fact, my dream language has only global variables and no parameter passing and no pointers ... |
19:00:42 | Araq | ;-) |
19:00:50 | reactormonk | Araq, apparently you've never worked with other people :-P |
19:00:58 | ggVGc | pragm: just to clarify, I am not saying to stay away from haskell. But you should hold off on that until you are fairly comfortable with functional programming in general, because otherwise you will waste your learning motivation on something that will just overwhelm you |
19:01:12 | reactormonk | pragm, try scala ;-) |
19:01:29 | ggVGc | scala is also an okay choice. But I think an ML-family language is a better learning experience |
19:01:41 | * | squirtle joined #nim |
19:02:26 | kas | ggVGc: I think scala is bit messy. |
19:02:36 | pragm | ggVGc: what part exactly is overwhelming about Haskell? |
19:02:55 | squirtle | For starters its a read only language |
19:03:02 | * | squirtle is now known as dtscoded |
19:03:10 | Araq | I think you mean *write only* |
19:03:18 | dtscoded | err yes write only |
19:03:20 | reactormonk | kas, yes, yes it is. But it's kinda pragmatic too |
19:03:23 | dtscoded | sorry I just woke up |
19:03:30 | ggVGc | pragm: as I mentioned before. the main thing about haskell is the type system, which is very unusual compared to other languages, and very advanced(and amazing). But if you are also trying to learn functional programming, it will be too much to get anywhere |
19:03:46 | reactormonk | dtscoded, hello squirtle |
19:03:53 | dtscoded | o/ |
19:04:19 | ggVGc | pragm: the other thing, which doesn't matter as much but is "weird", is that it is lazy by default, and not eager(like _all_ other common languages) |
19:04:20 | pragm | damn man ;-; |
19:04:32 | * | pragm cries |
19:05:09 | ggVGc | pragm: the point being, if you get into a functional language like Ocaml, what you are learning is functional programming. If you start with haskell without knowing FP, then you have literally nothing to stand on. The evaluation model is different, the programming paradigm is different, and the whole way you reason about the types in your pgoram is different |
19:06:08 | ggVGc | pragm: and all learning reasource you'll find for haskell assume you already have a steady grasp of functional programming. |
19:06:56 | pragm | ggVGc: http://learnyouahaskell.com/ |
19:06:58 | pragm | ? |
19:06:59 | ggVGc | pragm: beginning with haskell without playing in something like ocaml first, is like taking a uni cource in calculus after just learning basic addition |
19:07:10 | pragm | WHAT? |
19:07:17 | pragm | to that degree? |
19:07:24 | ggVGc | yes] |
19:07:51 | ggVGc | pragm: so, the type system itself in haskell is very functional in nature. So if you are not comfortable with the concepts of functional programming, then the whole type system makes no sense |
19:08:05 | ggVGc | dunno how to explain this well |
19:09:10 | ozra | Araq: Hehe, right |
19:10:35 | * | dtscoded quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:10:37 | ggVGc | pragm: so, say you are used to programing in java-style languages, and then you get into FP and get an AHA! moment where you see a whole new way of expressing algorithms and structuring your logic. Now take that concept and apply it to type systems. The haskell type system compared to more common type systems, has about the same relation to the way you write logic in a Java/C++:ish language compared to writing logic in a fully functional way |
19:11:34 | ggVGc | pragm: but you can't really get your head around it unbtil until you have had that AHA! moment in functional programming, because that's what it's al all built on |
19:13:06 | ggVGc | pragm: and then add the fact that haskell is not just functional, but also purely functional, meaning you never have anything mutable anywhere, and nothing can have side effects unless you express it in a specific notation, which in turn has it's own set of rules you need to understand |
19:13:35 | * | jbomo joined #nim |
19:13:36 | ggVGc | pragm: so, going from "not much FP experience" to haskell, is like going from basic addition straight to calculus |
19:13:38 | pragm | is this coming from experience from diving into haskell first |
19:13:42 | ggVGc | yes |
19:13:43 | ggVGc | 3 times |
19:13:48 | pragm | 3 times?1 |
19:13:51 | ggVGc | third time I started grokking it |
19:14:27 | pragm | ggVGc: how much of Ocaml b4 i get into haskell? |
19:14:38 | Araq | ozra: I call this the "completely honest programming language". Where all memory usage is bounded by design and a[i] can alias b[j] iff a == b (static check) and i == j (dynamic check) |
19:14:58 | pragm | nothing beats pony-lang |
19:15:10 | vikaton | why the hell did they name it "pony" |
19:15:21 | Arrrrr | +1 |
19:15:38 | ggVGc | pragm: first time I started looking at it I had about 5 years programming experience and knew just a little about FP. Second time I looked at it I had written quite a lot of F#(including some parsers and tools for autocompletion in it) and knew quite a lot of FP. Third time was last year, with about 9 years total programming experience and 4 years of FP interest |
19:15:43 | vikaton | thats worse than Nomrod ! |
19:16:07 | ggVGc | nimrod is pretty bad though, amirite |
19:16:21 | pragm | ggVGc: I have a little under 1 year experience :[ |
19:16:28 | pragm | in programming all tg |
19:16:36 | Araq | ggVGc: hey, Nimrod kicked ass. :P |
19:16:46 | ggVGc | pragm: I know you might feel like it sounds badass to just dive in at the deep end, but it will really just make you lose interest in haskell, and burn your learning motivation. Just let it wait |
19:16:47 | vikaton | who ever called Nim nimrod is a nimrod themselves! |
19:17:06 | vikaton | srry araq :[ |
19:17:09 | vikaton | just a j0ke |
19:17:18 | Araq | vikaton: but it was me :'-( |
19:17:23 | vikaton | ! |
19:17:29 | vikaton | I take back the apology |
19:17:34 | Arrrrr | Nimrod was a better name than nim, to be honest |
19:17:46 | Araq | now you did it. I have to go jogging, bbl. |
19:17:51 | vikaton | tbh nobody used Nimrod as an insult anymore |
19:17:58 | vikaton | uses* |
19:18:10 | Arrrrr | we should fork nim to rename it back to nimrod |
19:18:16 | vikaton | on it |
19:19:04 | ggVGc | pragm: you have to understand that haskell is built on heavy heavy academia, by people who sit in their universities writing books on type systems and bleeding edge computer science. The concepts in haskell are built upon earlier concepts that has come up in other languegs before it and it is a very advanced language. But that currently means that it's very very hard to just dive straight into it if you don't have those more basic concepts solidly in your head |
19:19:59 | kas | pragm: If you want see difference, you could try all:) Every day something different, and after week pick one you think most suitable for you :) |
19:20:00 | ggVGc | pragm: ocaml on the other hand will feel like somewhat familiar, but with a focus on writing programs in a way you're not used to. That is a fun learning experience, and it won't feel like baning your head aginst a ball of spikes. |
19:21:58 | ggVGc | pragm: like, you probably have in your head what makes some objects "alike" and how they could interact, based on your current programming experience. In haskell the rules of what makes objects "alike" and how they can interact is modelled in a completely different way, so the way you think about all types(from integers, to strings, to functions, to your custom types) is different at the core |
19:22:57 | ggVGc | combined with the fact nothing can have side effects, nothing can be mutated, and nothing can really be imperative(kind of true but also kind of not) |
19:23:26 | pragm | oboi |
19:23:29 | * | pragm quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:23:38 | ggVGc | :( |
19:23:41 | ggVGc | seems I drove him off |
19:23:44 | ggVGc | sorry channel |
19:23:46 | ggVGc | back to NIm talk |
19:23:50 | ggVGc | or should I say nimrod |
19:28:21 | * | pragm joined #nim |
19:28:29 | pragm | ggVGc: the coin landed on Ocaml anyways |
19:28:35 | ggVGc | :) |
19:28:38 | pragm | but how long do I have to stay with Ocaml |
19:28:57 | ggVGc | pragm: until you get an AHA moment about functional programming |
19:29:15 | pragm | well thats gonna be a while |
19:29:26 | ggVGc | pragm: I mean, start looking at haskell if you want. I'm just saying it's gonna be a lot of work, and not very fun, to try working in it before you have a fairly good grasp of FP |
19:29:56 | ggVGc | pragm: as I said, the main problem is that haskells type system itself is built on functional programming ideas |
19:30:09 | ggVGc | but maybe it will make sense to you very quickly |
19:30:35 | pragm | hakell's community is much larger than Ocaml's |
19:30:36 | pragm | w0w |
19:30:46 | ggVGc | pragm: many people who know both haskell and ocaml still prefer ocaml for writing their daily software. Not many people have managed to make haskell their go-to language for general purpose development |
19:31:05 | pragm | ggVGc: the purpose is to learn, not practically use |
19:31:28 | pragm | ggVGc: is it ture that haskell would make you smarter? |
19:31:51 | pragm | or at least look at problems in a different view ? |
19:31:58 | ggVGc | pragm: alright, do this then. Start reading learnyouahaskell.com and write the simplest text processor you can think of in it. But I think fairly quickly you will feel overwhelmed. Then go to ocaml |
19:32:47 | ggVGc | pragm: yes, since as I said the type system is very different(and I really mean different, not just an alternative way of something you've already seen). But when you start getting into understanding that type system you'll find it very cool |
19:33:18 | pragm | Ill go with ur plan then |
19:33:49 | pragm | because haskell just seems too appealing to ignore |
19:34:06 | pragm | I have tackled Rust's borrow checker, i think I might hit haskell |
19:34:32 | ggVGc | pragm: the fun begins quite early when you realise there isn't a straightforward way of just reading a string from stdin in a way you're used to |
19:34:52 | * | pragm quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:36:00 | vikaton | ggVGc: http://learnyouahaskell.com/input-and-output ? |
19:36:03 | ggVGc | pregressive: Rust is still built on the computation model we are all very familiar with, meaning imperative and dealing with memory spots and pointers. Haskell is completely in another world compared to that |
19:37:01 | ggVGc | vikaton: sure, but already here it bubbles up that all of a sudden IO is part of a type? And it's not an actual type |
19:40:48 | * | Arrrrr quit (Quit: WeeChat 1.2) |
19:41:09 | ozra | Varriount: If you're around: some fixes to the highlighter, it seems to be solid now (more exhaustive tests needed, ie look through more source code ;) |
19:41:15 | ozra | PR'ed. |
19:43:20 | * | pwzoii joined #nim |
19:50:29 | reactormonk | ozra, will https://github.com/nim-lang/Nim/pull/2890 fix https://github.com/nim-lang/Nim/issues/2904 ? |
19:50:55 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:54:01 | * | xet7 joined #nim |
19:55:30 | reactormonk | Araq, could you take a look at https://github.com/nim-lang/Nim/pull/2903 ? Looks good to me but I'm not sure if I can judge that correctly |
20:03:54 | * | Matthias247 joined #nim |
20:04:37 | * | dtscode is now known as bulbasaur |
20:08:13 | * | mikolalysenko quit (Ping timeout: 256 seconds) |
20:08:18 | avsej_ | for centos/fedora users. I configured automatic build of devel branch, running basic tests and publishing to YUM repositories. Instructions here: http://copr.fedoraproject.org/coprs/avsej/nim-devel/ |
20:08:30 | pigmej | avsej_: cool |
20:09:19 | * | mikolalysenko joined #nim |
20:18:06 | Guest9271 | I dunno if kirbyfan64 hangs around on IRC here, but I think I made some nice extension to his PR that make Nim output even more sweet: https://github.com/nim-lang/Nim/pull/2906 |
20:18:12 | * | Guest9271 is now known as OnO |
20:18:22 | OnO | hmm.... I dunno what happened to my nick |
20:18:29 | OnO | sorry |
20:21:48 | pigmej | OnO: screens? |
20:22:09 | bulbasaur | Do we have anything for dlfcn.h in the stdlib? |
20:22:12 | * | Mat4 joined #nim |
20:23:29 | * | kas quit (Ping timeout: 246 seconds) |
20:24:04 | OnO | pigmej: https://www.dropbox.com/s/8k5f04gf127i44z/Nim%20Colors.png?raw=1 |
20:25:03 | pigmej | sweet, |
20:25:34 | * | enquora joined #nim |
20:25:59 | * | Mat4 left #nim (#nim) |
20:27:24 | reactormonk | dom96, any way to run the test suite automatically and diff between two commits? E.g. /json/builders/linux-x64-builder/builds?select=-1/<git commit of devel PR'd against>/changes&select=-2/<git commit of PR>/changes ? |
20:27:48 | reactormonk | OnO, maybe nickserv? |
20:28:09 | OnO | reactormonk: switched to ZNC recently, forgot to enable nickserv mod :> |
20:28:15 | pigmej | reactormonk: hey :) |
20:28:16 | * | Mat4 joined #nim |
20:28:57 | * | banister joined #nim |
20:29:11 | * | pregressive quit (Remote host closed the connection) |
20:29:54 | * | brson joined #nim |
20:32:00 | reactormonk | pigmej, o/ |
20:33:43 | reactormonk | yglukhov________, please don't squad commits, it makes it harder to follow the comments |
20:34:04 | reactormonk | I currently have no idea what you just changed. |
20:37:45 | * | xcombelle quit (Remote host closed the connection) |
20:41:23 | yglukhov________ | reactormonk, sorry, line 551 of old jssys is reverted back. thats where sets copying occurs |
20:41:54 | * | yglukhov________ is now known as yglukhov |
20:42:47 | reactormonk | yglukhov, honestly, I don't know too much about it, so I'll just wait for Araq. |
20:46:40 | * | sepisoad quit (Ping timeout: 265 seconds) |
20:50:34 | * | avsej_ is now known as avsej |
20:52:19 | Araq | bulbasaur: look at posix.nim please |
20:52:28 | Araq | reactormonk, yglukhov it's wrong ;-) |
20:54:21 | Araq | OnO: any progress on the "TR macros should be recursive but not self-applying" problem? |
20:55:33 | Araq | avsej: please note that the tester now always uses the local nim or something. ozra knows the details |
20:56:44 | avsej | on builder box only local nim available |
20:56:47 | avsej | so it is okay |
20:58:15 | avsej | Araq, are you going to release 0.11.3 soon? https://github.com/nim-lang/Nim/blob/devel/compiler.nimble#L3 |
20:58:58 | Araq | version 0.11.3 is the development version. once released it will be 0.11.4 or even 1.0RC1 |
21:02:25 | * | ChrisMAN quit (Remote host closed the connection) |
21:04:09 | avsej | okay I see |
21:04:10 | * | bulbasaur is now known as PaulMaudib |
21:06:43 | * | Noobulater quit (Ping timeout: 246 seconds) |
21:17:35 | * | ChrisMAN joined #nim |
21:21:28 | * | PaulMaudib is now known as dtscode |
21:25:39 | * | Jesin joined #nim |
21:25:57 | yglukhov | Araq, what's wrong? Squashing or copying? =) |
21:26:34 | Araq | yglukhov: I commented the PR |
21:28:00 | yglukhov | Araq, errr.. Probably you're talking about the other one? There's a couple of them. |
21:28:28 | yglukhov | Does anyone see my nickname with an enourmous underscore trail? |
21:29:38 | yglukhov | Araq, also, I've made changes according to your comment. |
22:02:36 | Araq | yummy |
22:02:49 | Araq | finally somebody fixed unittest escape characters |
22:03:26 | Araq | which is a bug that I predicted btw since ansi escape sequences are braindead |
22:04:49 | Mat4 | ?? |
22:07:52 | * | phira quit (Quit: ZNC - http://znc.sourceforge.net) |
22:08:38 | * | Jesin quit (Ping timeout: 252 seconds) |
22:10:14 | Araq | Mat4: redirect the output of a program that uses escape sequences for coloring and see what happens |
22:10:41 | Mat4 | ah this effect you mean |
22:13:07 | * | boop is now known as boopisaway |
22:17:55 | Araq | yglukhov: well at this point you know the JS codegen better than I do and you also have more working code that targets JS than I do. so it's a bit pointless to review your work |
22:18:13 | Araq | want write access? |
22:18:37 | * | Mat4 quit (Quit: Verlassend) |
22:18:50 | * | Jesin joined #nim |
22:21:20 | yglukhov | Araq, wow, that's a level up =) I would be glad, of course. |
22:22:06 | Araq | well it's only write access for JS related stuff. don't misuse your power :P |
22:25:17 | reactormonk | Araq, sounds like you need to check if output is tty... |
22:26:21 | Araq | reactormonk: I know of this solution, but that's just an abstraction breaking hack. |
22:26:49 | Araq | but then the "everything is a stream" abstraction never worked to begin with, so I don't really mind |
22:31:11 | * | kumul joined #nim |
22:31:24 | * | boopisaway is now known as boop |
22:33:13 | yglukhov | Araq, actually I'm not sure if it's a good idea at all to push without at least a formal review. |
22:33:52 | yglukhov | So, I would welcome at least an LGTM in my future PRs ;) |
22:34:03 | reactormonk | yglukhov, I usually do it that way too |
22:34:33 | Araq | yeah true |
22:40:16 | taotetek | would it be possible to construct a nim proc that calls a c function via a macro? |
22:41:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:43:06 | taotetek | it looks like you cannot -use- a proc that depends on ffi as part of a macro.. but how about creating a proc, via macro, that will call ffi when the proc is called from outside of the macro? |
22:43:20 | Araq | taotetek: yes. |
22:43:30 | taotetek | Araq: excellent. |
22:43:45 | Araq | also you can use staticExec to run what you want, FFI dependency or not |
22:44:28 | taotetek | Araq: I'll work through the macro tutorials when I get a little time, and either figure it out or be back with a question or two :) |
22:44:56 | * | Trustable quit (Remote host closed the connection) |
22:45:01 | * | yglukhov quit (Quit: Be back later ...) |
22:50:54 | * | Matthias247 quit (Quit: Matthias247) |
22:51:18 | * | wan quit (Quit: WeeChat 1.2) |
22:51:51 | * | blake joined #nim |
22:52:12 | blake | hey, have a question from the tutorial about getter and setter procedures |
22:52:15 | * | blake is now known as Guest27458 |
22:52:27 | reactormonk | looks like nickserv doesn't like you :-) |
22:52:41 | Guest27458 | I don't know how to IRC...dammit |
22:52:59 | reactormonk | just pick a different nick |
22:53:08 | reactormonk | with /nick newnick |
22:54:24 | * | Guest27458 is now known as blakev |
22:54:33 | blakev | hopefully that works |
22:55:02 | Araq | blakev: well? what's your question |
22:55:06 | blakev | haha cool, so I was hoping someone could explain to me why the setter uses "s: var Person" but the getter doesn't use `var` |
22:55:11 | blakev | http://nim-lang.org/docs/tut2.html#object-oriented-programming-properties |
22:55:23 | reactormonk | blakev, because by default variables are immutable |
22:55:54 | reactormonk | blakev, in a simpler version, remove the `var` annotation and see what the compiler tells you |
22:56:06 | blakev | it worked...which is why I was confused |
22:56:23 | reactormonk | really? hum |
22:57:02 | Araq | reactormonk: depends also on whether it's a ref object or not |
22:57:18 | reactormonk | blakev, update your compiler, compiler complains here |
22:57:24 | reactormonk | Araq, why the distinction btw? |
22:57:38 | blakev | I just downloaded the windows install binary today from the site, should I compile from source? |
22:58:31 | Araq | blakev: no. |
22:58:50 | Araq | reactormonk: cause we fucked up that part of the language. just kidding. |
22:59:09 | reactormonk | Araq, you never know |
22:59:37 | Araq | cause deep immutability is hard to work with, but we'll experiment with it via the 'func' keyword |
22:59:43 | reactormonk | ok |
23:00:05 | blakev | it seems like it's because the `var` keyword allows modifying variables inside the procedure without returning them |
23:00:22 | reactormonk | blakev, nah, test.nim(8, 10) Error: 'v.x' cannot be assigned to |
23:00:51 | Araq | `var` is C++'s & really. ref is * and ptr is * too. |
23:01:09 | Araq | so ... if you know C++, that should help |
23:02:09 | blakev | I do not :) I have a strong Python background -- this is the code I'm running, http://pastebin.com/raw.php?i=61ADKA3y |
23:03:52 | Araq | blakev: well your Person is a 'ref', so no 'var' required. we need to expand on this in the tutorials I guess |
23:04:28 | Araq | but yeah, it's always safe to not use the 'var' and sometimes things don't compile and then you might need to add it ;-) |
23:05:16 | blakev | haha works for me, for now :P I've been watching the language for awhile and decided to give it a try. The "compiles to C" is extremely relevent, because it would make Python interop trivial |
23:05:49 | Araq | check out "nimborg" then for really sweet Python interop |
23:15:42 | * | boop is now known as boopisaway |
23:23:11 | blakev | does the nimble package manager have a repository website? |
23:24:51 | reactormonk | blakev, nah, just a github repo |
23:25:22 | Araq | not sure what you mean, but look here http://nim-lang.org/docs/lib.html#nimble-unofficial-packages |
23:39:49 | * | vikaton quit () |
23:43:45 | Etheco | I have the `df` data and i want to parse that to a more usable array, would using pegs be my best option ? |
23:44:37 | Araq | Etheco: we generally encourage to use parseutils |
23:45:05 | Etheco | Araq, ah okie, will look at that instead, thanks :) |
23:45:28 | Araq | but that's rather low level, so if you hate it try pegs or re/nre |
23:46:34 | Etheco | okie cool. |
23:46:48 | Etheco | its all a learning curve so will give it a go :) |
23:47:13 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:47:20 | Araq | it'll make you a better programmer ;-) |
23:48:11 | Etheco | lets hope so :D, php isn't great at making me a good programmer lol. |
23:48:52 | Araq | rule of thumb: if you use 'split' or 're' for parsing, you're doing it wrong ;-) |
23:49:19 | Etheco | ill try keep to that rule then :D, now to figure out what all these procs mean haha. |
23:49:43 | Etheco | i have done a lot of bash scripting over time, so trying to convert that to nim for learning :D |
23:50:36 | Etheco | also enjoyed your talk on oreilly :) |
23:50:55 | Araq | thank you. :-) |
23:51:31 | * | wepy joined #nim |
23:51:33 | wepy | oi |
23:51:41 | wepy | is nim good at CGI and like.. mime parsing? |
23:52:06 | Araq | we got modules for both |
23:52:15 | wepy | are they good? |
23:52:31 | wepy | also, is there anything like python's argparse? |
23:52:43 | Araq | yes but I forgot its name |
23:52:47 | wepy | k |
23:53:07 | wepy | i think i tried the cgi module before.. didn't do any mime with it |
23:53:15 | wepy | also.. funny question about installs |
23:53:29 | wepy | so.. it seems like the compiler looks for a lib path relative to itself? |
23:53:44 | wepy | is there a way to install stuff properly as root? |
23:54:10 | Araq | yeah and you can also use --lib to tell them where to find the stdlib |
23:54:16 | wepy | ic |
23:54:32 | Araq | but we don't like you to install properly as root cause that's stupid |
23:54:39 | wepy | why |
23:55:14 | wepy | like if you want multiple users to have access to it easily |
23:55:18 | wepy | seems like good way |
23:56:07 | Araq | it makes updating nim more cumbersome and requires sudo. |
23:56:18 | wepy | sudo? |
23:56:26 | wepy | ah |
23:56:29 | wepy | like for a package install |
23:56:49 | wepy | why is updating harder? |
23:57:02 | wepy | are you a windows guy or something? |
23:57:23 | Araq | lol |
23:57:25 | wepy | my whole unix life has been: configure; make; su/sudo make install :) |
23:57:29 | Etheco | surely security comes to mind running everything under root |
23:57:38 | Araq | no, I hate all OSes. |
23:57:39 | wepy | it's not running under root |
23:57:57 | Araq | but since everybody agrees Windows sucks I focus on telling people how much Poonix sucks |
23:58:07 | wepy | Etheco: difference between suid/sgid and root-owned stuff |
23:58:08 | strcmp1 | Araq, what about TempleOS |
23:58:13 | wepy | haha |
23:58:26 | flaviu | 17:00 <Araq> flaviu: TempleOS looks really cool :-) |
23:58:33 | Etheco | lol |
23:59:01 | Etheco | surely wont be long for NimOS? |
23:59:11 | wepy | isn't binaries self locating kinda.. ghetto though? |
23:59:19 | wepy | you could use an environment variable to locate the libs |
23:59:22 | flaviu | Araq: How about a HolyC backend for Nim? |
23:59:22 | wepy | or have standard paths |