00:05:45 | * | bjz joined #nim |
00:17:33 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:21:46 | * | PMunch joined #nim |
00:21:55 | * | chemist69 quit (Ping timeout: 272 seconds) |
00:25:43 | * | chemist69 joined #nim |
00:28:29 | * | brson quit (Quit: leaving) |
00:36:22 | * | elrood quit (Quit: Leaving) |
00:51:17 | * | libman quit (Remote host closed the connection) |
01:09:03 | * | PMunch quit (Quit: leaving) |
01:14:06 | * | kulelu88 quit (Quit: Leaving) |
01:40:24 | * | chemist69 quit (Ping timeout: 265 seconds) |
01:53:14 | * | chemist69 joined #nim |
02:14:38 | * | gangstacat joined #nim |
02:34:39 | * | Jesin quit (Quit: Leaving) |
02:47:56 | * | bjz joined #nim |
02:52:54 | * | bjz quit (Ping timeout: 265 seconds) |
02:54:52 | * | bjz joined #nim |
03:07:42 | * | StarBrilliant quit (Ping timeout: 250 seconds) |
03:09:22 | * | StarBrilliant joined #nim |
03:43:59 | * | ARCADIVS joined #nim |
03:54:06 | * | Demon_Fox joined #nim |
04:09:27 | * | dddddd quit (Remote host closed the connection) |
04:18:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:40:43 | * | bjz joined #nim |
05:51:19 | FromGitter | <girvo> Hey all :) |
05:51:35 | FromGitter | <gokr> Hey |
05:52:27 | ftsf | o/ |
05:52:47 | FromGitter | <girvo> What's best practice for `ref object` types in terms of naming? Better to create a regular `object` type, `Example`; what would one call the `ref object` version? Or is that just not needed, better to define them all as `object` and just use `thing: var Example` in my proc type signatures? |
05:53:10 | ftsf | i've seen them as FooPtr which is a bit confusing |
05:53:28 | FromGitter | <girvo> Haha yeah, I've seen the same |
05:53:42 | FromGitter | <girvo> `ExampleRef` maybe? |
05:53:56 | FromGitter | <gokr> There is a convention described |
05:54:14 | FromGitter | <gokr> In manual IIRC |
05:54:48 | FromGitter | <Araq> in NEP-1 |
05:55:09 | FromGitter | <girvo> Brilliant, thanks |
05:55:31 | FromGitter | <gokr> I think BlaPtr and BlaRef but the commonly used variant without suffix |
06:07:05 | * | yglukhov quit (Ping timeout: 248 seconds) |
06:11:47 | * | nsf joined #nim |
06:33:24 | * | gokr joined #nim |
06:41:07 | * | brechtm joined #nim |
06:44:10 | * | GustavoLapasta joined #nim |
06:48:30 | * | GustavoLapasta quit (Ping timeout: 264 seconds) |
06:52:14 | * | Arrrr joined #nim |
07:06:44 | FromGitter | <dom96> It's FooObj and FooRef. But only if both the ``object`` and ``ref object`` are useful. |
07:07:01 | FromGitter | <dom96> if all that is used is the ``ref object`` then only define it and name it ``Foo``. |
07:07:16 | FromGitter | <girvo> makes sense @dom96 -- only `ref object` is needed for this particular type, so I'll leave it as-is! |
07:07:38 | FromGitter | <girvo> Figured I'd check best-practice to make sure it was okay :) |
07:14:12 | * | xet7 joined #nim |
07:17:06 | * | bjz_ joined #nim |
07:17:46 | * | bjz quit (Ping timeout: 265 seconds) |
07:21:04 | * | xet7 quit (Quit: Leaving) |
07:39:05 | * | yglukhov joined #nim |
07:40:28 | * | Andris_zbx joined #nim |
07:40:33 | * | yglukhov quit (Read error: Connection reset by peer) |
07:40:55 | ftsf | hmm mysterious, my app segfaults when compiled with 0.15 |
07:40:58 | * | yglukhov joined #nim |
07:43:26 | enthus1ast | ftsf, maybe delete nimcache |
07:43:53 | ftsf | yea just thought to try that, but same |
07:44:58 | ftsf | ahh actually maybe it's not nim's fault |
07:45:07 | ftsf | (i did an os upgrade which upgraded nim, haven't rebooted yet) |
07:45:16 | ftsf | might be the graphics drivers |
07:48:03 | ftsf | will reboot and see if that fixes it |
07:48:17 | * | ftsf quit (Quit: Leaving) |
07:50:29 | * | ftsf joined #nim |
07:51:38 | ftsf | hmm nope still crashing when compiling with 0.15 |
07:52:02 | ftsf | 0.14.2 is fine |
07:52:28 | enthus1ast | whats the message? |
07:53:14 | ftsf | Segmentation fault (core dumped) |
07:53:24 | ftsf | i'll try it in gdb |
07:54:34 | ftsf | https://gist.github.com/ftsf/e9106e1e69e089670424c9acb04506eb |
07:54:44 | ftsf | ahh in setupforeignthreadgc |
07:59:07 | * | fredrik92 joined #nim |
08:00:13 | ftsf | doesn't seem like many changes in that area between versions |
08:01:20 | ftsf | whitespace and comment changes |
08:02:24 | ftsf | bottom and bottomData are now threadvars... |
08:07:41 | FromGitter | <Araq> ftsf: I think setForeignThreadGc needs to call initAllocator() |
08:07:51 | FromGitter | <Araq> can you try it and create a PR? |
08:07:59 | FromGitter | <Araq> 0.15.2 is just around the corner |
08:08:00 | ftsf | Araq_, sure |
08:11:08 | ftsf | hmm when running a nim installed in a non-standard directory do I need to tell it where to find nim's lib dir? |
08:14:12 | ftsf | lib/pure/collections/tableimpl.nim(76, 6) Error: undeclared identifier: 'mustRehash' |
08:14:35 | * | xet7 joined #nim |
08:14:52 | ftsf | but mustRehash appears to be defined in tableimpl.nim on line 23 |
08:18:53 | * | enthus1ast quit (Ping timeout: 252 seconds) |
08:20:18 | * | aaasad_ quit (Ping timeout: 264 seconds) |
08:33:10 | * | fredrik92 quit (Read error: Connection reset by peer) |
08:36:03 | * | xet7 quit (Quit: Leaving) |
08:37:04 | * | stk joined #nim |
08:37:09 | * | stk left #nim (#nim) |
08:38:48 | ftsf | Araq, looks like that fixes it \o/ |
08:39:24 | * | xet7 joined #nim |
08:51:30 | * | desophos quit (Ping timeout: 264 seconds) |
08:57:00 | ftsf | pico.nim(1155, 12) Error: internal error: genLiteral(nkHiddenCallConv) any idea what this means? |
08:57:30 | ftsf | occurs at case evt.cbutton.button: of SDL_CONTROLLER_BUTTON_A: |
08:57:51 | ftsf | (unreleated to version change) |
09:18:30 | * | derka quit (Ping timeout: 264 seconds) |
09:23:39 | * | fredrik92 joined #nim |
09:23:44 | * | couven92 joined #nim |
09:29:41 | * | fredrik92 quit (Disconnected by services) |
09:29:47 | * | couven92 is now known as fredrik92 |
09:30:09 | * | couven92 joined #nim |
09:30:36 | * | derka joined #nim |
09:31:28 | * | couven92 quit (Client Quit) |
09:31:29 | * | fredrik92 quit (Quit: Client disconnecting) |
09:31:48 | * | fredrik92 joined #nim |
09:34:55 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
09:48:36 | * | gangstacat quit (Quit: Ĝis) |
09:55:00 | * | gangstacat joined #nim |
10:01:14 | * | gangstacat quit (Quit: Ĝis) |
10:06:19 | * | gangstacat joined #nim |
10:12:13 | * | gangstacat quit (Read error: Connection reset by peer) |
10:14:37 | * | krux02 joined #nim |
10:23:18 | * | gokr quit (Ping timeout: 264 seconds) |
10:29:31 | Arrrr | Is the pico thing on github? |
10:32:09 | * | enthus1ast joined #nim |
10:38:03 | * | Zer0Pings quit (Ping timeout: 276 seconds) |
10:38:14 | ftsf | Arrrr, not yet no |
10:38:22 | ftsf | still undergoing a lot of changes |
10:39:18 | * | elrood joined #nim |
10:45:21 | * | brechtm_ joined #nim |
10:46:50 | * | brechtm quit (Ping timeout: 252 seconds) |
10:49:14 | * | brechtm joined #nim |
10:49:57 | * | brechtm_ quit (Ping timeout: 265 seconds) |
11:08:03 | * | gokr joined #nim |
11:11:40 | * | ARCADIVS quit (Quit: ARCADIVS) |
11:16:47 | * | brechtm quit (Remote host closed the connection) |
11:18:51 | * | brechtm joined #nim |
11:19:14 | * | gokr quit (Quit: Leaving.) |
11:23:08 | * | brechtm quit (Ping timeout: 252 seconds) |
11:40:29 | * | yglukhov_ joined #nim |
11:41:02 | * | Arrrr quit (Quit: WeeChat 1.5) |
11:42:38 | * | yglukhov quit (Ping timeout: 265 seconds) |
11:51:41 | * | brechtm joined #nim |
12:04:56 | * | astocko quit (Ping timeout: 272 seconds) |
12:07:50 | * | astocko joined #nim |
12:18:07 | * | ofelas quit (Quit: shutdown -h now) |
12:26:19 | * | ofelas joined #nim |
12:36:13 | * | dddddd joined #nim |
12:55:17 | cheatfate | If i have type `type SomeType = distinct seq[SomeTypeUnit]` how to borrow `[]`, `[]=` from `seq`? |
12:56:27 | * | zielmicha[m] quit (Quit: node-irc says goodbye) |
13:03:33 | * | yglukhov_ quit (Remote host closed the connection) |
13:04:32 | * | yglukhov joined #nim |
13:10:43 | flyx | cheatfate: I believe there's a compiler bug. `proc `[]`(a: SomeType, i: int): SomeTypeUnit {.borrow.}` breaks the compiler. |
13:30:21 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:32:25 | * | fredrik92 quit (Ping timeout: 248 seconds) |
13:34:50 | * | fredrik92 joined #nim |
13:58:42 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:15:23 | * | derka quit (Ping timeout: 272 seconds) |
14:16:34 | * | desophos joined #nim |
14:26:10 | * | pregressive joined #nim |
14:26:18 | * | pregressive quit (Remote host closed the connection) |
14:27:43 | * | pregressive joined #nim |
14:28:09 | * | derka joined #nim |
14:30:22 | krux02 | cheatfate: as Araq told me, using distinct is discouraged. I think it should be marked as experimental feature, because of the way he thinks about it at the moment. |
14:30:36 | krux02 | so expect some bugs |
14:30:39 | * | krux02 quit (Quit: Leaving) |
14:30:53 | ftsf | mmm it seem painful to use |
14:31:03 | ftsf | nice idea though |
14:31:22 | Araq_ | I've never said anything like that |
14:31:48 | Araq_ | borrowing of [] is not supported and 0.15 should not crash on it |
14:39:08 | * | NimBot joined #nim |
14:39:11 | * | Sentreen joined #nim |
14:39:12 | * | fredrik92 joined #nim |
14:39:13 | * | elrood joined #nim |
14:39:20 | * | arnetheduck joined #nim |
14:43:05 | FromGitter | <dom96> There is no way `distinct` should be considered experimental |
14:57:04 | Sentreen | Is there a way to define a command line value in nimscript? As in, I can pass something like '-d:majorVersion=1' on the command line, but I cannot seem to get the same thing to work in my nimscript build file |
14:57:52 | Sentreen | Having `--d:majorVersion=1` in my nimscript file just gives me `???(???, 0) Error: invalid command line option: '--majorVersion = 1'` |
14:58:10 | * | nicanaca0 joined #nim |
15:01:25 | cheatfate | If i have type `type SomeType = distinct seq[SomeTypeUnit]` how to borrow `[]`, `[]=` from `seq`? |
15:01:28 | cheatfate | sorry |
15:01:30 | cheatfate | missclick |
15:09:41 | flyx | Sentreen: "switch("d", "majorVersion=1") |
15:09:55 | flyx | --d:"majorVersion=1" might also work |
15:10:11 | flyx | erm, drop the leading " from switch |
15:10:54 | Sentreen | --d:"stringvalue" doesn't work, but the first one does |
15:11:30 | Sentreen | feels like a pretty hacky workaround though, perhaps a define macro could help there |
15:11:35 | Sentreen | Thanks though! |
15:12:19 | flyx | actually, `--` is the hack. switch is the actual proc that is being called. see http://nim-lang.org/docs/nimscript.html#--.t,untyped,untyped |
15:13:59 | Sentreen | I know that, I meant that building the "majorVersion=1" part feels sort of hacky |
15:15:06 | Sentreen | I just ended up creating a simple template: `template define(key, val: string) = switch("define", "$#=$#" % [key, val])` |
15:15:14 | * | derka quit (Ping timeout: 252 seconds) |
15:16:10 | flyx | yeah well. transforming `--` into a macro would make it possible to detect an AST that contains `majorVersion=1` as Asgn and handle it as special case. not sure if that would be worth the effort though |
15:17:08 | Sentreen | Hmmm, it might be, depending on how popular {. intdefine .} and {. stringdefine .} end up being |
15:17:10 | Araq_ | Sentreen: .intdefine and .strdefine should work in nimscript too |
15:19:42 | Sentreen | Not sure I get you Araq_, I want to define the majorVersion in my nimscript, and pass it on as a const to the program I'm compiling |
15:20:14 | Sentreen | I don't think intdefine and stringdefine help me there, unless I want to pass it from the command line into nimscript? |
15:20:32 | Araq_ | oh for that you can share an include file containing the version |
15:21:10 | Araq_ | or you do something like const version = staticRead"version.txt" |
15:21:45 | Sentreen | Hmmm, I didn't think about staticRead yet, that sounds like it might be better than my current approach |
15:26:52 | * | brson joined #nim |
15:27:13 | * | derka joined #nim |
15:47:22 | * | PMunch joined #nim |
15:53:52 | * | pregress_ joined #nim |
15:53:56 | * | pregressive quit (Read error: Connection reset by peer) |
16:03:26 | * | Andris_zbx quit (Remote host closed the connection) |
16:04:25 | * | Trustable joined #nim |
16:06:17 | * | gokr joined #nim |
16:36:25 | * | pregress_ quit (Remote host closed the connection) |
16:39:53 | * | yglukhov quit (Ping timeout: 265 seconds) |
16:42:46 | joshbaptiste_ | hey guys.. Python guy who looked over Go,Rust and Nim just fits the bill had a quick question about imports |
16:43:28 | joshbaptiste_ | import foo .. which contains bar .. after importing foo .. bar is automatically in the name scope? |
16:44:20 | flyx | joshbaptiste_: yes |
16:45:13 | cheatfate | flyx, i dont think so |
16:45:26 | joshbaptiste_ | ok.. im reading code samples on github and find it hard to find where certain names are coming from |
16:46:36 | flyx | you can get the Python behavior with `from foo import nil`. you'd then have to write foo.bar |
16:47:11 | joshbaptiste_ | ah .. |
16:48:14 | * | fredrik92 quit (Quit: Client disconnecting) |
16:55:15 | federico3 | joshbaptiste_: mind the asterisk on right of the proc declaration |
16:56:26 | * | enthus1ast quit (Ping timeout: 252 seconds) |
16:56:37 | * | enthus1ast joined #nim |
16:58:03 | * | gokr quit (Ping timeout: 256 seconds) |
17:00:29 | joshbaptiste_ | federico3: k |
17:07:08 | * | filwit joined #nim |
17:07:26 | * | derka quit (Ping timeout: 252 seconds) |
17:08:15 | filwit | hey folks, is there a reason why i can't make a macro which returns an `nnkObjectTy` and then use it like `type X = objectMacro(...)` ? |
17:09:16 | filwit | I can make a macro which returns simply some other type, then call it like that, but if I try to return a ObjectTy i get an "invalid expression" error |
17:09:39 | * | Demon_Fox quit (Quit: Leaving) |
17:09:41 | filwit | is that an oversight or purposeful restriction? |
17:11:10 | filwit | I mean, I can't see why it would be purposeful since you can just make a `type Container[T:tuple] = object fields: T` and then make a macro which returns `Container[(...)]` which essentially allows you to construct the type fields |
17:11:52 | Araq_ | filwit: it's very hard to support |
17:12:05 | Araq_ | requires a blog post to explain I guess |
17:12:13 | filwit | but i don't know for sure ofc, which is why i'm asking. Would like to use this for something (i can work around this like i just described above) |
17:15:44 | flyx | filwit: you can also have objectMacro(X, ...) which will generate `type X = …` |
17:15:56 | * | pregressive joined #nim |
17:19:01 | * | enthus1ast quit (Ping timeout: 256 seconds) |
17:20:42 | * | derka joined #nim |
17:22:35 | * | Kaini quit (Remote host closed the connection) |
17:23:20 | * | Kaini joined #nim |
17:25:18 | * | filwit quit (Read error: Connection timed out) |
17:25:53 | * | filwit joined #nim |
17:28:13 | * | fredrik92 joined #nim |
17:29:26 | * | yglukhov joined #nim |
17:34:06 | * | yglukhov quit (Remote host closed the connection) |
17:34:21 | * | yglukhov joined #nim |
17:43:57 | * | Trustable quit (Remote host closed the connection) |
17:50:21 | * | Matthias247 joined #nim |
18:07:13 | baabelfish | "delete, deldel is supposed to be faster than delete, because it does not keep the order; delete keeps the order" quite odd convention |
18:08:13 | Araq_ | faster to type, faster at runtime |
18:08:19 | Araq_ | makes perfect sense :P |
18:08:24 | baabelfish | indeed :D |
18:08:47 | baabelfish | a.i[d](s) |
18:08:49 | filwit | `deleteFast` would help code readers more... |
18:09:05 | filwit | Araq_, did you see my question above? |
18:09:21 | Araq_ | I answered it? |
18:09:28 | filwit | Araq_.... errr.. sorry, my IRC client fucked up |
18:09:34 | filwit | just saw your response now in the logs |
18:10:29 | filwit | okay thanks for the response |
18:11:38 | * | filwit quit (Read error: Connection reset by peer) |
18:12:02 | * | filwit joined #nim |
18:16:20 | * | nsf quit (Quit: WeeChat 1.5) |
18:30:33 | * | yglukhov quit (Remote host closed the connection) |
18:31:15 | * | yglukhov joined #nim |
18:37:21 | * | filwit quit (Quit: Leaving) |
18:50:45 | * | irrequietus joined #nim |
18:51:05 | * | fredrik92 quit (Read error: Connection reset by peer) |
18:57:37 | * | brechtm_ joined #nim |
18:58:39 | * | yglukhov quit (Remote host closed the connection) |
18:58:54 | * | yglukhov joined #nim |
19:01:17 | * | brechtm quit (Ping timeout: 252 seconds) |
19:02:46 | * | fredrik92 joined #nim |
19:05:23 | * | Jesin joined #nim |
19:06:55 | * | Kingsquee joined #nim |
19:17:14 | * | brson quit (Ping timeout: 252 seconds) |
19:29:58 | * | brechtm_ quit (Remote host closed the connection) |
19:30:44 | * | brechtm joined #nim |
19:30:46 | * | brson joined #nim |
19:33:20 | * | kulelu88 joined #nim |
19:44:58 | * | fredrik92 quit (Quit: Shutting down...) |
19:47:38 | * | fredrik92 joined #nim |
19:48:20 | * | libman joined #nim |
19:49:03 | * | fredrik92 quit (Client Quit) |
19:49:38 | * | M-Quora quit (Quit: node-irc says goodbye) |
19:51:48 | * | fredrik92 joined #nim |
19:55:26 | * | nsf joined #nim |
20:13:46 | * | yglukhov quit (Remote host closed the connection) |
20:14:20 | * | yglukhov joined #nim |
20:14:41 | * | brson quit (Ping timeout: 256 seconds) |
20:18:48 | * | gangstacat joined #nim |
20:19:03 | * | confundus joined #nim |
20:26:36 | * | confundus quit (Quit: leaving) |
20:28:41 | * | brson joined #nim |
20:32:29 | * | yglukhov quit (Remote host closed the connection) |
20:32:41 | * | yglukhov joined #nim |
20:40:12 | dom96 | Araq_: Perhaps we should put out some announcement to packagers that Nimble should now be installed as part of Nim? |
20:41:04 | dom96 | Also, does `koch install` install nimble? |
20:42:49 | Araq_ | 'koch install' needs to die. |
20:44:26 | dom96 | okay, and what should the replacement be? |
20:45:13 | Araq_ | our installation instructions are up to date. |
20:46:51 | * | gokr joined #nim |
20:50:19 | Araq_ | the replacement should be 'koch distrohelper' because that's what 'koch install' is supposed to do |
20:52:23 | * | brson quit (Ping timeout: 252 seconds) |
20:55:41 | dom96 | okay, so users shouldn't use it at all? |
20:55:59 | dom96 | i.e. the only way for users to install manually is using the "change your PATH" method? |
20:58:46 | * | Trustable joined #nim |
21:01:07 | * | fredrik92 quit (Read error: Connection reset by peer) |
21:01:40 | Araq_ | there is still the install.sh script |
21:01:48 | Araq_ | it too is mentioned in our docs. |
21:02:04 | Araq_ | but yes, the official method is to change the path. |
21:03:30 | * | brson joined #nim |
21:03:31 | Araq_ | to put it into /usr/bin, use your OS's package manager. |
21:05:07 | LindsayLojban | This is sensible |
21:05:24 | LindsayLojban | Is there a Docker distribution yet? |
21:05:29 | LindsayLojban | Or Autobuild? |
21:07:10 | Araq_ | yes, according to our website, we have Docker support |
21:07:42 | dom96 | if install.sh still exists then packagers shouldn't be using ./koch install at all |
21:08:48 | Araq_ | what packagers do is still a mystery to me |
21:09:19 | Araq_ | I thought they would have their own tools by now. |
21:10:13 | Araq_ | binaries to /usr/bin, config to /etc, lib+compiler to /usr/lib, done |
21:10:51 | Araq_ | instead it's a never ending story. |
21:11:59 | dom96 | if it was that simple then why isn't install.sh simply "cp lib/*.nim /usr/lib/nim/*" etc? |
21:12:08 | dom96 | It lists every file explicitly |
21:12:27 | dom96 | Do you expect packagers to painstakingly update the files that need to be copied? |
21:13:32 | Araq_ | because 'cp' is a tool from 40 years ago, esp. if your usage of it seeks to be posix compliant. |
21:14:14 | Araq_ | the high level description of what goes where is in compiler/installer.ini |
21:14:52 | Araq_ | and yeah, I don't care about beauty in generated code, I'm sorry. |
21:18:34 | dom96 | Why are you talking about the beauty? That's not my point. |
21:18:53 | dom96 | packagers can't parse a .ini file |
21:20:40 | * | fredrik92 joined #nim |
21:21:52 | Araq_ | but they can parse a shell script? |
21:22:51 | Araq_ | they don't have to parse the .ini file anyway, niminst parses it and can build a .deb file or something |
21:23:13 | Araq_ | we never get patches for this mechanism though |
21:23:57 | Araq_ | as I said, what packagers do is a mystery. |
21:24:58 | dom96 | they don't parse a shell script, they execute it |
21:25:43 | dom96 | Every package is just a script that specifies the steps needed to install it |
21:25:49 | dom96 | there is no mystery here |
21:29:50 | Araq_ | how can they execute it? how would uninstall work then? |
21:31:37 | * | Snircle joined #nim |
21:32:40 | euantor | Packing on Linux sucks |
21:33:17 | dom96 | Araq_: The package manager can surely keep track of what files have been copied during the installation of each package |
21:33:27 | euantor | Thousands of different types of packages, some of which only work on some version of some distress and all of which have different ideas about how things should work |
21:35:50 | Araq_ | how does it work? if you execute 'cp' you need some OS specific file system callack hook to figure what changed, I think. do package managers use this mechanism? |
21:36:35 | euantor | I know it's Ruby (ew), but fpm is designed to alleviate these kind of headaches for packagers: https://github.com/jordansissel/fpm |
21:37:13 | dom96 | Araq_: One way is to create a virtual environment. Copy files there and see where they end up. |
21:37:49 | dom96 | basically: ~/myVirtualEnv/{usr, etc, ...} |
21:39:19 | Araq_ | dom96: aha, but this VE step is not part of the installation process, is it? it's a preprocessing right |
21:39:36 | dom96 | Araq_: Depends on the package manager I guess |
21:40:27 | dom96 | federico3: what things make packaging easiest? Like... do you have an example of how typical software is structured that makes it super easy to package? |
21:41:30 | dom96 | Is a script that allows you to specify a virtual env typically what is provided? |
21:41:51 | federico3 | dom96: well, many languages have a pretty standard build system (or a known build "behavior") e.g. C, Python, Ruby, where they generate outputs in a known location. |
21:42:53 | FromGitter | <mraxilus> hello, has anyone used OpenGL from Nim? |
21:43:05 | federico3 | This allowed people to write simple wrapper that can tell which output files are to be "installed"[*] and which aren't (e.g. sources, object files, other byproducts) |
21:43:48 | * | pregressive quit (Remote host closed the connection) |
21:44:21 | * | pregressive joined #nim |
21:44:46 | dom96 | right, but I think that a compiler deserves to be a special case |
21:44:59 | dom96 | how are special cases handled? |
21:45:08 | federico3 | In most cases there is a package building tool that will run the application build (eg. make) in a sandbox (e.g. a chroot or just a temp dir) and then grab the output and place it in a package |
21:46:21 | FromGitter | <mraxilus> I'm trying out Nim for game development and I've encountered an issue that I'm not sure how to resolve |
21:46:22 | federico3 | actually, most compilers are just pretty normal application. You build them from sources, get some binaries as output... |
21:46:41 | dom96 | mraxilus: tell us about your issue |
21:47:05 | FromGitter | <mraxilus> I'm using a combination of the sdl2 and opengl packages |
21:47:17 | federico3 | Nim being a bit special because it builds from csources and then use it's own binaries to generate other stuff |
21:47:23 | Araq_ | mraxilus: calll registerExtensions() |
21:47:23 | FromGitter | <mraxilus> and I'm running through this opengl tutorial https://open.gl/textures |
21:47:41 | Araq_ | or something of similar name |
21:47:53 | FromGitter | <mraxilus> I have loadExtensions() |
21:47:54 | dom96 | I think that packagers could handle it manually |
21:48:09 | FromGitter | <mraxilus> but the issue is with the glTexImage2D() function |
21:48:15 | federico3 | dom96: however "installed" in this context means putting the output files in the deb/rpm/tarball, not installing it on the system |
21:48:15 | dom96 | Copy all .nim files in lib/ to /usr/lib/nim |
21:48:16 | dom96 | etc |
21:48:31 | FromGitter | <mraxilus> it throws out an opengl error saying that I passed in an invalid enum |
21:48:45 | * | pregressive quit (Ping timeout: 256 seconds) |
21:49:00 | Araq_ | I fail to see how Python doesn't have the very same problem with its lib and binaries |
21:49:08 | federico3 | dom96: what do you mean with "packager"? The tool that generates a deb/rpm or the tool that installs it? |
21:49:25 | FromGitter | <mraxilus> this is the function definition in the library https://github.com/nim-lang/opengl/blob/master/src/opengl.nim#L1820 |
21:49:25 | dom96 | either |
21:49:31 | Araq_ | also: you don't need to build from csources. you only need a working Nim binary. |
21:49:34 | dom96 | I'm thinking of two different package managers |
21:49:41 | dom96 | or rather package management systems |
21:49:58 | FromGitter | <mraxilus> and this is my call "glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0, GL_RGB, cGL_DOUBLE, addr(texture_image))" |
21:50:21 | FromGitter | <mraxilus> I've checked other sources and I'm fairly sure I'm passing in the right arguments |
21:50:32 | FromGitter | <mraxilus> but the 3rd argument is the one that it complains about |
21:50:37 | dom96 | But perhaps we should just keep `koch install` (but rename it to something else so that users are not using it) |
21:50:42 | dom96 | and get rid of install.sh |
21:51:16 | dom96 | but then should this `koch install` also install nimble? |
21:51:43 | federico3 | dom96: the "package builders" are the smart ones that do most of the work. The package managers (e.g. apt-get/dpkg, yum) are designed to take less decision as possible at install time: e.g. they don't decide which file goes where, just unpack an archive |
21:52:34 | dom96 | federico3: yes, but certain package managers such as pacman (with AUR) don't just unpack an archive, they follow a pkgbuild. |
21:52:39 | Araq_ | mraxilus: what's the error message? |
21:52:47 | dom96 | But this doesn't really matter |
21:52:55 | * | sp33der89 joined #nim |
21:53:04 | * | Trustable quit (Remote host closed the connection) |
21:53:06 | dom96 | You'll always be copying files to some temporary directory or inside a chroot |
21:53:17 | federico3 | as such, during the package building you want to know where to put every file (and that's quite easy to do, it's just a couple of config lines) |
21:53:24 | federico3 | correct |
21:53:41 | federico3 | (sorry, catching a bus, I'll type from my phone) |
21:53:44 | FromGitter | <mraxilus> http://pastebin.com/Gxkn84qE |
21:54:08 | dom96 | federico3: I think we should get back to this some other time. I need to head to bed. |
21:54:11 | FromGitter | <mraxilus> but I can get around that by explicitly casting the problem argument with cast[GLint](GL_RGB) |
21:54:26 | FromGitter | <mraxilus> but then I get this... |
21:55:20 | FromGitter | <mraxilus> http://pastebin.com/HSZPdXWi |
21:55:26 | * | sp33der89 left #nim (#nim) |
21:55:52 | Araq_ | maybe you shouldn't cast then? |
21:56:46 | FromGitter | <mraxilus> And that's where I'm stuck, if I don't cast I get a type error, if I do I get invalid enum |
21:56:55 | FromGitter | <mraxilus> Idk, I'm new to Nim |
21:56:55 | dom96 | good night |
21:56:56 | cheatfate | I think there must be article in github wiki which fully describe installation needs... So package maintainers can follow instructions and make appropriate changes, i think most of the problems is coming because there no such recommendations about installation |
21:57:01 | FromGitter | <mraxilus> night |
21:57:12 | LindsayLojban | hi mraxilus! |
21:57:18 | LindsayLojban | Is #nim treating you well? |
21:57:36 | FromGitter | <mraxilus> heyo, so far yes :D |
21:58:03 | reactormonk | Time to change that >:) |
21:59:52 | LindsayLojban | hehe |
22:00:10 | Araq_ | cheatfate: and what should this document contain? binaries to /usr/bin, config to /etc, lib+compiler to /usr/lib, done. |
22:00:29 | Araq_ | I don't have to explain Unix to packagers now, do I? |
22:01:06 | LindsayLojban | Araq_: let me know if you don't get an answer |
22:01:08 | LindsayLojban | oops |
22:01:11 | * | LindsayLojban rubs eyes |
22:01:15 | LindsayLojban | mraxilus |
22:01:19 | cheatfate | Araq_, nope it must describe, that nim binary must be accesses from PATH and nim library must be placed in XXX and configs must be manipulated in such way |
22:04:09 | Araq_ | nim binary doesn't have to be accessed form path, it's just that it sux to type '/some/path/here/nim c ...' all the time |
22:04:36 | Araq_ | again, what does this document contain that is not an introduction into Unix? |
22:04:38 | cheatfate | of course but nim must have access to nim.cfg to know where its library is placed |
22:05:46 | cheatfate | it describe requirements to make installation package without problems |
22:06:22 | Araq_ | mraxilus: I'm sorry I don't know enough about OpenGL to help you. but your type mismatch seems to indicate a misunderstanding of the API. |
22:06:36 | Araq_ | maybe the tutorial you follow is outdated? |
22:07:04 | cheatfate | and nim must support any kind of placement, (i mean like /usr/local/bin/nim and config in /usr/local/etc/nim.conf and stdlib in /usr/local/share/nim) |
22:07:31 | FromGitter | <mraxilus> yeah, but I looked at other people using the same package in nim, and they use the same call with similar arguments |
22:07:36 | elrood | perhaps it would help to describe what problem you guys are actually facing with packaging as it's currently done, kind of in a rubber-duck-debugging way. after reading this chat it's not even remotely clear what the real issue is |
22:08:18 | Araq_ | cheatfate: it does support that since 5 years now. it's hard to test all these combinations though so maybe stuff breaks. |
22:08:33 | elrood | and packagers usually aren't that dense not to be able to figure out which files need to go where |
22:09:46 | * | pie__ joined #nim |
22:12:28 | LindsayLojban | def-: Are you around? |
22:13:23 | * | pie_ quit (Ping timeout: 265 seconds) |
22:15:14 | FromGitter | <mraxilus> LindsayLojban: do you have the same name in #lojban, I don't recall the name |
22:15:26 | LindsayLojban | FromGitter: I'm ldlework/cadgu'a |
22:15:26 | FromGitter | LindsayLojban, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
22:15:32 | LindsayLojban | oops |
22:16:19 | FromGitter | <mraxilus> Ah, amusing name choice |
22:16:20 | LindsayLojban | ftsf: you around? |
22:16:30 | LindsayLojban | ki'e mraxilus |
22:16:46 | def- | LindsayLojban: sometimes |
22:16:51 | * | yglukhov quit (Remote host closed the connection) |
22:16:52 | LindsayLojban | mraxilus, I pinged everyone I know who might be able to help |
22:17:20 | LindsayLojban | def-: Do you have experience with OpenGL? our new nim user here, mraxilus is having a tiny argument-type error |
22:17:29 | * | yglukhov joined #nim |
22:19:23 | def- | FromGitter: You can use GL_RGB.GLint to convert GL_RGB to GLint |
22:19:23 | FromGitter | def-, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
22:19:41 | def- | mraxilus: You can use GL_RGB.GLint to convert GL_RGB to GLint. But I'm just guessing |
22:19:46 | LindsayLojban | u'i |
22:19:56 | FromGitter | <mraxilus> Nah, I get invalid enum if I do that |
22:20:15 | FromGitter | <mraxilus> but from the code I've seen online I'm doing the same thing they are |
22:21:01 | LindsayLojban | mraxilus, can you give an example of other people's code? |
22:21:04 | LindsayLojban | maybe we can spot the difference |
22:21:18 | FromGitter | <mraxilus> http://hub.darcs.net/discoloda/NGE/raw-file/gl_texture_atlas.nim |
22:21:31 | FromGitter | <mraxilus> https://github.com/rbmz/nim3d/blob/master/texture.nim |
22:22:04 | FromGitter | <mraxilus> https://github.com/yglukhov/nimx/blob/master/nimx/image.nim#L106 |
22:22:40 | FromGitter | <mraxilus> also here's the API documentation for this function: http://docs.gl/gl3/glTexImage2D |
22:23:10 | FromGitter | <mraxilus> I tried using opengl 3 and 4 and get the same problem in each |
22:27:53 | * | yglukhov quit (Remote host closed the connection) |
22:28:06 | * | yglukhov joined #nim |
22:29:35 | * | yglukhov quit (Client Quit) |
22:35:52 | * | PMunch quit (Quit: leaving) |
22:43:34 | * | irrequietus quit (Read error: Connection reset by peer) |
22:45:40 | * | elrood quit (Quit: Leaving) |
22:47:51 | * | Kaini quit (Quit: No Ping reply in 180 seconds.) |
22:48:59 | * | Kaini joined #nim |
22:49:00 | LindsayLojban | :( |
22:49:23 | LindsayLojban | Wish i had some bandwidth to help right now |
22:52:44 | * | nsf quit (Quit: WeeChat 1.5) |
23:01:59 | Araq_ | mraxilus: keep in mind that cast is not the same as a type conversion |
23:02:25 | Araq_ | def- is right, try GL_RGB.GLint rather than a 'cast' |
23:03:43 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:06:41 | * | dddddd quit (Remote host closed the connection) |
23:13:19 | * | fredrik92 quit (Quit: Client disconnecting) |
23:15:21 | FromGitter | <mraxilus> No dice, still get the "OpenGL error: invalid enum [GLerror]" error |
23:23:59 | Araq_ | well try some random values like 0, 1, 2, 3 then :-) |
23:24:19 | * | gokr quit (Ping timeout: 244 seconds) |
23:35:28 | FromGitter | <mraxilus> I got it! |
23:35:43 | FromGitter | <mraxilus> apparently doubles aren't excepted |
23:35:47 | FromGitter | <mraxilus> only floats |
23:36:01 | FromGitter | <mraxilus> but most other functions accept doubles... sigh |
23:38:09 | FromGitter | <mraxilus> does anyone have a "cleaner" way of doing this: https://github.com/mraxilus/experiments/blob/master/library/opengl/texture.nim#L55 |
23:38:33 | FromGitter | <mraxilus> I feel like converting all the ints separately is definately not the way to do it |
23:38:59 | FromGitter | <mraxilus> but without those it complains about the constructor type being different from the variable type. |