<< 01-11-2013 >>

00:00:38Araqhi freezerburnv welcome
00:00:43OrionPKif FD_ISSET(socketFd) is NON zero: remove from resulting set
00:00:48OrionPKam I crazy?
00:00:51freezerburnvHey Araq, thanks :)
00:01:26AraqOrionPK: ask dom96 when he's around please
00:01:39OrionPKwill do..
00:03:26OrionPKaraq if I invert the logic it works as expected
00:03:34OrionPK if select(rsocks, timeout) == 1:# and rsocks.contains == 0:
00:03:34OrionPK if rsocks.contains(ws.server):
00:03:34OrionPK new(ws.socket)
00:03:34OrionPK accept(ws.server, ws.socket)
00:11:05AraqI need to sleep now. good night
00:12:12freezerburnvNight!
00:14:00freezerburnvHow do you change default indentation in nimrod.vim? It seems to indent something like 8 spaces by default, would much prefer it to be something like 2 or 4
00:19:35*dymk quit (Ping timeout: 245 seconds)
00:21:00OrionPKfreezerburnv think thats more of a vim question than a nimrod question :\
00:22:20freezerburnvI changed vim's default indentation. I was wondering if nimrod.vim defined an indentation standard. If not, then I'll try to figure something out
00:22:41freezerburnvThe documentation on the github page is pretty sparse
00:24:03OrionPKthat sucks.
00:24:08OrionPKi typically use sublime
00:24:20freezerburnvSublime has nimrod support? If that's the case, awesome! I love sublime
00:24:31freezerburnvIt wasn't mentioned on the homepage, so I assumed it didn't exist yet
00:24:33OrionPKthere's a plugin for it, but it's kinda outdated
00:24:56OrionPKit's in sublime package manager
00:25:11freezerburnvCool, I'll go ahead and install that
00:32:05*wlhlm quit (Ping timeout: 245 seconds)
00:42:33Varriountfreezerburnv, The problem is that sublime text is very... cryptic, as far as adding a new language goes.
00:48:35freezerburnvThat's no fun. Is that why it isn't very well maintained? Or did the author just move on to other things or something?
00:48:55VarriountBefore my time.
00:49:12Varriountfreezerburnv, if you're good with regex's, then you could try.
00:49:52VarriountOr, you try integrating nimrod's idetools feature.
00:49:59freezerburnvI suppose I could try that at some point, in-between trying to actually learn nimrod
00:50:08freezerburnvI'll poke at it sometime
00:50:51*CptRootbeer left #nimrod (#nimrod)
00:51:02*DAddYE quit (Remote host closed the connection)
00:51:08freezerburnvis there a way to specify the type an enum is? I want to make sure it's a uint32 for an FFI call
00:55:42VarriountHm. Well, you can manually specify the type by defining each enumeration
00:58:36*dymk joined #nimrod
01:02:07freezerburnvWhat's the syntax for that? Everywhere I tried to add something like ":Uint32" had the compiler yell at me
01:04:21Varriounttype
01:04:27*yetfeo left #nimrod (#nimrod)
01:04:34Varriount MyEnum = Enum
01:05:01Varriount A = uint32(1)
01:05:09VarriountSomething roughly like that.
01:06:28*dyu joined #nimrod
01:07:02Varriountfreezerburnv, http://nimrod-code.org/manual.html#numerical-constants
01:08:40*dyu_ joined #nimrod
01:09:43freezerburnvAwesome, thanks
01:12:13*dyu quit (Ping timeout: 272 seconds)
01:13:28Varriountfreezerburnv, if you're making a wrapper, you might want to check out the c2nim
01:13:32Varriount*c2nim tool
01:14:17VarriountIt isn't perfect, and is a bit picky on what kind of C code is given to it, but if you're wrapping a large library, it can be great.
01:14:36freezerburnvI saw that. Right now I'm doing some stuff manually to learn a bit about the FFI/pragmas
01:15:30*dyu_ quit (Ping timeout: 252 seconds)
01:18:21freezerburnvThey don't seem to be documented super well. I found a bunch of stuff in an existing wrapper for what I'm trying to work with that I couldn't find in any of the docs linked from the main site
01:18:57reactormonkfreezerburnv, ask zahary about nimrod.vim, I'm handling nimrod-mode.el
01:19:03VarriountThe wrappers? They aren't documented because their interface is nearly exactly the same as whatever library they wrap.
01:19:47VarriountIt's assumed (by others, not me) that those who want to use the wrappers will go read the wrapped library docs.
01:21:04freezerburnvEr, sorry. What I meant by that was FFI pragmas weren't documented super well
01:22:23freezerburnve.g.: {.push callConv: cdecl, dynlib: LibName.}, didn't find anything about a push pragma in any docs I looked at
01:23:01Varriounthttp://nimrod-code.org/manual.html#push-and-pop-pragmas
01:23:19*Varriount is now known as The_Manual
01:23:27*The_Manual is your friend
01:23:36*The_Manual is now known as Varriount
01:24:12xenagithat explains a lot
01:24:22Varriount?
01:24:34freezerburnvGah, I feel dumb. Thought I looked through that stuff
01:24:37xenagilol i was jk
01:26:13*Associat0r joined #nimrod
01:26:13*Associat0r quit (Changing host)
01:26:13*Associat0r joined #nimrod
01:27:08freezerburnvOk, so if I'm understanding this correctly: the push pragma I pasted will declare all following functions to be cdecl (meaning an FFI C call), and coming from the dynamic library specified by LibName
01:28:04VarriountYep.
01:28:51*dyu_ joined #nimrod
01:32:57*freezerburnv quit (Quit: freezerburnv)
01:49:36*dyu_ quit (Ping timeout: 252 seconds)
01:52:57*DAddYE joined #nimrod
01:57:55*DAddYE quit (Ping timeout: 272 seconds)
02:02:28*DAddYE joined #nimrod
02:02:35*dyu_ joined #nimrod
02:07:25*DAddYE quit (Ping timeout: 272 seconds)
02:23:31*dyu__ joined #nimrod
02:26:19*dyu_ quit (Ping timeout: 272 seconds)
02:26:30*dyu_ joined #nimrod
02:29:31*dyu__ quit (Ping timeout: 260 seconds)
02:30:37*dyu_ quit (Ping timeout: 240 seconds)
02:36:33*dell joined #nimrod
02:38:41*Associ8or joined #nimrod
02:38:41*Associ8or quit (Changing host)
02:38:41*Associ8or joined #nimrod
02:40:28dellHI...which is the best way for calling c++ code from nimrod? is it hard?
02:40:59*Associat0r quit (Ping timeout: 272 seconds)
02:41:43dom96dell: Here is an example: https://github.com/Araq/Nimrod/blob/master/examples/c%2B%2Biface/irrlichtex.nim
02:42:05dom96c2nim now also should support C++ so you can use it to generate wrappers.
02:43:51*dyu joined #nimrod
02:43:55dellI'm not familiar with c++ (would it be a problem??) I come from python,c# :S ...
02:44:25dom96What C++ code do you want to call?
02:47:44dellcinder...is a library for visual experiments (arts,effects,etc)
02:47:46dellhttp://libcinder.org/about/
02:50:21*dyu_ joined #nimrod
02:53:12*XAMPP quit (Read error: Connection reset by peer)
02:53:38*dyu quit (Ping timeout: 264 seconds)
02:53:44*mah joined #nimrod
02:54:33*DAddYE joined #nimrod
02:55:02*dyu_ quit (Ping timeout: 268 seconds)
02:56:53dom96dell: Does it have a C wrapper? If so it may be easier to wrap that.
02:57:29dom96As for C++ knowledge, well, basic knowledge at least would be very helpful in creating a wrapper.
02:58:54*DAddYE quit (Ping timeout: 252 seconds)
02:59:43*brson quit (Ping timeout: 245 seconds)
03:01:02dom96OrionPK: The behaviour of select is in line with the behaviour of the posix select(). It is 3am so maybe i'm overlooking something, but the sockets which are ready should be removed from the sequence of sockets passed. How else would it work?
03:01:14OrionPKnope
03:01:20OrionPKsockets that are ready should be left in
03:01:28OrionPKeverything thats NOT ready should be removed
03:01:46*brson joined #nimrod
03:07:06dom96hrm, perhaps you're right.
03:07:47OrionPKfixing it will break things.. but I think it has to be done
03:07:54*dyu_ joined #nimrod
03:08:39dom96Why are you using select directly anyway? You should use asyncio.
03:08:55OrionPKI'm writing two implementations, similar to http server
03:09:08OrionPKjust a basic 'run' method will use the select
03:10:28dom96Select() will be obsolete soon anyway once my selector module is ready.
03:11:12dom96but maybe that will still be useful.
03:11:21dom96hrm, we will see.
03:11:28dom96It's too late for me to be making these decisions.
03:11:36OrionPKhehe
03:12:04OrionPKgo sleep on it. I think select will still be useful going forward but having asyncio would obviously be preferred
03:12:50dom96Yeah. Good night.
03:12:53OrionPKnight
03:17:51*dyu__ joined #nimrod
03:20:56*dyu_ quit (Ping timeout: 268 seconds)
03:21:54*brson quit (Quit: leaving)
03:27:39*dyu__ quit (Ping timeout: 240 seconds)
03:27:43*dell left #nimrod ("Saliendo")
03:31:00*XAMPP joined #nimrod
03:41:24*dyu__ joined #nimrod
03:45:22*dyu_ joined #nimrod
03:48:24*dyu__ quit (Ping timeout: 260 seconds)
03:55:58*DAddYE joined #nimrod
03:56:21*mah quit (Quit: Page closed)
03:58:46*dyu_ quit (Ping timeout: 265 seconds)
04:00:32*DAddYE quit (Ping timeout: 260 seconds)
04:10:33*dyu_ joined #nimrod
04:15:03*xenagi quit (Quit: Leaving)
04:15:24*dyu__ joined #nimrod
04:16:52*dyu_ quit (Ping timeout: 260 seconds)
04:20:54*dyu_ joined #nimrod
04:24:14*dyu__ quit (Ping timeout: 264 seconds)
04:45:39*dyu_ quit (Ping timeout: 272 seconds)
04:54:14*mkb quit (Ping timeout: 240 seconds)
04:55:24*mkb joined #nimrod
04:57:25*DAddYE joined #nimrod
05:03:55*DAddYE quit (Ping timeout: 268 seconds)
05:10:31*mflamer joined #nimrod
05:33:43VarriountHow can I get the high() of an unsigned integer into an enum?
05:43:52*DAddYE joined #nimrod
05:44:02*DAddYE quit (Remote host closed the connection)
05:44:08*DAddYE joined #nimrod
05:57:55*OrionPK quit (Read error: Connection reset by peer)
06:04:02*mflamer_ joined #nimrod
06:06:49*mflamer quit (Ping timeout: 268 seconds)
06:20:58*DAddYE quit (Remote host closed the connection)
06:21:06*DAddYE joined #nimrod
06:27:09*mflamer_ quit (Ping timeout: 246 seconds)
07:02:37*Jackneill joined #nimrod
07:14:38*dLog_ quit (Read error: Connection reset by peer)
07:58:04*ics quit (Ping timeout: 264 seconds)
07:59:16*ics joined #nimrod
08:42:07*sebcrozet joined #nimrod
08:58:35*reactormonk quit (*.net *.split)
09:05:43*reactormonk joined #nimrod
09:14:46*sebcrozet quit (Quit: Gone)
09:26:27*DAddYE quit (Remote host closed the connection)
09:26:54*DAddYE joined #nimrod
09:31:22*CarpNet joined #nimrod
09:31:47*DAddYE quit (Ping timeout: 265 seconds)
09:33:11*ics quit (Ping timeout: 272 seconds)
10:14:53*wlhlm joined #nimrod
10:22:18*EXetoC joined #nimrod
10:49:18*EXetoC quit (Ping timeout: 246 seconds)
10:56:48*musicalchair quit (Ping timeout: 272 seconds)
11:06:35*EXetoC joined #nimrod
11:08:17*musicalchair joined #nimrod
11:13:40*freezerburnv joined #nimrod
11:54:11*gour joined #nimrod
12:08:59gouri read in reddit comments about some recent development going on in nimrod like user-defined typeclasses (could not docs about it), some improvements/add-ons for FP programming as well as support for C++ in c2nim. now, seeing there is wxRust project (using wxhaskell's wxC), i wonder if prividing wx bindings for nimrod could be done using c2nim's C++ support or, similar to (wx)rust, by using wxC?
12:10:55gourbesides rust, another option which i consider atm is ocaml due to some activity going on with lablqt/wxocaml projects...
12:11:25*gour definitely gave up on adaž
12:15:03*faassen joined #nimrod
12:20:46*qwebirc12228 joined #nimrod
12:25:05*qwebirc12228 quit (Ping timeout: 250 seconds)
12:35:10*fredmorcos joined #nimrod
12:36:35BitPuffingour: Yeah I considered going with ocaml but I decided to stay with nimro
12:36:36BitPuffind
12:37:39BitPuffingour: you could definitely bind wxWidgets with c2nim
12:39:09fredmorcosHello, I'm new here, I've been *technically* counter productive for a very long time now, some years actually... due to the lack of a sensible programming language and tooling issues... I've been through the entire spectrum between C and Haskell if you know what I mean...
12:39:46fredmorcosI recently read about Nimrod, and so far it seems like what I've been imagining as an ideal programming language to work with
12:40:19fredmorcosI'm not so sure about the tooling though, didn't have time to take a look yet, but I hope I'm here to stay :)
12:41:17BitPuffinfredmorcos: I've went through the same thing! What exactly do you wonder about with the tooling?
12:41:25BitPuffinfredmorcos: There is an IDE
12:41:42BitPuffinfredmorcos: nimrod comes with a debugger, and debugger
12:41:52BitPuffinand profiler*
12:42:24fredmorcosBitPuffin, well, to start off, it would be great if the compiler could already provide the framework for using it in building IDEs
12:42:42EXetoCit does
12:42:48BitPuffinfredmorcos: some info about the built in tools here. http://nimrod-code.org/tools.html and the IDE is here: https://github.com/nimrod-code/Aporia
12:43:16fredmorcosso that the same analyzer runs when I'm writing code and when I'm building my code
12:43:17BitPuffinfredmorcos: Yeah it does that like EXetoC said
12:43:42fredmorcosoh... sounds very reasonable... most compilers don't do that
12:44:11fredmorcosi built aporia on archlinux yesterday, I really like the auto completion
12:44:17fredmorcosbut I am very stuck with emacs
12:44:54BitPuffinfredmorcos: You could definitely build IDE like functionality using the built in stuff in the compiler. I want to do the same for vim
12:45:13fredmorcosI just got used to some features of emacs and its keybindings that i can't let go anymore
12:45:13EXetoCwhat's missing in nimrod.vim?
12:45:31BitPuffinEXetoC: afaik it only provides syntax highlighting
12:45:45fredmorcosis the nimrod compiler able to provide auto-completion suggestions?
12:46:44fredmorcossomething like nimrod suggest <file>:<line>:<column>
12:46:58fredmorcosthen nimrod-mode or nimrod.vim could parse that output
12:47:16EXetoCsemantical analysis and go to definition as well, but no completion yet according to the wiki
12:47:44fredmorcosEXetoC, fair enough, but would such a feature be welcomed?
12:49:13EXetoCnimrod --advanced should list the interface used by Aporia for example. look for idetools
12:49:26EXetoCcan't see why not; especially if it's something that can be toggled
12:49:54dom96The Nimrod compiler does provide auto-completion suggestions.
12:49:57dom96That's what Aporia uses.
12:50:11dom96I believe nimrod.vim supports that.
12:50:29BitPuffindom96: not from what I have noticed
12:50:36fredmorcos--track:FILE,LINE,COL track a file/cursor position
12:50:39BitPuffindom96: Well it provides vim normal autocompletion
12:50:41dom96I think i've seen emacs support it too. Ask reactormonk when he's around.
12:50:52BitPuffindom96: but it doesn't suggest based on what the compiler would think is available
12:51:03BitPuffindom96: only like words in the same file
12:52:37EXetoCit uses --track and --trackDirty apparently
12:57:35fredmorcosI have question, I read about the function pragmas, things like NoSideEffects and NoWriteIO and so on... when a function is tagged with such a pragma, is it still allowed to call another function that is not tagged with such pragmas?
12:58:03BitPuffinEXetoC: what does?
12:58:15BitPuffinfredmorcos: don't think so
12:58:23BitPuffinfredmorcos: or well
12:58:27BitPuffinfredmorcos: it is allowed probably
12:58:34BitPuffinfredmorcos: if the proc doesn't have side effects
12:58:38BitPuffinthat's my guess
12:59:37*Ricky_Ricardo joined #nimrod
12:59:51EXetoCafter the compiler is able to deduce that implicitly, I'd assume
12:59:57fredmorcosokay, sounds reasonable, since it guarantees me (as a programmer) that any library function calls from my function aren't doing any IO
13:00:32gourBitPuffin: what were some pro/cons of ocaml vs nimrod in your case?
13:00:46EXetoCBitPuffin: nimrod.vim, so yes it's only for go to definition
13:01:03BitPuffinEXetoC: strange, I've never noticed that
13:01:05fredmorcosEXetoC, same for emacs-mode
13:01:33fredmorcosalthough emacs-mode requires the auto-complete package ^_^
13:02:39gouri'm with vim and hope support will improve, but not sure if i desperately need IDE
13:03:16EXetoCBitPuffin: noticed what? I found that out by grepping, and the readme provides a go to function
13:06:29BitPuffingour: nimrod has the advantages that it has amazing macros and let's you do manual memory management and inline asm (that IS possible with ocaml but doesn't come by default, you have to add it yourself). Ocaml has the advantage that it's been around for a longer time and is very stable and has some features that I miss in nimrod (pattern matching, function currying, I am working on adding that with macros though which wouldn't have worked
13:06:29BitPuffinin ocaml). Ocaml has the disadvantage that it has problems with paralellisation. Although I don't know how nimrod compares there, maybe both do multiprocessing with multiple processes passing messages, which is fine but maybe nimrod can do better I dont know.
13:07:14BitPuffingour: also even though the GC of ocaml is pretty nice the GC in nimrod seems to be even better
13:07:23BitPuffinwhich is a huge pro for me since I do games
13:08:46gourthanks...i do not miss manual memora mgmt and inline asm, but i do miss pattern matching & co.
13:08:59BitPuffingour: co?
13:09:18*freezerburnv quit (Quit: freezerburnv)
13:09:21BitPuffingour: anyways the advantage nimrod has is that you can pretty much anything you miss with macros
13:09:30gourthere is also some branch in ocaml supposed to fix parall....opam is nice and community is becoming more active
13:09:40gourBitPuffin: co = some other FP stuff
13:10:20gourBitPuffin: indeed. besides that, nimrod's syntax is really terrific, especially when looking at something like rust :-)
13:10:22BitPuffingour: ah you mean like company. Well maybe you could help working on adding some FP stuff with me :D I also want some more of those things
13:10:32BitPuffingour: yes I know but it's a very difficult issue
13:10:39BitPuffingour: and nimrod has babel, which is also nice :D
13:10:53BitPuffinand the community is growing slowly but steadily :)
13:11:37gourBitPuffin: otoh, i'm not into games, but more for 'general' GUI bindings (gtk excluded as incapable for multi-platform work), but have to be silent about it in order not to make gods angry ;)
13:11:38EXetoCok it uses --suggest and --def as well, in addition to the formerly mentioned options, and of course --server
13:11:57*freezerburnv joined #nimrod
13:11:57*freezerburnv quit (Client Quit)
13:13:47BitPuffingour: well nimrod can interface with C++ with a little work :D you would be praised for binging wxWidgets or Qt I'm certain
13:14:11*freezerburnv joined #nimrod
13:15:01*freezerburnv quit (Client Quit)
13:15:07gourBitPuffin: someone on reddit said 'Probably not' in regard to qt
13:15:34*dymk quit (Ping timeout: 262 seconds)
13:16:17BitPuffingour: it is possible but since Qt is extremely huge it's not exactly viable for just one guy
13:16:29dom96gour: I really wish you would just get started instead of endlessly wondering what language to use.
13:17:13dom96In the time since you were here last and now you probably would have been able to wrap Qt.
13:17:15gourdom96: me too. (un)fortunately have other things to do in the meantime
13:18:25BitPuffingour: I think you would be most happy with nimrod because if there is a missing feature you can add it
13:20:31*dymk joined #nimrod
13:24:58*enurlyx joined #nimrod
13:30:37dom96Looks like I missed round 7 of framework benchmarks
13:31:12BitPuffindom96: damn it
13:31:29dom96But they say they will do a round every month.
13:31:29dom96so it's all good.
13:31:35dom96Just need to get it done in a month :P
13:32:22gourwhat about http://benchmarksgame.alioth.debian.org/
13:32:27BitPuffindom96: the optimization?
13:32:45dom96BitPuffin: Yes. New asyncio specifically.
13:33:00BitPuffincewl!
13:33:53dom96gour: For those benchmarks we would probably be within 99% of C's performance, it's not that interesting.
13:35:06EXetoCBitPuffin: so nimrod.vim does indeed use --def and --suggest, which implies that it doesn't just match words. it does complete some things from system.nim, but not from sequtils for example
13:35:33EXetoCI don't know when I'm hitting nimrod.nim and idetools limitations respectively. haven't used Aporia much so I cannot compare
13:35:42gourdom96: well, that's what you know (anticipate, but not others
13:38:14EXetoCeither way, neocomplcache and syntastic pwns
13:41:09fredmorcosBitPuffin, gour: pattern matching, partial application, ... would be amazing
13:41:22BitPuffinfredmorcos: on the way :D
13:43:43gourfredmorcos: yes, it would be kind of super-ocaml, iow. offering lot of FP features + rest of imperative goodness in very elegant way
13:44:41BitPuffingour: comiiiiing
13:46:54fredmorcosgour, well, with those FP features and purity/no-side-effects kinds of pragmas, you can go from assembly and C to haskell all within nimrod :)
13:48:46gourBitPuffin: atm, i'm trying to build wxocaml...let me see...
13:49:14BitPuffingour: or bind wx to nimrod :P
13:51:09EXetoCI wonder if partial application macro would be practical. At least writing it should be possible
13:52:38gourwhat does Araq say about such FP plans?
13:53:21*gour quit (Quit: WeeChat 0.4.1)
13:57:11*gour joined #nimrod
13:59:47gourBitPuffin: considering https://github.com/Araq/Nimrod/issues/620 are you on fbsd?
14:06:21fredmorcoshow is the nimrod bootstrap working?
14:06:57fredmorcosbuild an old version of the nimrod compiler with cc, then use that compiler to build the new version (written in nimrod)?
14:07:14BitPuffingour: nah that was on a server I was considering deploying nimrod on
14:07:47BitPuffinfredmorcos: more or less, C sources are generated every now and then and then you build that and then you build the nimrod one
14:08:41fredmorcosah cool
14:08:59fredmorcosjust to be able to use newer nimrod features in the compiler, correct?
14:09:56*freezerburnv joined #nimrod
14:10:13BitPuffinthink so yeah
14:11:31*gour will probably move to free/pc-bsd soon
14:13:19fredmorcosgour, currently on linux?
14:13:35gourfredmorcos: yep, debian (sid)
14:13:48fredmorcosgour: ok... ever given archlinux a try?
14:14:32gourfredmorcos: yes, before switching to debian i spent >5yrs with arch and before that same amount of time on gentoo
14:16:19BitPuffingour: why are you going to freebsd?
14:16:25BitPuffingour: btw netbsd is really nice
14:16:35BitPuffinanyways
14:16:42BitPuffinwayland and stuff is coming to linux now
14:16:46BitPuffinon bsd you are gonna miss out
14:17:22fredmorcosfrom the BSDs, for a desktop/workstation i would personally go with openbsd
14:18:46fredmorcosBitPuffin, wayland doesn't bring much in terms of user-facing features
14:18:52fredmorcosnothing X cannot do now anyways
14:19:06fredmorcossure, the underlying stack will be cleaner
14:19:24fredmorcosbut it will also come with its own set of bugs and issues, because, you know, "let's get it out the door as soon as possible"
14:19:59gourBitPuffin: zfs, then pc-bsd's pbis are cool, reminding me of nixos...it's rolling distro, but stable kernel+userland...
14:20:02fredmorcosplus, most issues on linux systems come from complex desktop environments, and the complex services that need to be running to support those desktops
14:20:28*gour is using i3 only
14:20:34*mflamer joined #nimrod
14:20:56fredmorcosgour, even so, you're probably running many of the u* or *kit stuff
14:21:26BitPuffingour: sure but zfs works on linux too
14:22:33gourfredmorcos: i've pc-bsd (9.2) on my netbook and everything works. they even wrote gui app for mounting sticks etc. there is some kind of NW (i use wifi), so nothing is missing except running vuescan which i regularly need, but for it installed mint/ubuntu under vbox and everything is fine
14:23:09gouranyway, i'd like to see working nimrod on fbsd
14:23:48*faassen left #nimrod (#nimrod)
14:24:30BitPuffinwell Araq doesn't really care about fbsd
14:24:37fredmorcoscool :) maybe when freebsd10 is ready i'll jump over
14:25:06BitPuffinfreebsd 10 seems like it's gonna be pretty cool
14:25:28gourfredmorcos: well, that's very soon, 10.0beta2 is coming
14:25:41gouri also run ati card with 9.2 and it works ok
14:31:14gouras far as (nimrod) docs is concerned, manual is preferred over tuts?
14:31:54mflamerGood morning
14:32:21*freezerburnv quit (Quit: freezerburnv)
14:33:19mflamerThe manual is best but tutorial is a little easier reading when your new and has a few more examples
14:33:30*freezerburnv joined #nimrod
14:33:45fredmorcosgotta bounce, bbl
14:33:46gourmflamer: manual is more up to date, right?
14:33:49*fredmorcos quit (Quit: Leaving)
14:34:42CarpNetoh btw, re the dynlib linking issue i was having on ubuntu, should i open an issue about that?
14:35:41mflamerIt might be, I havent looked at the tutorials much lately
14:38:06mflameranybody know why this wouldnt work?
14:38:08mflamerproc Foo(T: typedesc): typedesc =
14:38:08mflamer return TFoo[T]
14:38:08mflamervar x:Foo(int)
14:38:42mflamerI have also tried with the proc as {.compileTime.}
14:50:45*OrionPK joined #nimrod
14:53:39EXetoCshould a proc be used in that case? I don't know if it makes much sense
14:54:40EXetoCor maybe it does, but I'd just use a template
14:54:59mflamerwell, I was hoping to be able to still pass the proc around, although I suspect I couldd only do that at copiletime still
14:59:15EXetoCI think it can only be a proc if removing the pragma would allow it to be executed at runtime as well, which I think seems like a fair limitation
15:06:31mflameryeah, seems fair
15:07:00mflamerbrb
15:11:27*mflamer quit (Ping timeout: 246 seconds)
15:11:27EXetoCI guess you could pass a template around, as maybe an expr
15:11:32EXetoCtiming
15:16:37OrionPKdom96 it would be nice to have recv support indefinite size on TSocket
15:16:53OrionPKrather than looping through/crashing if you dont receive exactly the size you input
15:17:11OrionPKjust take what you get & return if size == -1 maybe
15:18:24OrionPKas it is, I have to call recv several times to figure out how much to read
15:19:17EXetoCis the async API on the same level?
15:19:43OrionPKhm?
15:20:43dom96OrionPK: I don't think that's supported by the OS.
15:21:14OrionPKdom96 I think it is.. recv is looping right now until read == size
15:21:25OrionPKand then throwing an exception if timeout is reached
15:22:02dom96I assume you mean something like http://build.nimrod-code.org/docs/sockets.html#151
15:22:37dom96?
15:22:37OrionPKnot that overload
15:22:56OrionPKhttp://build.nimrod-code.org/docs/sockets.html#143
15:23:07OrionPK#1076 in sockets.nim
15:23:17OrionPKline 1087 you can see it looping
15:24:33dom96I don't understand what you want.
15:25:12OrionPKif size parameter < 0, return with the buffer of data you read
15:25:49*noam quit (Read error: Connection timed out)
15:26:04dom96Do you want the recv proc to return whatever is in the buffer if size == -1?
15:26:13OrionPKyes
15:26:21*MFlamer joined #nimrod
15:26:29OrionPKrather than enforce size
15:26:34*noam joined #nimrod
15:26:50dom96The recv proc expects a pointer to a pre-allocated string though.
15:26:58dom96Thus you must tell it how big you preallocated this string.
15:27:14OrionPKer, you're right
15:27:23OrionPKi thought there was another 'length' parameter somewhere
15:27:59OrionPKhrm.. it would be nice not to have to call recv 3 times to get a websocket message
15:28:12dom96show me your code
15:28:48OrionPKhttps://gist.github.com/onionhammer/7267136
15:29:25OrionPKi have to read 2 bytes to determine if I need to read 2 or 8 more bytes
15:29:31OrionPKto determine the length of the message to follow
15:30:43*Endy joined #nimrod
15:30:58OrionPKit works, but most implementations I've seen are just read = recv(fd, buffer, length)
15:31:07OrionPKwhere if read < length, it's fine.
15:31:08dom96I'm sadly not familiar with the web sockets protocol.
15:31:26dom96What languages are those?
15:31:33OrionPKbut the way recv is written, if read < length, it crashes
15:31:38OrionPKno point in even having a read parameter
15:31:40OrionPKerm
15:31:43OrionPKread return result
15:32:26OrionPKalthough maybe thats my fault
15:33:05dom96Can you give me an example of a sample websocket session?
15:33:23*gour quit (Disconnected by services)
15:33:30*gour_ joined #nimrod
15:33:45OrionPKhttp://stackoverflow.com/a/8125509/640301
15:34:16EXetoChow's the socket API? I'll wait if it needs improvements since I don't have anything specific in mind
15:34:22EXetoCor not, if it needs testing
15:34:45OrionPKdom96 you can test it with this: https://github.com/onionhammer/onion-nimrod/tree/master/websockets
15:34:53OrionPKit's nowhere near finished though
15:35:19OrionPKexetoc it has some kinks, I would say
15:35:35EXetoCit's necessary to deal with a lot of platform-specific stuff in the D lib for example
15:35:37EXetoCok
15:37:43dom96"one byte which contains the type of data (and some additional info which is out of scope for a trivial server)"
15:37:49dom96"
15:37:49dom96one byte which contains the length"
15:38:06dom96Doesn't it seem logical that you should read the first two bytes manually?
15:38:29OrionPKyou should read in whatever is available, then read the 1st two bytes
15:38:37OrionPKor check them rather
15:38:41dom96huh
15:38:56OrionPKthen you can determine how much fo the message is length and how much is header
15:39:07OrionPKthis works as it is for now I guess
15:39:37*[1]Endy joined #nimrod
15:39:50OrionPKalthough I htink there's a memory leak somewhere
15:41:13dom96also maybe you should use the higher-level recv?
15:41:29OrionPKthe deprecated ones?
15:42:38dom96http://build.nimrod-code.org/docs/sockets.html#145
15:42:57*Endy quit (Ping timeout: 246 seconds)
15:42:57*[1]Endy is now known as Endy
15:43:02*MFlamer quit (Remote host closed the connection)
15:43:06OrionPKdont think that would help really
15:43:29OrionPKthat one modifies the input string
15:43:44OrionPKwhereas now Im reusing the buffer
15:43:57dom96yeah, that's what the low-level one does too...
15:44:28OrionPKno no, not what I meant
15:44:41OrionPKit calls 'setLen
15:45:26OrionPKI dont think my read proc is leaking anyway, it's the connection stuff I think
15:45:31dom96the websockets protocol looks like a huge mess :P
15:45:37OrionPKha
15:45:40OrionPKit's pretty easy
15:54:22CarpNethow would i convert a raw pointer array of *cuchar to an array[int8]? i do know the length
15:55:25OrionPKyou could do copyMem
15:56:37*qwebirc40955 joined #nimrod
15:57:11dom96OrionPK: I think that using this "give me the buffer" method would be risky. What if the buffer doesn't contain enough data?
15:57:34OrionPKenough data?
15:57:37OrionPKyou mean enough space?
15:57:58OrionPKdom96 thats up to the reader to determine how much data is being sent from the data it receives.. this is pretty typical in socket programming
15:58:11CarpNetthanks OrionPK, that sounds like it may work
15:58:24OrionPKw/ websockets I know from the first 2 bytes how much more data in my buffer is valid
15:58:30dom96No. I mean, what if all the data has not been transmitted yet?
15:58:51dom96Therefore is not present in the buffer.
15:59:10OrionPKthat means it got broken up by the kernel, i think
15:59:28OrionPKagain, its up to the protocol to detect that and call recv again to get the rest
15:59:39OrionPKup to whatever reader/caller of recv that is
16:00:04dom96You might as well just give it a length explicitly.
16:00:16OrionPKhow when I wont know the length until I read it
16:00:38dom96To say "this is what I expect"
16:01:07dom96You know how much you need to read to find out the length.
16:01:09OrionPKhave you read through beej's network guide?
16:01:11dom96So you read that first.
16:01:18dom96No.
16:03:03*qwebirc40955 quit (Ping timeout: 250 seconds)
16:08:25EXetoCrisky how? specify the same buffer every time, and read what data is available, then parse
16:16:12dom96IMO the code is easier to keep safe when you don't have to worry about cases where only a part of the data you are parsing has been received.
16:17:54EXetoCblocking in other words?
16:18:29OrionPKyou pass in a timeout exetoc
16:18:30EXetoCthere appears to be one such overload. what's the issue with that again?
16:18:45OrionPKwhich overload is that
16:19:10EXetoCif only there were clickable anchors
16:19:27EXetoCproc recv(socket: TSocket; data: pointer; size: int)
16:19:54dom96using the timeout to get around this sounds highly inefficient.
16:20:07OrionPKit does
16:20:24OrionPKbut passing 0 timeout after select is pretty standard afaik
16:20:33OrionPKthats what you want to do to keep things asynchronous
16:21:34*Demos joined #nimrod
16:23:50EXetoCdepends on how often you want to check, I guess. I used a fairly small timeout before, which is a simple way to reduce the CPU usage
16:24:25OrionPKselect is supposed to tell you that data is available, that's kind of its raison d'etre
16:24:48OrionPKso timeout shouldnt be necessary after you've ensured there is data to be read
16:25:56EXetoCright
16:26:38OrionPKpulling the stringtable into the global scope reduced memory leakage :\
16:26:53EXetoChow common is the error file descriptor? I remember not using it for whatever reason
16:26:59EXetoCit never contained any data IIRC
16:28:59OrionPKdunno
16:33:40EXetoChttp://stackoverflow.com/a/1343995 uncommon indeed
16:34:35*DAddYE joined #nimrod
16:39:24*huehuehue joined #nimrod
16:53:26*io2 joined #nimrod
16:55:59BitPuffinhmmm
16:56:07BitPuffinwhy not put nimrod on open suse build service?
16:57:28dom96would they allow that?
16:57:59BitPuffindom96: why would they not?
16:58:17BitPuffindom96: http://en.opensuse.org/openSUSE:Build_Service
17:01:13*silven joined #nimrod
17:01:21*Demos quit (Ping timeout: 246 seconds)
17:02:57*shodan45 quit (Read error: Connection reset by peer)
17:08:59*Demos joined #nimrod
17:09:35*shodan45 joined #nimrod
17:16:18*gour_ is now known as gour
17:22:33*eigenlicht quit (Ping timeout: 265 seconds)
17:32:35*io2 quit (Ping timeout: 260 seconds)
17:36:26*BitPuffi1 joined #nimrod
17:37:35*BitPuffi1 quit (Client Quit)
17:37:44*BitPuffin quit (Read error: Connection reset by peer)
17:38:04*BitPuffin joined #nimrod
17:52:51*enurlyx2 joined #nimrod
17:54:10*brson joined #nimrod
17:55:27*enurlyx quit (Ping timeout: 260 seconds)
18:01:50*Demos quit (Ping timeout: 240 seconds)
18:02:53*huehuehue left #nimrod (#nimrod)
18:09:34*CarpNet quit (Quit: Leaving)
18:13:29*delian2 joined #nimrod
18:13:59*delian1 quit (Quit: Terminated!)
18:16:53*enurlyx2 is now known as enurlyx
18:17:54*filwit joined #nimrod
18:18:37filwithi
18:18:58filwitnice article, dom96
18:19:13*Ricky_Ricardo quit (Quit: laptop[lid].close)
18:19:27dom96filwit: thanks :)
18:19:49*Ricky_Ricardo joined #nimrod
18:22:30*Associ8or quit (Quit: Associ8or)
18:28:15Araqhi filwit, welcome back
18:28:34filwithey, Araq
18:31:10OrionPKhow accurate is getTotalMem?
18:32:49OrionPKah nm, looks like getOccupiedMem is giving more what I'd expect.. (i.e. growing)
18:35:51*io2 joined #nimrod
18:36:29OrionPKahh nice, now it's staying at 812k memory :)
18:36:32OrionPKhappy day
18:39:10*MFlamer joined #nimrod
18:43:22OrionPKaraq, you there?
18:43:31Araqyup kind of
18:44:12OrionPKI had a reference to a TSocket that I was basically ditching any reference to every iteration of a loop and creating a new one, but the GC wasn't cleaning up the unreferenced object
18:45:16OrionPKhttps://github.com/onionhammer/onion-nimrod/commit/8895d35f37b251d00acf4b2cd56db926862ed8a2
18:45:33OrionPKif you look at that diff, basically all I cahnged was where the "client" variable is declared
18:45:41OrionPKand now GC is cleaning it up
18:48:43AraqOrionPK: the stack is marked conservatively which can have this effect but it should only keep 1-2 sockets object alive unnecessarily
18:49:22OrionPKit just kept growing in task manager it grew from 800k to 3,000k after a few minutes
18:49:32OrionPKobviously it varied on how much I was hitting it
18:49:47OrionPK(but now I can hit it every millisecond for minutes and it stays at 812k)
18:51:01OrionPKGC_fullCollect didnt seem to make a difference, not sure if it should have, but just throwing that out there
18:51:44Araqmake a bug report, it's interesting how a fixed sized stack can produce a growing memory leak
18:52:06*BitPuffin quit (Quit: WeeChat 0.4.2)
18:53:27OrionPKmmk
18:54:45Araqand please add OS and CPU information; hopefully I can reproduce it
18:54:53OrionPKsure
18:55:21OrionPKyou can test it w/ my websockets.nim from the link above too
18:55:25OrionPKjust revert that change
18:58:46Araqhmm ok
18:59:03Araqwill have time to look at it in ~3 months
18:59:06OrionPK:D
18:59:07*BitPuffin joined #nimrod
18:59:38*Demos joined #nimrod
19:01:39*Demos quit (Client Quit)
19:02:15*LoneTech joined #nimrod
19:02:55Araqfilwit: I'm still curious about your argument why "HAS" means "IS" and "IS" means "HAS" ... well not really :P
19:03:08Araqhi LoneTech welcome
19:03:25LoneTechminor nitpick: I just built nimrod for the first time and ran into a pointer size fault on the first compilation. I run a 32-bit userspace on an x86_64. Replacing `uname -m` with `gcc -dumpmachine|cut -d- -f1` in build.sh solved that
19:03:32LoneTechhi (:
19:04:20Araqgood but 'uname -m' is what we should use according to Posix iirc
19:04:49filwitAraq: ??
19:05:08Araqfilwit: type X: object =
19:05:12filwitAraq: you mean why i think "type Foo: object = ..." should be defautl?
19:05:15LoneTechwhen not using gcc, it surely works better.. but machine type and build target aren't necessarily the same
19:05:46filwitAraq: it's consistent with the *implied* structure of procs
19:06:22Araqfilwit: perhaps but 'type' introduces a section and 'proc' does not, so it's different by design
19:06:24filwitAraq: "proc <name> : <of-type> = <body>" .. "type <name> : <of-type> = <def>"
19:06:46filwitAraq: oh yeah, i don't like that either, haha
19:06:54Araqalso you're wrong again
19:07:09Araqit's proc <name> <params> = <body>
19:07:10filwitAraq: i wish either procs would define a section, or types wouldn't
19:07:32Araqproc foo: T doesn't mean foo has type T but that it returns a T
19:07:45filwitAraq: i left out <params> cause it wasn't relevant
19:08:00Araq': T' is part of params
19:08:21Araqso it's highly relevant
19:08:24filwitokay, i'm not talking about the *current* way the NimrodNode tree is setup
19:08:38*enurlyx quit (Ping timeout: 240 seconds)
19:08:49filwiti'm talking about the way coders *perceive* the structure by thy symbols which are used
19:09:08filwitthe fact is, type and proc are inconsistent
19:09:17Araqyes and by design
19:09:36filwitbut why add the inconsistency when they dont need to be?
19:10:00Araqthey need to be.
19:10:19filwitwell i'm not talking about underlining structure
19:10:30filwiti understand procs and types are fundamentally different
19:10:43Araqfor instance, mutual recursive types need to be in the same type *section*
19:10:49filwit(although, something like "const Foo: type = ..." might have made sense)
19:11:11Araqso we need the notion of a section for that. ok ok there are other ways to deal with it
19:11:16filwitAraq: i see. so type's need a section, sure.
19:11:43Araqbut 'proc' section just leads to overly excessive indentation :P
19:11:57filwitAraq: but that was never really my point (although i still wish procs and types where consistent here, it's not a big deal at all)
19:12:33filwitmy original point (a long time ago), was only about the placement of '=' in the type def
19:12:58AraqLoneTech: so what do you proprose?
19:13:00filwitit just doesn't make sense to me, feels out of place, even if it's "clinically" correct
19:13:27OrionPKI agree that type name: inheritsFrom = ... would feel more consistent
19:13:31Araqand yet the '=' is consistent. TYPE foo = body; proc foo = body
19:13:44OrionPK= object just kind of floating at the end after the = feels weird
19:13:48filwitAraq: but those are aliases
19:14:20filwitAraq: no wait, sorry
19:14:38filwitAraq: wait.. why is that inconsistent? that's the syntax i'm asking for, lol
19:14:57filwitAraq: type <name> : <of> = <body>
19:15:00Araqno you ask for type foo : body
19:15:09filwitAraq: or shorthand: type <name> = <body>
19:15:13LoneTechAraq: not really sure yet. Initially I just saw gcc was the default CC, and the -dumpmachine option worked there, but clang doesn't seem to have a similar switch. OTOH, the darwin target already handles ucpu specially.
19:15:26OrionPKhe's asking for type foo : <baseType> = <body> (if I follow)
19:15:37filwitOrionPK: yes
19:15:50Araqthere is no meaningfuly "basetype" involved
19:15:52OrionPKwhich I wholeheartedly support
19:16:22Araqwell at this point I can only repeat myself
19:16:32Araqand yet the '=' is consistent. TYPE foo = body; PROC foo = body
19:16:58Araqyou don't seem to get what a "body" of a type definition means
19:17:02OrionPKtype foo = object \n _ _ body you mean :p
19:17:14filwitAraq: but i agree with that... i LIKE type Foo = body
19:17:18AraqOrionPK: yes. you don't get it
19:17:34filwitAraq: i just don't like: type Foo = object; body
19:17:59Araqbecause your notion of "body" is wrong :P
19:18:10filwitAraq: you don't do: proc foo() = int; return 0
19:18:10OrionPKto you, the 'object' is part of the body
19:18:12OrionPKright?
19:18:32OrionPKwhy is it at the top to the right of the = ?
19:18:40filwitAraq: 'object' looks and feels like a keyword or type in the syntax
19:18:41OrionPKnothing else allows you to do that
19:18:54*CarpNet joined #nimrod
19:18:57OrionPKit would give you invalid indentation with a proc
19:18:58filwitAraq: even if it's technically "part of the body" it doesn't _appear_ that way
19:20:02Araqbut it does as soon as you understand what can be done with TYPE
19:20:12filwitexample?
19:20:13Araqtype Foo = array [8, int]
19:20:20Araqtype Bar = distinct int
19:20:26filwittype Foo: array[8, int]
19:20:27Araqtype Baz = object
19:20:31filwittpye Bar: distinct int
19:20:43filwittype Baz: object
19:20:44LoneTechlooking at http://nimrod-code.org/manual.html#type-sections it appears to be that "object" itself opens up a subblock to declare the contents of the object, which makes sense as most objects have properties
19:20:47filwittype Boo = Bar
19:20:50gouris there some example of user-defined typeclass in nimrod (docs is 'to be written')?
19:21:07Araqgour: that feature is not finished
19:21:27Araqfilwit: so you DO want ':' instead of '=' for "consistency"
19:21:34Araqwhich makes no sense.
19:21:57filwitAraq: .. yes.. i thought that's what we where arguing about this whole time :P
19:22:13gourAraq: i see...it's quite important feature, imho
19:22:35*eigenlicht joined #nimrod
19:23:07Araqhi eigenlicht welcome
19:23:20filwitAraq: and I don't see any reason it doesn't make sense. even if you concept for these symbols needs to be re-adjusted slightly, it still makes sense
19:23:44filwiteven if **the
19:24:34Araqand yet the '=' is consistent. TYPE foo = body; PROC foo = body
19:24:46Araqyou don't seem to get what a "body" of a type definition means
19:24:57filwitAraq: ah, i see your point now
19:25:17Araqlol
19:25:21filwitAraq: and i was wrong. aliases should be: type Foo: Bar
19:25:48filwitso. type Foo = <body>
19:25:56filwittype Bar: Foo
19:26:01dom96No. Think of it this way: Foo = Bar means 'Foo equals Bar'.
19:26:13filwitk
19:26:33OrionPKFoo IsA Bar
19:26:35OrionPKnot =
19:26:39filwiti understand that, dom96
19:26:55filwitit's not about what the equal sign means
19:26:56Araqbbl
19:26:59filwitk
19:27:16OrionPKsame.. time to go beef
19:27:24filwitdom96: it's about what the ':' means, and how consistent the type/proc syntax is to learn
19:27:52*BitPuffin quit (Quit: WeeChat 0.4.2)
19:28:07*BitPuffin joined #nimrod
19:28:47LoneTechit's not just type and proc; there's var and let too. In those, : denotes types and = assigns values
19:29:10filwit^
19:29:22filwitexactly
19:29:55filwitvar x:<of-type> = <value>
19:30:04filwittype X:<of-type> = <body>
19:30:14filwitproc x:<of-type> = <body>
19:30:21filwitmakes so much more sense to me
19:30:52LoneTechexcept type blocks *make* types. what's the difference between your of-type and body then?
19:31:16filwitproc blocks *make* procs
19:31:28filwiti don't understand your question really
19:31:33EXetoCthe definition
19:33:29LoneTechfilwit: could you type out an example with your proposed type syntax where of-type and body are both written out rather than placeholders?
19:33:48filwitLoneTech: sure..
19:37:07filwithttps://gist.github.com/PhilipWitte/7270768
19:37:11EXetoCtypes are types and procs and procs
19:37:27EXetoCand then you have proc *types* which are defined in a type block
19:37:44filwitLoneTech: notice the 'vec' which is an alias of 'vec4'
19:40:02EXetoCthey are two different concepts so I don't know if the term inconsistency applies. either way, it's really minor so I don't care either way
19:41:56filwitLoneTech: here's another example: https://gist.github.com/PhilipWitte/7270834
19:42:48filwitLoneTech: the idea is that you can write "type Foo = ..." (shorthand), or "type Foo: object = ..." (explicit)
19:42:54EXetoCwill that tuple syntax be unambiguous when used inline?
19:43:12*sebcrozet joined #nimrod
19:43:26filwitExetoC: ??
19:43:54EXetoCproc x(): tuple x, y, z = ...
19:44:06filwitahh, right right
19:44:10EXetoCoops, missed a detail
19:44:29filwitnot that it matters
19:44:37EXetoCtuple tuple x, y, z ...
19:44:39filwittry doing that with objects right now...
19:44:57filwitproc x(): object[x, y:float] =
19:44:58filwitdoesn't work
19:45:26filwitso it depends on *which* inconsistency you want to tackle, lol
19:45:50EXetoCI don't know what purpose that serves though
19:45:53Araqyes. because 'object' introduces a nominal type so it doesn't make sense to be able to introduce anonymous object types
19:45:56filwitand while it's a "minor" detail, true, it's also one _everyone_ sees
19:46:04Araqnope
19:46:10Araqmany people don't see it
19:46:28filwitprogrammers don't write their own types?
19:46:38filwitor you mean that people just don't care?
19:46:48LoneTechI'm really unsure what to go for in that. partly using : feels like making the blocks of let, proc, object, tuple match up with type. Partly I'm wondering if the names bound by type should be distinct as not holding a value an expression could take.
19:46:49Araqno they don't see the "inconsistency"
19:46:57filwiti do
19:47:12filwitand if you really want to test that theory
19:47:17Araqtype foo: int # so foo HAS the type 'int'? NO, it doesn't
19:47:19filwitwe could ask a large audiance
19:47:32filwitaudience**
19:47:34Araqsure but then it should be unbiased
19:47:39Araqwhich means non-programmers
19:47:52filwitthat's debatable, but sure
19:48:03Araqbut ugh the average has no notion of formal languages
19:48:03filwitlol
19:48:13Araqso .. it's pointless
19:48:17LoneTecha large part of the programmer in me feels not changing it would break less
19:48:47filwitLoneTech: i'm more concerned with Nimrod design's longevity
19:49:11filwitcause of course, it's not like this is going to get written anyways..
19:49:21EXetoCAraq: would "tuple x, y, z: float, w: int" be unambiguous?
19:49:44AraqEXetoC: depends on what you mean exactly
19:49:45EXetoCalso, you'd need parens or something with nested tuples, right?
19:50:00Araqright
19:50:11filwitthat doesn't matter, uhg...
19:50:21filwitit doesn't matter that it's a "non-nomial" type
19:50:28filwitno one knows the difference!
19:50:30Araqyes it does
19:50:33Araqit does matter
19:50:43filwitno, you mis-understand my meaning
19:50:57Araqand not everybody is the avarage john dumbass script kiddie either
19:51:06EXetoCwhat matters to me is that it can be defined on the spot; and when you do that, then you obviously don't want any kind of encapsulation
19:51:10Araqmany people really can understand these things
19:51:13BitPuffinAraq: What do you think about putting nimrod on the openSUSE build service? It would give you repositories for debian, ubuntu, arch, fedora, opensuse etc etc
19:51:38filwitAraq: i can understand it just fine. that doesn't mean it's nice to use
19:51:41Araqand many also acknowledge the *history* of Nimrod's syntax
19:51:51filwitAraq: and i'm not a dumbass script-kiddie
19:52:06Araqwhich you completely and utterly miss since all you've ever used is C# :P
19:52:21Araqfilwit: sorry, I never implied that
19:52:27filwitAraq: i've used more than just C# (i do much more Javascript than C# anyways)
19:52:45AraqJS doesn't count as a programming language :P
19:53:00EXetoCwut
19:53:08filwitAraq: no, no. i know you weren't calling my a script-kiddie, i'm just using myself as an example of a non-script-kiddie to doesn't like it
19:53:08LoneTechit's a language, though why they chose to Javaify the syntax is a sad story
19:53:15filwitcalling me**
19:53:33Araqok good
19:53:49filwitAraq: an i agree, JS is a horrible, horrible language
19:54:05BitPuffinJS is the worst of all the large programming languages
19:54:31LoneTechreally? I'd say PHP is a competitor
19:54:36filwitAraq: whoever thought dynamic-typing + prototype inheritance was a good idea is either simple or played a horrible joke
19:54:49Araqfilwit: in any case, syntax is what matters the *least* in any PL. and there have been studies about it afaik
19:54:49EXetoCBitPuffin loses a point
19:54:59dom96It's funny that so many people think that JS is a crap language and yet node is the coolest kid on the block.
19:55:22BitPuffinLoneTech: forgot about that one :P
19:55:24filwitAraq: no, disagree completely. syntax matters the least when the language is already established
19:55:47BitPuffinLoneTech: PHP is so horrible that I have repressed it
19:55:55filwitAraq: Nimrod needs to give programmers a reason to switch from C#/Java/C++, and that's why details matter
19:56:03EXetoCI'm part of the minority then. bad syntax sucks
19:56:09BitPuffinEXetoC loses a friend
19:56:30filwitAraq: Nimrod can do all sorts of fancy things.. but not everyone is going to take the time to learn about them if they wont read past initial code examples
19:56:36BitPuffinEXetoC: kidding :P
19:56:56LoneTechbad syntax does suck; as does bad naming policies. that along with the state of the documentation is why I am currently interested in Nimrod over ATS
19:57:02filwitAraq: I'm not trying to claim the sky is falling. I'm just saying, details *DO* matter
19:57:07BitPuffinEXetoC, dom96: we should play something soon all three of urs
19:57:45Araqfilwit: ok, but anything that connects "syntax" and "Nimrod design's longevity" is misguided
19:58:05filwitAraq: point taken. i mis-spoke
19:58:13BitPuffinthe only naming convention of nimrod that I disagree with is that constants are written in code the same way as procs
19:58:15LoneTechI'd rather like to avoid O'Caml-style multiplicity of syntax, though
19:58:16dom96BitPuffin: totally. What do you have in mind?
19:58:17BitPuffinin the compiler at least
19:58:27BitPuffindom96: hmm not sure
19:58:36BitPuffindom96: what do you like?
19:59:00EXetoCI agree with Araq; the concepts are different enough that no consistencies exist
19:59:08EXetoCand I'm done with the bikeshedding
19:59:37dom96BitPuffin: I like pretty much everything.
19:59:39AraqLoneTech: ok, thanks for your interesting feedback.
20:00:04filwitEXetoC: i still maintain that "type <name> : <of-type> = <body" would be *the best solution*.. but i agree that it's not a huge dea
20:00:05BitPuffinbut it's not a biggie
20:00:12BitPuffinIt's a bikeshed thing
20:00:25LoneTechjust don't take it as law, it's just my still forming opinions
20:00:31BitPuffinI just like that I know that a VARIABLE is a constant if it looks like that
20:01:19LoneTechfilwit: but "object" or "tuple" aren't complete types; they each need that body
20:01:35filwitLoneTech: easy solutions to that
20:01:49Araqfilwit: the real solution is:
20:01:52Araqobject Foo =
20:01:55Araq a, b: int
20:02:11Araqskip the "type" completely and you have another consistent solution
20:02:11filwitLoneTech: and I think the fact that it makes the syntax "apparently more consistent to those who don't want to argue over the details" is a better thing
20:02:21filwityes Araq: i agree
20:02:30BitPuffindom96: Yeah I can enjoy more or less anything too :P
20:02:57filwitactually... i honestly hope you eventually do just that.. as it would free up "type" for var names
20:03:15Araqand I might provide that syntax if enough people want it but then we have the Perl-problem again
20:03:32filwitAraq: one very annoying thing about using "type" as a keyword, is that you have to use "typ" everywhere else lol
20:03:34Araq(too many ways to accompish the same)
20:03:47EXetoCor `type`, but I prefer typ
20:04:15Araqfilwit: a fair point but I like the 'type' sections so they'll stay
20:04:20LoneTechI think top-level object statement risks confusion with JS-like protype; it still defined a type, right?
20:04:26EXetoCeither syntax is fine, but keeping the old syntax would be bad, yes
20:04:59AraqLoneTech: yeah, it's still a type
20:05:15BitPuffinI think type is best
20:05:24BitPuffinputting everything under object is not good
20:05:36EXetoCfilwit: type is also an operator
20:05:45filwitBitPuffin: you would only put a single object under 'object'
20:06:04BitPuffinfilwit: oh
20:06:15BitPuffinfilwit: do you put enums under type right now? can't remember
20:06:21LoneTechbut for people from class/object languages, it isn't an object; it's a class, a type of object?
20:06:31filwitBitPuffin: yeah, you put enums under type
20:06:53LoneTechI like the type section myself
20:07:10filwitLoneTech: Araq said the type section wouldn't go away
20:07:23BitPuffinfilwit: Yeah so it's very consistent
20:07:26BitPuffineverything under type
20:07:28BitPuffineasy to grok
20:07:40*Dispatch joined #nimrod
20:07:44EXetoCenum under type but not object? can't see why
20:07:47filwitLoneTech: so if he does eventually add "object Foo of Bar = ..." it would be an extra thing
20:08:01BitPuffinEXetoC: right? that would just be confusing
20:08:10BitPuffinnewbies would come here and ask
20:08:28EXetoCI welcome logical explanations though, but nothing comes to mind
20:08:32BitPuffinwhy do I not need to put object in a type section when I have to put everything else under type
20:08:57BitPuffinand then we would say because people coming from class languages would find it more attractive
20:09:00BitPuffindoesn't make sense
20:09:09filwitAraq: also, i'm not a big fan of the "object Foo of Bar = ..." unless it's meant to completely replace the type syntax.
20:09:23filwitAraq: i would rather live with "type Foo = object"
20:09:23BitPuffinI think type sections makes things feel organized somehow
20:09:37Araqfilwit: excellent ok
20:09:47filwitAraq: it will probably be more confusing to new users if you add in something special which works completely differently
20:10:11Araqyup plue you want a 'class' macro for your stuff anyway I guess
20:10:15Araq*plus
20:10:23filwitAraq: i still think you should switch the "=" to ":" and remove the "of" and.. etc.. but i'm done trying to get my way :P
20:10:26BitPuffinAraq: weren't some people working on that?
20:10:52filwitAraq: exactly.. i'm probably just going to write macros to wrap all this stuff anyways (i have to to make interfaces properly)
20:11:03AraqBitPuffin: no they exist and work but nothing has been sanctionized officially
20:11:26BitPuffinthe only thing I have felt a bit unclean is that : is used both for type annotations and stuff like if statements
20:11:30BitPuffinbut that's nitpicky
20:12:00*sebcrozet left #nimrod ("Gone")
20:12:38Araqthat was a close call in the syntax design but I prefer 'if foo: bar else: baz' over 'if foo bar else baz'
20:12:41EXetoCBitPuffin: right, logical grouping. I sometimes have multiple adjacent type sections for that reason
20:13:01filwityeah, gotta agree with BitPuffin.. it's one of the reason i didn't want to do things in macros originally.. cause it would be inconsistent with how to define proc/types
20:13:21filwitwait...
20:13:43filwitAraq: could you make it so the ':' where completely optional (like they are with 'case' now) ?
20:13:57filwitAraq: not actually asking you too, btw
20:14:05filwitAraq: just want to know if it's possible
20:15:03AraqI don't know. using INDENT instead of ':' INDENT should work everywhere
20:15:32EXetoCand parens would be used when spanning multiple lines? or just an additional indent (deeper than the following block)
20:15:39BitPuffinAraq: what do you think about having a then keyword?
20:15:50filwitBitPuffin: NO!
20:15:53BitPuffinif foo then elif bar then else
20:16:00BitPuffinfilwit: :P
20:16:00filwitNO NO NO
20:16:03filwitlol
20:16:12EXetoCyou forgot 'end'
20:16:18BitPuffinEXetoC: yeah
20:16:47AraqBitPuffin: pascal uses 'while x do' and 'if x then' and I find it annoying when I have to transform an 'if' into a 'while' (which is not uncommon to do)
20:17:09BitPuffinThe thing that also feels like a clash is that with if you do : and then it executes what is in the body and with procs it has = and then what it executes
20:17:26BitPuffinAraq: yeah I can see why that would be annoying
20:18:17EXetoCshould we have a 'pair' iterator for typedesc[enum]
20:18:29filwitokay.. well anyways, on to real problems. my SDL2 OpenGL code is rendering but not displaying my GL Vertex Array
20:18:54EXetoCbeen there, about 18 times. I always get the offsets wrong
20:18:58filwitgotta figure out if it's cause the matrix is messed up, or cause SDL is doing something to the GL context...
20:19:24filwitExetoC: :D
20:20:44*mah joined #nimrod
20:20:55Araqhi mah welcome
20:21:11EXetoCand column-major coupled with the way arrays are declared does my head in
20:21:29Araqbbl
20:21:36filwitEXetoC: yeah, matrices suck sometimes
20:21:39filwitAraq: later
20:21:54EXetoCbut I'm gonna specialize in web scraping rather than game development so it doesn't matter
20:22:03EXetoCj/k
20:22:27filwitEXetoC: i'm copying code from another C# code-base, so it's not a lot of head-scratching over math right now
20:22:32filwitLOL
20:22:33EXetoCit's pretty easy once the actually interface does the right thing though
20:22:39EXetoCright
20:23:03filwitwell that's why we work with Quaternions and stuff more
20:23:05EXetoCgood thing you don't copy from GLM
20:23:10filwiti just take setting up perspective matrices
20:23:22filwityeah, i never really looked at GLM
20:23:29EXetoCyou need an IDE to navigate through that template maze
20:23:39filwitit's OpenGL focused, so doesn't really work with DirectX (which uses row-major matrices)
20:23:51EXetoCit supports both
20:23:59filwitahhh, didn't know that
20:24:22filwitI've always just written my own, that way i know what's going on
20:24:35filwitplus i'm not guessing about optimization
20:32:46filwitwoah.. dom96: 59 users?
20:32:56dom96record is 60 :P
20:33:06filwitdamn >:|
20:33:14filwitwell, not damn, that's a good thing
20:33:23filwitseems to be going up faster now though
20:33:37filwit40 was the record just a few weeks ago
20:34:03filwiti noticed your article on reddit got good reception
20:35:21filwitNimrod only really need a few more articles like that, and a "start application" (or two) and then Araq can find a Nimrod job and then the angles will sing and jesus will return
20:35:35filwitstar** application
20:37:24DispatchTo whomever wrote that article; thanks!
20:37:36Dispatchfirst time I heard from nimrod and I like it a lot
20:38:20shodan45oooh, new round of web framework benchmarks by that tech empower company is out: http://www.techempower.com/blog/2013/10/31/framework-benchmarks-round-7/
20:38:35shodan45and yes, nimrod is on there
20:38:51shodan45(although it didn't do very well...)
20:40:48filwitdidn't do horrible either
20:40:53filwitand Jester is new, right?
20:41:15shodan45who wrote jester again?
20:41:21filwitdom96
20:41:53shodan45dom96: explain yourself ;)
20:43:05*Endy quit (Ping timeout: 268 seconds)
20:43:27dom96shodan45: I didn't get a chance to optimise it.
20:44:10filwitdom96: seriously. how could you, a single young adult, not create a web-framework in a new language that completely obliterated the alternatives with their millions of dollars and IDE support
20:44:45shodan45dom96: tsk tsk tsk... making Araq look bad :P
20:44:53filwitlol
20:45:22shodan45dom96: seriously, I swear I'm going to try jester one day.... just not today :/
20:45:35dom96hah
20:45:42*shodan45 is stuck in php hell
20:46:00shodan45aka the worst language ever made
20:46:01*filwit is with shodan45 in php hell
20:46:16filwitalthough i mostly do JS and Unity/C# now
20:47:08shodan45I remember way way back in 1999 when I found php. It was soooo cool back then. o_o
20:50:54EXetoCdom96: aiming for #1 next time?
20:51:39dom96Maybe if I got a million dollars in funding :P
20:52:15EXetoCoh
20:53:09filwitone day, dom96, one day
20:54:39OrionPKAraq it'd be nice if the import foo.bar.nim would first check to see if "foo.bar.nim" existed before "foo/bar.nim"
20:55:41filwitOrionPK: i could see that leading to some hard-to-find bugs
20:55:57OrionPKimport foo.bar* rather, not foo.bar.nim
20:56:03filwitOrionPK: or maybe just some "why isn't this importing" bugs which are easy to find...
20:56:13OrionPKfilwit give me a scenario
20:56:58filwitOrionPK: no, your right, i can't think of any (thought something would happen that doesn't)
20:57:07filwitgtg though, bbl
20:57:09*filwit quit (Quit: Leaving)
20:58:08*Jackneill quit (Remote host closed the connection)
21:02:49BitPuffinEXetoC: by the way linagl is switching to row major
21:04:00MFlamergood, column major matricies are bastard anyway
21:04:27*freezerburnv quit (Quit: freezerburnv)
21:04:31BitPuffinMFlamer: yeah, the column major decision was ill-informed, as with opengl 3.x and up it doesn't really care anymore
21:04:56BitPuffineventually though I wanna make it a choice
21:05:09BitPuffinso that you can choose if it should be row major or column major
21:05:13BitPuffinbut row major will be the default
21:05:54MFlamerIt's just another thing to promote mistakes for me. I always think of matrices as a column of vectors etc.
21:05:57EXetoCI thought there were advantages with column-major as well
21:06:05EXetoCbut if OpenGL doesn't care anymore, then I don't either
21:06:47EXetoCso what are the differences now? no need to transpose?
21:07:26BitPuffinEXetoC: well first of all since it's programmable it matters in the sense in which way your shaders are written
21:07:48BitPuffinEXetoC: I believe it's a flag that you set when you update matrix data iirc
21:14:55gourdom96: i'm not familiar at all with sinatra, but curious with which python-powered framework could jester be compared?
21:15:11BitPuffingour: flask
21:15:30gourahh, ok. so, micro-wave :-)
21:15:35BitPuffinyeah :)
21:15:44BitPuffineven more so than flask/sinatra :P
21:15:53gourlol
21:16:16BitPuffinbut it's fun
21:16:18BitPuffintry it
21:17:16EXetoCMFlamer: some argue that column-major is more cache friendly. is that a minor point?
21:19:49MFlamerYeah, I've heard that. But, isnt most of the vector-matrix operations happening on the GPU anyway?
21:20:06BitPuffinEXetoC: I am not really sure that's true
21:23:42MFlamerwe keep a matrix stack and concateate it our scene graph, but the matrix gets used in the shaders on the gpu for most of the heavy work, but I'm not thinking about it much, so I could be easily missing something
21:25:22MFlamerjust talking in general, not about any specific scene graph
21:26:11BitPuffinI can't really think of any way that column major would be more cache friendly
21:27:29EXetoCis it a tree? some guys complained about the scene tree layout, so I decided to take a different approach in my own code. it seems to work pretty well
21:27:39BitPuffinhttp://stackoverflow.com/questions/16699247/what-is-cache-friendly-code
21:27:47EXetoCBitPuffin: I don't know. When accessing individual vectors?
21:29:55BitPuffinin his example it seems like row major is the cache friendly one even
21:30:18EXetoCI want 1GB of Really Fast Memory (tm)
21:30:22BitPuffinEXetoC: well that doesn't really matter
21:30:46BitPuffinEXetoC: for example with a col major matrix you'd put the w vector in the last column
21:30:56BitPuffinbut in the row major one you'd put it in the last row
21:31:29BitPuffinand when doing matrix matrix multiplication it will use the rows of one matrix and the columns of another
21:31:33BitPuffinone of them will be slower
21:32:10EXetoCI guess someone was wrong on the internets then
21:32:24BitPuffinEXetoC: it really depends on the operation
21:32:27BitPuffinas for the GPUs
21:32:47BitPuffinwell they might store them different to what the API wants you to believe anyway
21:33:38*io2 quit ()
21:38:51*freezerburnv joined #nimrod
21:41:19*Dispatch quit (Quit: Page closed)
21:48:11*kib2 joined #nimrod
21:51:44*kib2_ joined #nimrod
21:52:50*freezerburnv quit (Quit: freezerburnv)
21:53:33*kib2 quit (Ping timeout: 252 seconds)
21:53:38*kib2_ is now known as kib2
21:54:30kib2Hi, I'm trying to install Babel on a Windows but it fails with the following message "could not import: CRYPTO_set_mem_functions". Any idea ? Thanks.
21:55:49dom96You need the latest compiler from Github.
21:56:25dom96or just grab the latest openssl wrapper from github, that's really the only thing you need I think.
21:58:04kib2Thanks dom96, I'll try your solution.
22:08:15kib2It's even worse, I cannot produce any babel.exe now: http://pastebin.com/xkCMiY1U
22:10:50dom96hrm, perhaps you should just try bootstrapping the latest compiler from github.
22:11:30dom96Not sure what happened there, the errors are not in English.
22:12:22kib2Yep; I'm French, but there're not French either :)
22:14:31kib2In fact I just took the latest NimBuild windows version "5468d8f62bd6" then copied/pasted to the old Nimrod directory. Maybe I was a bit optimistic.
22:22:25*mah left #nimrod (#nimrod)
22:22:45gourvery nice article praising nimrod (if you're not already aware of it) by some known FreeBSD-er - http://ivoras.sharanet.org/blog/tree/2013-10-05.what-i-like-about-the-nimrod-programming-language.html
22:27:29MFlamerThat is a nice article. I had not read that one yet
22:28:00kib2Ok, it's working fine now with the x86 build.
22:32:05ScramblejamsSilly import question. I've been playing with the enet wrapper, and I notice that "import enet" seems to import a bunch of names into my file's scope. (Apologies if my nomenclature's unrigorous.) In Python, import foo means the only clutter added to my namespace is "foo," but it seems like that's not happening here, and I'm not sure by what mechanism that happens.
22:36:13ScramblejamsFor example, see this source file: https://github.com/fowlmouth/nimrod-enet/blob/master/examples/testserver.nim
22:36:26ScramblejamsLine 10 uses some constant EnetHostAny.
22:36:43ScramblejamsHow did "import enet" put that into this file's namespace?
22:37:46dom96Scramblejams: Every symbol from the module is imported.
22:37:53dom96well, every public symbol.
22:37:56Scramblejamsick
22:38:07*BitPuffin wonders how he got it working on freebsd
22:38:38gourBitPuffin: he's expert in freebsd
22:38:41ScramblejamsAny way to change that? It invokes tremendous feelings of insecurity in me.
22:38:44gour:-)
22:38:57ScramblejamsI have no idea what I'm cluttering my namespace with without going in and looking at all the public declarations.
22:40:49ScramblejamsAnd then there's two ways to get at the symbols, right? I can say EnetHostAny or enet.EnetHostAny.
22:42:42dom96Scramblejams: You can get around it, but it's not the nimrod way (tm) :P
22:43:41ScramblejamsSo what's the point of the second form, enet.EnetHostAny? Is it to get at non-public symbols?
22:43:48BitPuffingour: well he said that he hasn't even learned the language yet
22:44:00BitPuffingour: so he couldn't have fixed whatever bugs I encountered
22:44:16BitPuffinunless he is using the release version
22:44:38BitPuffinbecause I'm pretty sure they worked
22:44:42dom96Scramblejams: It's useful when you have to disambiguate.
22:45:14gourBitPuffin: maybe tried on non-fbsd, he works on university where there are plenty of machines/OS-es
22:45:18Scramblejamsdom96: Okay, so what happens when module A and mobule B both publicly declare symbol C? Do you get a compiler warning if you don't disambiguate?
22:45:37BitPuffingour: could be
22:45:51dom96Scramblejams: You get a compiler error.
22:46:00BitPuffingour: I think the release version works though. And most newcomers probably install that because that's what I guess is common sense in a way
22:46:18*gour graduated (many years ago) at the same university :-)
22:46:19BitPuffinScramblejams: you can also import foo as bar
22:46:30BitPuffinI mean from foo import bar as baz
22:46:54BitPuffingour: cool! which one?
22:47:34gourBitPuffin: http://www.fer.unizg.hr/en
22:47:37BitPuffindom96: I wonder how it would be to write a file system in nimred :P
22:47:41BitPuffinnimrEd
22:47:57dom96Nimred: The Halloween version of Nimrod.
22:47:59dom96:D
22:48:24BitPuffincroatia huh gour
22:48:26BitPuffin:D
22:48:33BitPuffindom96: nimredrum
22:48:39ScramblejamsSo my concern in this stems from my experience in Python, where this sort of behavior is considered nasty and unacceptable magic, because of the likelihood that you'll unwittingly reuse the symbol and end up with ugly bugs. With Nimrod's static type system, assuming the types aren't the same, the compiler saves you. What happens when the sames are the same?
22:48:51dom96BitPuffin: The Shining reference, nice.
22:48:58BitPuffindom96: I think so
22:49:04ScramblejamsErr, when the types are the same? Oops. :-)
22:49:25dom96BitPuffin: Funny, I only watched The Shining a couple days ago.
22:49:31BitPuffinwhen sames are the same the same one will same with the saming sames
22:49:51BitPuffindom96: right! I think you mentioned that
22:50:27BitPuffindom96: but you are only 18, did you dare watch to watch it? :O :O :O
22:50:30ScramblejamsIt's also unfortunate because you can have a perfectly working source file, and then you decide, hey I wanna add a little functionality, let me start by importing something, oops, just stepped on a bunch of my own symbols.
22:50:51ScramblejamsNow I've got to go and fix a bunch of code that was fine a minute ago.
22:51:06BitPuffinScramblejams: not really
22:51:21BitPuffinScramblejams: then you just name the imports or refer to them with full path
22:51:55ScramblejamsTrue, but naming imports is generally frowned upon for readability.
22:52:29BitPuffinScramblejams: I guess, so use full path
22:52:41BitPuffinScramblejams: there isn't really a way to solve this as far as I know
22:53:06ScramblejamsThere is: Just make "import foo" add only "foo" to the namespace and it's solved.
22:53:31dom96BitPuffin: what now? lol
22:53:33ScramblejamsOf course that'd break lots of code but the edits could be automated.
22:53:55BitPuffindom96: huh? :P
22:54:19BitPuffinScramblejams: I'm not sure that is a solution
22:55:15dom96Scramblejams: It's really not that big of a problem. Ambiguity errors happen rarely.
22:55:37dom96You would waste more time writing the module name everywhere than you would fixing the ambiguities :P
22:56:04*wlhlm left #nimrod ("weechat 0.4.2")
22:57:15BitPuffinScramblejams: the solution you described is a tool requiring solution, not a language based solution
22:59:18gour'night
22:59:29BitPuffinI think even think full paths make it a bit more readable
22:59:41*gour quit (Quit: WeeChat 0.4.1)
22:59:46BitPuffinbecause then you know what something comes from
23:00:10BitPuffinjust that it is kind of tedious to type the path all the time
23:00:32ScramblejamsBitPuffin: Well, sure! I'd love to do that. I'd prefer to do that. But that's not the nimrod way, so when I'm reading source with a bunch of imports at the top, now I'm guessing at where a symbol comes from.
23:00:42dom96Scramblejams: Also if you really want you can force yourself to write the module name everywhere :P
23:01:12Scramblejamsdom96: I'll probably do that so I know where it comes from, but as I said, others aren't doing that, and it makes reading source harder.
23:01:21BitPuffinScramblejams: well nimrod *can* do it that way
23:01:35ScramblejamsSure, but it's not enforced. The enet module isn't doing it that way.
23:01:38BitPuffinScramblejams: if you import A then you can do A.foo()
23:01:56BitPuffinScramblejams: there is barely a single language that enforces it
23:02:04BitPuffinand doing so wouldn't really be all too practical I think
23:02:11ScramblejamsWhat? Python enforces it.
23:02:11EXetoChopefully people will be explicit when it's not clear
23:02:18BitPuffinit does?
23:02:28BitPuffindidn't know
23:02:36ScramblejamsYes. You do "import foo", if you want something in foo, "foo.whatever" is the only way to get at it.
23:02:37BitPuffinwell actually now that you say it
23:02:43ScramblejamsLots of languages work that way.
23:02:57ScramblejamsThis kind of behavior I associated with "include", not "import."
23:03:01BitPuffinwell I still think they are definitely a minority
23:03:09ScramblejamsErlang works that way.
23:03:15BitPuffinScramblejams: well try looking at D for example
23:03:15ScramblejamsRuby too, IIRC.
23:03:21BitPuffinScramblejams: no not ruby
23:03:23ScramblejamsNobody uses D. :-D
23:03:37ScramblejamsRuby's full of monkeypatching though, so it wouldn't surprise me.
23:04:00EXetoCit's one or the other in python, yes
23:04:29EXetoCalso, you can import only a specific selection, so that might help
23:04:33ScramblejamsIn Python you can do "from foo import *", but (a) that's frowned upon, and (b) it requires the author to choose to clutter their own namespace.
23:04:45*ics joined #nimrod
23:05:06ScramblejamsI'd even argue that C and C++ don't work that way, because they use include, not import.
23:05:22ScramblejamsWith include, I expect a concatenation of source files.
23:05:23BitPuffinScramblejams: well the good thing about nimrod is that it doesn't force anything upon you
23:05:44ScramblejamsAgain, the problem is in reading source: I have no idea where symbols are coming from. A large source file could have a dozen imports at the top.
23:05:46BitPuffinScramblejams: nimrod has include too, and it works just like include it C
23:05:53ScramblejamsBitPuffin: Right, and that's fine.
23:06:00BitPuffinScramblejams: yes it is frustrating for me too I hear you
23:06:10BitPuffinso it's best to refer with full path
23:07:25BitPuffinScramblejams: I think it could be that you and me are just too damn focused on details, I tend to look up which module every proc comes from etc because otherwise I feel like my knowledge is incomplete. While in general you can probably get by with just inferring what happens from the proc names
23:07:29EXetoC"123\n456".splitLines. I wouldn't bother in that case, but it'd be nice to have a style guide that stresses these points
23:07:55BitPuffinEXetoC: indeed
23:08:41BitPuffinScramblejams: however in the case of python it can also be slightly confusing because the syntax is the same as when accessing object fields etc
23:08:43BitPuffinwell in nimrod too
23:08:51BitPuffinbut I mean since they force it
23:08:59ScramblejamsI guess I found it so strange because the nimrod syntax is explicitly influenced by Python, but the behavior of the import keyword is very very different.
23:09:04EXetoCthose should really be distinct sentences, but anyway
23:10:00ScramblejamsBitPuffin: I guess I look at it as a form of the uniform access principal -- dots for most things.
23:10:01EXetoCsyntax yes, but also syntax and other things from pascal and what have you
23:10:30ScramblejamsYeah, it's been 20 years since I played with Pascal, maybe I'd feel more at home if my P-skillz were more up to date.
23:10:32BitPuffinScramblejams: sure but there can be some confused as of where things are accessed from
23:10:47ScramblejamsBitPuffin: how so? Like, you're not sure whether you're hitting a module or an object?
23:11:00BitPuffinScramblejams: yeah
23:11:43EXetoC'/'?
23:11:51BitPuffinScramblejams: anyways Python takes the approach of there is one right way and you all should write the same style. Whereas nimrod is powerful for doing that, it doesn't stop you from doing anything, if your style is to refer to proc foo as f_O_o nimrod won't stop you
23:12:11ScramblejamsI can't remember ever having that problem, just because methods/functions almost never return a module. So if I'm hitting a module, I know because I imported it at the top of my source file. If I'm hitting an object I know because I either instantiated it or got it from a function.
23:12:23ScramblejamsBitPuffin: Yes, I think Perl lost that war. :-)
23:12:51BitPuffinScramblejams: perl is still alive and well :P
23:13:15BitPuffinbut perl has some other less pleasing things about its syntax that probably made it the lesser one
23:13:21ScramblejamsNobody in their right mind starts a big new project in it.
23:13:42BitPuffininterestingly enough ruby borrowed some of that and ended up being pretty
23:14:07ScramblejamsYes, I saw a post from Matz regretting how unnecessarily diverse he'd made the syntax. I guess they cleaned some of that up but I wasn't paying close attention.
23:14:16EXetoCsome modules inevitably grow very large though, but visual cue's powered by idetools could remedy this somewhat
23:14:32ScramblejamsIf I need an IDE to show me where I'm at and what's what, I'm already in trouble. :-)
23:14:49BitPuffinScramblejams: I agree
23:14:50ScramblejamsI hate using IDEs because their editors usually suck.
23:15:10ScramblejamsIf I can get an emacs mode for my language, I'm happy.
23:15:13BitPuffinScramblejams: good thing nobody will stop you from writing code where you do A.x
23:15:52ScramblejamsEXetoC: Forget a style guide, Nimrod needs its own answer to gofmt.
23:16:01*ics quit (Ping timeout: 245 seconds)
23:16:27ScramblejamsThat has silenced the format wars which would no doubt still be carrying on to this day in the Go community.
23:17:02EXetoCidetools is used in nimrod.vim too
23:17:06dom96Araq is/was thinking of making the compiler enforce a style :P
23:17:14ScramblejamsAnd then if Araq decides the right way is to spell out the full symbol path, problem solved.
23:17:20ScramblejamsYeah that'd be awesome actually.
23:17:30dom96I think many people would protest.
23:17:32BitPuffinI don't think anything should be enforced
23:17:39Scramblejamsyes, they would, and then they would continue to get their work done.
23:17:51BitPuffinScramblejams: without a compiler?
23:17:56BitPuffinoh
23:17:58BitPuffinmisread
23:18:11BitPuffinno but seriously
23:18:16BitPuffinnothing should be enforced
23:18:19BitPuffinthere is nothing worse
23:18:20ScramblejamsWe'd all disagree on certain points, but everyone's code would look the same, and that's hugely valuable.
23:18:45BitPuffinScramblejams: Well I think most nimrod code already looks the same
23:18:54BitPuffinpeople all name their types like TFooBar etc
23:19:02BitPuffinmore or less at least
23:19:15BitPuffinI try to stay faithful to the common conventions
23:19:27BitPuffineven if I don't like to write constantsLikeThis
23:19:30ScramblejamsWhen you've spent a lot of time reading horribly formatted code in diverse languages, the value of one style becomes clear. And that's how it is most of the time -- as a project gets bigger, people usually spend way more time reading code than writing.
23:19:39EXetoCI have nothing against pep8 for example, and I don't hear much hate towards it, so I guess people just get on with it
23:20:22*ics joined #nimrod
23:20:33EXetoCI don't think I'd mind, as long as things like "123\n456".splitLines wouldn't turn into strutils.splitLines("123\n456"), but I highly doubt that :>
23:20:34BitPuffinEXetoC: like most of us already do with nimrod even if we don't have a style guide
23:20:40ScramblejamsEXetoC: Yeah, the whole spaces/tabs thing is enough to keep the community busy. :-) Actually, Python's syntax hugely constrains style choices so there's less to argue about there.
23:20:50*freezerburnv joined #nimrod
23:21:11EXetoCyeah
23:21:53dom96Yeah, we have had at least 2 people already complaining about the enforcement of no tabs.
23:21:54ScramblejamsBitPuffin: Your syntax style is already enforced -- indentation, yo! Many people bitterly complained about that for years in Python.
23:22:13ScramblejamsPeople still bring it up as a reason to reject the language outright.
23:22:17dom96If we enforce style... it will get ugly :P
23:22:31ScramblejamsNo, the community is still small and Araq is the BDFL.
23:23:02BitPuffinScramblejams: yes but I don't really think that naming things and syntax is the same thing
23:23:23ScramblejamsOne day there will be (hopefully) many millions of lines of Nimrod out there. A consistent style is a gigantic benefit to a huge code base and programmers can't be expected to do it consistently, as history shows.
23:23:45BitPuffinyes
23:23:54BitPuffinand that's why you have style guides for your projects
23:24:10BitPuffineither pick the one that most of the community uses
23:24:12BitPuffinor your own
23:24:17ScramblejamsThere are style guides for C++. And PHP. And every other horribly mangled code you've ever looked at. :-)
23:24:30dom96There is a lot of disagreements on style though. If we enforce a certain style we may be cutting off a large percentage of the programmer population.
23:24:37BitPuffinyeah and those style guides work
23:24:51BitPuffinwithin their projects
23:25:00Scramblejamsdom96: Yes. The Go inventors were wise to impose gofmt right out of the gate.
23:25:41Scramblejamsdom96: But what Nimrod offers is pretty unique, actually. They can't just go somewhere else and get what they're getting from Nimrod. There would be arguments and some anger, but it would subside and people would move on.
23:27:05dom96Scramblejams: Yeah, but we have a harder time getting users than languages like Go which has Google behind it.
23:27:29dom96They can afford to do crazy things like not providing any exceptions.
23:27:42dom96Because people will use it only because Google uses it.
23:27:59BitPuffingood point
23:28:20dom96If we do that... people simply won't use it.
23:28:20ScramblejamsI say that significant whitespace isn't just some magic exception to The Right Way where style is an anything-goes mishmash of craziness. It's just a sliver of a greater principle.
23:29:07Scramblejamsdom96: (a) You don't know how many you'll lose and (b) a change like that only gets harder with time.
23:30:30dom96True. I can predict the numbers though, most programmers are pretty stubborn I think :P
23:33:27ScramblejamsAnother issue with this import thing is that it gives outsized power to library authors to screw with you. Some guy will have the bright idea to use public symbols named things like person, amount, x, y, z, r, i, j, etc. And then the library users will either have to spend mental energy choosing different variable names than they would have, or will change the names at import time, which is bad for readability.
23:34:33*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:34:43BitPuffinScramblejams: well then making them spend more time on all variables doesn't really solve the time thing. And if they do that you simply don't use their lib P:
23:34:46ScramblejamsOf course everybody lived with that in C and C++, but I'd thought we'd all decided that was a bad idea.
23:34:52dom96In that case you can use "from module import nil"
23:35:40Scramblejamsdom96: Nice tip, so I can still do module.foo and module.bar after that?
23:36:07dom96yes, you can only do that.
23:36:47ScramblejamsCool, that will help me from accidentally departing from my chosen style. As mentioned before, I'm still screwed when I'm reading everybody else's source. :-)
23:38:09freezerburnvEvening all
23:38:16EXetoCcomplain away
23:38:21*Varriount here
23:38:22BitPuffinwe should write plugins for different editors that let's you view source in your own style :P
23:38:36BitPuffinahoy Varriount
23:38:46*Varriount has been in bed all day
23:39:13EXetoCthat's it!
23:39:18EXetoCbrilliant
23:39:38dom96hi Varriount and freezerburnv
23:39:49freezerburnvHey dom96
23:42:04*kib2 quit (Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332])
23:57:37*freezerburnv quit (Quit: freezerburnv)