00:00:58 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:00:58 | Varriount | Ok, issue created and assigned to me - https://github.com/Araq/Nimrod/issues/1622 |
00:01:22 | Varriount | Right now my priority is getting the builder up and running though. |
00:04:01 | Varriount | Araq: Just to confirm, you want the installers to use the Nimrod source code in the 0.9.6 release on the Github repo, right? |
00:04:51 | Araq | right |
00:05:38 | * | boydgreenfield joined #nimrod |
00:07:58 | Varriount | Araq: https://drive.google.com/file/d/0B077nrrf63xtYzZ4Q1puRnVJNE0/view?usp=sharing |
00:11:59 | Araq | Varriount: tested my patch ? |
00:12:35 | Mat3 | ciao |
00:12:48 | * | Mat3 quit (Quit: Verlassend) |
00:14:13 | Araq | well I uploaded it |
00:14:24 | gokr1 | Araq: 50 million calls, I have like 5 different silly calls. Worked fine. :) |
00:14:54 | Araq | well but you're lucky since you're on linux |
00:15:07 | Araq | for windows it should be fine too |
00:15:24 | gokr1 | I will try on OSX tomorrow. |
00:15:29 | Araq | but for macosx the thread local storage emulation might cause problems ... |
00:15:44 | gokr1 | gnite folks |
00:15:56 | Araq | bye |
00:17:43 | * | gokr_ quit (Quit: IRC for Sailfish 0.8) |
00:29:24 | Araq | ping will |
00:29:41 | will | Araq: you called? |
00:30:40 | Araq | if build.nim-lang vs build.nimrod-lang is the issue how come it works with chrome but not with firefox? |
00:30:55 | Araq | well ok, maybe it works with neither properly |
00:31:03 | Araq | but only FF shows the error message |
00:31:20 | will | aren't you looking at the wrong page? |
00:31:40 | will | http://build.nimrod-lang.org/docs/lib.html |
00:31:56 | flaviu | Araq: Firefox is like linux. It's completely firefox's fault :) |
00:32:45 | will | you are probably looking at: http://nimrod-lang.org/lib.html? which seesm to work in both firefox and chromium ;D |
00:32:55 | flaviu | Firefox has lots of open source extensions. Chrome has more proprietary extensions. Coincidence? I think not. |
00:33:45 | Araq | hrm wtf, let's see |
00:35:02 | Araq | well, now it works on FF too. browser cache thing... |
00:35:15 | Araq | however it didn't work before |
00:35:28 | Araq | maybe dom96 already fixed it |
00:35:32 | will | does http://build.nimrod-lang.org/docs/lib.html work though? |
00:35:48 | rpag | for me yup |
00:35:54 | will | that is compiled with 0.10.0 |
00:36:19 | Araq | nope, but build.nimrod-lang is a second class citizen |
00:37:32 | will | well the problem with that one is: http://build.nim-lang.org/packages?callback=gotPackageList in docs/lib.txt |
00:37:54 | Araq | which is correct for bigbreak |
00:38:04 | will | but the link doesn't work |
00:38:06 | will | 404? |
00:38:07 | Araq | it's just that it's still in flux |
00:38:16 | Araq | the link will work |
00:39:11 | will | fair enough :D |
00:39:28 | will | it was gradha that compalined wasn't it? |
00:39:36 | will | can't find the post on the forum |
00:40:19 | Araq | it was in the more general "we suck" thread |
00:41:00 | Araq | http://forum.nim-lang.org/t/600 |
00:41:03 | * | q66 quit (Quit: Leaving) |
00:42:55 | will | oh yeah, I guess all is well then :D |
00:43:24 | Araq | yeah. btw |
00:43:34 | Araq | if one of you guys is looking for work |
00:43:50 | Araq | the JS tagged bugs are usually easy to fix for newcomers |
00:43:56 | * | xenagi joined #nimrod |
00:44:01 | Araq | hi xenagi |
00:45:22 | will | cheers, I might try and fix a few when I get some more time |
00:46:04 | xenagi | hi Araq |
00:46:35 | Araq | xenagi: please fix some JS tagged bug before you leave ;-) |
00:47:06 | xenagi | O_o |
00:47:10 | xenagi | this is news to me lol |
00:49:23 | Araq | well one way out of this dilemma is to never leave again |
00:49:56 | xenagi | yes, there's that... |
00:52:38 | * | darkf joined #nimrod |
00:53:20 | NimBot | Araq/Nimrod bigbreak 771e3db Flaviu Tamas [+0 ±1 -0]: Remove extra trailing zero from oid... 3 more lines |
00:53:20 | NimBot | Araq/Nimrod bigbreak 65c64fd Andreas Rumpf [+0 ±1 -0]: Merge pull request #1621 from flaviut/fix-oid... 2 more lines |
00:56:45 | NimBot | Araq/Nimrod devel aa1fb9a Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds stringification support for nnkPostfix nodes. |
00:56:45 | NimBot | Araq/Nimrod devel e7edd9e Andreas Rumpf [+0 ±1 -0]: Merge pull request #1565 from gradha/pr_supports_nnkPostfix_stringification... 2 more lines |
00:58:51 | NimBot | Araq/Nimrod devel 2476ee0 def [+0 ±1 -0]: Add -lm for fesetround and fegetround |
00:58:51 | NimBot | Araq/Nimrod devel c0422ae def [+0 ±2 -0]: Move floating point rounding and exceptions handling to math... 1 more lines |
00:58:51 | NimBot | Araq/Nimrod devel a019825 def [+1 ±1 -0]: Move fenv to its own module |
00:58:51 | NimBot | Araq/Nimrod devel a0ecfd1 Andreas Rumpf [+1 ±2 -0]: Merge pull request #1448 from def-/posix-math... 2 more lines |
00:59:08 | * | bjz joined #nimrod |
01:02:00 | Araq | Varriount: just remembered ... I really like your idea of keeping separate output buffers for parallel exec |
01:02:21 | NimBot | Araq/Nimrod bigbreak 679aefd Erwan Ameil [+0 ±2 -0]: Prettify compiler output for verbosity=1... 2 more lines |
01:02:21 | NimBot | Araq/Nimrod bigbreak 06c32aa Erwan Ameil [+0 ±2 -0]: Tidy up the prettification of the default verbosity c compilation output |
01:02:21 | NimBot | Araq/Nimrod bigbreak 2f3add9 Erwan Ameil [+0 ±1 -0]: Change empty callback into nil |
01:02:21 | NimBot | Araq/Nimrod bigbreak 49e9332 Erwan Ameil [+0 ±1 -0]: Use defaut nil callback for execProcesses |
01:02:21 | NimBot | 2 more commits. |
01:03:30 | NimBot | Araq/Nimrod devel 400fd6a Grzegorz Adam Hankiewicz [+0 ±1 -0]: Documents json module. |
01:03:30 | NimBot | Araq/Nimrod devel 57dadb3 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Hides TJsonError, it wasn't being used. |
01:03:30 | NimBot | Araq/Nimrod devel db228d3 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1553 from gradha/pr_json_module_improvements... 2 more lines |
01:09:22 | NimBot | Araq/Nimrod devel 9f99dd0 def [+0 ±1 -0]: Add list comprehensions to future module |
01:09:22 | NimBot | Araq/Nimrod devel c7898a0 def [+0 ±1 -0]: Extend list comprehension documentation |
01:09:22 | NimBot | Araq/Nimrod devel bd2ba2d Andreas Rumpf [+0 ±1 -0]: Merge pull request #1443 from def-/future-listcomprehensions... 2 more lines |
01:10:46 | Araq | Varriount: one more thing you could do: ensure that a release includes Nimble. just patch koch.nim to do that. |
01:18:16 | * | rpag quit (Quit: Leaving) |
01:23:26 | * | will quit (Ping timeout: 256 seconds) |
01:26:51 | * | brson joined #nimrod |
01:41:32 | flaviu | Araq: wrt gradha's PR, it's easy to apply it anyway. `git checkout devel; git branch gradhapr; git checkout gradhapr; git apply` |
01:41:32 | flaviu | paste the contents of https://github.com/Araq/Nimrod/pull/1383.patch and press ctrl-d; |
01:41:32 | flaviu | `git rebase bigbreak; git checkout bigbreak; git merge gradhapr` |
01:52:52 | * | flaviu quit (Ping timeout: 240 seconds) |
01:55:58 | * | xenagi quit (Read error: Connection reset by peer) |
02:16:01 | * | brson quit (Quit: leaving) |
02:18:23 | * | johnsoft quit (Ping timeout: 240 seconds) |
02:18:29 | * | johnsoft joined #nimrod |
02:21:40 | * | phI||Ip quit (Ping timeout: 258 seconds) |
02:23:04 | * | phI||Ip joined #nimrod |
03:02:31 | * | superfunc joined #nimrod |
03:04:54 | * | ehaliewicz joined #nimrod |
03:11:18 | superfunc | hmp, that's odd. Git wouldn't see the bigbreak branch for csources after cloning and trying to checkout, but if I clone with --b bigbreak it had no troubles |
03:15:46 | * | bjz quit (Ping timeout: 244 seconds) |
03:19:57 | * | boydgreenfield quit (Quit: boydgreenfield) |
03:20:19 | * | flaviu joined #nimrod |
03:20:55 | * | superfunc quit (Ping timeout: 246 seconds) |
03:21:57 | * | flaviu quit (Remote host closed the connection) |
03:24:16 | * | flaviu joined #nimrod |
03:41:52 | * | bjz joined #nimrod |
03:54:00 | * | flaviu quit (Ping timeout: 244 seconds) |
03:59:36 | * | johnsoft quit (Ping timeout: 250 seconds) |
03:59:45 | * | johnsoft joined #nimrod |
04:07:29 | Varriount | Araq: Shouldn't Nimble/Babel be another component? |
04:20:24 | Varriount | Araq: Also, it might be more expediant to tell me how to upload the installers myself - that way I don't have to bother you each time they need to be updated/fixed. |
04:21:38 | * | Jesin quit (Ping timeout: 255 seconds) |
04:46:50 | * | johnsoft quit (Ping timeout: 265 seconds) |
04:47:54 | * | johnsoft joined #nimrod |
05:10:04 | * | Jesin joined #nimrod |
05:29:16 | Varriount | Araq: Eh, are the installers supposed to include babel? |
05:37:44 | * | ARCADIVS joined #nimrod |
05:54:43 | * | boydgreenfield joined #nimrod |
06:35:54 | * | boydgreenfield quit (Quit: boydgreenfield) |
06:48:41 | * | superfunc joined #nimrod |
07:04:35 | * | BitPuffin quit (Ping timeout: 265 seconds) |
07:07:07 | * | superfunc quit (Quit: Page closed) |
07:12:02 | NimBot | Araq/Nimrod bigbreak 1b4dd6f Varriount [+0 ±1 -0]: Update buildbat.tmpl... 2 more lines |
07:17:39 | NimBot | Araq/Nimrod devel 6935171 Varriount [+0 ±1 -0]: Fix math.nim on windows |
07:34:44 | * | gokr_ joined #nimrod |
07:41:04 | * | gokr_ quit (Ping timeout: 245 seconds) |
07:46:19 | Araq | Varriount: yeah, that's what I meant. the installers should include Nimble. |
08:19:10 | * | Pisuke quit (Ping timeout: 255 seconds) |
08:21:36 | * | Trustable joined #nimrod |
08:29:00 | * | mbenadda_ joined #nimrod |
08:38:41 | * | mbenadda_ quit (Quit: Lingo: www.lingoirc.com) |
08:38:48 | * | mbenadda_ joined #nimrod |
08:41:35 | * | mbenadda_ quit (Client Quit) |
08:41:53 | * | mbenadda_ joined #nimrod |
08:51:54 | * | khmm joined #nimrod |
09:03:40 | * | gokr_ joined #nimrod |
09:19:11 | * | Lynx_ joined #nimrod |
09:42:30 | * | ehaliewicz quit (Ping timeout: 258 seconds) |
09:45:56 | * | ehaliewicz joined #nimrod |
10:06:19 | * | ehaliewicz quit (Ping timeout: 265 seconds) |
10:22:19 | * | BlaXpirit joined #nimrod |
10:36:05 | * | BlaXpirit-UA joined #nimrod |
10:38:52 | * | BlaXpirit quit (Ping timeout: 240 seconds) |
11:22:28 | * | vendethiel- quit (Ping timeout: 244 seconds) |
11:23:27 | * | vendethiel joined #nimrod |
11:36:40 | * | flaviu joined #nimrod |
11:36:59 | * | q66[lap] quit (Read error: Connection reset by peer) |
11:37:39 | * | q66[lap] joined #nimrod |
11:40:36 | * | Boscop__ is now known as Boscop |
11:56:02 | * | flaviu quit (Ping timeout: 265 seconds) |
11:57:28 | * | flaviu joined #nimrod |
12:03:15 | gokr1 | http://goran.krampe.se/2014/11/03/squeak-to-nim |
12:17:34 | * | Pisuke joined #nimrod |
12:26:46 | * | BitPuffin joined #nimrod |
12:36:15 | Araq | gokr1: what do you do with the ffiConcat's string? |
12:36:31 | gokr1 | Mmm, I wonder too :) |
12:36:59 | gokr1 | You mean the char* returned to Squeak from Nim, right? |
12:37:12 | gokr1 | Which... is a GCed Nim string. |
12:37:42 | gokr1 | And I was under the impression that Squeak FFI copies it, but perhaps its not. |
12:37:59 | gokr1 | (but... it must be, Squeak Strings are something completely different) |
12:38:39 | gokr1 | But... I can try a variant that I have found several examples of in our image - using byte* instead, and then copy it "manually". |
12:39:24 | gokr1 | If that solves it - then I suspect that the Squeak FFI does something fishy with the char* coming back from Nim. |
12:39:59 | gokr1 | Nim copies the args to concat, right? Doesn't do anything with them? |
12:40:17 | Araq | yeah |
12:40:25 | gokr1 | ok, will try |
12:40:38 | Araq | it's essnetial that the squeak vm doesn't do weird things with threads |
12:40:49 | Araq | you know, what you're doing here is really fragile |
12:41:04 | Araq | you return a cstring that aliases GC'ed memory |
12:41:26 | Araq | now the GC supports that, in theory |
12:41:48 | Araq | but it has to see that single reference on the stack that it scans somewhere |
12:43:39 | Araq | also for windows (and it doesn't hurt for other OSes) you should use the 'cdecl' calling convention for everything that you 'exportc' |
12:44:58 | gokr1 | right. |
12:45:23 | gokr1 | So... better is if Squeak allocates memory, then asks Nim to "fill it in", right? |
12:46:46 | gokr1 | Yeah, I see what you mean - not so good :) |
12:48:32 | gokr1 | So I presume the best approach is if the caller allocates args and results, let Nim "fill in", then after the caller has converted that into Squeak objects - the caller can free. |
12:49:08 | Araq | depends but yeah, sounds about right |
12:49:22 | gokr1 | This pattern is seen in lots of the FFI code in our image. |
12:56:28 | gokr1 | So does Nim create some separate thread? |
13:00:18 | Araq | no |
13:01:34 | gokr1 | So I modified the code to use "byte*" and then use #fromCString to copy that out into a String object. Seems stable now. |
13:02:26 | gokr1 | In Smalltalk "#Blabla" means the method/message called "Blabla", also known as a "selector". |
13:02:32 | gokr1 | (whatever) |
13:02:55 | Araq | nice, but eventually I think we should look into it again to understand where the crash came from |
13:08:14 | NimBot | Araq/Nimrod bigbreak 9f99dd0 def [+0 ±1 -0]: Add list comprehensions to future module |
13:08:14 | NimBot | Araq/Nimrod bigbreak c7898a0 def [+0 ±1 -0]: Extend list comprehension documentation |
13:08:14 | NimBot | Araq/Nimrod bigbreak 2476ee0 def [+0 ±1 -0]: Add -lm for fesetround and fegetround |
13:08:14 | NimBot | Araq/Nimrod bigbreak c0422ae def [+0 ±2 -0]: Move floating point rounding and exceptions handling to math... 1 more lines |
13:08:14 | NimBot | 31 more commits. |
13:18:55 | NimBot | Araq/Nimrod devel f3d7158 Simon Krauter [+0 ±1 -0]: Fix terminate() and add kill() |
13:18:55 | NimBot | Araq/Nimrod devel a7f5d55 Simon Krauter [+1 ±0 -0]: Added test case |
13:18:55 | NimBot | Araq/Nimrod devel 33ce5c2 Andreas Rumpf [+1 ±1 -0]: Merge pull request #1620 from trustable-code/PR6... 2 more lines |
13:18:56 | gokr1 | Araq: Yeah. |
13:33:22 | * | will joined #nimrod |
14:13:05 | * | Pisuke quit (Ping timeout: 264 seconds) |
14:13:38 | * | Sembei joined #nimrod |
14:22:44 | * | darkf quit (Quit: Leaving) |
14:31:25 | Trustable | Araq: Maybe move the test case for terminate() from "stdlib" to "osproc". |
14:33:36 | * | BitPuffin quit (Ping timeout: 265 seconds) |
14:36:01 | Araq | Trustable: ok. btw that JS issue seems to be gone for reasons I don't understand |
14:38:20 | * | BitPuffin joined #nimrod |
14:41:04 | * | vendethiel quit (Ping timeout: 272 seconds) |
14:42:20 | Trustable | Araq: what do you think of a to do list in the wiki? |
14:42:42 | Araq | we already use the issue tracker for that |
14:42:48 | Araq | well Varriount does |
14:42:57 | Araq | I have my own todo.txt |
14:43:07 | * | vendethiel joined #nimrod |
14:43:22 | Araq | and dom96 has his own too |
14:43:27 | Trustable | maybe add a milestone for 0.10.0 |
14:48:38 | Araq | meh, the milestones didn't work too well for 0.9.6 |
14:48:53 | * | dom96_ quit (Ping timeout: 240 seconds) |
14:49:04 | Trustable | Just found out that an issue be a list tasks. |
14:49:19 | Trustable | Still open issues for 0.9.6: https://github.com/Araq/Nimrod/issues?q=is%3Aopen+is%3Aissue+milestone%3A0.9.6 |
14:50:13 | * | dom96_ joined #nimrod |
14:54:49 | * | dom96_ quit (Ping timeout: 260 seconds) |
14:58:42 | * | askatasuna joined #nimrod |
15:04:24 | * | q66[lap] quit (Quit: Textual IRC Client: www.textualapp.com) |
15:04:32 | * | khmm quit (Ping timeout: 265 seconds) |
15:08:46 | * | saml joined #nimrod |
15:10:17 | * | khmm joined #nimrod |
15:14:44 | fowl | gokr1, you probably get a segfault because you're returning the bytes from a string |
15:15:15 | fowl | that is, taking them from a garbage-collected object and passing them around like they're just a pointer |
15:22:30 | * | khmm quit (Ping timeout: 244 seconds) |
15:23:14 | * | saml quit (Quit: Leaving) |
15:23:30 | * | Jehan_ joined #nimrod |
15:25:29 | * | saml joined #nimrod |
15:27:20 | Araq | Jehan_: why does your patch require 'strutils'? |
15:27:36 | Araq | you added that import to cgmeth.nim |
15:27:51 | Jehan_ | Araq: Umm … may be leftover debugging code. |
15:28:11 | Araq | ok as I suspected |
15:28:26 | Jehan_ | I thought I had reviewed the code for such imports, but it must have slipped through. |
15:29:50 | * | vendethiel quit (Ping timeout: 272 seconds) |
15:29:55 | gokr1 | fowl: I don't. |
15:30:07 | fowl | you do in concat() |
15:30:23 | gokr1 | You mean Nim code? |
15:30:40 | fowl | yea |
15:31:28 | gokr1 | So the thing is that the Squeak FFI is meant to convert the Smalltalk String to a C string. |
15:31:32 | NimBot | Araq/Nimrod devel 52a3acb Reimer Behrends [+0 ±1 -0]: Fix method recursion bug.... 2 more lines |
15:31:32 | NimBot | Araq/Nimrod devel 1fc8bab Reimer Behrends [+0 ±1 -0]: Reset location when creating a method dispatcher... 8 more lines |
15:31:32 | NimBot | Araq/Nimrod devel bce2d57 Reimer Behrends [+1 ±0 -0]: Added test case for recursive methods. |
15:31:32 | NimBot | Araq/Nimrod devel ce9a57f Reimer Behrends [+1 ±2 -0]: Fix dispatcher creation for method prototypes.... 6 more lines |
15:31:32 | NimBot | 1 more commits. |
15:33:50 | Araq | Varriount: please assign a priority to every issue; I rarely look at the bugs without some filter |
15:33:52 | fowl | gokr1, look at the function foo(), you create a string and then return the char*s from under it |
15:33:56 | fowl | that shouldn |
15:34:02 | fowl | shouldn't be allowed |
15:34:28 | gokr1 | Thing is - on the Squeak side I copy what I get. |
15:34:33 | Araq | fowl: it's an edge case. usually it works |
15:34:58 | fowl | gokr1, you probably get a crash when the GC runs between the time you send the string to squeak and get it copied |
15:35:06 | Araq | as long as the returned cstring is referenced from the stack until it's copied over |
15:35:34 | gokr1 | So the GC would run before Squeak gets it back? |
15:35:40 | gokr1 | Nim GC that is. |
15:35:52 | * | vendethiel joined #nimrod |
15:35:54 | fowl | it could run at any time |
15:36:10 | gokr1 | Well, its not in a separate thread, right? |
15:36:17 | Araq | right. |
15:36:25 | Araq | don't listen to fowl ;-) |
15:36:29 | Jehan_ | Araq: Heh, so I just wanted to push the fix and you had already pulled. :) |
15:36:38 | gokr1 | But sure, if it can run before I get the result back - then I can be screwed. |
15:37:11 | Araq | that shouldn't happen. that said, there was some bug report about it |
15:37:51 | gokr1 | The annoying thing is that I ... seem to be able to get a segfault even when only using ... hello. Which just returns 42. I need to test more closely. |
15:38:21 | * | silven quit (Quit: No Ping reply in 180 seconds.) |
15:38:23 | fowl | gokr1, are you sure nimrod |
15:38:33 | fowl | nimrod's int is the same as smalltalk's long? |
15:38:55 | gokr1 | This is 32 bit, so an int is 32 bits in Nim I gather. |
15:38:58 | fowl | you could use the type "clong" |
15:39:33 | fowl | int in nimrod is native-size, so if you have a 64 bit processor its 8 bytes |
15:39:35 | * | silven joined #nimrod |
15:39:48 | gokr1 | And then on the Squeak side - a long is a 32 bit signed. |
15:40:03 | gokr1 | fowl: Certain even if I compile as 32 bits? |
15:40:35 | Jehan_ | gokr1: an int is int_ptr_t in Nim. |
15:40:57 | * | khmm joined #nimrod |
15:41:06 | * | jlebrech joined #nimrod |
15:41:13 | Jehan_ | I.e. sizeof(int) == sizeof(pointer) |
15:41:38 | jlebrech | I want to write webapps with nirmod which splits off into client/server code. |
15:41:53 | gokr1 | So if I use -m32, doesn't that make int and pointer 32 bits? |
15:42:38 | fowl | gokr1, well -m32 is an option for the c compiler and linker |
15:42:42 | Jehan_ | gokr1: Correct. |
15:42:55 | Jehan_ | You may still have to specify --cpu:... |
15:42:56 | fowl | if anything would affect nimrods int size it would be --cpu:i386 but you should double check that |
15:43:23 | gokr1 | Jehan_: I do that too. |
15:43:58 | fowl | gokr1, just do echo(sizeof(int)) and see |
15:46:22 | Jehan_ | nimbase.h has a check that will stop compilation if Nim and the C compiler disagree on the size of int. |
15:46:52 | fowl | hey I dont see where you call nimrod_init or whatever |
15:47:53 | * | gokr1 quit (Ping timeout: 240 seconds) |
15:49:18 | fowl | i cant find the documentation talking about that though.. |
15:49:27 | fowl | going to work, have a good day all |
15:50:03 | Jehan_ | With respect to the GC, the GC needs to know the extent of the stack. That's done from NimMain() usually. |
15:50:55 | * | khmm quit (Ping timeout: 244 seconds) |
15:51:25 | Jehan_ | I've forgotten what needs to be done for threads, though. |
15:53:33 | * | EXetoC joined #nimrod |
15:53:57 | * | khmm joined #nimrod |
15:54:46 | * | q66[lap] joined #nimrod |
15:57:09 | * | kemet joined #nimrod |
15:59:09 | * | bogen joined #nimrod |
15:59:28 | * | kemet quit (Client Quit) |
15:59:49 | * | gokr joined #nimrod |
16:00:14 | * | untitaker quit (Ping timeout: 250 seconds) |
16:05:59 | * | untitaker joined #nimrod |
16:11:04 | gokr_ | it said 4 btw (sizeof) |
16:11:45 | gokr_ | And niminit is called automatically for a lib I hope? |
16:12:30 | gokr_ | In fact... it might be stable now. I think it was me unloadin reloading causing it to go boom |
16:12:42 | gokr_ | later |
16:26:05 | * | superfunc joined #nimrod |
16:26:55 | gokr | Araq: I think its stable - as long as I don't do "Smalltalk unloadModule: 'testlib' " and then try again (causing a reload of the lib). But that is probably a Squeak thing. |
16:27:02 | gokr | Running a fat test now |
16:27:18 | superfunc | Sup gokr |
16:31:28 | * | brson joined #nimrod |
16:32:46 | * | BitPuffin quit (Remote host closed the connection) |
16:34:43 | * | q66[lap] quit (Quit: Textual IRC Client: www.textualapp.com) |
16:42:43 | * | vendethiel quit (Ping timeout: 255 seconds) |
16:44:20 | * | q66[lap] joined #nimrod |
16:44:31 | * | vendethiel joined #nimrod |
16:45:58 | * | khmm quit (Ping timeout: 256 seconds) |
16:46:43 | * | mbenadda_ quit (Quit: Be back later ...) |
16:47:11 | * | mbenadda_ joined #nimrod |
16:52:19 | * | gokr_ quit (Ping timeout: 245 seconds) |
17:05:15 | * | vendethiel quit (Ping timeout: 258 seconds) |
17:07:13 | * | vendethiel joined #nimrod |
17:11:03 | NimBot | Araq/Nimrod master 9f99dd0 def [+0 ±1 -0]: Add list comprehensions to future module |
17:11:03 | NimBot | Araq/Nimrod master c7898a0 def [+0 ±1 -0]: Extend list comprehension documentation |
17:11:03 | NimBot | Araq/Nimrod master 2476ee0 def [+0 ±1 -0]: Add -lm for fesetround and fegetround |
17:11:03 | NimBot | Araq/Nimrod master c0422ae def [+0 ±2 -0]: Move floating point rounding and exceptions handling to math... 1 more lines |
17:11:03 | NimBot | 53 more commits. |
17:13:11 | Araq | Jehan_: please think about my .dispatcher proposal. bigbreak is the right time to fix this language wart |
17:13:48 | Araq | pseudo-randomly selection of what's the base for the effect system is really not good enough |
17:22:31 | * | q66[lap] quit (Quit: Textual IRC Client: www.textualapp.com) |
17:29:04 | * | vendethiel quit (Ping timeout: 250 seconds) |
17:29:44 | * | mko joined #nimrod |
17:35:36 | * | vendethiel joined #nimrod |
17:58:19 | * | mko quit (Read error: Connection reset by peer) |
17:58:37 | * | mko joined #nimrod |
18:02:44 | * | mbenadda__ joined #nimrod |
18:03:34 | * | Matthias247 joined #nimrod |
18:06:37 | * | mbenadda_ quit (Ping timeout: 260 seconds) |
18:07:41 | * | mbenadda__ quit (Ping timeout: 264 seconds) |
18:10:30 | * | jlebrech quit (Remote host closed the connection) |
18:11:17 | ldlework | boo to closing my PR |
18:11:22 | ldlework | just kidding :) |
18:12:42 | * | BitPuffin joined #nimrod |
18:12:53 | * | Jehan_ quit (Quit: Leaving) |
18:19:19 | * | vendethiel quit (Ping timeout: 265 seconds) |
18:20:25 | ldlework | Does anyone know, assuming I have libtcod installed correctly to my system, how I can compile this and the samples? https://github.com/Vladar4/libtcod-nim |
18:29:55 | * | vendethiel joined #nimrod |
18:38:33 | ldlework | Does the csources have a bigbreak branch? |
18:39:29 | ldlework | nm |
18:51:53 | * | vendethiel quit (Ping timeout: 240 seconds) |
18:58:46 | * | vendethiel joined #nimrod |
19:02:09 | * | BitPuffin quit (Ping timeout: 260 seconds) |
19:05:13 | ldlework | Araq: when compiling a newly cloned bigbreak: https://gist.github.com/dustinlacewell/a4727e9f7d6d0989ff76 |
19:07:23 | ldlework | Which branch should I be using?! |
19:07:30 | ldlework | I see commits landing on master... |
19:07:40 | ldlework | I thought bigbreak was where current was going |
19:16:42 | dom96 | bigbreak |
19:18:18 | Araq | ldlework: thanks for reporting |
19:18:34 | Araq | looks like it's only gcsafe due to the better inference that I implemented |
19:18:57 | Araq | which means bootstrapping fails unless you use Araq's binaries |
19:19:06 | Araq | hi dom96 |
19:19:14 | Araq | ldlework: well I merged devel to master |
19:19:26 | Araq | and will merge bigbreak to devel |
19:19:31 | * | Mat3 joined #nimrod |
19:19:34 | Mat3 | hello |
19:19:40 | Araq | hi Mat3 |
19:19:54 | Mat3 | hi Araq |
19:20:10 | dom96 | hey Araq |
19:20:46 | * | Hakaslak joined #nimrod |
19:22:29 | ldlework | Araq: I'm not sure what that means. What should I do to compile a new version? |
19:22:51 | Araq | ldlework: wait an hour until I fixed it |
19:23:12 | ldlework | oh okay |
19:23:13 | ldlework | :) |
19:39:23 | * | q66[lap] joined #nimrod |
19:40:22 | * | q66 joined #nimrod |
19:41:54 | * | vendethiel quit (Ping timeout: 265 seconds) |
19:44:36 | * | vendethiel joined #nimrod |
19:52:00 | * | Jehan_ joined #nimrod |
19:52:38 | * | superfunc quit (Quit: Connection closed for inactivity) |
19:54:12 | Jehan_ | Araq: Why is initializing the stack bottom disabled when emulatedThreadVars() is on? |
19:56:03 | Araq | Jehan_: it's not disabled, but it's done later iirc |
19:56:42 | Araq | for some codegen reasons (setStackBottom uses the shadow stack which uses thread local storage which is emulated) |
19:56:57 | Jehan_ | Hmm. |
19:57:08 | Araq | but I think we should get rid of that |
19:58:53 | Jehan_ | Hmm, setStackBottom does not do anything other than casting both the old and new to int and comparing them and using the lower/higher (depending on stack direction) value. |
20:00:13 | ldlework | Araq: do you mind pinging me? |
20:00:40 | Jehan_ | I found out when I was looking at how this was initialized for thread stacks and finding that the call for the main stack disappeared entirely. |
20:09:54 | * | ARCADIVS quit (Quit: ARCADIVS) |
20:10:00 | * | q66[lap] quit (Quit: Textual IRC Client: www.textualapp.com) |
20:11:44 | * | q66[lap] joined #nimrod |
20:13:31 | Araq | ldlework: sure I'll ping you |
20:14:23 | * | Hakaslak quit (Ping timeout: 240 seconds) |
20:28:06 | * | Francisco quit (Ping timeout: 256 seconds) |
20:30:18 | * | vendethiel quit (Ping timeout: 265 seconds) |
20:34:12 | * | Francisco joined #nimrod |
20:36:17 | * | vendethiel joined #nimrod |
20:41:50 | * | superfunc joined #nimrod |
20:54:11 | * | will quit (Remote host closed the connection) |
20:57:47 | * | vendethiel quit (Ping timeout: 265 seconds) |
21:00:26 | * | eigenlicht quit (Ping timeout: 272 seconds) |
21:03:24 | * | mbenadda__ joined #nimrod |
21:05:06 | * | eigenlicht joined #nimrod |
21:07:54 | * | mbenadda__ quit (Ping timeout: 250 seconds) |
21:11:37 | * | vendethiel joined #nimrod |
21:13:52 | * | Joe_knock joined #nimrod |
21:19:51 | * | Hakaslak joined #nimrod |
21:32:28 | ldlework | Araq: any luck? |
21:33:46 | Araq | ldlework: sorrry, got distracted |
21:33:51 | Araq | let me upload now |
21:40:38 | * | Mat3 quit (Quit: Verlassend) |
21:42:07 | * | mbenadda__ joined #nimrod |
21:42:14 | * | mbenadda__ quit (Client Quit) |
21:42:25 | * | mbenadda_ joined #nimrod |
21:43:30 | * | superfunc quit (Quit: Page closed) |
21:49:19 | NimBot | nimrod-code/csources bigbreak 2c54ca5 Araq [+46 ±2518 -0]: updated csources for bigbreak |
21:49:28 | Araq | ldlework: ping |
21:49:33 | ldlework | yay |
21:51:37 | NimBot | Araq/Nimrod bigbreak 52a3acb Reimer Behrends [+0 ±1 -0]: Fix method recursion bug.... 2 more lines |
21:51:37 | NimBot | Araq/Nimrod bigbreak 1fc8bab Reimer Behrends [+0 ±1 -0]: Reset location when creating a method dispatcher... 8 more lines |
21:51:37 | NimBot | Araq/Nimrod bigbreak f3d7158 Simon Krauter [+0 ±1 -0]: Fix terminate() and add kill() |
21:51:37 | NimBot | Araq/Nimrod bigbreak bce2d57 Reimer Behrends [+1 ±0 -0]: Added test case for recursive methods. |
21:51:37 | NimBot | 5 more commits. |
21:52:55 | gokr | On my Squeak2Nim calling - 2 hours later and about 8 billion calls. Did the same with the first code using "char*" for a billion calls and that worked too. So it all works. |
21:53:15 | gokr | It was that unloadModule: thingy that isn't working. But who needs to unload :) |
21:54:02 | ldlework | wow that was a lot of changes I just pulled to csources |
21:54:06 | Araq | it's no surprise that unloading doesn't work |
21:54:48 | gokr | I also checked the FFI code - and yes, it copies char* arguments going to Nim - and deallocates them on return, and also copies any char* returned from Nim. |
21:55:24 | ldlework | Araq: I get the same error |
21:55:34 | ldlework | do I need to reclone, or just pull, rebuild csources, then koch |
21:56:36 | Araq | pull from bigbreak |
21:57:12 | Araq | then do: |
21:57:15 | Araq | build.sh |
21:57:33 | fowl | gokr, you fixed the segfault issue from this morning? |
21:57:39 | Araq | use the newly produced 'nim' exe to compile koch and then bootstrap |
21:57:49 | gokr | fowl: Yeah, it seems there really was no issue. |
21:57:56 | Araq | ldlework: the binary's name is now 'nim' |
21:58:10 | ldlework | ah |
21:58:11 | gokr | The problem was me doing "Smalltalk unloadModule: 'testlib' " |
21:58:12 | ldlework | that worked |
21:58:23 | fowl | ah |
21:58:30 | gokr | fowl: That unloads the .so, and upon next call it will reload it. |
21:58:34 | gokr | But then... BOOM. |
21:58:56 | gokr | If I just don't do that (as the doctor says) - it all works fine. |
21:59:08 | gokr | I am soon pushing an updated article. |
22:00:22 | gokr | Now... concat() works because: a) Squeak copies the strings sent to temp memory before passing to Nim b) Nim doesn't GC the returned char* until next time we call Nim at the earliest c) Squeak immediately copies the bytes returned from Nim. |
22:00:46 | Araq | yes. that's how it should be |
22:01:07 | Araq | Varriount, Jehan_, dom96 etc... please any PR now against bigbreak |
22:01:26 | Araq | merging devel to bigbreak is getting tedious |
22:01:43 | Araq | or maybe I should merge bigbreak to devel? |
22:01:52 | gokr | fowl: So I'm a happy clam :) |
22:02:00 | Araq | oh well, what can go wrong? |
22:05:16 | Jehan_ | Araq: Sure, except for showstoppers, I take it? |
22:06:30 | Jehan_ | W.r.t. merging bigbreak into release, wouldn't that incorporate all the breaking changes into 0.9.8 or whatever? |
22:06:36 | Jehan_ | s/release/devel |
22:08:03 | Araq | well I need to update master, it should be 0.9.7 |
22:08:19 | Araq | devel will be bigbreak, so 0.10.0 |
22:08:26 | Jehan_ | Okay, I see. |
22:08:30 | Araq | which is not released so hrm |
22:08:52 | Jehan_ | In which case, just merge devel into master and rename bigbreak to devel? |
22:09:19 | Araq | I already merged it into master today |
22:09:30 | gokr | Thanks everyone for helping on that Squeak2Nim thing btw, letting that go for now, but yet another article :) |
22:09:36 | Araq | ah, I didn't know one can rename |
22:10:55 | Araq | well we need an odd number, so it's 0.10.1, right? |
22:11:06 | Jehan_ | Araq: Still not sure about the value of a special syntax for list comprehensions. |
22:11:29 | Araq | Jehan_: for me 'future' means 'playground' |
22:11:31 | Jehan_ | Hmm, 0.10.-1 doesn't work, I think. |
22:11:38 | Jehan_ | Araq: Yeah, that's understood. |
22:14:47 | Araq | well we can't release 0.10.0 anyway ... lots of people already have a compiler that pretends to be 0.10.0 |
22:14:58 | Araq | so it'll be 0.10.2 then |
22:15:49 | Varriount | Araq: We're releasing bigbreak? |
22:16:07 | Varriount | I was under the impression that (eventually) bigbreak would just be merged into devel, then deleted. |
22:16:38 | Araq | Varriount: not tonight. but since it's named "devel" we can merge it tonight, right? |
22:16:39 | Jehan_ | Varriount: devel is constantly being merged into bigbreak, so they should be pretty much in sync. |
22:16:51 | Varriount | Araq: I'll prioritize issues when I get home. |
22:17:03 | Araq | sure no worries |
22:19:35 | Araq | Jehan_: how can I rename branches? |
22:20:15 | flaviu | Araq: git branch --help; /rename |
22:20:15 | Jehan_ | Araq: git branch -m |
22:20:42 | Jehan_ | Note that if you rename to an existing branch, that other branch will be deleted. |
22:21:05 | flaviu | Jehan_: that's -M |
22:21:14 | Jehan_ | So, you'll have to merge devel into master first. |
22:21:53 | ldlework | Man this is ridiculous. I compiled libtcod a few weeks ago. Haven't touched it. And now recompiling gives me errors. |
22:22:16 | Jehan_ | flaviu: It's what happens if you rename, I didn't say it's what happens if you rename using "git branch -m" :) |
22:23:00 | Jehan_ | What I was trying to communicate was that in git, branches aren't branches in the traditional sense, but simply names that point to specific commits. |
22:23:28 | ldlework | Can anyone help me figure out why this isn't working? https://gist.github.com/dustinlacewell/078ff38ca8b300a936bd |
22:23:35 | ldlework | Shouldn't RShift be something that's part of SDL? |
22:24:25 | Araq | ldlework: bigbreak is case sensitive (partially), so it should be rshift |
22:24:48 | ldlework | Araq: I'll try that thanks for the hint |
22:25:12 | Araq | and please make PRs against any babel/Nimble package that you encounter |
22:25:54 | Araq | *any broken |
22:26:21 | reactormonk | yup, bigbreak does deserve its name. |
22:26:57 | ldlework | Araq: it worked! |
22:30:06 | ldlework | hmm |
22:30:18 | ldlework | But now the BSP example causes it to hang |
22:30:32 | ldlework | spinning at 100% |
22:30:34 | ldlework | yikes |
22:31:20 | ldlework | aaaaand, SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
22:31:43 | ldlework | note: I have *not* git-pulled on libtcod-nim (there haven't been any updates anyway) |
22:33:09 | ldlework | I guess I should just ignore it? |
22:35:08 | ldlework | I think it is because its using the nil keyword? |
22:35:12 | ldlework | was nil deprecated? |
22:36:49 | flaviu | That'd be a bit crazy |
22:36:51 | EXetoC | yes, as a synonym for discard |
22:37:22 | ldlework | EXetoC: so do you check if a value is 'discard' or? |
22:38:22 | EXetoC | no it was deprecated for that situation only. there's still the value nil |
22:38:35 | * | mbenadda_ quit (Read error: Connection reset by peer) |
22:39:03 | * | mbenadda_ joined #nimrod |
22:39:04 | EXetoC | "if bla: nil" discard should be used in that situation. both could be used before |
22:39:29 | EXetoC | though you still need nil in type variant blocks. I'm sure that's unintended |
22:42:01 | fowl | discard makes slightly less sense there EXetoC |
22:43:21 | EXetoC | nil just being a value makes sense to me. it's not really one in that situation imo |
22:47:25 | EXetoC | it's just for the sake of satisfying the grammar rules in both cases, right? |
22:49:26 | ldlework | lol did anything happen in bigbreak that would change the result of arithmatic? |
22:49:34 | * | Jehan_ quit (Quit: Leaving) |
22:51:50 | ldlework | All the numbers in this program are just way too huge now |
22:51:50 | EXetoC | I hope 1 + 1 still equals 2 |
22:52:01 | ldlework | which is why it hangs now |
22:52:14 | ldlework | because its trying to generate a map of billions by billions |
22:53:02 | flaviu | ldlework: gdb? |
22:53:16 | ldlework | flaviu: I dont' know how to use it very well |
22:53:36 | flaviu | Unfortunately I don't either :P |
22:57:50 | fowl | weird arithmetic? i doubt it |
23:02:23 | * | hopla joined #nimrod |
23:03:08 | hopla | I am porting sse/avx intrinsics. Is there anyway to have underscore as a first character for types and functions (just to have same naming as C)? |
23:04:25 | flaviu | hopla: No, but there is a way to avoid mangling with a custom name. |
23:04:27 | fowl | hopla, use the importc pragma |
23:04:31 | ldlework | Okay so, calling bsp_new_with_size(0, 0, SAMPLE_SCREEN_WIDTH, SAMPLE_SCREEN_HEIGHT) results in a BSP node with it's Y set to some huuuuuuuuuuuuuuuge number. |
23:04:50 | flaviu | ldlework: sounds like confusion with signs |
23:05:12 | ldlework | flaviu: like signed vs unsigned not being checked at the nim/c border? |
23:05:16 | ldlework | ..or something? |
23:05:39 | hopla | fowl: this is what I am doing. But the nim name cannot have underscore as a first argument. See: https://gist.github.com/anonymous/e6ce63727e543b17a4e7 |
23:05:51 | fowl | er flaviu is right you can't have an identifier like _foo at all in nimrod |
23:05:52 | flaviu | ldlework: that sounds about right. Is there any code I can take a look at? |
23:06:06 | hopla | flaviu: ok! |
23:06:29 | fowl | hopla, thats correct, also use header:"<xmm...>" on the types instead of emitting #include |
23:06:48 | flaviu | Yep, last time I looked at the compiler that was coded into the parser, without any sort of flag on it. |
23:06:50 | hopla | fowl: thanks! |
23:06:59 | hopla | fowl: I'll do it. |
23:07:12 | * | Francisco quit (Ping timeout: 244 seconds) |
23:07:50 | * | Francisco joined #nimrod |
23:07:51 | flaviu | hopla: If you'd like, you can patch the compiler so that it'll work in 99% of cases. You could get issues with hygienic macros if you tried hard enough though. |
23:08:26 | hopla | Also, there will be need for the user to enable these features for gcc or msvc (using compiler flags). Is there a proper way to do it with nim (forcing flags when required)? This is true for sse/sse2 in 32 bits and then for everything else for x64 and x64. |
23:08:37 | hopla | x86 and 64 |
23:09:01 | hopla | flaviu: I am fine with mm_add_ps. Just a matter of taste anmd compatiblity I guess. |
23:09:04 | fowl | hopla, yes use the passC/passL pragmas to pass options to the c compiler or linker |
23:09:51 | hopla | fowl: Is it going to be per module? Basically, if I use xmmintrin module, then everything using it must turn the flags on? |
23:10:15 | fowl | no just in that module |
23:10:16 | * | BlaXpirit-UA quit (Quit: Quit Konversation) |
23:10:53 | ldlework | flaviu: does Nim even distinguish between uint and int? |
23:11:05 | Araq | ldlework: yes it does |
23:11:19 | ldlework | When I try to set the struct property to uint I get, |
23:11:21 | ldlework | samples.nim(859, 14) Error: type mismatch: got (int literal(1), uint) |
23:11:24 | hopla | fowl: can I create a macro in the module that we can use then in the module including it. this macro will turn the flag on then. Is that a good way to do it? |
23:11:33 | flaviu | yeah, and I think that it uses that info for the signed shifts |
23:11:42 | flaviu | ldlework: import unsigned? |
23:11:49 | fowl | hopla, i dont think you need to do that |
23:12:22 | Araq | hopla: identifiers starting with _ are ugly and hence not allowed |
23:12:35 | ldlework | hmm I'm starting to get confused :P |
23:13:45 | fowl | ldlework, unsigned stuff is in a different module (unsigned) |
23:13:58 | ldlework | fowl: sure but I'm not really sure what to change |
23:14:09 | * | hopla2 joined #nimrod |
23:14:35 | fowl | brb |
23:14:43 | * | Trustable quit (Quit: Leaving) |
23:14:45 | ldlework | It seems odd that I have to handle unsigned things so explicitly |
23:14:56 | ldlework | Also did this change? Because libtcod's examples were compiling fine before... |
23:14:56 | hopla2 | Araq: ok for me. I don't care :-) |
23:15:05 | Araq | also it's usually better to introduce names that make sense as opposed to copy the names from C |
23:15:34 | fowl | nooo a c wrapper should have the same interface as it does on c |
23:15:38 | flaviu | Araq: I've mostly seen 1:1 wrappers, and then a higher level wrapper on top that |
23:15:49 | * | hopla quit (Ping timeout: 246 seconds) |
23:15:53 | hopla2 | Araq: they are pseudo for instructions name. _mm_add_ps is actually addps |
23:16:01 | hopla2 | I can pick up addps |
23:16:08 | Araq | hey, you can even introduce operators instead of mxopcAddFluffy |
23:16:34 | ldlework | I have a feeling this is because C uses unsigned ints by default? |
23:16:38 | Araq | fowl: it depends on whether that even counts as a "C wrapper" |
23:16:40 | ldlework | So likely libtcod is using unsigned ints |
23:16:42 | hopla2 | Araq: I want to have plain wrappers (as close as possible from c) and then wrappers |
23:16:51 | ldlework | so I will have to convert the entirety of the source to use explicitly denoted unsigned ints? |
23:16:56 | Araq | ldlework: C doesn't use unsigned by default, whatever that means |
23:17:04 | ldlework | Araq: https://github.com/Araq/Nimrod/wiki/Nimrod-for-C-programmers |
23:17:18 | ldlework | Unsigned ints | Yes (by default) | Yes (not by default) |
23:17:28 | Araq | so? |
23:17:40 | hopla2 | for example something like that: https://github.com/embree/embree/blob/master/common/simd/ssef.h |
23:17:43 | Araq | ohhh a wiki page with an error. never seens that before |
23:17:47 | Araq | *seen |
23:18:13 | hopla2 | I like embree simd code. It is clean and well abstract but I would like to have "bare metal" intrinsics also |
23:20:08 | hopla2 | Araq: I don't care about '_'. If used nowhere, I agree it is just ugly to have an exception for that. |
23:20:49 | ldlework | I'm getting, samples.nim(859, 14) Error: type mismatch: got (int literal(1), uint) |
23:20:55 | ldlework | if minx > 1: dec(minx) |
23:20:59 | ldlework | unsigned is imported |
23:21:50 | Araq | ldlework: well, you can't really do signed -= unsigned |
23:21:58 | Araq | maybe learn about type conversions |
23:22:11 | ldlework | This is worrying. |
23:22:31 | ldlework | All of the other bindings, go, rust, etc, just have it defined as "int" and it works |
23:22:38 | ldlework | Further, this worked before I upgraded to bigbreak |
23:23:26 | Araq | yeah I can imagine why |
23:23:46 | ldlework | Araq: you can? |
23:24:18 | Araq | some wrapper has UInt, somewhere it's uint, now it's system.uint instead of wrapper.UInt |
23:24:30 | Araq | and the misery starts |
23:24:45 | Araq | the fix is to update the wrapper |
23:25:05 | ldlework | Araq: by wrapper you mean 'libtcod' |
23:25:12 | Araq | I guess so |
23:25:15 | flaviu | Araq: Not being able to do `signed -= unsigned` sounds like a misfeature at best |
23:25:43 | ldlework | Here is how the wrapper's structure is defined, https://gist.github.com/dustinlacewell/14b318b193b7e05c7535 |
23:25:44 | * | superfunc joined #nimrod |
23:26:05 | ldlework | Its the X, Y, W, H that seem to get enormous values when this structure comes back from the C barrier back into Nim |
23:26:09 | EXetoC | flaviu: don't like explicit casting? |
23:26:16 | Araq | flaviu: I don't care. if you wanna play the game "I don't care about types or proper range checking or bugs" you're free to continue to use C |
23:26:47 | ldlework | Araq: so, this wrapper never defined it as UInt or anything, it was always just 'int' |
23:27:22 | Araq | most serious developers like fewer implicit conversions for the numeric type zoo, afaict |
23:27:48 | ldlework | It does use 'uint8' in some places not relevant to this behavior |
23:28:27 | Araq | ldlework: well gist it and we may be able to help you. |
23:31:10 | hopla2 | Other good naming can be to take something like LLVM intrinsics names: x86_sse_add_ps |
23:32:41 | Araq | where "good naming" as usual ignores usage statistics |
23:33:16 | Araq | hint: how often do you want to read x86_sse_ in your SSE heavy code? |
23:33:20 | flaviu | EXetoC: I don't really mind explicit casting, but looking at that it's not really a good idea - looking at context to decide to convert or not is ridiculous. however, `let v: int32 = uint8(32)` is perfectly safe and not implicit, while `float32(0x7FFF_FFFF_FFFF_FFF)` is done implicitly and is unsafe |
23:33:31 | hopla2 | I am not sure. We can go for short like addps or more explicit. |
23:34:51 | hopla2 | Araq: I don't really mind honestly. I guess it is more about consistency with the rest of nim and I am a nim newbie. So, pick your choice :-) |
23:35:18 | Araq | name the module x86_see and the proc addps |
23:36:23 | Araq | ldlework: well the libtcod-nim wrapper is almost a year old and hasn't been updated afaict |
23:36:30 | ldlework | Araq: that's what I'm attempting to do |
23:36:41 | ldlework | Araq: I have every sample working with bigbreak except this last one |
23:36:43 | * | hsuh quit (Ping timeout: 255 seconds) |
23:36:48 | ldlework | I want to take over maintainence ownership of the lib |
23:36:51 | * | johnsoft quit (Ping timeout: 272 seconds) |
23:37:01 | ldlework | Araq: I'm committing my updates to my own fork now |
23:37:06 | Araq | oh ok, sorry |
23:37:06 | * | johnsoft joined #nimrod |
23:37:35 | ldlework | okay, https://github.com/dustinlacewell/libtcod-nim |
23:37:52 | ldlework | If you compile libtcod first, then go into samples and do ./build-samples.sh |
23:37:54 | ldlework | It should compile fine |
23:38:10 | ldlework | run the samples and go down to BSP example, and I have logged some output |
23:38:20 | ldlework | You can notice that the X, Y values for the node are super huuuge |
23:38:43 | * | askatasuna quit (Quit: WeeChat 1.0.1) |
23:39:06 | ldlework | The BSP struct that we're passing to C and getting back, is defined in libtcod/lib/bsp.nim |
23:39:16 | * | hopla2 quit (Ping timeout: 246 seconds) |
23:39:34 | ldlework | The code that uses it is in libtcod/samples/samples.nim line 945 |
23:39:34 | * | hopla joined #nimrod |
23:39:45 | ldlework | This is where we get back the BSP object from the C side |
23:39:48 | hopla | Araq: so go for it. Thanks! |
23:39:52 | ldlework | Its attributes are already huge at this point |
23:40:08 | ldlework | So the C must be creating the struct and passing us back a pointer to it, and we're interpreting the attributes as the wrong int type |
23:40:09 | hopla | Araq: BTW, I think we really need a forceinline/always_inline. inline is a bit of disaster in most C compilers. It is kind of critical for this kind of code to get inlined for sure (well, msvc can be still reluctant but gcc / clang / ICC will comply) |
23:41:15 | Araq | hopla: BTW I think you should learn to read assembler code. Most C compilers manage to inline 1-liners, even *without* inline. |
23:42:07 | Araq | ldlework: what's the struct's name? |
23:42:11 | Araq | where is it declared? |
23:42:12 | * | hsuh joined #nimrod |
23:43:20 | hopla | Araq: please don't prejudge me. C compilers can fail to inline leafs in the call tree. __forceinline is the rule for this kind of code and avoid any problem with C compilers |
23:44:18 | Araq | sounds to me like some random rule that stopped making sense a decade ago |
23:44:40 | hopla | Araq: open xmmintrin.h from Clang and see by yourself how they are defined. |
23:45:09 | Araq | so? what does that prove? |
23:45:22 | Araq | that people rarely touch what works |
23:45:27 | fowl | ldlework, try making bsp_new_with_size take cint |
23:47:31 | hopla | Araq: please do not start a flameware. It proved nothing. It is just a good practice and avoid any inlining issue. I don't understand the problem you have with that. |
23:47:46 | * | mbenadda_ quit (Quit: Be back later ...) |
23:48:35 | fowl | ldlework, change the declaration in bsp.nim i mean |
23:49:29 | Araq | it's not "good practice". it's archaic. what if compiler start to screw up forceinline? do we then have reallyforceinline? and is that then a "best practice"?! |
23:50:13 | Araq | however you're free to patch N_INLINE so that it maps to __forceinline ... |
23:51:21 | ldlework | fowl: compiles, crashes the same way |
23:51:31 | ldlework | fowl: what is cint? |
23:51:38 | hopla | Araq: I am practical. I don't care. I know pretty well LLVM. And this is forceinline: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/IPO/InlineAlways.cpp. It is brutal and simple. This: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/IPO/InlineSimple.cpp is full of bullshit heuristics. I am sorry. This is life of backends. Not my fault. |
23:51:42 | ldlework | Araq: I mentioned that the struct is defined in bsp.nim |
23:52:31 | Varriount | Araq: I'm home. |
23:53:17 | * | Sembei quit (Ping timeout: 264 seconds) |
23:53:46 | hopla | Araq: I am fine with inline btw. But, I would like to add force_inline ABI. Would it be possible? I do not think forceinline for everything is a good idea. Sounds more like a terrible idea actually |
23:53:48 | fowl | ldlework, cint is "int" in c, wrappers should use it. gcc on my machine uses 32 bit ints but nimrod uses 64 |
23:55:20 | * | xenagi joined #nimrod |
23:57:09 | ldlework | fowl: welllllll, that fixed the issue but I still get a segfault :( |
23:57:25 | Araq | hopla: mapping .inline to __forceinline (if available) is fine with me. I don't see the point in a "maybe inline, maybe not" inline directive |
23:57:37 | ldlework | IE, its printing out normal values now, but it crashesh |
23:57:56 | fowl | do you get a stacktrace |
23:58:05 | Araq | hopla: the "maybe" is what a modern optimizer does already anyway |
23:58:06 | ldlework | How do you tell where the: SIGSEGV: Illegal storage access. (Attempt to read from nil?) is happening? |
23:58:10 | ldlework | fowl: no :( |
23:58:15 | fowl | compile with -d:debug |
23:58:18 | ldlework | oh okay |
23:59:26 | ldlework | fowl: could not load: libtcod_debug.so |
23:59:38 | ldlework | fowl: I recompiled libtcod with -d:debug but it doesn't produce .so's |